Mapper  0.9.0
API documentation
Functions
OpenOrienteering::Util::SpinBox Namespace Reference

Functions

QSpinBoxcreate (int min, int max, const QString &unit={}, int step=0)
 Creates and initializes a QSpinBox. More...
 
QDoubleSpinBoxcreate (int decimals, double min, double max, const QString &unit={}, double step=0.0)
 Creates and initializes a QDoubleSpinBox. More...
 
template<class T >
QDoubleSpinBoxcreate ()
 Creates and initializes a QDoubleSpinBox. More...
 
template<class T >
QDoubleSpinBoxcreate (const QString &unit)
 Creates a QLabel which is styled as a headline. More...
 

Function Documentation

◆ create() [1/4]

QSpinBox * OpenOrienteering::Util::SpinBox::create ( int  min,
int  max,
const QString unit = {},
int  step = 0 
)

Creates and initializes a QSpinBox.

This method allows to initialize the most frequent options of QSpinBox in a single call: the lower and upper bound of the valid range, the unit of measurement (optional), the step width of the spinbox buttons (optional), the wrapping property of the spinbox (optional).

◆ create() [2/4]

QDoubleSpinBox * OpenOrienteering::Util::SpinBox::create ( int  decimals,
double  min,
double  max,
const QString unit = {},
double  step = 0.0 
)

Creates and initializes a QDoubleSpinBox.

This method allows to initialize the most frequent options of QDoubleSpinBox in a single call: the number of decimals, the lower and upper bound of the valid range, the unit of measurement (optional), the step width of the spinbox buttons (optional; dependent on the number of decimals if not specified), the wrapping property of the spinbox (optional).

◆ create() [3/4]

template<class T >
QDoubleSpinBox* OpenOrienteering::Util::SpinBox::create ( )

Creates and initializes a QDoubleSpinBox.

This method allows to initialize the most frequent options of QDoubleSpinBox in a single call, determining the actual properties via InputProperties<T>.

◆ create() [4/4]

template<class T >
QDoubleSpinBox* OpenOrienteering::Util::SpinBox::create ( const QString unit)

Creates a QLabel which is styled as a headline.

Deprecated:
Transitional method.

Creates and initializes a QDoubleSpinBox.

This method allows to initialize the most frequent options of QDoubleSpinBox in a single call, determining the actual properties via InputProperties<T>.

The unit of measurement is taken from the actual parameter. This is meant to support the transition from code where the translation of units still exists in the context of the client code, instead of in the context UnitOfMeasurement.