basic functionality of error handling ready
[situare] / src / ui / userinfopanel.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
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
23 #ifndef USERPANEL_H
24 #define USERPANEL_H
25
26 #include <QtGui>
27 #include "../user/user.h"
28 #include "sidepanel.h"
29
30 class UserInfo;
31
32 /**
33 * @brief Class for sliding user information panel
34 *
35 * @author Kaj Wallin - kaj.wallin (at) ixonos.com
36 * @class UserInfoPanel
37 */
38 class UserInfoPanel : public SidePanel
39 {
40     Q_OBJECT
41
42 public:
43     /**
44     * @brief Default constructor
45     *
46     * @param parent
47     */
48     UserInfoPanel(QWidget *parent = 0);
49
50 /*******************************************************************************
51  * MEMBER FUNCTIONS AND SLOTS
52  ******************************************************************************/
53 public slots:
54     /**
55     * @brief Slot to capture returning user data from situareService
56     *
57     * @param user
58     */
59     void userDataReceived(User *user);
60
61 /*******************************************************************************
62  * SIGNALS
63  ******************************************************************************/
64 signals:
65     /**
66     * @brief Signal for finding user.
67     *
68     * @param coordinates user geo coordinates
69     */
70     void findUser(const QPointF &coordinates);
71
72     /**
73     * @brief Signal for refreshing user data.
74     *
75     */
76     void refreshUserData();
77
78     /**
79     * @brief Signal for requesting reverseGeo from SituareEngine
80     *
81     */
82     void requestReverseGeo();
83
84     /**
85     * @brief Signals, when address data is ready
86     *
87     * @param address Street address
88     */
89     void reverseGeoReady(const QString &address);
90
91     /**
92     * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
93     *
94     * @param status Status message
95     * @param publish Publish on Facebook
96     */
97     void statusUpdate(const QString &status, const bool &publish);
98     void messageUpdatedToSituare();
99     void messageSendingFailed(const QString &error);
100     void notificateUpdateFailing(const QString &message);
101
102 /*******************************************************************************
103  * DATA MEMBERS
104  ******************************************************************************/
105 private:
106     UserInfo *m_userInfo; ///< Instance of the user info view
107
108 };
109 #endif // USERPANEL_H