16 #ifndef QGSSCALEWIDGET_H 17 #define QGSSCALEWIDGET_H 20 #include <QToolButton> 34 Q_PROPERTY(
bool showCurrentScaleButton READ showCurrentScaleButton WRITE setShowCurrentScaleButton )
43 void setShowCurrentScaleButton(
bool showCurrentScaleButton );
50 QString
scaleString() {
return mScaleComboBox->scaleString(); }
52 bool setScaleString( QString scaleTxt ) {
return mScaleComboBox->setScaleString( scaleTxt ); }
54 double scale() {
return mScaleComboBox->scale();}
56 void setScale(
double scale ) {
return mScaleComboBox->setScale( scale ); }
66 void updateScales(
const QStringList &scales = QStringList() ) {
return mScaleComboBox->updateScales( scales ); }
69 void setScaleFromCanvas();
77 QToolButton* mCurrentScaleButton;
79 bool mShowCurrentScaleButton;
82 #endif // QGSSCALEWIDGET_H
static double toDouble(QString scaleString, bool *ok=NULL)
Helper function to convert a scale string to double.
Map canvas is a class for displaying all GIS data types on a canvas.
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...