Finalised the classes for panels
[situare] / src / ui / userpanel.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
28 class PanelSliderBar;
29
30 /**
31 * @brief Class for sliding user information panel
32 *
33 * @author Kaj Wallin - kaj.wallin (at) ixonos.com
34 * @class UserInfoPanel userpanel.h "ui/userpanel.h"
35 */
36 class UserInfoPanel : public QWidget
37 {
38     Q_OBJECT
39
40 public:
41     /**
42     * @brief Default constructor
43     *
44     * @param parent
45     */
46     UserInfoPanel(QWidget *parent = 0);
47
48 /*******************************************************************************
49  * MEMBER FUNCTIONS AND SLOTS
50  ******************************************************************************/
51 public slots:
52     /**
53     * @brief Slot to redraw the panel after window resize event
54     *
55     * @param width Width of the window after resize
56     * @param height Height of the window after resize
57     */
58     void reDrawUserPanel(int width, int height);
59
60 /*******************************************************************************
61  * DATA MEMBERS
62  ******************************************************************************/
63 private:
64     QVBoxLayout *m_userPanelVBox; ///< Vertical layout inside the panel
65     PanelSliderBar *m_userPanelSlidingBar; ///< Widget for sidebar tab item
66
67     QStateMachine *m_userPanelStateMachine; ///< State machine for sliding the panel
68     QState *m_userPanelStateClosed; ///< State of the closed panel
69     QState *m_userPanelStateOpened; ///< State of the opened panel
70     QSignalTransition *m_userPanelTransitionClose; ///< Transition signal for closing the panel
71     QSignalTransition *m_userPanelTransitionOpen; ///< Transition signal for opening the panel
72 };
73 #endif // USERPANEL_H