15 #include <QtAlgorithms>
17 #include <QStringListModel>
21 #include "ui_MarbleNavigator.h"
26 class MarbleNavigatorPrivate
31 Ui::MarbleNavigator uiWidget;
37 d( new MarbleNavigatorPrivate )
40 d->uiWidget.setupUi(
this );
42 d->m_minimumzoom = 950;
46 connect( d->uiWidget.goHomeButton, SIGNAL(clicked()),
48 connect( d->uiWidget.zoomSlider, SIGNAL(valueChanged(
int)),
50 connect( d->uiWidget.zoomInButton, SIGNAL(clicked()),
52 connect( d->uiWidget.zoomOutButton, SIGNAL(clicked()),
55 connect( d->uiWidget.moveLeftButton, SIGNAL(clicked()),
57 connect( d->uiWidget.moveRightButton, SIGNAL(clicked()),
59 connect( d->uiWidget.moveUpButton, SIGNAL(clicked()),
61 connect( d->uiWidget.moveDownButton, SIGNAL(clicked()),
73 return d->m_minimumzoom;
81 d->uiWidget.zoomSlider->setValue( zoom );
82 d->uiWidget.zoomSlider->setMinimum( d->m_minimumzoom );
91 if ( !d->uiWidget.zoomSlider->isHidden() ) {
92 d->uiWidget.zoomSlider->hide();
93 d->uiWidget.m_pSpacerFrame->setSizePolicy( QSizePolicy::Preferred,
94 QSizePolicy::Expanding );
97 if ( d->uiWidget.zoomSlider->isHidden() ) {
98 d->uiWidget.zoomSlider->show();
99 d->uiWidget.m_pSpacerFrame->setSizePolicy( QSizePolicy::Preferred,
100 QSizePolicy::Fixed );
107 #include "MarbleNavigator.moc"
void changeZoom(int zoom)
Sets the value of the slider.
int minimumZoom() const
Return the minimum zoom level set in the widget.
MarbleNavigator(QWidget *parent=0)
Construct a new MarbleNavigator.
void moveUp()
Signal emitted when the Move Up button has been pressed.
void zoomChanged(int zoom)
Signal emitted when the zoom slider has been moved.
void moveLeft()
Signal emitted when the Move Left button has been pressed.
void moveRight()
Signal emitted when the Move Right button has been pressed.
void zoomIn()
Signal emitted when the Zoom In button has been pressed.
void zoomOut()
Signal emitted when the Zoom Out button has been pressed.
This file contains the header for MarbleNavigator.
void resizeEvent(QResizeEvent *)
Reimplementation of the resizeEvent() of the widget.
void goHome()
Signal emitted when the Home button has been pressed.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void moveDown()
Signal emitted when the Move Down button has been pressed.