Merge branch 'master' into indicator
[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         Katri Kaikkonen - katri.kaikkonen@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 USERPANEL_H
24 #define USERPANEL_H
25
26 #include <QtGui>
27
28 #include "../user/user.h"
29 #include "sidepanel.h"
30
31 class UserInfo;
32
33 /**
34 * @brief Class for sliding user information panel
35 *
36 * @author Kaj Wallin - kaj.wallin (at) ixonos.com
37 * @class UserInfoPanel
38 */
39 class UserInfoPanel : public SidePanel
40 {
41     Q_OBJECT
42
43 public:
44     /**
45     * @brief Default constructor
46     *
47     * @param parent
48     */
49     UserInfoPanel(QWidget *parent = 0);
50
51 /*******************************************************************************
52  * MEMBER FUNCTIONS AND SLOTS
53  ******************************************************************************/
54 public slots:
55     /**
56     * @brief Slot to capture returning user data from situareService
57     *
58     * @param user
59     */
60     void userDataReceived(User *user);
61
62 /*******************************************************************************
63  * SIGNALS
64  ******************************************************************************/
65 signals:
66     /**
67     * @brief Signal for finding user.
68     *
69     * @param coordinates user geo coordinates
70     */
71     void findUser(const GeoCoordinate &coordinates);
72
73     /**
74     * @brief Signal that used to inform user that his message/location update tp Situare server
75     *        was failed.
76     *        This signal is originally sended from UserInfo
77     * @param message message for notification
78     * @param modal true if modal notification otherwice false
79     */
80     void notificateUpdateFailing(const QString &message, bool modal);
81
82     /**
83     * @brief Signal for refreshing user data.
84     *
85     */
86     void refreshUserData();
87
88     /**
89     * @brief Signal for requesting reverseGeo from SituareEngine
90     *
91     */
92     void requestReverseGeo();
93
94     /**
95     * @brief Signals, when address data is ready
96     *
97     * @param address Street address
98     */
99     void reverseGeoReady(const QString &address);
100
101     /**
102     * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
103     *
104     * @param status Status message
105     * @param publish Publish on Facebook
106     */
107     void statusUpdate(const QString &status, const bool &publish);
108
109     /**
110     * @brief Signals when updateLocationDialog's data must be cleared
111     *
112     */
113     void clearUpdateLocationDialogData();
114 /*******************************************************************************
115  * DATA MEMBERS
116  ******************************************************************************/
117 private:
118     UserInfo *m_userInfo; ///< Instance of the user info view
119
120 };
121 #endif // USERPANEL_H