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 ABSTRACTFORMEDITOR_H
5#define ABSTRACTFORMEDITOR_H
6
7#include <QtDesigner/sdk_global.h>
8
9#include <QtCore/qobject.h>
10#include <QtCore/qpointer.h>
11
12QT_BEGIN_NAMESPACE
13
14class QDesignerWidgetBoxInterface;
15class QDesignerPropertyEditorInterface;
16class QDesignerFormWindowManagerInterface;
17class QDesignerWidgetDataBaseInterface;
18class QDesignerMetaDataBaseInterface;
19class QDesignerWidgetFactoryInterface;
20class QDesignerObjectInspectorInterface;
21class QDesignerPromotionInterface;
22class QDesignerActionEditorInterface;
23class QDesignerIntegrationInterface;
24class QDesignerPluginManager;
25class QDesignerIntrospectionInterface;
26class QDesignerDialogGuiInterface;
27class QDesignerSettingsInterface;
28class QDesignerOptionsPageInterface;
29class QtResourceModel;
30class QtGradientManager;
31
32class QWidget;
33class QIcon;
34
35class QExtensionManager;
36
37class QDesignerFormEditorInterfacePrivate;
38
39class QDESIGNER_SDK_EXPORT QDesignerFormEditorInterface : public QObject
40{
41 Q_OBJECT
42public:
43 explicit QDesignerFormEditorInterface(QObject *parent = nullptr);
44 virtual ~QDesignerFormEditorInterface();
45
46 QExtensionManager *extensionManager() const;
47
48 QWidget *topLevel() const;
49 QDesignerWidgetBoxInterface *widgetBox() const;
50 QDesignerPropertyEditorInterface *propertyEditor() const;
51 QDesignerObjectInspectorInterface *objectInspector() const;
52 QDesignerFormWindowManagerInterface *formWindowManager() const;
53 QDesignerWidgetDataBaseInterface *widgetDataBase() const;
54 QDesignerMetaDataBaseInterface *metaDataBase() const;
55 QDesignerPromotionInterface *promotion() const;
56 QDesignerWidgetFactoryInterface *widgetFactory() const;
57 QDesignerActionEditorInterface *actionEditor() const;
58 QDesignerIntegrationInterface *integration() const;
59 QDesignerPluginManager *pluginManager() const;
60 QDesignerIntrospectionInterface *introspection() const;
61 QDesignerDialogGuiInterface *dialogGui() const;
62 QDesignerSettingsInterface *settingsManager() const;
63 QString resourceLocation() const;
64 QtResourceModel *resourceModel() const;
65 QtGradientManager *gradientManager() const;
66 QList<QDesignerOptionsPageInterface*> optionsPages() const;
67
68 void setTopLevel(QWidget *topLevel);
69 void setWidgetBox(QDesignerWidgetBoxInterface *widgetBox);
70 void setPropertyEditor(QDesignerPropertyEditorInterface *propertyEditor);
71 void setObjectInspector(QDesignerObjectInspectorInterface *objectInspector);
72 void setPluginManager(QDesignerPluginManager *pluginManager);
73 void setActionEditor(QDesignerActionEditorInterface *actionEditor);
74 void setIntegration(QDesignerIntegrationInterface *integration);
75 void setIntrospection(QDesignerIntrospectionInterface *introspection);
76 void setDialogGui(QDesignerDialogGuiInterface *dialogGui);
77 void setSettingsManager(QDesignerSettingsInterface *settingsManager);
78 void setResourceModel(QtResourceModel *model);
79 void setGradientManager(QtGradientManager *manager);
80 void setOptionsPages(const QList<QDesignerOptionsPageInterface*> &optionsPages);
81
82 QObjectList pluginInstances() const;
83
84 static QIcon createIcon(const QString &name);
85
86protected:
87 void setFormManager(QDesignerFormWindowManagerInterface *formWindowManager);
88 void setMetaDataBase(QDesignerMetaDataBaseInterface *metaDataBase);
89 void setWidgetDataBase(QDesignerWidgetDataBaseInterface *widgetDataBase);
90 void setPromotion(QDesignerPromotionInterface *promotion);
91 void setWidgetFactory(QDesignerWidgetFactoryInterface *widgetFactory);
92 void setExtensionManager(QExtensionManager *extensionManager);
93
94private:
95 QScopedPointer<QDesignerFormEditorInterfacePrivate> d;
96};
97
98QT_END_NAMESPACE
99
100#endif // ABSTRACTFORMEDITOR_H
101

source code of qttools/src/designer/src/lib/sdk/abstractformeditor.h