18#ifndef QGSSCALECOMBOBOX_H
19#define QGSSCALECOMBOBOX_H
60 QString scaleString()
const;
66 bool setScaleString(
const QString &
string );
110 static double toDouble(
const QString &
string,
bool *ok =
nullptr );
119 void setAllowNull(
bool allowNull );
128 bool allowNull()
const;
138 void setPredefinedScales(
const QVector<double> &scales );
169 void updateScales(
const QStringList &scales = QStringList() );
213 double mMinScale = 0.0;
214 bool mAllowNull =
false;
A combobox which lets the user select map scale from predefined list and highlights nearest to curren...
void updateScales(const QStringList &scales=QStringList())
Sets the list of predefined scales to show in the combobox.
QgsScaleComboBox(QWidget *parent=nullptr)
Constructor for QgsScaleComboBox.
void setScale(double scale)
Set the selected scale from a double.
void ratioModeChanged(QgsScaleComboBox::RatioMode mode)
Emitted when the ratio mode for the widget is changed.
void showPopup() override
void setNull()
Sets the combo box to the null value.
RatioMode
Scale ratio modes.
@ ForceUnitNumerator
Default mode, forces the scale numerator to be 1, e.g. "1:1000".
void setRatioMode(QgsScaleComboBox::RatioMode mode)
Sets the ratio mode for the scale.
void setMinScale(double scale)
Set the minimum allowed scale.
double minScale() const
Returns the minimum scale, or 0 if no minimum scale set.
void scaleChanged(double scale)
Emitted when user has finished editing/selecting a new scale.