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 NOTIFICATIONPANEL_H
23 #define NOTIFICATIONPANEL_H
25 #include "panelbase.h"
27 class ExtendedListItemDelegate;
29 class HeaderListItemDelegate;
32 class MessageListView;
35 * @brief Message panel
37 * @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
39 class MessagePanel : public PanelBase
45 * @brief Default constructor
49 MessagePanel(QWidget *parent = 0);
51 /*******************************************************************************
52 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
53 ******************************************************************************/
56 * @brief Re-implemented from QWidget::hideEvent()
58 * Calls clearListsSelections()
62 void hideEvent(QHideEvent *event);
64 /*******************************************************************************
65 * MEMBER FUNCTIONS AND SLOTS
66 ******************************************************************************/
69 * @brief Called when any of the panel tabs is closed
71 * Calls clear item selection to list.
73 void anyPanelClosed();
76 * @brief Called when message button is pressed.
78 * Calls requestMessageDialog with message receiver's ID and name
80 void messageButtonPressed();
83 * @brief Populates message list view.
85 * @param received list of received Message objects
86 * @param sent list of sent Message objects
88 void populateMessageListView(QList<Message> &received, QList<Message> &sent);
91 * @brief Removes message.
93 * Removes selected message from list view and emits removeMessage signal.
98 * @brief Sets person's image.
101 * @param image image pixmap
103 void setImage(const QString &id, const QPixmap &image);
107 * @brief Inits item delegates for message list view.
109 void initItemDelegates();
111 /*******************************************************************************
113 ******************************************************************************/
116 * @brief Signal for friend finding
118 * @param coordinates Target coordinate
120 void findFriend(const GeoCoordinate &coordinates);
123 * @brief Requests message dialog.
125 * @param receiver receiver facebook ID and name
127 void requestMessageDialog(const QPair<QString, QString> &receiver);
130 * @brief Requests messages sent to the user.
132 void requestMessages();
135 * @brief Requests message remove.
137 * @param id message ID
139 void requestRemoveMessage(const QString &id);
141 /*******************************************************************************
143 ******************************************************************************/
145 MessageListView *m_messageListView; ///< Message list view
147 ExtendedListItemDelegate *m_messageListItemDelegate; ///< Message list item delegate
148 HeaderListItemDelegate *m_headerListItemDelegate; ///< Header list item delegate
151 #endif // NOTIFICATIONPANEL_H