KDDockWidgets API Documentation 1.7
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-2023 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 "docks_export.h"
23
24#include "KDDockWidgets.h"
25
26QT_BEGIN_NAMESPACE
27class QByteArray;
28QT_END_NAMESPACE
29
30class TestDocks;
31
32namespace KDDockWidgets {
33
34class DockWidgetBase;
35
36
54class DOCKS_EXPORT LayoutSaver
55{
56public:
58 explicit LayoutSaver(RestoreOptions options = RestoreOption_None);
59
62
64 static bool restoreInProgress();
65
71 bool saveToFile(const QString &jsonFilename);
72
78 bool restoreFromFile(const QString &jsonFilename);
79
83 QByteArray serializeLayout() const;
84
97 bool restoreLayout(const QByteArray &);
98
105 QVector<DockWidgetBase *> restoredDockWidgets() const;
106
113 void setAffinityNames(const QStringList &affinityNames);
114
116 class Private;
117 Private *dptr() const;
118
119 struct Layout;
120 struct MainWindow;
121 struct FloatingWindow;
122 struct DockWidget;
123 struct Position;
124 struct MultiSplitter;
125 struct Frame;
126 struct Placeholder;
127 struct ScalingInfo;
128 struct ScreenInfo;
129
130private:
131 Q_DISABLE_COPY(LayoutSaver)
132 friend class ::TestDocks;
133
134 Private *const d;
135};
136}
137
138#endif
File with KDDockWidgets namespace-level enums and methods.
Represents a dock widget.
Definition DockWidget.h:38
LayoutSaver allows to save or restore layouts.
Definition LayoutSaver.h:55
The QMainwindow sub-class that the application should use to be able to dock KDDockWidget::DockWidget...
Definition MainWindow.h:37

© 2019-2023 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 on Wed Nov 1 2023 00:02:31 for KDDockWidgets API Documentation by doxygen 1.9.8