KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
LayoutSaverInstantiator.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
13#ifndef KD_LAYOUT_SAVER_INSTANTIATOR_P_H
14#define KD_LAYOUT_SAVER_INSTANTIATOR_P_H
15
16#include "LayoutSaver.h"
17
18#include <QObject>
19
20
21QT_BEGIN_NAMESPACE
22class QQuickItem;
23QT_END_NAMESPACE
24
25namespace KDDockWidgets {
26
27
33class DOCKS_EXPORT LayoutSaverInstantiator : public QObject, public LayoutSaver
34{
35 Q_OBJECT
36 Q_PROPERTY(QVector<QString> affinities READ affinities WRITE setAffinities NOTIFY affinitiesChanged)
37public:
38 explicit LayoutSaverInstantiator(QObject *parent = nullptr);
39 ~LayoutSaverInstantiator() override;
40
41 QVector<QString> affinities() const;
42 void setAffinities(const QVector<QString> &);
43
44 Q_INVOKABLE bool saveToFile(const QString &jsonFilename);
45 Q_INVOKABLE bool restoreFromFile(const QString &jsonFilename);
46Q_SIGNALS:
48};
49
50}
51
52#endif
Class to save and restore dockwidget layouts.
A QObject wrapper around LayoutSaver so it can be used in QML. Use it from QML, like: LayoutSaver { i...
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