Removed showContactDialog call from showMessageDialog.
[situare] / src / ui / meetpeoplepanel.h
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5        Jussi Laitinen - jussi.laitinen@ixonos.com
6
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.
10
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.
15
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,
19    USA.
20 */
21
22 #ifndef MEETPEOPLEPANEL_H
23 #define MEETPEOPLEPANEL_H
24
25 #include <QList>
26
27 #include "panelbase.h"
28
29 class QUrl;
30
31 class GeoCoordinate;
32 class ImageButton;
33 class PersonListView;
34 class User;
35
36 class MeetPeoplePanel : public PanelBase
37 {
38     Q_OBJECT
39
40 public:
41     /**
42     * @brief Unit test class
43     */
44     friend class TestMeetPeoplePanel;
45
46     /**
47      * @brief Default constructor
48      *
49      * @param parent
50      */
51     MeetPeoplePanel(QWidget *parent = 0);
52
53 /*******************************************************************************
54  * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
55  ******************************************************************************/
56 protected:
57     /**
58     * @brief Re-implemented from QWidget::hideEvent()
59     *
60     * Calls clear item selection to list.
61     *
62     * @param event
63     */
64     void hideEvent(QHideEvent *event);
65
66 private slots:
67     /**
68     * @brief Called when any of the panel tabs is closed
69     *
70     * Calls clear item selection to list.
71     */
72     void anyPanelClosed();
73
74     /**
75     * @brief Called when message button is pressed.
76     *
77     * Calls requestMessageDialog with message receiver's ID and name
78     */
79     void messageButtonPressed();
80
81     /**
82     * @brief Sets person's image.
83     *
84     * @param id image ID
85     * @param image image pixmap
86     */
87     void setImage(const QString &id, const QPixmap &image);
88
89     /**
90     * Shows selected friend in friend list
91     *
92     * Emits requestShowFriend with selected friend from list
93     */
94     void showFriend();
95
96     /**
97     * @brief Populates interesting people list view.
98     *
99     * @param interestingPeople list of interesting people
100     */
101     void populateInterestingPeopleListView(QList<User> &interestingPeople);
102
103 signals:
104     /**
105      * @brief Signal for person finding
106      *
107      * @param coordinates Target coordinate
108      */
109     void findPerson(const GeoCoordinate &coordinates);
110
111     /**
112     * @brief Requests interesting people from current map viewport.
113     *
114     * Interesting people is defined by people with same tags as user has.
115     */
116     void requestInterestingPeople();
117
118     /**
119     * @brief Requests interesting people search.
120     */
121     void requestInterestingPeopleSearch();
122
123     /**
124     * @brief Requests message dialog.
125     * @param receiver receiver facebook ID and name
126     */
127     void requestMessageDialog(const QPair<QString, QString> &receiver);
128
129     /**
130     * @brief Requests to show friend in friend list.
131     *
132     * @param userIDs list of friends' user IDs
133     */
134     void requestShowFriend(const QList<QString> &userIDs);
135
136 private:
137     PersonListView *m_personListView;   ///< Interesting people list view
138     ImageButton *m_chatButton;          ///< Chat button
139 };
140
141 #endif // MEETPEOPLEPANEL_H