KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
LayoutSaver.h
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11
12#ifndef KD_LAYOUTSAVER_H
13#define KD_LAYOUTSAVER_H
14
22#include "kddockwidgets/docks_export.h"
23
24#include "kddockwidgets/KDDockWidgets.h"
25
26QT_BEGIN_NAMESPACE
27class QByteArray;
28QT_END_NAMESPACE
29
30class TestDocks;
31
32namespace KDDockWidgets {
33
34namespace Core {
35class DockWidget;
36}
37
55class DOCKS_EXPORT LayoutSaver
56{
57public:
59 explicit LayoutSaver(RestoreOptions options = RestoreOption_None);
60
63
65 static bool restoreInProgress();
66
72 bool saveToFile(const QString &jsonFilename);
73
79 bool restoreFromFile(const QString &jsonFilename);
80
84 QByteArray serializeLayout() const;
85
98 bool restoreLayout(const QByteArray &);
99
107 Vector<Core::DockWidget *> restoredDockWidgets() const;
108
116 void setAffinityNames(const Vector<QString> &affinityNames);
117
123 static Vector<QString> openedDockWidgetsInLayout(const QString &jsonFilename);
124 static Vector<QString> openedDockWidgetsInLayout(const QByteArray &serialized);
125
126 static Vector<QString> sideBarDockWidgetsInLayout(const QString &jsonFilename);
127 static Vector<QString> sideBarDockWidgetsInLayout(const QByteArray &serialized);
128
130 class Private;
131 Private *dptr() const;
132
133 struct Layout;
134 struct MainWindow;
135 struct FloatingWindow;
136 struct DockWidget;
137 struct Position;
138 struct MultiSplitter;
139 struct Group;
140 struct Placeholder;
141 struct ScalingInfo;
142 struct ScreenInfo;
143
144private:
146 friend class ::TestDocks;
147
148 Private *const d;
149};
150}
151
152#endif
#define KDDW_DELETE_COPY_CTOR(NAME)
LayoutSaver allows to save or restore layouts.
Definition LayoutSaver.h:56
Class to abstract QAction, so code still works with QtQuick and Flutter.

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8