16 #ifndef QGSSCALEWIDGET_H
17 #define QGSSCALEWIDGET_H
20 #include <QToolButton>
37 Q_PROPERTY(
bool showCurrentScaleButton READ showCurrentScaleButton WRITE setShowCurrentScaleButton )
38 Q_PROPERTY(
bool scale READ scale WRITE setScale NOTIFY scaleChanged )
39 Q_PROPERTY(
bool minScale READ minScale WRITE setMinScale )
55 void setShowCurrentScaleButton(
bool showCurrentScaleButton );
61 bool showCurrentScaleButton() {
return mShowCurrentScaleButton;}
72 QString
scaleString()
const {
return mScaleComboBox->scaleString(); }
78 bool setScaleString(
const QString &
string ) {
return mScaleComboBox->setScaleString(
string ); }
85 double scale()
const {
return mScaleComboBox->scale(); }
102 double minScale()
const {
return mScaleComboBox->minScale(); }
128 void setAllowNull(
bool allowNull );
137 bool allowNull()
const;
146 void setScale(
double scale );
152 void updateScales(
const QStringList &scales = QStringList() ) { mScaleComboBox->updateScales( scales ); }
158 void setScaleFromCanvas();
166 void setMinScale(
double scale ) { mScaleComboBox->setMinScale( scale ); }
185 void scaleChanged(
double scale );
189 void menuAboutToShow();
193 QToolButton *mCurrentScaleButton =
nullptr;
195 QMenu *mMenu =
nullptr;
196 bool mShowCurrentScaleButton =
false;
199 #endif // QGSSCALEWIDGET_H