1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef QDESIGNER_SETTINGS_H
5#define QDESIGNER_SETTINGS_H
6
7#include "designer_enums.h"
8#include <shared_settings_p.h>
9#include <QtCore/qmap.h>
10#include <QtCore/qrect.h>
11#include <QtCore/qstringlist.h>
12#include <QtCore/qvariant.h>
13
14QT_BEGIN_NAMESPACE
15
16class QDesignerFormEditorInterface;
17class QDesignerSettingsInterface;
18struct ToolWindowFontSettings;
19
20class QDesignerSettings : public qdesigner_internal::QDesignerSharedSettings
21{
22public:
23 QDesignerSettings(QDesignerFormEditorInterface *core);
24
25 void setValue(const QString &key, const QVariant &value);
26 QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const;
27
28 void restoreGeometry(QWidget *w, QRect fallBack = QRect()) const;
29 void saveGeometryFor(const QWidget *w);
30
31 QStringList recentFilesList() const;
32 void setRecentFilesList(const QStringList &list);
33
34 void setShowNewFormOnStartup(bool showIt);
35 bool showNewFormOnStartup() const;
36
37 void setUiMode(UIMode mode);
38 UIMode uiMode() const;
39
40 void setToolWindowFont(const ToolWindowFontSettings &fontSettings);
41 ToolWindowFontSettings toolWindowFont() const;
42
43 QByteArray mainWindowState(UIMode mode) const;
44 void setMainWindowState(UIMode mode, const QByteArray &mainWindowState);
45
46 QByteArray toolBarsState(UIMode mode) const;
47 void setToolBarsState(UIMode mode, const QByteArray &mainWindowState);
48
49 void clearBackup();
50 void setBackup(const QMap<QString, QString> &map);
51 QMap<QString, QString> backup() const;
52};
53
54QT_END_NAMESPACE
55
56#endif // QDESIGNER_SETTINGS_H
57

source code of qttools/src/designer/src/designer/qdesigner_settings.h