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
abstractformwindowmanager.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#ifndef ABSTRACTFORMWINDOWMANAGER_H
5#define ABSTRACTFORMWINDOWMANAGER_H
6
7#include <QtDesigner/sdk_global.h>
8#include <QtDesigner/abstractformwindow.h>
9
10#include <QtCore/qobject.h>
11
12QT_BEGIN_NAMESPACE
13
14class QDesignerFormEditorInterface;
15class QDesignerDnDItemInterface;
16
17class QWidget;
18class QPixmap;
19class QAction;
20class QActionGroup;
21
22class QDESIGNER_SDK_EXPORT QDesignerFormWindowManagerInterface: public QObject
23{
24 Q_OBJECT
25public:
26 explicit QDesignerFormWindowManagerInterface(QObject *parent = nullptr);
27 ~QDesignerFormWindowManagerInterface() override;
28
29 enum Action
30 {
31#if QT_CONFIG(clipboard)
32 CutAction = 100,
33 CopyAction,
34 PasteAction,
35#endif
36 DeleteAction = 103,
37 SelectAllAction,
38
39 LowerAction = 200,
40 RaiseAction,
41
42 UndoAction = 300,
43 RedoAction,
44
45 HorizontalLayoutAction = 400,
46 VerticalLayoutAction,
47 SplitHorizontalAction,
48 SplitVerticalAction,
49 GridLayoutAction,
50 FormLayoutAction,
51 BreakLayoutAction,
52 AdjustSizeAction,
53 SimplifyLayoutAction,
54
55 DefaultPreviewAction = 500,
56
57 FormWindowSettingsDialogAction = 600
58 };
59 Q_ENUM(Action)
60
61 enum ActionGroup
62 {
63 StyledPreviewActionGroup = 100
64 };
65 Q_ENUM(ActionGroup)
66
67 virtual QAction *action(Action action) const = 0;
68 virtual QActionGroup *actionGroup(ActionGroup actionGroup) const = 0;
69
70#if QT_CONFIG(clipboard)
71 QAction *actionCut() const;
72 QAction *actionCopy() const;
73 QAction *actionPaste() const;
74#endif
75 QAction *actionDelete() const;
76 QAction *actionSelectAll() const;
77 QAction *actionLower() const;
78 QAction *actionRaise() const;
79 QAction *actionUndo() const;
80 QAction *actionRedo() const;
81
82 QAction *actionHorizontalLayout() const;
83 QAction *actionVerticalLayout() const;
84 QAction *actionSplitHorizontal() const;
85 QAction *actionSplitVertical() const;
86 QAction *actionGridLayout() const;
87 QAction *actionFormLayout() const;
88 QAction *actionBreakLayout() const;
89 QAction *actionAdjustSize() const;
90 QAction *actionSimplifyLayout() const;
91
92 virtual QDesignerFormWindowInterface *activeFormWindow() const = 0;
93
94 virtual int formWindowCount() const = 0;
95 virtual QDesignerFormWindowInterface *formWindow(int index) const = 0;
96
97 virtual QDesignerFormWindowInterface *createFormWindow(QWidget *parentWidget = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()) = 0;
98
99 virtual QDesignerFormEditorInterface *core() const = 0;
100
101 virtual void dragItems(const QList<QDesignerDnDItemInterface*> &item_list) = 0;
102
103 virtual QPixmap createPreviewPixmap() const = 0;
104
105Q_SIGNALS:
106 void formWindowAdded(QDesignerFormWindowInterface *formWindow);
107 void formWindowRemoved(QDesignerFormWindowInterface *formWindow);
108 void activeFormWindowChanged(QDesignerFormWindowInterface *formWindow);
109 void formWindowSettingsChanged(QDesignerFormWindowInterface *fw);
110
111public Q_SLOTS:
112 virtual void addFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
113 virtual void removeFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
114 virtual void setActiveFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
115 virtual void showPreview() = 0;
116 virtual void closeAllPreviews() = 0;
117 virtual void showPluginDialog() = 0;
118};
119
120QT_END_NAMESPACE
121
122#endif // ABSTRACTFORMWINDOWMANAGER_H
The QDesignerFormWindowManagerInterface class allows you to manipulate the collection of form windows...
friend class QWidget
Definition qpainter.h:431
Combined button and popup list for selecting options.