6#include <PhosphorShell/phosphorshell_export.h>
23class QFileSystemWatcher;
76 bool load(
const QUrl& shellUrl);
85 [[nodiscard]] QQmlEngine*
engine()
const;
165 void onFileChanged();
166 void onScreensChanged();
173 [[nodiscard]]
bool buildAndMaterialize();
180 [[nodiscard]]
bool materializePanels(QString* failureReason);
193 void savePersistentState();
194 void restorePersistentState();
204 [[nodiscard]] QList<PersistentProperties*> collectPersistentProperties()
const;
207 std::unique_ptr<QQmlEngine> m_engine;
208 std::unique_ptr<QObject> m_rootObject;
214 QPointer<QObject> m_rootRef;
216 std::vector<std::unique_ptr<PhosphorLayer::Surface>> m_surfaces;
222 std::vector<QPointer<PanelWindow>> m_panels;
233 QPointer<QScreen> screen;
237 std::vector<ReservedEdge> m_reserved;
238 QFileSystemWatcher* m_watcher =
nullptr;
239 QTimer* m_reloadTimer =
nullptr;
242 QHash<QString, QVariantMap> m_persistentState;
243 std::vector<EngineHook> m_engineHooks;
Source-of-truth interface for the available QScreen set.
Definition IScreenProvider.h:62
Stateless constructor for Surfaces.
Definition SurfaceFactory.h:35
One layer-shell surface with a managed lifecycle.
Definition Surface.h:105
Definition PanelWindow.h:23
Definition PersistentProperties.h:14
Definition ScreenModel.h:25
void requestReload()
Coalesced rebuild for configuration changes affecting surface geometry.
QMargins reservedMarginsFor(QScreen *screen) const
The space this shell's own panels reserve on screen, per edge: the largest exclusive zone advertised ...
void aboutToReload()
Emitted at the very top of a hot reload, BEFORE any teardown.
void reloaded()
A successful rebuild after a file or screen change, including the first successful build following a ...
void addEngineHook(EngineHook hook)
std::function< void(QQmlEngine *)> EngineHook
Register a callback that fires whenever a fresh QQmlEngine is created — at startup AND on hot-reload ...
Definition ShellEngine.h:109
bool load(const QUrl &shellUrl)
Build the shell from shellUrl.
QQmlEngine * engine() const
The current QML engine, or null before a successful load and after a failed one.
void loaded()
A successful load() call.
void failed(const QString &reason)
Something went wrong, with a human-readable reason.
ShellEngine(Deps deps, QObject *parent=nullptr)
Definition ShellGlobal.h:30
Definition SurfaceAnimator.h:26
Definition Environment.h:11
Definition ShellEngine.h:46
PhosphorLayer::IScreenProvider * screenProvider
Definition ShellEngine.h:48
QString shellName
The app's name, the one its ShellLoader takes: the layer-shell scope prefix of every panel and the di...
Definition ShellEngine.h:52
PhosphorLayer::SurfaceFactory * surfaceFactory
Definition ShellEngine.h:47