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
119 class Private;
120 Private *dptr() const;
121
122 struct Layout;
123 struct MainWindow;
124 struct FloatingWindow;
125 struct DockWidget;
126 struct Position;
127 struct MultiSplitter;
128 struct Group;
129 struct Placeholder;
130 struct ScalingInfo;
131 struct ScreenInfo;
132
133private:
135 friend class ::TestDocks;
136
137 Private *const d;
138};
139}
140
141#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