1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt Designer of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:GPL-EXCEPT$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU
19** General Public License version 3 as published by the Free Software
20** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
21** included in the packaging of this file. Please review the following
22** information to ensure the GNU General Public License requirements will
23** be met: https://www.gnu.org/licenses/gpl-3.0.html.
24**
25** $QT_END_LICENSE$
26**
27****************************************************************************/
28
29#ifndef ABSTRACTFORMEDITOR_H
30#define ABSTRACTFORMEDITOR_H
31
32#include <QtDesigner/sdk_global.h>
33
34#include <QtCore/qobject.h>
35#include <QtCore/qpointer.h>
36
37QT_BEGIN_NAMESPACE
38
39class QDesignerWidgetBoxInterface;
40class QDesignerPropertyEditorInterface;
41class QDesignerFormWindowManagerInterface;
42class QDesignerWidgetDataBaseInterface;
43class QDesignerMetaDataBaseInterface;
44class QDesignerWidgetFactoryInterface;
45class QDesignerObjectInspectorInterface;
46class QDesignerPromotionInterface;
47class QDesignerActionEditorInterface;
48class QDesignerIntegrationInterface;
49class QDesignerPluginManager;
50class QDesignerIntrospectionInterface;
51class QDesignerDialogGuiInterface;
52class QDesignerSettingsInterface;
53class QDesignerOptionsPageInterface;
54class QtResourceModel;
55class QtGradientManager;
56
57class QWidget;
58class QIcon;
59
60class QExtensionManager;
61
62class QDesignerFormEditorInterfacePrivate;
63
64class QDESIGNER_SDK_EXPORT QDesignerFormEditorInterface : public QObject
65{
66 Q_OBJECT
67public:
68 explicit QDesignerFormEditorInterface(QObject *parent = nullptr);
69 virtual ~QDesignerFormEditorInterface();
70
71 QExtensionManager *extensionManager() const;
72
73 QWidget *topLevel() const;
74 QDesignerWidgetBoxInterface *widgetBox() const;
75 QDesignerPropertyEditorInterface *propertyEditor() const;
76 QDesignerObjectInspectorInterface *objectInspector() const;
77 QDesignerFormWindowManagerInterface *formWindowManager() const;
78 QDesignerWidgetDataBaseInterface *widgetDataBase() const;
79 QDesignerMetaDataBaseInterface *metaDataBase() const;
80 QDesignerPromotionInterface *promotion() const;
81 QDesignerWidgetFactoryInterface *widgetFactory() const;
82 QDesignerActionEditorInterface *actionEditor() const;
83 QDesignerIntegrationInterface *integration() const;
84 QDesignerPluginManager *pluginManager() const;
85 QDesignerIntrospectionInterface *introspection() const;
86 QDesignerDialogGuiInterface *dialogGui() const;
87 QDesignerSettingsInterface *settingsManager() const;
88 QString resourceLocation() const;
89 QtResourceModel *resourceModel() const;
90 QtGradientManager *gradientManager() const;
91 QList<QDesignerOptionsPageInterface*> optionsPages() const;
92
93 void setTopLevel(QWidget *topLevel);
94 void setWidgetBox(QDesignerWidgetBoxInterface *widgetBox);
95 void setPropertyEditor(QDesignerPropertyEditorInterface *propertyEditor);
96 void setObjectInspector(QDesignerObjectInspectorInterface *objectInspector);
97 void setPluginManager(QDesignerPluginManager *pluginManager);
98 void setActionEditor(QDesignerActionEditorInterface *actionEditor);
99 void setIntegration(QDesignerIntegrationInterface *integration);
100 void setIntrospection(QDesignerIntrospectionInterface *introspection);
101 void setDialogGui(QDesignerDialogGuiInterface *dialogGui);
102 void setSettingsManager(QDesignerSettingsInterface *settingsManager);
103 void setResourceModel(QtResourceModel *model);
104 void setGradientManager(QtGradientManager *manager);
105 void setOptionsPages(const QList<QDesignerOptionsPageInterface*> &optionsPages);
106
107 QObjectList pluginInstances() const;
108
109 static QIcon createIcon(const QString &name);
110
111protected:
112 void setFormManager(QDesignerFormWindowManagerInterface *formWindowManager);
113 void setMetaDataBase(QDesignerMetaDataBaseInterface *metaDataBase);
114 void setWidgetDataBase(QDesignerWidgetDataBaseInterface *widgetDataBase);
115 void setPromotion(QDesignerPromotionInterface *promotion);
116 void setWidgetFactory(QDesignerWidgetFactoryInterface *widgetFactory);
117 void setExtensionManager(QExtensionManager *extensionManager);
118
119private:
120 QScopedPointer<QDesignerFormEditorInterfacePrivate> d;
121
122private:
123 QDesignerFormEditorInterface(const QDesignerFormEditorInterface &other);
124 void operator = (const QDesignerFormEditorInterface &other);
125};
126
127QT_END_NAMESPACE
128
129#endif // ABSTRACTFORMEDITOR_H
130

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