Reviewed new files
[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 ///< @todo Base class? Might be misleading comment and does not tell about what this class does
33 /**
34  * @brief Base class for panel content area
35  *
36  * @author Kaj Wallin - kaj.wallin (at) ixonos.com
37  * @author Pekka Nissinen - pekka.nissinen@ixonos.com
38  */
39 class PanelContent : public QWidget
40 {
41     Q_OBJECT
42
43 public:
44     /**
45      * @brief Constructor
46      *
47      * @param parent
48      */
49     PanelContent(QWidget *parent = 0);
50
51 /*******************************************************************************
52  * MEMBER FUNCTIONS AND SLOTS
53  ******************************************************************************/
54 public:
55     /**
56      * @brief Sets the panel content widget
57      *
58      * @param widget Widget
59      */
60     void setContentWidget(QWidget *widget);
61
62 public slots:
63     /**
64      * @brief Slot to redraw the panel content area after window resize event
65      *
66      * @param size Size of the new window
67      */
68     void resizePanelContent(const QSize &size);
69
70 /*******************************************************************************
71  * DATA MEMBERS
72  *******************************************************************************/
73 private:
74     QVBoxLayout *m_panelVBox;   ///< Vertical layout inside the panel
75
76     PanelBase *m_panelBase;     ///< Widget for panel base
77 };
78
79 #endif // PANELCONTENT_H