1 /****************************************************************************
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd.
4 ** Contact: http://www.qt.io/licensing/
5 **
6 ** This file is part of the Qt Designer of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
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 http://www.qt.io/terms-conditions. For further
15 ** information use the contact form at http://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 or version 3 as published by the Free
20 ** Software Foundation and appearing in the file LICENSE.LGPLv21 and
21 ** LICENSE.LGPLv3 included in the packaging of this file. Please review the
22 ** following information to ensure the GNU Lesser General Public License
23 ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
24 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 **
26 ** As a special exception, The Qt Company gives you certain additional
27 ** rights. These rights are described in The Qt Company LGPL Exception
28 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 **
30 ** GNU General Public License Usage
31 ** Alternatively, this file may be used under the terms of the GNU
32 ** General Public License version 3.0 as published by the Free Software
33 ** Foundation and appearing in the file LICENSE.GPL included in the
34 ** packaging of this file.  Please review the following information to
35 ** ensure the GNU General Public License version 3.0 requirements will be
36 ** met: http://www.gnu.org/copyleft/gpl.html.
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef ABSTRACTFORMEDITOR_H
43 #define ABSTRACTFORMEDITOR_H
44 
45 #include <QtDesigner/sdk_global.h>
46 
47 #include <QtCore/QObject>
48 #include <QtCore/QPointer>
49 
50 QT_BEGIN_HEADER
51 
52 QT_BEGIN_NAMESPACE
53 
54 class QDesignerWidgetBoxInterface;
55 class QDesignerPropertyEditorInterface;
56 class QDesignerFormWindowManagerInterface;
57 class QDesignerWidgetDataBaseInterface;
58 class QDesignerMetaDataBaseInterface;
59 class QDesignerWidgetFactoryInterface;
60 class QDesignerObjectInspectorInterface;
61 class QDesignerPromotionInterface;
62 class QDesignerBrushManagerInterface;
63 class QDesignerIconCacheInterface;
64 class QDesignerActionEditorInterface;
65 class QDesignerIntegrationInterface;
66 class QDesignerPluginManager;
67 class QDesignerIntrospectionInterface;
68 class QDesignerDialogGuiInterface;
69 class QDesignerSettingsInterface;
70 class QDesignerOptionsPageInterface;
71 class QtResourceModel;
72 class QtGradientManager;
73 
74 class QWidget;
75 
76 class QExtensionManager;
77 
78 class  QDesignerFormEditorInterfacePrivate;
79 
80 class QDESIGNER_SDK_EXPORT QDesignerFormEditorInterface : public QObject
81 {
82     Q_OBJECT
83 public:
84     QDesignerFormEditorInterface(QObject *parent = 0);
85     virtual ~QDesignerFormEditorInterface();
86 
87     QExtensionManager *extensionManager() const;
88 
89     QWidget *topLevel() const;
90     QDesignerWidgetBoxInterface *widgetBox() const;
91     QDesignerPropertyEditorInterface *propertyEditor() const;
92     QDesignerObjectInspectorInterface *objectInspector() const;
93     QDesignerFormWindowManagerInterface *formWindowManager() const;
94     QDesignerWidgetDataBaseInterface *widgetDataBase() const;
95     QDesignerMetaDataBaseInterface *metaDataBase() const;
96     QDesignerPromotionInterface *promotion() const;
97     QDesignerWidgetFactoryInterface *widgetFactory() const;
98     QDesignerBrushManagerInterface *brushManager() const;
99     QDesignerIconCacheInterface *iconCache() const;
100     QDesignerActionEditorInterface *actionEditor() const;
101     QDesignerIntegrationInterface *integration() const;
102     QDesignerPluginManager *pluginManager() const;
103     QDesignerIntrospectionInterface *introspection() const;
104     QDesignerDialogGuiInterface *dialogGui() const;
105     QDesignerSettingsInterface *settingsManager() const;
106     QString resourceLocation() const;
107     QtResourceModel *resourceModel() const;
108     QtGradientManager *gradientManager() const;
109     QList<QDesignerOptionsPageInterface*> optionsPages() const;
110 
111     void setTopLevel(QWidget *topLevel);
112     void setWidgetBox(QDesignerWidgetBoxInterface *widgetBox);
113     void setPropertyEditor(QDesignerPropertyEditorInterface *propertyEditor);
114     void setObjectInspector(QDesignerObjectInspectorInterface *objectInspector);
115     void setPluginManager(QDesignerPluginManager *pluginManager);
116     void setActionEditor(QDesignerActionEditorInterface *actionEditor);
117     void setIntegration(QDesignerIntegrationInterface *integration);
118     void setIntrospection(QDesignerIntrospectionInterface *introspection);
119     void setDialogGui(QDesignerDialogGuiInterface *dialogGui);
120     void setSettingsManager(QDesignerSettingsInterface *settingsManager);
121     void setResourceModel(QtResourceModel *model);
122     void setGradientManager(QtGradientManager *manager);
123     void setOptionsPages(const QList<QDesignerOptionsPageInterface*> &optionsPages);
124 
125 protected:
126     void setFormManager(QDesignerFormWindowManagerInterface *formWindowManager);
127     void setMetaDataBase(QDesignerMetaDataBaseInterface *metaDataBase);
128     void setWidgetDataBase(QDesignerWidgetDataBaseInterface *widgetDataBase);
129     void setPromotion(QDesignerPromotionInterface *promotion);
130     void setWidgetFactory(QDesignerWidgetFactoryInterface *widgetFactory);
131     void setExtensionManager(QExtensionManager *extensionManager);
132     void setBrushManager(QDesignerBrushManagerInterface *brushManager);
133     void setIconCache(QDesignerIconCacheInterface *cache);
134 
135 private:
136     QPointer<QWidget> m_pad1;
137     QPointer<QDesignerWidgetBoxInterface> m_pad2;
138     QPointer<QDesignerPropertyEditorInterface> m_pad3;
139     QPointer<QDesignerFormWindowManagerInterface> m_pad4;
140     QPointer<QExtensionManager> m_pad5;
141     QPointer<QDesignerMetaDataBaseInterface> m_pad6;
142     QPointer<QDesignerWidgetDataBaseInterface> m_pad7;
143     QPointer<QDesignerWidgetFactoryInterface> m_pad8;
144     QPointer<QDesignerObjectInspectorInterface> m_pad9;
145     QPointer<QDesignerBrushManagerInterface> m_pad10;
146     QPointer<QDesignerIconCacheInterface> m_pad11;
147     QPointer<QDesignerActionEditorInterface> m_pad12;
148     QDesignerFormEditorInterfacePrivate *d;
149 
150 private:
151     QDesignerFormEditorInterface(const QDesignerFormEditorInterface &other);
152     void operator = (const QDesignerFormEditorInterface &other);
153 };
154 
155 QT_END_NAMESPACE
156 
157 QT_END_HEADER
158 
159 #endif // ABSTRACTFORMEDITOR_H
160