Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorControl::PageController Class Reference

Base class for a settings page: a staging domain backed by a QML page that appears in the sidebar. More...

#include <PhosphorControl/PageController.h>

Inheritance diagram for PhosphorControl::PageController:
[legend]

Public Member Functions

 PageController (QString id, QObject *parent=nullptr)
 ~PageController () override
QString id () const
Public Member Functions inherited from PhosphorControl::StagingDomain
 StagingDomain (QObject *parent=nullptr)
 ~StagingDomain () override
virtual bool isDirty () const =0

Additional Inherited Members

Public Slots inherited from PhosphorControl::StagingDomain
virtual void apply ()=0
 Persist staged changes to the backing store.
virtual void discard ()=0
 Drop staged changes; reload from the backing store.
virtual void resetToDefaults ()
 Load factory defaults into the staged area.
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.

Detailed Description

Base class for a settings page: a staging domain backed by a QML page that appears in the sidebar.

Subclasses provide the page identity (id) and the staged-state methods inherited from StagingDomain. Title and qmlSource are wired at registration time by ApplicationController::registerPage().

The id must be globally unique within the application and stable across runs — it is used by PageRegistry for lookup, by ApplicationController to address the current page, and by QML for state restoration.

Constructor & Destructor Documentation

◆ PageController()

PhosphorControl::PageController::PageController ( QString id,
QObject * parent = nullptr )
explicit

◆ ~PageController()

PhosphorControl::PageController::~PageController ( )
override

Member Function Documentation

◆ id()

QString PhosphorControl::PageController::id ( ) const

The documentation for this class was generated from the following file: