|
RADLib
RADical C++ application framework
|
Toolbar state model. More...
#include <RADWidgets.h>
Inheritance diagram for RADUi::ToolBarModel:
Collaboration diagram for RADUi::ToolBarModel:Public Member Functions | |
| const std::vector< ToolButton > & | buttons () const |
| Returns toolbar buttons. More... | |
| void | setButtons (std::vector< ToolButton > buttons) |
| Replaces toolbar buttons. More... | |
| bool | setEnabled (const std::string &id, bool enabled) |
| Updates one button enabled state by id. More... | |
| bool | trigger (const std::string &id) |
| Triggers one enabled button by id. 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 button descriptors change. More... | |
| RADCore::Event< void(std::string) > | triggered |
| Raised with button id when a button is triggered. More... | |
Toolbar state model.
| const std::vector<ToolButton>& RADUi::ToolBarModel::buttons | ( | ) | const |
Returns toolbar buttons.
| void RADUi::ToolBarModel::setButtons | ( | std::vector< ToolButton > | buttons | ) |
Replaces toolbar buttons.
| bool RADUi::ToolBarModel::setEnabled | ( | const std::string & | id, |
| bool | enabled | ||
| ) |
Updates one button enabled state by id.
| bool RADUi::ToolBarModel::trigger | ( | const std::string & | id | ) |
Triggers one enabled button by id.
| RADCore::Event<void () > RADUi::ToolBarModel::changed |
Raised when button descriptors change.
| RADCore::Event<void (std::string) > RADUi::ToolBarModel::triggered |
Raised with button id when a button is triggered.