Added info tab to view.
[situare] / src / ui / listviewscreen.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        Jukka Saastamoinen - jukka.saastamoinen@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
24 #ifndef LISTVIEWTAB_H
25 #define LISTVIEWTAB_H
26
27 #include <QtGui>
28 #include "infotab.h"
29 #include "pixmap.h"
30 #include "updatelocation/updatelocationdialog.h"
31
32 class FriendListView;
33 class User;
34
35 /**
36 * @brief List View class. Used for displaying List of friends
37 *
38 * @class ListViewScreen mainwindow.h "src/ui/mainwindow.h"
39 */
40 class ListViewScreen : public QWidget
41 {
42 Q_OBJECT
43 public:
44     /**
45     * @brief Constructor
46     *
47     * @param parent Parent
48     */
49     ListViewScreen(QWidget *parent = 0);
50     /**
51     * @brief Destructor
52     *
53     */
54     ~ListViewScreen();
55
56 /*******************************************************************************
57  * MEMBER FUNCTIONS AND SLOTS
58  ******************************************************************************/
59 public slots:
60     /**
61     * @brief Slot to capture returning user data from situareService
62     *
63     * @param user
64     */
65     void userDataReceived(User *user);
66
67     /**
68     * @brief Slot to capture returningn friends list data from situareService
69     *
70     * @param friendList
71     */
72     void friendInfoReceived(QList<User *> &friendList);
73
74 signals:
75     /**
76     * @brief Forwarding signal from InfoTab to parent to open update dialog
77     */
78     void launchUpdateDialog();
79     /**
80     * @brief  Forwarding signal from InfoTab to parent to update friends list data
81     */
82     void updateFriendsData();
83
84 /*******************************************************************************
85  * DATA MEMBERS
86  ******************************************************************************/
87 private:
88     InfoTab *m_personalInfo;    ///< Personal info tab
89     QHBoxLayout *m_vbox;    ///< Holds the graphics view
90     Pixmap *m_arrowbutton;    ///< Button which reveals/hides the info tab when pressed
91     Pixmap *m_leftSideBar; ///< Left side sidebar image
92     Pixmap *m_slidingLeftSideBar; ///< Left side sliding sidebar image
93     Pixmap *m_personalInfoBackGround; ///< Personal info background image
94     Pixmap *m_arrowLeft; ///< Right side arrow image
95     Pixmap *m_arrowRight; ///< Left side arrow image
96     QGraphicsProxyWidget *m_widgetProxy; ///< Embeds InfoTab to graphics view
97     QAbstractTransition *m_trans1;    ///< Animation transition from hidden state to visible
98     QAbstractTransition *m_trans2;    ///< Animation transition from visible to hidden
99     QPropertyAnimation *m_anim1;    ///< Animation for infotab from hidden to visible
100     QPropertyAnimation *m_anim2;    ///< Animation for arrowbutton from hidden to visible
101     QPropertyAnimation *m_anim3;    ///< Animation for infotab from visible to hidden
102     QPropertyAnimation *m_anim4;    ///< Animation for arrowbutton from visible to hidden
103     QPropertyAnimation *m_anim5;    ///< Animation
104     QPropertyAnimation *m_anim6;    ///< Animation for arrowbutton from visible to hidden
105     QPropertyAnimation *m_anim7;    ///< Animation?
106     QPropertyAnimation *m_anim8;    ///< Animation?
107     QPropertyAnimation *m_anim9;    ///< Animation?
108     QPropertyAnimation *m_anim10;    ///< Animation?
109     QPropertyAnimation *m_anim11;    ///< Animation?
110     QPropertyAnimation *m_anim12;    ///< Animation?
111     QPropertyAnimation *m_anim13;    ///< Animation?
112     QPropertyAnimation *m_anim14;    ///< Animation?
113     UpdateLocationDialog *m_locationDialog; ///< Message dialog
114
115     FriendListView *m_friendListView;   ///< Friend list view
116 };
117
118 #endif // LISTVIEWTAB_H