|
RADLib
RADical C++ application framework
|
Searchable command palette model. More...
#include <RADAppKit.h>
Inheritance diagram for RADUi::CommandPaletteModel:
Collaboration diagram for RADUi::CommandPaletteModel:Public Member Functions | |
| const std::vector< Command > & | commands () const |
| Returns all commands. More... | |
| void | setCommands (std::vector< Command > commands) |
| Replaces commands. More... | |
| void | setFilter (std::string filter) |
| Sets filter text. More... | |
| const std::string & | filter () const |
| Returns filter text. More... | |
| std::vector< Command > | filteredCommands () const |
| Returns filtered commands. More... | |
| bool | trigger (const std::string &id) |
| Triggers an enabled command 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 commands or filter text changes. More... | |
| RADCore::Event< void(std::string) > | triggered |
| Raised when a command is triggered. More... | |
Searchable command palette model.
| const std::vector<Command>& RADUi::CommandPaletteModel::commands | ( | ) | const |
Returns all commands.
| const std::string& RADUi::CommandPaletteModel::filter | ( | ) | const |
Returns filter text.
| std::vector<Command> RADUi::CommandPaletteModel::filteredCommands | ( | ) | const |
Returns filtered commands.
| void RADUi::CommandPaletteModel::setCommands | ( | std::vector< Command > | commands | ) |
Replaces commands.
| void RADUi::CommandPaletteModel::setFilter | ( | std::string | filter | ) |
Sets filter text.
| bool RADUi::CommandPaletteModel::trigger | ( | const std::string & | id | ) |
Triggers an enabled command by id.
| RADCore::Event<void () > RADUi::CommandPaletteModel::changed |
Raised when commands or filter text changes.
| RADCore::Event<void (std::string) > RADUi::CommandPaletteModel::triggered |
Raised when a command is triggered.