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
qttoolbardialog_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 LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
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 QTTOOLBARDIALOG_H
16#define QTTOOLBARDIALOG_H
17
18#include <QtWidgets/QDialog>
19
21
22class QMainWindow;
23class QAction;
24class QToolBar;
25
27
29{
31public:
32
33 explicit QtToolBarManager(QObject *parent = 0);
35
36 void setMainWindow(QMainWindow *mainWindow);
37 QMainWindow *mainWindow() const;
38
39 void addAction(QAction *action, const QString &category);
40 void removeAction(QAction *action);
41
42 void addToolBar(QToolBar *toolBar, const QString &category);
43 void removeToolBar(QToolBar *toolBar);
44
45 QList<QToolBar *> toolBars() const;
46
47 QByteArray saveState(int version = 0) const;
48 bool restoreState(const QByteArray &state, int version = 0);
49
50private:
51
52 friend class QtToolBarDialog;
53 QScopedPointer<QtToolBarManagerPrivate> d_ptr;
56};
57
59
61{
63public:
64
65 explicit QtToolBarDialog(QWidget *parent = 0, Qt::WindowFlags flags = {});
67
68 void setToolBarManager(QtToolBarManager *toolBarManager);
69
70protected:
71
72 void showEvent(QShowEvent *event) override;
73 void hideEvent(QHideEvent *event) override;
74
75private:
76
77 QScopedPointer<QtToolBarDialogPrivate> d_ptr;
80};
81
82QT_END_NAMESPACE
83
84#endif
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
QDesignerFormWindowInterface * editor() const
void closeEvent(QCloseEvent *ev) override
This event handler is called with the given event when Qt receives a window close request for a top-l...
QDesignerWorkbench * workbench() const
void changeEvent(QEvent *e) override
This event handler can be reimplemented to handle state changes.
void resizeEvent(QResizeEvent *rev) override
This event handler can be reimplemented in a subclass to receive widget resize events which are passe...
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
static QDesignerToolWindow * createStandardToolWindow(StandardToolWindow which, QDesignerWorkbench *workbench)
Qt::DockWidgetArea dockWidgetAreaHint() const
void hideEvent(QHideEvent *e) override
This event handler can be reimplemented in a subclass to receive widget hide events.
QDesignerWorkbench * workbench() const
void changeEvent(QEvent *e) override
This event handler can be reimplemented to handle state changes.
void showEvent(QShowEvent *e) override
This event handler can be reimplemented in a subclass to receive widget show events which are passed ...
QDesignerActions * actionManager() const
QActionGroup * modeActionGroup() const
QDesignerToolWindow * toolWindow(int index) const
bool saveForm(QDesignerFormWindowInterface *fw)
QDesignerFormEditorInterface * core() const
void setSuppressNewFormShow(bool v)
bool suppressNewFormShow() const
QDesignerFormWindow * formWindow(int index) const
void removeFormWindow(QDesignerFormWindow *formWindow)
void updateBackup(QDesignerFormWindowInterface *fwi)
friend class QWidget
Definition qpainter.h:421
The QtToolBarDialog class provides a dialog for customizing toolbars.
void hideEvent(QHideEvent *event) override
\reimp
void showEvent(QShowEvent *event) override
\reimp
void setToolBarManager(QtToolBarManager *toolBarManager)
Connects the toolbar dialog to the given toolBarManager.
~QtToolBarDialog()
Destroys the toolbar dialog.
The QtToolBarManager class provides toolbar management for main windows.
void removeAction(QAction *action)
Removes the specified action from the manager's list of actions.
~QtToolBarManager()
Destroys the toolbar manager.
QMainWindow * mainWindow() const
Returns the main window associated this toolbar manager.
QList< QToolBar * > toolBars() const
Returns the manager's toolbar list.
void removeToolBar(QToolBar *toolBar)
Removes the specified toolBar from the manager's list.
QByteArray saveState(int version=0) const
Saves the state of the toolbar manager's toolbars.
void addAction(QAction *action, const QString &category)
Adds the given action to the given category in the manager's list of actions.
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.
void addToolBar(QToolBar *toolBar, const QString &category)
Adds the given toolBar to the manager's toolbar list.
QByteArray saveState(int version=0) const
bool restoreState(const QByteArray &state, int version=0)
UIMode
@ NeutralMode
@ 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
#define QDESIGNER_SHARED_IMPORT
friend bool comparesEqual(const ToolWindowFontSettings &lhs, const ToolWindowFontSettings &rhs) noexcept
QFontDatabase::WritingSystem m_writingSystem