A combobox which lets the user select map scale from predefined list and highlights nearest to current scale value.
More...
#include <qgsscalecombobox.h>
Public Slots |
void | updateScales (const QStringList &scales=QStringList()) |
Signals |
void | scaleChanged () |
| Signal is emitted when user has finished editing/selecting a new scale.
|
Public Member Functions |
| QgsScaleComboBox (QWidget *parent=0) |
virtual | ~QgsScaleComboBox () |
double | scale () |
| Function to read the selected scale as double.
|
QString | scaleString () |
| Function to read the selected scale as text.
|
void | setScale (double scale) |
| Function to set the selected scale from double.
|
bool | setScaleString (QString scaleTxt) |
| Function to set the selected scale from text.
|
Static Public Member Functions |
static double | toDouble (QString scaleString, bool *ok=NULL) |
| Helper function to convert a scale string to double.
|
static QString | toString (double scale) |
| Helper function to convert a double to scale string.
|
Protected Member Functions |
void | showPopup () override |
Detailed Description
A combobox which lets the user select map scale from predefined list and highlights nearest to current scale value.
Definition at line 27 of file qgsscalecombobox.h.
Constructor & Destructor Documentation
QgsScaleComboBox::QgsScaleComboBox |
( |
QWidget * |
parent = 0 | ) |
|
QgsScaleComboBox::~QgsScaleComboBox |
( |
| ) |
|
|
virtual |
Member Function Documentation
double QgsScaleComboBox::scale |
( |
| ) |
|
void QgsScaleComboBox::scaleChanged |
( |
| ) |
|
|
signal |
Signal is emitted when user has finished editing/selecting a new scale.
QString QgsScaleComboBox::scaleString |
( |
| ) |
|
void QgsScaleComboBox::setScale |
( |
double |
scale | ) |
|
bool QgsScaleComboBox::setScaleString |
( |
QString |
scaleTxt | ) |
|
void QgsScaleComboBox::showPopup |
( |
| ) |
|
|
overrideprotected |
double QgsScaleComboBox::toDouble |
( |
QString |
scaleString, |
|
|
bool * |
ok = NULL |
|
) |
| |
|
static |
QString QgsScaleComboBox::toString |
( |
double |
scale | ) |
|
|
static |
void QgsScaleComboBox::updateScales |
( |
const QStringList & |
scales = QStringList() | ) |
|
|
slot |
The documentation for this class was generated from the following files: