Added StubBase class and SituareService class test.
[situare] / src / ui / notificationpanel.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 NOTIFICATIONPANEL_H
23 #define NOTIFICATIONPANEL_H
24
25 #include "panelbase.h"
26
27 class ExtendedListItemDelegate;
28 class ImageButton;
29 class Notification;
30 class NotificationListView;
31
32 /**
33  * @brief Notification panel
34  *
35  * @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
36  * @author Sami Rämö - sami.ramo (at) ixonos.com
37  */
38 class NotificationPanel : public PanelBase
39 {
40     Q_OBJECT
41
42 public:
43     /**
44      * @brief Default constructor
45      *
46      * @param parent
47      */
48     NotificationPanel(QWidget *parent = 0);
49
50 /*******************************************************************************
51  * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
52  ******************************************************************************/
53 protected:
54     /**
55     * @brief Re-implemented from QWidget::hideEvent()
56     *
57     * Calls clearListsSelections()
58     *
59     * @param event
60     */
61     void hideEvent(QHideEvent *event);
62
63 /*******************************************************************************
64  * MEMBER FUNCTIONS AND SLOTS
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 Populates nofification list view.
76     *
77     * @param locations list of Notification objects
78     */
79     void populateNotificationListView(QList<Notification> &notifications);
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  * SIGNALS
91  ******************************************************************************/
92 signals:
93     /**
94     * @brief Requests notifications sent to the user.
95     */
96     void requestNotifications();
97
98 /*******************************************************************************
99  * DATA MEMBERS
100  ******************************************************************************/
101 private:
102     NotificationListView *m_notificationListView;    ///< Notification list view
103 };
104
105 #endif // NOTIFICATIONPANEL_H