Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PersistentProperties.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include <PhosphorShell/phosphorshell_export.h>
7
8#include <QQuickItem>
9#include <QVariantMap>
10
11namespace PhosphorShell {
12
13class PHOSPHORSHELL_EXPORT PersistentProperties : public QQuickItem
14{
15 Q_OBJECT
16
17 Q_PROPERTY(QString reloadId READ reloadId WRITE setReloadId NOTIFY reloadIdChanged)
18
19public:
20 explicit PersistentProperties(QQuickItem* parent = nullptr);
22
23 [[nodiscard]] QString reloadId() const;
24 void setReloadId(const QString& id);
25
26 [[nodiscard]] QVariantMap saveState() const;
27 void restoreState(const QVariantMap& state);
28
29Q_SIGNALS:
31
32private:
33 QString m_reloadId;
34};
35
36} // namespace PhosphorShell
Definition PersistentProperties.h:14
void restoreState(const QVariantMap &state)
void setReloadId(const QString &id)
PersistentProperties(QQuickItem *parent=nullptr)
Definition Environment.h:11