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,
26 #include "panelcommon.h"
28 #include "panelcontentstack.h"
30 PanelContentStack::PanelContentStack(QWidget *parent)
31 : QStackedWidget(parent)
33 qDebug() << __PRETTY_FUNCTION__;
35 resize(PANEL_WIDTH, PANEL_HEIGHT);
37 m_menuDropShadowTile.load(":res/images/menu_bar_drop_shadow.png");
39 QPalette pal = palette();
40 pal.setColor(QPalette::Background, QColor(0, 0, 0, 128));
42 setAutoFillBackground(true);
45 void PanelContentStack::paintEvent(QPaintEvent *event)
47 qDebug() << __PRETTY_FUNCTION__;
51 QPainter painter(this);
53 QRect shadowRect = QRect(0, 0, this->rect().width(), m_menuDropShadowTile.height());
54 painter.drawTiledPixmap(shadowRect, m_menuDropShadowTile);
57 void PanelContentStack::resizePanelContentStack(const QSize &size)
59 qDebug() << __PRETTY_FUNCTION__;
61 resize(PANEL_WIDTH, size.height() - PANEL_TOP_PADDING - PANEL_BOTTOM_PADDING);