KDDockWidgets API Documentation  1.5
LayoutSaver.h
Go to the documentation of this file.
1 /*
2  This file is part of KDDockWidgets.
3 
4  SPDX-FileCopyrightText: 2019-2022 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 
26 QT_BEGIN_NAMESPACE
27 class QByteArray;
28 QT_END_NAMESPACE
29 
30 class TestDocks;
31 
32 namespace KDDockWidgets {
33 
34 class DockWidgetBase;
35 
36 
54 class DOCKS_EXPORT LayoutSaver
55 {
56 public:
58  explicit LayoutSaver(RestoreOptions options = RestoreOption_None);
59 
61  ~LayoutSaver();
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 
130 private:
131  Q_DISABLE_COPY(LayoutSaver)
132  friend class ::TestDocks;
133 
134  Private *const d;
135 };
136 }
137 
138 #endif
KDDockWidgets.h
File with KDDockWidgets namespace-level enums and methods.
KDDockWidgets::LayoutSaver
LayoutSaver allows to save or restore layouts.
Definition: LayoutSaver.h:55
KDDockWidgets::DockWidget
Represents a dock widget.
Definition: DockWidget.h:38
QString
KDDockWidgets::RestoreOption_None
@ RestoreOption_None
Definition: KDDockWidgets.h:184
KDDockWidgets::MainWindow
The QMainwindow sub-class that the application should use to be able to dock KDDockWidget::DockWidget...
Definition: MainWindow.h:33
KDDockWidgets
Definition: Config.cpp:36
QVector< DockWidgetBase * >
QByteArray
QStringList

© 2019-2022 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 Mon Mar 7 2022 02:01:20 for KDDockWidgets API Documentation by doxygen 1.8.20