Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
shared_settings_p.h
Go to the documentation of this file.
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//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef SHARED_SETTINGS_H
16#define SHARED_SETTINGS_H
17
19#include "shared_enums_p.h"
21
22#include <QtCore/qglobal.h>
23#include <QtCore/qlist.h>
24
26
27class QDesignerFormEditorInterface;
28class QDesignerSettingsInterface;
29
30class QSize;
31
32namespace qdesigner_internal {
33class Grid;
34class PreviewConfiguration;
35}
36
37/*!
38 Auxiliary methods to store/retrieve settings
39 */
40namespace qdesigner_internal {
41
43public:
45
47
48 Grid defaultGrid() const;
49 void setDefaultGrid(const Grid &grid);
50
53
56
57 QString formTemplate() const;
58 void setFormTemplate(const QString &t);
59
60 QSize newFormSize() const;
61 void setNewFormSize(const QSize &s);
62
63 // Check with isCustomPreviewConfigurationEnabled if custom or default
64 // configuration should be used.
67
70
73
74 bool zoomEnabled() const;
75 void setZoomEnabled(bool v);
76
77 // Zoom in percent
78 int zoom() const;
79 void setZoom(int z);
80
81 // Object naming convention (ActionEditor)
84
85 // Embedded Design
88 int currentDeviceProfileIndex() const;
89
93
95 static void migrateTemplates();
96
97protected:
99
100private:
103};
104
105} // namespace qdesigner_internal
106
107QT_END_NAMESPACE
108
109#endif // SHARED_SETTINGS_H
bool activateIdentifier(const QString &identifier, QString *errorMessage)
bool isRunning() const
bool showPage(const QString &path, QString *errorMessage)
static QString qtReferenceManualUrl(int qtVersion=0)
static QString designerManualUrl(int qtVersion=0)
static QString documentUrl(const QString &prefix, int qtVersion=0)
bool activateKeyword(const QString &keyword, QString *errorMessage)
void restoreSettings(const QDesignerSettings &s, const DockWidgetList &dws, const QRect &desktopArea)
DockedMainWindow(QDesignerWorkbench *wb, QMenu *toolBarMenu, const DesignerToolWindowList &toolWindows)
DockWidgetList addToolWindows(const DesignerToolWindowList &toolWindows)
void saveSettings(QDesignerSettings &) const
QMdiSubWindow * createMdiSubWindow(QWidget *fw, Qt::WindowFlags f, const QKeySequence &designerCloseActionShortCut)
QMdiArea * mdiArea() const
void formWindowActivated(QDesignerFormWindow *)
bool event(QEvent *event) override
static QString mainWindowTitle()
CloseEventPolicy closeEventPolicy() const
Definition mainwindow.h:46
void closeEvent(QCloseEvent *e) override
This event handler is called with the given event when Qt receives a window close request for a top-l...
static int settingsVersion()
static QList< QToolBar * > createToolBars(const QDesignerActions *actions, bool singleToolBar)
void setCloseEventPolicy(CloseEventPolicy pol)
Definition mainwindow.h:47
QActionGroup * helpActions() const
QActionGroup * fileActions() const
QActionGroup * settingsActions() const
QAction * minimizeAction() const
QActionGroup * styleActions() const
QActionGroup * editActions() const
QActionGroup * uiMode() const
bool writeOutForm(QDesignerFormWindowInterface *formWindow, const QString &fileName, bool check=true)
QString uiExtension() const
QActionGroup * formActions() const
bool openForm(QWidget *parent)
QDesignerFormEditorInterface * core() const
QActionGroup * toolActions() const
QAction * previewFormAction() const
QActionGroup * windowActions() const
bool readInForm(const QString &fileName)
QAction * closeFormAction() const
void setWindowListSeparatorVisible(bool visible)
bool saveForm(QDesignerFormWindowInterface *fw)
QAction * editWidgets() const
QAction * openFormAction() const
QAction * viewCodeAction() const
QDesignerWorkbench * workbench() const
void helpRequested(const QString &manual, const QString &document)
static const char * defaultToolbarPropertyName
void setBringAllToFrontVisible(bool visible)
QActionGroup * recentFilesActions() const
QStringList recentFilesList() const
void setToolWindowFont(const ToolWindowFontSettings &fontSettings)
void setShowNewFormOnStartup(bool showIt)
void setUiMode(UIMode mode)
void setBackup(const QMap< QString, QString > &map)
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
void restoreGeometry(QWidget *w, QRect fallBack=QRect()) const
QByteArray mainWindowState(UIMode mode) const
QDesignerSettings(QDesignerFormEditorInterface *core)
QMap< QString, QString > backup() const
QByteArray toolBarsState(UIMode mode) const
void setRecentFilesList(const QStringList &list)
void setValue(const QString &key, const QVariant &value)
ToolWindowFontSettings toolWindowFont() const
void saveGeometryFor(const QWidget *w)
bool showNewFormOnStartup() const
QDesignerActions * actionManager() const
friend class QWidget
Definition qpainter.h:421
The QtToolBarDialog class provides a dialog for customizing toolbars.
void setToolBarManager(QtToolBarManager *toolBarManager)
Connects the toolbar dialog to the given toolBarManager.
The QtToolBarManager class provides toolbar management for main windows.
QByteArray saveState(int version=0) const
Saves the state of the toolbar manager's toolbars.
bool restoreState(const QByteArray &state, int version=0)
Restores the saved state of the toolbar manager's toolbars.
void setMainWindow(QMainWindow *mainWindow)
Sets the main window upon which the toolbar manager operates, to be the given mainWindow.
QByteArray saveState(int version=0) const
bool restoreState(const QByteArray &state, int version=0)
UIMode
@ DockedMode
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
#define qDesigner
Definition qdesigner.h:12
static void addActionsToToolBar(const ActionList &actions, QToolBar *t)
static void addActionsToToolBarManager(const ActionList &al, const QString &title, QtToolBarManager *tbm)
static QToolBar * createToolBar(const QString &title, const QString &objectName, const ActionList &actions)
bool toolBarTitleLessThan(const QToolBar *t1, const QToolBar *t2)
#define QDESIGNER_SHARED_EXPORT