16 #include <QHBoxLayout> 25 , mShowCurrentScaleButton( false )
27 QHBoxLayout* layout =
new QHBoxLayout(
this );
28 layout->setContentsMargins( 0, 0, 0, 0 );
29 layout->setSpacing( 2 );
32 layout->addWidget( mScaleComboBox );
34 mCurrentScaleButton =
new QToolButton(
this );
36 layout->addWidget( mCurrentScaleButton );
37 mCurrentScaleButton->hide();
40 connect( mCurrentScaleButton, SIGNAL( clicked() ),
this, SLOT(
setScaleFromCanvas() ) );
51 mCurrentScaleButton->setVisible( mShowCurrentScaleButton && mCanvas );
57 mCurrentScaleButton->setVisible( mShowCurrentScaleButton && mCanvas );
static QIcon getThemeIcon(const QString &theName)
Helper to get a theme icon.
Map canvas is a class for displaying all GIS data types on a canvas.
double scale()
Get the last reported scale of the canvas.
A combobox which lets the user select map scale from predefined list and highlights nearest to curren...