QtCanpool 3.3.0
载入中...
搜索中...
未找到
qxworkspacemanager.h
浏览该文件的文档.
1
5#ifndef QXWORKSPACEMANAGER_H
6#define QXWORKSPACEMANAGER_H
7
8#include "qxapp_global.h"
9
10#include "qxcore/qxsettings.h"
11
12#include <QtCore/QObject>
13#include <QtCore/QString>
14#include <QtCore/QStringList>
15
17
18class QxAppShell;
19class QxWorkspaceManagerPrivate;
20
51class QX_APP_EXPORT QxWorkspaceManager : public QObject
52{
53 Q_OBJECT
54public:
55 explicit QxWorkspaceManager(QxAppShell *shell, QObject *parent = Q_NULLPTR);
56 ~QxWorkspaceManager() override;
57
59 QxAppShell *shell() const;
64 QX_CORE_PREPEND_NAMESPACE(QxSettings) * settings() const;
65
66 // Reading ---------------------------------------------------------------
68 int count() const;
70 QStringList workspaceNames() const;
72 bool contains(const QString &name) const;
79 QString currentWorkspace() const;
80
81 // Writing ---------------------------------------------------------------
88 bool saveWorkspace(const QString &name);
97 bool applyWorkspace(const QString &name);
104 bool removeWorkspace(const QString &name);
110 bool renameWorkspace(const QString &from, const QString &to);
112 void clearWorkspaces();
113
114Q_SIGNALS:
116 void workspaceSaved(const QString &name);
118 void workspaceApplied(const QString &name);
120 void workspaceRemoved(const QString &name);
122 void currentWorkspaceChanged(const QString &name);
123private:
124 Q_DISABLE_COPY(QxWorkspaceManager)
126};
127
129
130#endif // QXWORKSPACEMANAGER_H
The window skeleton of a ribbon application.
Definition qxappshell.h:70
The named layouts of one shell.
void workspaceRemoved(const QString &name)
A workspace was forgotten - also emitted once per name by clearWorkspaces().
void workspaceSaved(const QString &name)
A workspace was stored, first time or overwriting.
void currentWorkspaceChanged(const QString &name)
The current workspace changed; name is empty when there is none now.
void workspaceApplied(const QString &name)
A workspace was brought back on screen.
Thin wrapper around QSettings that keeps call sites free of the usual boilerplate: typed accessors wi...
Definition qxsettings.h:32
#define QX_APP_END_NAMESPACE
#define QX_APP_EXPORT
#define QX_DECLARE_PRIVATE(Class)
#define Q_NULLPTR
Copyleft (C) 2025 maminjie canpool@163.com SPDX-License-Identifier: MulanPSL-2.0
#define QX_APP_BEGIN_NAMESPACE
#define QX_CORE_PREPEND_NAMESPACE(name)
const char * name
Definition qxtheme.cpp:25