A combobox which lets the user select map scale from predefined list and highlights nearest to current scale value.
More...
#include <qgsscalewidget.h>
Signals |
void | scaleChanged () |
| Signal is emitted when user has finished editing/selecting a new scale.
|
Static Public Member Functions |
static double | toDouble (QString scaleString, bool *ok=0) |
| Helper function to convert a scale string to double.
|
static QString | toString (double scale) |
| Helper function to convert a double to scale string.
|
Detailed Description
A combobox which lets the user select map scale from predefined list and highlights nearest to current scale value.
Definition at line 31 of file qgsscalewidget.h.
Constructor & Destructor Documentation
QgsScaleWidget::QgsScaleWidget |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
QgsScaleWidget::~QgsScaleWidget |
( |
| ) |
|
|
virtual |
Member Function Documentation
double QgsScaleWidget::scale |
( |
| ) |
|
|
inline |
Function to read the selected scale as double.
Definition at line 54 of file qgsscalewidget.h.
void QgsScaleWidget::scaleChanged |
( |
| ) |
|
|
signal |
Signal is emitted when user has finished editing/selecting a new scale.
QString QgsScaleWidget::scaleString |
( |
| ) |
|
|
inline |
Function to read the selected scale as text.
Definition at line 50 of file qgsscalewidget.h.
set the map canvas associated to the current button
Definition at line 54 of file qgsscalewidget.cpp.
void QgsScaleWidget::setScale |
( |
double |
scale | ) |
|
|
inline |
Function to set the selected scale from double.
Definition at line 56 of file qgsscalewidget.h.
void QgsScaleWidget::setScaleFromCanvas |
( |
| ) |
|
|
slot |
bool QgsScaleWidget::setScaleString |
( |
QString |
scaleTxt | ) |
|
|
inline |
Function to set the selected scale from text.
Definition at line 52 of file qgsscalewidget.h.
void QgsScaleWidget::setShowCurrentScaleButton |
( |
bool |
showCurrentScaleButton | ) |
|
shows a button to set the scale to the current scale of the map canvas next to the combobox
- Note
- the map canvas must be defined to show the button
Definition at line 48 of file qgsscalewidget.cpp.
bool QgsScaleWidget::showCurrentScaleButton |
( |
| ) |
|
|
inline |
static double QgsScaleWidget::toDouble |
( |
QString |
scaleString, |
|
|
bool * |
ok = 0 |
|
) |
| |
|
inlinestatic |
Helper function to convert a scale string to double.
Definition at line 63 of file qgsscalewidget.h.
static QString QgsScaleWidget::toString |
( |
double |
scale | ) |
|
|
inlinestatic |
Helper function to convert a double to scale string.
Definition at line 61 of file qgsscalewidget.h.
void QgsScaleWidget::updateScales |
( |
const QStringList & |
scales = QStringList() | ) |
|
|
inlineslot |
Property Documentation
bool QgsScaleWidget::showCurrentScaleButton |
|
readwrite |
The documentation for this class was generated from the following files: