Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
ModulePlaceholderPage.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3#pragma once
4
6#include "phosphorcontrol_export.h"
7
8#include <QString>
9#include <QtQml/qqmlregistration.h>
10
11namespace PhosphorControl {
12
24class PHOSPHORCONTROL_EXPORT ModulePlaceholderPage : public PageController
25{
26 Q_OBJECT
28 Q_PROPERTY(QString moduleName READ moduleName CONSTANT)
30 Q_PROPERTY(bool failed READ failed NOTIFY moduleStateChanged)
34 Q_PROPERTY(QString reason READ reason NOTIFY moduleStateChanged)
36 Q_PROPERTY(bool canRetry READ canRetry NOTIFY moduleStateChanged)
37 QML_NAMED_ELEMENT(ModulePlaceholderPage)
38 QML_UNCREATABLE("ModulePlaceholderPage is an abstract base; ModuleHost creates the placeholders.")
39
40public:
41 explicit ModulePlaceholderPage(const QString& id, QObject* parent = nullptr);
43
44 bool isDirty() const override;
45 void apply() override;
46 void discard() override;
47
48 virtual QString moduleName() const = 0;
49 virtual bool failed() const = 0;
50 virtual bool disabledAfterCrash() const = 0;
51 virtual QString reason() const = 0;
52 virtual bool canRetry() const = 0;
53
56 Q_INVOKABLE virtual void retry() = 0;
57
58Q_SIGNALS:
60};
61
62} // namespace PhosphorControl
virtual bool canRetry() const =0
virtual bool disabledAfterCrash() const =0
void apply() override
Persist staged changes to the backing store.
virtual QString reason() const =0
virtual QString moduleName() const =0
virtual void retry()=0
Load the module again, or for the first time when it is still available.
void discard() override
Drop staged changes; reload from the backing store.
ModulePlaceholderPage(const QString &id, QObject *parent=nullptr)
The module's display name.
PageController(QString id, QObject *parent=nullptr)
Definition ApplicationController.h:21