Marble
10 #include <QtAlgorithms>
12 #include "MarbleDebug.h"
14 #include "ui_MarbleNavigator.h"
19 class MarbleNavigatorPrivate
24 Ui::MarbleNavigator uiWidget;
30 d( new MarbleNavigatorPrivate )
33 d->uiWidget.setupUi(
this );
35 d->m_minimumzoom = 950;
39 connect( d->uiWidget.goHomeButton, SIGNAL(clicked()),
41 connect( d->uiWidget.zoomSlider, SIGNAL(valueChanged(
int)),
43 connect( d->uiWidget.zoomInButton, SIGNAL(clicked()),
45 connect( d->uiWidget.zoomOutButton, SIGNAL(clicked()),
48 connect( d->uiWidget.moveLeftButton, SIGNAL(clicked()),
50 connect( d->uiWidget.moveRightButton, SIGNAL(clicked()),
52 connect( d->uiWidget.moveUpButton, SIGNAL(clicked()),
54 connect( d->uiWidget.moveDownButton, SIGNAL(clicked()),
58 MarbleNavigator::~MarbleNavigator()
66 return d->m_minimumzoom;
74 d->uiWidget.zoomSlider->setValue( zoom );
75 d->uiWidget.zoomSlider->setMinimum( d->m_minimumzoom );
84 if ( !d->uiWidget.zoomSlider->isHidden() ) {
85 d->uiWidget.zoomSlider->hide();
90 if ( d->uiWidget.zoomSlider->isHidden() ) {
91 d->uiWidget.zoomSlider->show();
100 #include "moc_MarbleNavigator.cpp"
int minimumZoom() const
Return the minimum zoom level set in the widget.
void changeZoom(int zoom)
Sets the value of the slider.
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void zoomChanged(int zoom)
Signal emitted when the zoom slider has been moved.
void zoomIn()
Signal emitted when the Zoom In button has been pressed.
void zoomOut()
Signal emitted when the Zoom Out button has been pressed.
Binds a QML item to a specific geodetic location in screen coordinates.
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 resizeEvent(QResizeEvent *) override
Reimplementation of the resizeEvent() of the widget.
MarbleNavigator(QWidget *parent=nullptr)
Construct a new MarbleNavigator.
void moveUp()
Signal emitted when the Move Up button has been pressed.
void goHome()
Signal emitted when the Home button has been pressed.
void moveDown()
Signal emitted when the Move Down button has been pressed.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:09 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.