|
RADLib
RADical C++ application framework
|
Current-selection model for list/table/tree style views. More...
#include <RADWidgets.h>
Inheritance diagram for RADUi::SelectionModel:
Collaboration diagram for RADUi::SelectionModel:Public Member Functions | |
| std::optional< size_t > | currentIndex () const |
| Returns selected index, if any. More... | |
| void | setCurrentIndex (std::optional< size_t > index) |
| Sets selected index or clears selection with nullopt. More... | |
| void | clear () |
| Clears selection. 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() > | changed |
| Raised when current index changes. More... | |
Current-selection model for list/table/tree style views.
| void RADUi::SelectionModel::clear | ( | ) |
Clears selection.
| std::optional<size_t> RADUi::SelectionModel::currentIndex | ( | ) | const |
Returns selected index, if any.
| void RADUi::SelectionModel::setCurrentIndex | ( | std::optional< size_t > | index | ) |
Sets selected index or clears selection with nullopt.
| RADCore::Event<void () > RADUi::SelectionModel::changed |
Raised when current index changes.