|
RADLib
RADical C++ application framework
|
Numeric slider model with minimum, maximum, and current value. More...
#include <RADWidgets.h>
Inheritance diagram for RADUi::SliderModel:
Collaboration diagram for RADUi::SliderModel:Public Member Functions | |
| SliderModel (double minimum=0.0, double maximum=1.0, double value=0.0) | |
| Creates a slider with range and initial value. More... | |
| double | minimum () const |
| Returns minimum accepted value. More... | |
| double | maximum () const |
| Returns maximum accepted value. More... | |
| double | value () const |
| Returns current value. More... | |
| void | setRange (double minimum, double maximum) |
| Updates range and clamps value as needed. More... | |
| void | setValue (double value) |
| Sets current value, clamped to range. More... | |
Public Member Functions inherited from RADCore::RADObject | |
| RADObject () | |
| Creates a RADObject bound to the current thread. More... | |
| virtual | ~RADObject () |
| Disconnects tracked event links and releases lifetime token. More... | |
| void | registerLink (const ConnectionRecord &record) |
| Registers a connection for cleanup when this object is destroyed. More... | |
| std::thread::id | threadId () const |
| Returns the thread id this object is currently associated with. More... | |
| EventLoop * | associatedEventLoop () const |
| Returns the associated event loop, if any. More... | |
| ThreadAffinity | threadAffinity () const |
| Returns both thread id and associated loop atomically. More... | |
| std::weak_ptr< void > | lifetimeToken () const |
| Returns a weak token used to drop queued callbacks after destruction. More... | |
| void | moveToThread (std::thread::id tId, EventLoop *loop=nullptr) |
| Moves the object's affinity to tId and optional loop. More... | |
Public Attributes | |
| RADCore::Event< void(double) > | changed |
| Raised with the current value when it changes. More... | |
Numeric slider model with minimum, maximum, and current value.
| RADUi::SliderModel::SliderModel | ( | double | minimum = 0.0, |
| double | maximum = 1.0, |
||
| double | value = 0.0 |
||
| ) |
Creates a slider with range and initial value.
| double RADUi::SliderModel::maximum | ( | ) | const |
Returns maximum accepted value.
| double RADUi::SliderModel::minimum | ( | ) | const |
Returns minimum accepted value.
| void RADUi::SliderModel::setRange | ( | double | minimum, |
| double | maximum | ||
| ) |
Updates range and clamps value as needed.
| void RADUi::SliderModel::setValue | ( | double | value | ) |
Sets current value, clamped to range.
| double RADUi::SliderModel::value | ( | ) | const |
Returns current value.
| RADCore::Event<void (double) > RADUi::SliderModel::changed |
Raised with the current value when it changes.