The controller of a page that stands in for a control module's page while the module is not loaded. More...
#include <PhosphorControl/ModulePlaceholderPage.h>
Signals | |
| void | moduleStateChanged () |
| Signals inherited from PhosphorControl::StagingDomain | |
| void | dirtyChanged () |
| void | applyResult (bool ok, const QString &error) |
| Async-completion signal — REQUIRED for use with ApplicationController::applyAllAsync. | |
| void | discardResult (bool ok, const QString &error) |
| Companion to applyResult for discard() — separate signal so the chrome can wire distinct user-visible states. | |
Public Member Functions | |
| ModulePlaceholderPage (const QString &id, QObject *parent=nullptr) | |
| The module's display name. | |
| ~ModulePlaceholderPage () override | |
| bool | isDirty () const override |
| void | apply () override |
| Persist staged changes to the backing store. | |
| void | discard () override |
| Drop staged changes; reload from the backing store. | |
| virtual QString | moduleName () const =0 |
| virtual bool | failed () const =0 |
| virtual bool | disabledAfterCrash () const =0 |
| virtual QString | reason () const =0 |
| virtual bool | canRetry () const =0 |
| virtual void | retry ()=0 |
| Load the module again, or for the first time when it is still available. | |
| Public Member Functions inherited from PhosphorControl::PageController | |
| PageController (QString id, QObject *parent=nullptr) | |
| ~PageController () override | |
| QString | id () const |
| Public Member Functions inherited from PhosphorControl::StagingDomain | |
| StagingDomain (QObject *parent=nullptr) | |
| ~StagingDomain () override | |
Additional Inherited Members | |
| Public Slots inherited from PhosphorControl::StagingDomain | |
| virtual void | resetToDefaults () |
| Load factory defaults into the staged area. | |
The controller of a page that stands in for a control module's page while the module is not loaded.
ModuleHost registers one per placeholder, and ModulePage.qml, the page it shows (ModuleHost::placeholderPageSource), declares its controller as this type, so QML checks the members it reads.
Never dirty: apply() and discard() succeed at once, so a placeholder never holds up a batch. The module's state comes from the implementation, which emits moduleStateChanged() whenever any of failed, disabledAfterCrash, reason or canRetry may have changed.
|
explicit |
The module's display name.
The module failed: its library, its metadata or its registration. The module was turned off because the app stopped while it loaded. The host's diagnostic account of a failure. Not translated. Whether retry() can load the module now.
|
override |
|
overridevirtual |
Persist staged changes to the backing store.
ApplicationController only invokes apply() on domains whose isDirty() returns true, so implementations may assume there is staged work to do. Must not rely on side effects ("stamp last-applied timestamp", "fire notification") that need to run even when clean.
Implements PhosphorControl::StagingDomain.
|
pure virtual |
|
pure virtual |
|
overridevirtual |
Drop staged changes; reload from the backing store.
ApplicationController only invokes discard() on dirty domains — same side-effect-free contract as apply().
Implements PhosphorControl::StagingDomain.
|
pure virtual |
|
overridevirtual |
Implements PhosphorControl::StagingDomain.
|
pure virtual |
|
signal |
|
pure virtual |
|
pure virtual |
Load the module again, or for the first time when it is still available.