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_zoomInButton = new ImageButton(this, ":/res/images/zoom_in.png");
37 m_zoomOutButton = 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_zoomInButton, 0, 0);
45 m_panelLayout.addWidget(m_zoomOutButton, 1, 0);
50 void ZoomButtonPanel::disableZoomInButton()
52 qDebug() << __PRETTY_FUNCTION__;
54 m_zoomInButton->setMode(QIcon::Disabled);
57 void ZoomButtonPanel::disableZoomOutButton()
59 qDebug() << __PRETTY_FUNCTION__;
61 m_zoomOutButton->setMode(QIcon::Disabled);
64 void ZoomButtonPanel::resetButtons()
66 qDebug() << __PRETTY_FUNCTION__;
68 m_zoomInButton->setMode(QIcon::Normal);
69 m_zoomOutButton->setMode(QIcon::Normal);