1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the designer application of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
29
#include "abstractformeditor.h"
31
#include <QtDesigner/abstractformwindow.h>
32
#include <QtDesigner/abstractformwindowmanager.h>
33
#include <QtDesigner/abstractimagecollection.h>
34
#include <QtDesigner/abstractmetadatabase.h>
35
#include <QtDesigner/abstractwidgetbox.h>
36
#include <QtDesigner/abstractwidgetfactory.h>
37
#include <QtDesigner/abstractpropertyeditor.h>
38
#include <QtDesigner/abstractwidgetdatabase.h>
39
#include <QtDesigner/abstractobjectinspector.h>
40
#include <QtDesigner/qextensionmanager.h>
41
#include <QtDesigner/abstracticoncache.h>
46
\class QDesignerFormEditorInterface
47
\brief The QDesignerFormEditorInterface class provides an interface that is used to
48
control \QD's form editor component.
53
Constructs a form editor interface with the given \a parent.*/
54
QDesignerFormEditorInterface::QDesignerFormEditorInterface(QObject *parent)
59
m_formWindowManager(0),
60
m_extensionManager(0),
69
Destroys the interface to the form editor.*/
70
QDesignerFormEditorInterface::~QDesignerFormEditorInterface()
75
Returns an interface to \QD's widget box.*/
76
QDesignerWidgetBoxInterface *QDesignerFormEditorInterface::widgetBox() const
77
{ return m_widgetBox; }
80
Sets the widget box used by the form editor to the specified \a widgetBox.*/
81
void QDesignerFormEditorInterface::setWidgetBox(QDesignerWidgetBoxInterface *widgetBox)
82
{ m_widgetBox = widgetBox; }
85
Returns an interface to the property editor used by the form editor.*/
86
QDesignerPropertyEditorInterface *QDesignerFormEditorInterface::propertyEditor() const
87
{ return m_propertyEditor; }
90
Sets the property editor used by the form editor to the specified \a propertyEditor.*/
91
void QDesignerFormEditorInterface::setPropertyEditor(QDesignerPropertyEditorInterface *propertyEditor)
92
{ m_propertyEditor = propertyEditor; }
95
Returns the top-level widget used by the form editor.*/
96
QWidget *QDesignerFormEditorInterface::topLevel() const
97
{ return m_topLevel; }
102
void QDesignerFormEditorInterface::setTopLevel(QWidget *topLevel)
103
{ m_topLevel = topLevel; }
106
Returns the interface used to control the form window manager.*/
107
QDesignerFormWindowManagerInterface *QDesignerFormEditorInterface::formWindowManager() const
108
{ return m_formWindowManager; }
113
void QDesignerFormEditorInterface::setFormManager(QDesignerFormWindowManagerInterface *formWindowManager)
114
{ m_formWindowManager = formWindowManager; }
117
Returns the extension manager used by the form editor.*/
118
QExtensionManager *QDesignerFormEditorInterface::extensionManager() const
119
{ return m_extensionManager; }
124
void QDesignerFormEditorInterface::setExtensionManager(QExtensionManager *extensionManager)
125
{ m_extensionManager = extensionManager; }
128
Returns an interface to the meta database used by the form editor.*/
129
QDesignerMetaDataBaseInterface *QDesignerFormEditorInterface::metaDataBase() const
130
{ return m_metaDataBase; }
135
void QDesignerFormEditorInterface::setMetaDataBase(QDesignerMetaDataBaseInterface *metaDataBase)
136
{ m_metaDataBase = metaDataBase; }
139
Returns an interface to the widget database used by the form editor.*/
140
QDesignerWidgetDataBaseInterface *QDesignerFormEditorInterface::widgetDataBase() const
141
{ return m_widgetDataBase; }
146
void QDesignerFormEditorInterface::setWidgetDataBase(QDesignerWidgetDataBaseInterface *widgetDataBase)
147
{ m_widgetDataBase = widgetDataBase; }
150
Returns an interface to the widget factory used by the form editor to create widgets
152
QDesignerWidgetFactoryInterface *QDesignerFormEditorInterface::widgetFactory() const
153
{ return m_widgetFactory; }
158
void QDesignerFormEditorInterface::setWidgetFactory(QDesignerWidgetFactoryInterface *widgetFactory)
159
{ m_widgetFactory = widgetFactory; }
162
Returns an interface to the object inspector used by the form editor.*/
163
QDesignerObjectInspectorInterface *QDesignerFormEditorInterface::objectInspector() const
164
{ return m_objectInspector; }
167
Sets the object inspector used by the form editor to the specified \a objectInspector.*/
168
void QDesignerFormEditorInterface::setObjectInspector(QDesignerObjectInspectorInterface *objectInspector)
169
{ m_objectInspector = objectInspector; }
172
Returns an interface to the icon cache used by the form editor to manage icons.*/
173
QDesignerIconCacheInterface *QDesignerFormEditorInterface::iconCache() const
174
{ return m_iconCache; }
179
void QDesignerFormEditorInterface::setIconCache(QDesignerIconCacheInterface *cache)
180
{ m_iconCache = cache; }
183
Returns the plugin manager used by the form editor.*/
184
PluginManager *QDesignerFormEditorInterface::pluginManager() const
185
{ return m_pluginManager; }
188
Sets the plugin manager used by the form editor to the specified \a pluginManager.*/
189
void QDesignerFormEditorInterface::setPluginManager(PluginManager *pluginManager)
190
{ m_pluginManager = pluginManager; }
193
Returns the path to the resources used by the form editor.*/
194
QString QDesignerFormEditorInterface::resourceLocation() const
197
return QLatin1String(":/trolltech/formeditor/images/mac");
199
return QLatin1String(":/trolltech/formeditor/images/win");