|
Omnidome
Fulldome Mapping Software Toolkit
|
Template class for a value within a certain min/max range. More...
#include <RangedValue.h>


Public Types | |
| typedef Range< VALUE > | range_type |
| typedef Step< VALUE > | step_type |
| typedef VALUE | value_type |
Public Types inherited from omni::ui::mixin::Range< VALUE > | |
| typedef VALUE | value_type |
Public Types inherited from omni::ui::mixin::Step< VALUE > | |
| typedef VALUE | value_type |
Public Member Functions | |
| RangedValue () | |
| Default constructor. More... | |
| RangedValue (value_type _value, value_type _minimum, value_type _maximum, value_type _singleStep=1.0, value_type _pageStep=10.0) | |
| Constructor from user defined value and range. More... | |
| qreal | ratio () const |
| Returns ratio of current value. More... | |
| value_type | value () const |
| Return value. More... | |
| value_type | defaultValue () const |
| Return default value. More... | |
| value_type | pivot () const |
| Return pivot value. More... | |
| void | increase () |
| Increate value by single step value. More... | |
| void | decrease () |
| Decrease value by single step value. More... | |
| void | setValue (value_type _value) |
| Set new value and emit value changed event. More... | |
| void | reset () |
| Reset value to default value. More... | |
| void | setDefaultValue (value_type _value) |
| Set new default value. More... | |
| void | setPivot (value_type _pivot) |
| Set pivot value (0.0 by default) More... | |
Public Member Functions inherited from omni::ui::mixin::Range< VALUE > | |
| Range (value_type _minimum=0.0, value_type _maximum=100.0) | |
| qreal | ratio (value_type _v) const |
| Return ratio of value v. More... | |
| value_type | range () const |
| Return range (difference between maximum and minimum) More... | |
| value_type | minimum () const |
| Return minimum value. More... | |
| value_type | maximum () const |
| Return maximum value. More... | |
| void | setMinimum (value_type _minimum) |
| Set new minimum value and value and emit rangeChanged event. More... | |
| void | disableMinimum () |
| Disable minimum by setting the value to infinite. More... | |
| void | setMaximum (value_type _maximum) |
| Set new maximum value and value and emit rangeChanged event. More... | |
| void | disableMaximum () |
| Disable maximum by setting maximum to infinite value. More... | |
| void | setRange (value_type _minimum, value_type _maximum) |
| Set range and validate. More... | |
| void | disableRange () |
| Disable range by setting minimum and maximum to infinite value. More... | |
| bool | minimumUsed () const |
| bool | maximumUsed () const |
Public Member Functions inherited from omni::ui::mixin::Step< VALUE > | |
| Step (value_type _singleStep=1.0, value_type _pageStep=10.0, bool _snap=false) | |
| Construct with a single step, page step value. More... | |
| qreal | snapped (value_type _v) const |
| Return snapped value. More... | |
| bool | snap () const |
| Snap value (align to single step value) More... | |
| void | setSnap (bool _snap) |
| Set boolean if value is to be snapped. More... | |
| value_type | singleStep () const |
| Return value for single step. More... | |
| value_type | pageStep () const |
| Return value for page step. More... | |
| void | setSingleStep (value_type _singleStep) |
| Set new single step value. More... | |
| void | setPageStep (value_type _pageStep) |
| Set new value for page step. More... | |
Protected Member Functions | |
| template<typename WIDGET > | |
| void | apply (WIDGET *_widget) const |
| Apply ranged value to widget. More... | |
| template<typename F > | |
| void | for_each_step (F f) |
| Functor to apply for each step. More... | |
| void | validate () |
| Validate minimum, maximum and value. More... | |
| virtual void | valueChangedEvent () |
| Value changed event which is emitted on changed value. More... | |
Protected Member Functions inherited from omni::ui::mixin::Range< VALUE > | |
| template<typename WIDGET > | |
| void | apply (WIDGET *_widget) const |
| Apply range to widget. More... | |
| template<typename WIDGET , typename V > | |
| void | apply (WIDGET *_widget, V _value) const |
| Applay range to widget and set value. More... | |
| virtual void | rangeChangedEvent () |
| Handler to emit rangeChanged signal in derived widgets. More... | |
Protected Member Functions inherited from omni::ui::mixin::Step< VALUE > | |
| template<typename MIN , typename MAX , typename F > | |
| void | for_each_step (MIN _min, MAX _max, F f) |
| Functor to be applied for each step between min and maximum. More... | |
Private Attributes | |
| value_type | value_ = 0.0 |
| value_type | defaultValue_ = 0.0 |
| value_type | pivot_ = 0.0 |
Template class for a value within a certain min/max range.
| DERIVED | name of derived class |
| VALUE | value type (e.g. int or double) |
| typedef Range<VALUE> omni::ui::mixin::RangedValue< DERIVED, VALUE >::range_type |
| typedef Step<VALUE> omni::ui::mixin::RangedValue< DERIVED, VALUE >::step_type |
| typedef VALUE omni::ui::mixin::RangedValue< DERIVED, VALUE >::value_type |
|
inline |
|
inline |
Constructor from user defined value and range.
|
inlineprotected |
Apply ranged value to widget.
|
inline |
Decrease value by single step value.
|
inline |
Return default value.
|
inlineprotected |
Functor to apply for each step.
|
inline |
Increate value by single step value.
|
inline |
Return pivot value.
|
inline |
Returns ratio of current value.
|
inline |
Reset value to default value.
|
inline |
Set new default value.
|
inline |
Set pivot value (0.0 by default)
|
inline |
Set new value and emit value changed event.
|
inlineprotectedvirtual |
Validate minimum, maximum and value.
Reimplemented from omni::ui::mixin::Range< VALUE >.
|
inline |
Return value.
|
inlineprotectedvirtual |
Value changed event which is emitted on changed value.
Reimplemented in omni::ui::RangedFloat, omni::ui::Dial, and omni::ui::RangedInt.
|
private |
|
private |
|
private |
1.8.6