16 #ifndef QGSSCALEWIDGET_H 17 #define QGSSCALEWIDGET_H 20 #include <QToolButton> 34 Q_PROPERTY(
bool showCurrentScaleButton READ showCurrentScaleButton WRITE setShowCurrentScaleButton )
35 Q_PROPERTY(
bool scale READ scale WRITE setScale NOTIFY scaleChanged )
36 Q_PROPERTY(
bool minScale READ minScale WRITE setMinScale )
45 void setShowCurrentScaleButton(
bool showCurrentScaleButton );
46 bool showCurrentScaleButton() {
return mShowCurrentScaleButton;}
56 double scale()
const {
return mScaleComboBox->scale();}
58 void setScale(
double scale );
60 double minScale()
const {
return mScaleComboBox->minScale(); }
73 void setScaleFromCanvas();
76 void setMinScale(
double scale ) { mScaleComboBox->setMinScale( scale ); }
80 void scaleChanged(
double scale );
86 bool mShowCurrentScaleButton;
89 #endif // QGSSCALEWIDGET_H
Map canvas is a class for displaying all GIS data types on a canvas.
static double toDouble(const QString &scaleString, bool *ok=nullptr)
Helper function to convert a scale string to double.
static QString toString(double scale)
Helper function to convert a double to scale string.
A combobox which lets the user select map scale from predefined list and highlights nearest to curren...