Removed QtGui includes
[situare] / src / ui / friendlistpanel.h
1  /*
2     Situare - A location system for Facebook
3     Copyright (C) 2010  Ixonos Plc. Authors:
4
5         Kaj Wallin - kaj.wallin@ixonos.com
6         Henri Lampela - henri.lampela@ixonos.com
7
8     Situare is free software; you can redistribute it and/or
9     modify it under the terms of the GNU General Public License
10     version 2 as published by the Free Software Foundation.
11
12     Situare is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with Situare; if not, write to the Free Software
19     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
20     USA.
21  */
22
23 #ifndef FRIENDLISTPANEL_H
24 #define FRIENDLISTPANEL_H
25
26 #include "sidepanel.h"
27
28 class QLabel;
29 class QPushButton;
30 class QWidget;
31
32 class FriendListItemDelegate;
33 class GeoCoordinate;
34 class ListView;
35 class User;
36
37 /**
38 * @brief Class for sliding friends list panel
39 *
40 * @author Kaj Wallin - kaj.wallin (at) ixonos.com
41 * @class FriendListPanel friendlistpanel.h "ui/friendlistpanel.h"
42 */
43 class FriendListPanel : public SidePanel
44 {
45     Q_OBJECT
46
47 public:
48     /**
49     * @brief Default constructor
50     *
51     * @param parent
52     */
53     FriendListPanel(QWidget *parent = 0);
54
55 /*******************************************************************************
56  * MEMBER FUNCTIONS AND SLOTS
57  ******************************************************************************/
58 public slots:
59     /**
60     * @brief Slot to update friend item's image
61     *
62     * @param user Friend
63     */
64     void friendImageReady(User *user);
65
66     /**
67     * @brief Slot to refresh friends list
68     *
69     * @param friendList
70     */
71     void friendInfoReceived(QList<User *> &friendList);
72
73 private slots:
74     /**
75     * @brief Slot to clear friend list filter.
76     */
77     void clearFriendListFilter();
78
79     /**
80     * @brief Slot to show friends in list.
81     *
82     * Shows only friends that are on userIDs list.
83     * @param userIDs list of user ID's
84     */
85     void showFriendsInList(const QList<QString> &userIDs);
86
87 /*******************************************************************************
88  * SIGNALS
89  ******************************************************************************/
90 signals:
91     /**
92     * @brief Signal for friend finding.
93     *
94     * @param coordinates Target coordinate
95     */
96     void findFriend(const GeoCoordinate &coordinates);
97
98 /*******************************************************************************
99  * DATA MEMBERS
100  ******************************************************************************/
101 private:
102     QWidget *m_friendListHeaderWidget;  ///< Friend list header widget
103     QLabel *m_friendListLabel;          ///< Friend list label
104     QPushButton *m_clearFilterButton;   ///< Button to clear list filtering
105     ListView *m_friendListView;         ///< Friend list view
106     FriendListItemDelegate *m_friendListItemDelegate;   ///< Friend list item delegate
107 };
108
109 #endif // FRIENDLISTPANEL_H