2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Kaj Wallin - kaj.wallin@ixonos.com
6 Pekka Nissinen - pekka.nissinen@ixonos.com
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.
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.
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,
23 #include <QAbstractState>
25 #include <QVBoxLayout>
27 #include "panelbase.h"
28 #include "panelcommon.h"
30 #include "panelcontent.h"
32 PanelContent::PanelContent(QWidget *parent)
35 qDebug() << __PRETTY_FUNCTION__;
37 resize(PANEL_WIDTH, PANEL_HEIGHT);
39 m_panelVBox = new QVBoxLayout(this);
40 m_panelVBox->setMargin(0);
41 m_panelVBox->setSpacing(0);
43 m_panelBase = new PanelBase(this);
44 m_panelBase->setLayout(m_panelVBox);
45 m_panelBase->resize(this->size());
48 void PanelContent::setContentWidget(QWidget *widget)
50 qDebug() << __PRETTY_FUNCTION__;
52 m_panelVBox->addWidget(widget);
55 void PanelContent::resizePanelContent(const QSize &size)
57 qDebug() << __PRETTY_FUNCTION__;
59 resize(PANEL_WIDTH, size.height() - PANEL_TOP_PADDING - PANEL_BOTTOM_PADDING);
61 m_panelBase->resize(this->size());