2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Pekka Nissinen - pekka.nissinen@ixonos.com
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.
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.
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,
25 #include "zoombuttonpanel.h"
26 #include "panelcommon.h"
28 ZoomButtonPanel::ZoomButtonPanel(QWidget *parent, int x, int y)
34 qDebug() << __PRETTY_FUNCTION__;
36 m_zoomInBtn = new ImageButton(this, ":/res/images/zoom_in.png");
37 m_zoomOutBtn = new ImageButton(this, ":/res/images/zoom_out.png");
39 m_panelLayout.setMargin(0);
40 m_panelLayout.setSpacing(0);
41 m_panelLayout.setVerticalSpacing(ZOOM_BUTTON_PANEL_BUTTON_SPACING);
42 m_panelLayout.setSizeConstraint(QLayout::SetFixedSize);
44 m_panelLayout.addWidget(m_zoomInBtn, 0, 0);
45 m_panelLayout.addWidget(m_zoomOutBtn, 1, 0);
50 ZoomButtonPanel::~ZoomButtonPanel()
52 qDebug() << __PRETTY_FUNCTION__;
60 void ZoomButtonPanel ::paintEvent(QPaintEvent *event)
62 qDebug() << __PRETTY_FUNCTION__;
66 QPainter painter(this);
69 painter.setPen(Qt::red);
70 painter.drawRect(this->rect().x(), this->rect().y(),
71 this->rect().width() - 1, this->rect().height() - 1);