2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Jussi Laitinen - jussi.laitinen@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 Situare is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Situare; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22 #ifndef MEETPEOPLEPANEL_H
23 #define MEETPEOPLEPANEL_H
27 #include "panelbase.h"
31 class ExtendedListItemDelegate;
33 class HeaderListItemDelegate;
38 class MeetPeoplePanel : public PanelBase
44 * @brief Unit test class
46 friend class TestMeetPeoplePanel;
49 * @brief Default constructor
53 MeetPeoplePanel(QWidget *parent = 0);
55 /*******************************************************************************
56 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
57 ******************************************************************************/
60 * @brief Re-implemented from QWidget::hideEvent()
62 * Calls clear item selection to list.
66 void hideEvent(QHideEvent *event);
70 * @brief Called when any of the panel tabs is closed
72 * Calls clear item selection to list.
74 void anyPanelClosed();
77 * @brief Handles list item selection.
79 * Sets item releated buttons enabled
81 void listItemSelectionHandler();
84 * @brief Called when message button is pressed.
86 * Calls requestMessageDialog with message receiver's ID and name
88 void messageButtonPressed();
91 * @brief Sets person's image.
94 * @param image image pixmap
96 void setImage(const QString &id, const QPixmap &image);
99 * Shows selected friend in friend list
101 * Emits requestShowFriend with selected friend from list
106 * @brief Populates interesting people list view.
108 * @param friends list of friends
109 * @param others list of other people
111 void populateInterestingPeopleListView(QList<User> &friends, QList<User> &others);
115 * @brief Inits item delegates for message list view.
117 void initItemDelegates();
121 * @brief Signal for person finding
123 * @param coordinates Target coordinate
125 void findPerson(const GeoCoordinate &coordinates);
128 * @brief Requests interesting people from current map viewport.
130 * Interesting people is defined by people with same tags as user has.
132 void requestInterestingPeople();
135 * @brief Requests interesting people search.
137 void requestInterestingPeopleSearch();
140 * @brief Requests message dialog.
142 * @param receiver receiver facebook ID and name
144 void requestMessageDialog(const QPair<QString, QString> &receiver);
147 * @brief Requests to show friend in friend list.
149 * @param userIDs list of friends' user IDs
151 void requestShowFriend(const QList<QString> &userIDs);
154 ExtendedListItemDelegate *m_personListItemDelegate; ///< Person list item delegate
155 HeaderListItemDelegate *m_headerListItemDelegate; ///< Header list item delegate
156 ImageButton *m_chatButton; ///< Chat button
157 ImageButton *m_friendListButton; ///< Friend list button
158 PersonListView *m_personListView; ///< Interesting people list view
161 #endif // MEETPEOPLEPANEL_H