itom
|
Meta-information for Param of type Int. More...
#include <paramMeta.h>
Public Member Functions | |
IntMeta (int32 minVal, int32 maxVal, int32 stepSize=1, ito::ByteArray category=ito::ByteArray()) | |
IntMeta (const IntMeta ©) | |
IntMeta & | operator= (const IntMeta &rhs) |
virtual bool | operator== (const ParamMeta &other) const |
int32 | getMin () const |
returns maximum value | |
int32 | getMax () const |
returns step size | |
int32 | getStepSize () const |
returns unit | |
ito::ByteArray | getUnit () const |
sets unit string of this parameter | |
void | setUnit (const ito::ByteArray &unit) |
returns display representation | |
ParamMeta::tRepresentation | getRepresentation () const |
sets display representation | |
void | setRepresentation (ParamMeta::tRepresentation behaviour) |
void | setMin (int32 val) |
sets the minimum value | |
void | setMax (int32 val) |
sets the maximum value | |
void | setStepSize (int32 val) |
sets the step size | |
Public Member Functions inherited from ito::ParamMeta | |
ParamMeta (ito::ByteArray category=ito::ByteArray()) | |
constructor used by derived classes to indicate their real type | |
ParamMeta (MetaRtti type, ito::ByteArray category=ito::ByteArray()) | |
ParamMeta (const ParamMeta ©) | |
ParamMeta & | operator= (const ParamMeta &rhs) |
destructor | |
virtual | ~ParamMeta () |
returns runtime type information value | |
MetaRtti | getType () const |
returns category name of this parameter (default: empty ByteArray) | |
ito::ByteArray | getCategory () const |
void | setCategory (const ito::ByteArray &category) |
bool | operator!= (const ParamMeta &other) const |
Static Public Member Functions | |
static IntMeta * | all (ito::ByteArray category=ito::ByteArray()) |
returns minimum value | |
Private Attributes | |
int32 | m_minVal |
int32 | m_maxVal |
int32 | m_stepSize |
ito::ByteArray | m_unit |
unit of value, e.g. 'mm', ... | |
ParamMeta::tRepresentation | m_representation |
hint for display behaviour in GUI widget | |
Additional Inherited Members | |
Public Types inherited from ito::ParamMeta | |
enum | MetaRtti { rttiUnknown = 0 , rttiCharMeta = 1 , rttiIntMeta = 2 , rttiDoubleMeta = 3 , rttiStringMeta = 4 , rttiHWMeta = 5 , rttiDObjMeta = 6 , rttiIntArrayMeta = 7 , rttiDoubleArrayMeta = 8 , rttiCharArrayMeta = 9 , rttiIntervalMeta = 10 , rttiDoubleIntervalMeta = 11 , rttiRangeMeta = 12 , rttiRectMeta = 13 , rttiStringListMeta = 14 } |
Runtime type information. More... | |
enum | tRepresentation { Linear = 0x0001 , Logarithmic = 0x0002 , Boolean = 0x0004 , PureNumber = 0x0008 , HexNumber = 0x0010 , IPV4Address = 0x0020 , MACAddress = 0x0040 , UnknownRepresentation = 0x0080 } |
The representation of number types indicates the type of widget that is suited best to display and change the value. More... | |
Protected Attributes inherited from ito::ParamMeta | |
MetaRtti | m_type |
ito::ByteArray | m_category |
optional category name of this parameter | |
Meta-information for Param of type Int.
An object of this class can be used to parametrize a parameter whose type is ito::ParamBase::Int. If set, the given integer number can be limited with respect to given minimum and maximum values as well as an optional step size (default: 1).
|
explicit |
< constructor with minimum and maximum value as well as optional step size (default: 1)
|
virtual |
returns a new instance of IntMeta, where the min and max are set to the full range available for integers. The caller has to take care of memory.
Reimplemented from ito::ParamMeta.
Reimplemented in ito::IntArrayMeta, and ito::IntervalMeta.
void ito::IntMeta::setMax | ( | int32 | val | ) |
sets the maximum value
val | is the new maximum value, if this is smaller than the current minimum value, the minimum value is changed to val, too |
void ito::IntMeta::setMin | ( | int32 | val | ) |
sets the minimum value
val | is the new minimum value, if this is bigger than the current maximum value, the maximum value is changed to val, too |
void ito::IntMeta::setStepSize | ( | int32 | val | ) |
sets the step size
val | is the new step size, hence only discrete values [minVal, minVal+stepSize, minVal+2*stepSize...,maxVal] are allowed |
void ito::IntMeta::setUnit | ( | const ito::ByteArray & | unit | ) |
returns display representation
< sets unit string of this parameter