df388111cad554ecbf7019f9e498af945721e276
[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         Pekka Nissinen - pekka.nissinen@ixonos.com
8
9     Situare is free software; you can redistribute it and/or
10     modify it under the terms of the GNU General Public License
11     version 2 as published by the Free Software Foundation.
12
13     Situare is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU General Public License for more details.
17
18     You should have received a copy of the GNU General Public License
19     along with Situare; if not, write to the Free Software
20     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
21     USA.
22  */
23
24 #ifndef USERPANEL_H
25 #define USERPANEL_H
26
27 #include <QWidget>
28
29 #include "user/user.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  * @author Katri Kaikkonen - katri.kaikkonen (at) ixonos.com
38  * @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
39  */
40 class UserInfoPanel : public QWidget
41 {
42     Q_OBJECT
43
44 public:
45     /**
46      * @brief Default constructor
47      *
48      * @param parent
49      */
50     UserInfoPanel(QWidget *parent = 0);
51
52 /*******************************************************************************
53  * MEMBER FUNCTIONS AND SLOTS
54  ******************************************************************************/
55 public slots:
56     /**
57      * @brief Slot to capture returning user data from situareService
58      *
59      * @param user
60      */
61     void userDataReceived(User *user);
62
63 /*******************************************************************************
64  * SIGNALS
65  ******************************************************************************/
66 signals:
67     /**
68      * @brief Signal for finding user.
69      *
70      * @param coordinates user geo coordinates
71      */
72     void findUser(const GeoCoordinate &coordinates);
73
74     /**
75      * @brief Signal that used to inform user that his message/location update tp Situare server
76      *        was failed.
77      *        This signal is originally sended from UserInfo
78      *
79      * @param message message for notification
80      * @param modal true if modal notification otherwice false
81      */
82     void notificateUpdateFailing(const QString &message, bool modal);
83
84     /**
85      * @brief Signal for refreshing user data.
86      */
87     void refreshUserData();
88
89     /**
90      * @brief Signal for requesting reverseGeo from SituareEngine
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     void clearUpdateLocationDialogData();
113
114 /*******************************************************************************
115  * DATA MEMBERS
116  ******************************************************************************/
117 private:
118     UserInfo *m_userInfo; ///< Instance of the user info view
119 };
120 #endif // USERPANEL_H