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

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 ()
QString scaleString ()
 Function to read the selected scale as text.
bool setScaleString (QString scaleTxt)
 Function to set the selected scale from text.
double scale ()
 Function to read the selected scale as double.
void setScale (double scale)
 Function to set the selected scale from double.

Static Public Member Functions

static QString toString (double scale)
 Helper function to convert a double to scale string.
static double toDouble (QString scaleString, bool *ok=NULL)
 Helper function to convert a scale string to double.

Protected Member Functions

void showPopup ()

Detailed Description

A combobox which lets the user select map scale from predefined list and highlights nearest to current scale value.

Constructor & Destructor Documentation

QgsScaleComboBox::QgsScaleComboBox ( QWidget *  parent = 0)
QgsScaleComboBox::~QgsScaleComboBox ( )
virtual

Member Function Documentation

double QgsScaleComboBox::scale ( )

Function to read the selected scale as double.

void QgsScaleComboBox::scaleChanged ( )
signal

Signal is emitted when user has finished editing/selecting a new scale.

QString QgsScaleComboBox::scaleString ( )

Function to read the selected scale as text.

void QgsScaleComboBox::setScale ( double  scale)

Function to set the selected scale from double.

bool QgsScaleComboBox::setScaleString ( QString  scaleTxt)

Function to set the selected scale from text.

void QgsScaleComboBox::showPopup ( )
protected
double QgsScaleComboBox::toDouble ( QString  scaleString,
bool *  ok = NULL 
)
static

Helper function to convert a scale string to double.

QString QgsScaleComboBox::toString ( double  scale)
static

Helper function to convert a double to scale string.

void QgsScaleComboBox::updateScales ( const QStringList &  scales = QStringList())
slot

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