QGIS API Documentation
2.4.0-Chugiak
|
Widget displaying a combobox allowing the user to choose between millimeter and map units If the user chooses map units, a button appears allowing the specification of minimum and maximum scale. More...
#include <qgsunitselectionwidget.h>
Signals | |
void | changed () |
Public Member Functions | |
QgsUnitSelectionWidget (QWidget *parent=0) | |
void | setUnits (const QStringList &units, int mapUnitIdx) |
Sets the units which the user can choose from in the combobox. More... | |
int | getUnit () const |
Get the selected unit index. More... | |
void | setUnit (int unitIndex) |
Sets the selected unit index. More... | |
QgsMapUnitScale | getMapUnitScale () const |
Returns the map unit scale. More... | |
void | setMapUnitScale (const QgsMapUnitScale &scale) |
Sets the map unit scale. More... | |
Private Slots | |
void | showDialog () |
void | toggleUnitRangeButton () |
Private Attributes | |
QgsMapUnitScaleDialog * | mUnitScaleDialog |
int | mMapUnitIdx |
Widget displaying a combobox allowing the user to choose between millimeter and map units If the user chooses map units, a button appears allowing the specification of minimum and maximum scale.
Definition at line 47 of file qgsunitselectionwidget.h.
QgsUnitSelectionWidget::QgsUnitSelectionWidget | ( | QWidget * | parent = 0 | ) |
Definition at line 70 of file qgsunitselectionwidget.cpp.
References changed(), mMapUnitIdx, mUnitScaleDialog, showDialog(), toggleUnitRangeButton(), and tr.
|
signal |
Referenced by QgsUnitSelectionWidget(), and showDialog().
|
inline |
Returns the map unit scale.
Definition at line 66 of file qgsunitselectionwidget.h.
|
inline |
Get the selected unit index.
Definition at line 62 of file qgsunitselectionwidget.h.
|
inline |
Sets the map unit scale.
Definition at line 68 of file qgsunitselectionwidget.h.
void QgsUnitSelectionWidget::setUnit | ( | int | unitIndex | ) |
Sets the selected unit index.
Definition at line 93 of file qgsunitselectionwidget.cpp.
void QgsUnitSelectionWidget::setUnits | ( | const QStringList & | units, |
int | mapUnitIdx | ||
) |
Sets the units which the user can choose from in the combobox.
mapUnitIdx specifies which entry corresponds to the map units, or -1 if none
Definition at line 85 of file qgsunitselectionwidget.cpp.
References mMapUnitIdx.
|
privateslot |
Definition at line 100 of file qgsunitselectionwidget.cpp.
References changed(), QgsMapUnitScaleDialog::getMapUnitScale(), QgsMapUnitScale::maxScale, QgsMapUnitScale::minScale, mUnitScaleDialog, and QgsMapUnitScaleDialog::setMapUnitScale().
Referenced by QgsUnitSelectionWidget().
|
privateslot |
Definition at line 117 of file qgsunitselectionwidget.cpp.
References mMapUnitIdx.
Referenced by QgsUnitSelectionWidget().
|
private |
Definition at line 53 of file qgsunitselectionwidget.h.
Referenced by QgsUnitSelectionWidget(), setUnits(), and toggleUnitRangeButton().
|
private |
Definition at line 52 of file qgsunitselectionwidget.h.
Referenced by QgsUnitSelectionWidget(), and showDialog().