608d8abcfb00f657a4289b93c8a6a97e063805cb
[situare] / src / ui / panelcontent.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         Pekka Nissinen - pekka.nissinen@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 PANELCONTENT_H
24 #define PANELCONTENT_H
25
26 #include <QWidget>
27
28 class QVBoxLayout;
29
30 class PanelBase;
31
32 /**
33  * @brief Base class for panel content area
34  *
35  * @author Kaj Wallin - kaj.wallin (at) ixonos.com
36  * @author Pekka Nissinen - pekka.nissinen@ixonos.com
37  *
38  * @class PanelContent panelcontent.h "ui/panelcontent.h"
39  */
40 class PanelContent : public QWidget
41 {
42     Q_OBJECT
43
44 public:
45     /**
46      * @brief Constructor
47      *
48      * @param parent
49      */
50     PanelContent(QWidget *parent = 0);
51
52 /*******************************************************************************
53  * MEMBER FUNCTIONS AND SLOTS
54  ******************************************************************************/
55 public:
56     /**
57      * @brief Sets the panel content widget
58      *
59      * @param widget Widget
60      */
61     void setContentWidget(QWidget *widget);
62
63 public slots:
64     /**
65      * @brief Slot to redraw the panel content area after window resize event
66      *
67      * @param size Size of the new window
68      */
69     void resizePanelContent(const QSize &size);
70
71 /*******************************************************************************
72  * DATA MEMBERS
73  *******************************************************************************/
74 private:
75     QVBoxLayout *m_panelVBox;   ///< Vertical layout inside the panel
76
77     PanelBase *m_panelBase;     ///< Widget for panel base
78 };
79
80 #endif // PANELCONTENT_H