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