|
RADLib
RADical C++ application framework
|
Preferences/settings form model. More...
#include <RADWidgets.h>
Inheritance diagram for RADUi::PreferencesModel:
Collaboration diagram for RADUi::PreferencesModel:Public Member Functions | |
| const std::vector< PreferenceField > & | fields () const |
| Returns field descriptors. More... | |
| void | setFields (std::vector< PreferenceField > fields) |
| Replaces field descriptors. More... | |
| bool | setValue (const std::string &id, std::string value) |
| Sets one field value by id. More... | |
| std::string | value (const std::string &id) const |
| Returns one field value by id or empty string. More... | |
| std::map< std::string, std::string > | values () const |
| Returns all values keyed by field 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 fields or values change. More... | |
| RADCore::Event< void(std::string, std::string) > | valueChanged |
| Raised with field id and value when a value changes. More... | |
Preferences/settings form model.
| const std::vector<PreferenceField>& RADUi::PreferencesModel::fields | ( | ) | const |
Returns field descriptors.
| void RADUi::PreferencesModel::setFields | ( | std::vector< PreferenceField > | fields | ) |
Replaces field descriptors.
| bool RADUi::PreferencesModel::setValue | ( | const std::string & | id, |
| std::string | value | ||
| ) |
Sets one field value by id.
| std::string RADUi::PreferencesModel::value | ( | const std::string & | id | ) | const |
Returns one field value by id or empty string.
| std::map<std::string, std::string> RADUi::PreferencesModel::values | ( | ) | const |
Returns all values keyed by field id.
| RADCore::Event<void () > RADUi::PreferencesModel::changed |
Raised when fields or values change.
| RADCore::Event<void (std::string, std::string) > RADUi::PreferencesModel::valueChanged |
Raised with field id and value when a value changes.