|
RADLib
RADical C++ application framework
|
Generic dialog state model. More...
#include <RADWidgets.h>
Inheritance diagram for RADUi::DialogModel:
Collaboration diagram for RADUi::DialogModel:Public Member Functions | |
| const std::string & | title () const |
| Returns dialog title. More... | |
| void | setTitle (std::string title) |
| Sets dialog title. More... | |
| bool | isOpen () const |
| Returns true when dialog should be visible. More... | |
| DialogResult | result () const |
| Returns current dialog result. More... | |
| void | open () |
| Opens the dialog and resets result to None. More... | |
| void | accept () |
| Accepts and closes the dialog. More... | |
| void | reject () |
| Rejects and closes the dialog. 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 title/open/result changes. More... | |
| RADCore::Event< void(RADUi::DialogResult) > | finished |
| Raised when the dialog accepts or rejects. More... | |
Generic dialog state model.
| void RADUi::DialogModel::accept | ( | ) |
Accepts and closes the dialog.
| bool RADUi::DialogModel::isOpen | ( | ) | const |
Returns true when dialog should be visible.
| void RADUi::DialogModel::open | ( | ) |
Opens the dialog and resets result to None.
| void RADUi::DialogModel::reject | ( | ) |
Rejects and closes the dialog.
| DialogResult RADUi::DialogModel::result | ( | ) | const |
Returns current dialog result.
| void RADUi::DialogModel::setTitle | ( | std::string | title | ) |
Sets dialog title.
| const std::string& RADUi::DialogModel::title | ( | ) | const |
Returns dialog title.
| RADCore::Event<void () > RADUi::DialogModel::changed |
Raised when title/open/result changes.
| RADCore::Event<void (RADUi::DialogResult) > RADUi::DialogModel::finished |
Raised when the dialog accepts or rejects.