QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | List of all members
QgsUnitSelectionWidget Class Reference

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.
int getUnit () const
 Get the selected unit index.
void setUnit (int unitIndex)
 Sets the selected unit index.
QgsMapUnitScale getMapUnitScale () const
 Returns the map unit scale.
void setMapUnitScale (const QgsMapUnitScale &scale)
 Sets the map unit scale.

Detailed Description

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.

Constructor & Destructor Documentation

QgsUnitSelectionWidget::QgsUnitSelectionWidget ( QWidget *  parent = 0)

Member Function Documentation

void QgsUnitSelectionWidget::changed ( )
signal
QgsMapUnitScale QgsUnitSelectionWidget::getMapUnitScale ( ) const
inline

Returns the map unit scale.

int QgsUnitSelectionWidget::getUnit ( ) const
inline

Get the selected unit index.

void QgsUnitSelectionWidget::setMapUnitScale ( const QgsMapUnitScale scale)
inline

Sets the map unit scale.

void QgsUnitSelectionWidget::setUnit ( int  unitIndex)

Sets the selected unit index.

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


The documentation for this class was generated from the following files: