8#include <QtDesigner/abstractoptionspage.h>
9#include <QtDesigner/abstractsettings.h>
10#include <QtDesigner/abstractpropertyeditor.h>
11#include <QtDesigner/abstractformwindowmanager.h>
12#include <QtDesigner/qextensionmanager.h>
13#include <QtDesigner/abstractmetadatabase.h>
14#include <QtDesigner/abstractwidgetdatabase.h>
15#include <QtDesigner/abstractwidgetfactory.h>
16#include <QtDesigner/abstractobjectinspector.h>
17#include <QtDesigner/abstractintegration.h>
18#include <QtDesigner/abstractactioneditor.h>
19#include <QtDesigner/abstractwidgetbox.h>
21#include <actioneditor_p.h>
22#include <pluginmanager_p.h>
23#include <qtresourcemodel_p.h>
24#include <qtgradientmanager_p.h>
25#include <widgetfactory_p.h>
26#include <shared_settings_p.h>
27#include <formwindowbase_p.h>
29#include <iconloader_p.h>
30#include <QtDesigner/abstractpromotioninterface.h>
32#include <QtGui/qicon.h>
37 Q_INIT_RESOURCE(shared);
38 Q_INIT_RESOURCE(ClamshellPhone);
39 Q_INIT_RESOURCE(PortableMedia);
40 Q_INIT_RESOURCE(S60_nHD_Touchscreen);
41 Q_INIT_RESOURCE(S60_QVGA_Candybar);
42 Q_INIT_RESOURCE(SmartPhone2);
43 Q_INIT_RESOURCE(SmartPhone);
44 Q_INIT_RESOURCE(SmartPhoneWithButtons);
45 Q_INIT_RESOURCE(TouchscreenPhone);
50using namespace Qt::StringLiterals;
84 delete m_formWindowManager;
88 delete m_resourceModel;
89 qDeleteAll(m_optionsPages);
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
135
136
137
139QDesignerFormEditorInterface::QDesignerFormEditorInterface(QObject *parent)
141 d(
new QDesignerFormEditorInterfacePrivate())
147
148
149QDesignerFormEditorInterface::~QDesignerFormEditorInterface() =
default;
152
153
154
155
156QDesignerWidgetBoxInterface *QDesignerFormEditorInterface::widgetBox()
const
158 return d->m_widgetBox;
162
163
164
165
166void QDesignerFormEditorInterface::setWidgetBox(QDesignerWidgetBoxInterface *widgetBox)
168 d->m_widgetBox = widgetBox;
172
173
174
175
176QDesignerPropertyEditorInterface *QDesignerFormEditorInterface::propertyEditor()
const
178 return d->m_propertyEditor;
182
183
184
185
186void QDesignerFormEditorInterface::setPropertyEditor(QDesignerPropertyEditorInterface *propertyEditor)
188 d->m_propertyEditor = propertyEditor;
192
193
194
195
196QDesignerActionEditorInterface *QDesignerFormEditorInterface::actionEditor()
const
198 return d->m_actionEditor;
202
203
204
205
206void QDesignerFormEditorInterface::setActionEditor(QDesignerActionEditorInterface *actionEditor)
208 d->m_actionEditor = actionEditor;
212
213
214QWidget *QDesignerFormEditorInterface::topLevel()
const
216 return d->m_topLevel;
220
221
222void QDesignerFormEditorInterface::setTopLevel(QWidget *topLevel)
224 d->m_topLevel = topLevel;
228
229
230QDesignerFormWindowManagerInterface *QDesignerFormEditorInterface::formWindowManager()
const
232 return d->m_formWindowManager;
236
237
238void QDesignerFormEditorInterface::setFormManager(QDesignerFormWindowManagerInterface *formWindowManager)
240 d->m_formWindowManager = formWindowManager;
244
245
246QExtensionManager *QDesignerFormEditorInterface::extensionManager()
const
248 return d->m_extensionManager;
252
253
254void QDesignerFormEditorInterface::setExtensionManager(QExtensionManager *extensionManager)
256 d->m_extensionManager = extensionManager;
260
261
262
263
264QDesignerMetaDataBaseInterface *QDesignerFormEditorInterface::metaDataBase()
const
266 return d->m_metaDataBase;
270
271
272void QDesignerFormEditorInterface::setMetaDataBase(QDesignerMetaDataBaseInterface *metaDataBase)
274 d->m_metaDataBase = metaDataBase;
278
279
280
281
282QDesignerWidgetDataBaseInterface *QDesignerFormEditorInterface::widgetDataBase()
const
284 return d->m_widgetDataBase;
288
289
290void QDesignerFormEditorInterface::setWidgetDataBase(QDesignerWidgetDataBaseInterface *widgetDataBase)
292 d->m_widgetDataBase = widgetDataBase;
296
297
298
299
301QDesignerPromotionInterface *QDesignerFormEditorInterface::promotion()
const
303 return d->m_promotion;
307
308
309
310
312void QDesignerFormEditorInterface::setPromotion(QDesignerPromotionInterface *promotion)
314 delete d->m_promotion;
315 d->m_promotion = promotion;
319
320
321
322
323
324QDesignerWidgetFactoryInterface *QDesignerFormEditorInterface::widgetFactory()
const
326 return d->m_widgetFactory;
330
331
332void QDesignerFormEditorInterface::setWidgetFactory(QDesignerWidgetFactoryInterface *widgetFactory)
334 d->m_widgetFactory = widgetFactory;
338
339
340QDesignerObjectInspectorInterface *QDesignerFormEditorInterface::objectInspector()
const
342 return d->m_objectInspector;
346
347
348
349
350
351void QDesignerFormEditorInterface::setObjectInspector(QDesignerObjectInspectorInterface *objectInspector)
353 d->m_objectInspector = objectInspector;
357
358
359
360
361QDesignerIntegrationInterface *QDesignerFormEditorInterface::integration()
const
363 return d->m_integration;
367
368
369void QDesignerFormEditorInterface::setIntegration(QDesignerIntegrationInterface *integration)
371 d->m_integration = integration;
375
376
377
378
379QList<QDesignerOptionsPageInterface*> QDesignerFormEditorInterface::optionsPages()
const
381 return d->m_optionsPages;
385
386
387
388
389void QDesignerFormEditorInterface::setOptionsPages(
const QList<QDesignerOptionsPageInterface*> &optionsPages)
391 d->m_optionsPages = optionsPages;
396
397
398
399
400QDesignerPluginManager *QDesignerFormEditorInterface::pluginManager()
const
402 return d->m_pluginManager;
406
407
408
409
410
411void QDesignerFormEditorInterface::setPluginManager(QDesignerPluginManager *pluginManager)
413 d->m_pluginManager = pluginManager;
417
418
419
420
421QtResourceModel *QDesignerFormEditorInterface::resourceModel()
const
423 return d->m_resourceModel;
427
428
429
430
431
432void QDesignerFormEditorInterface::setResourceModel(QtResourceModel *resourceModel)
434 d->m_resourceModel = resourceModel;
438
439
440
441
442QtGradientManager *QDesignerFormEditorInterface::gradientManager()
const
444 return d->m_gradientManager;
448
449
450
451
452
453void QDesignerFormEditorInterface::setGradientManager(QtGradientManager *gradientManager)
455 d->m_gradientManager = gradientManager;
459
460
461
462
463QDesignerSettingsInterface *QDesignerFormEditorInterface::settingsManager()
const
465 return d->m_settingsManager;
469
470
471
472
473void QDesignerFormEditorInterface::setSettingsManager(QDesignerSettingsInterface *settingsManager)
475 if (d->m_settingsManager)
476 delete d->m_settingsManager;
477 d->m_settingsManager = settingsManager;
481 const qdesigner_internal::QDesignerSharedSettings settings(
this);
482 qdesigner_internal::FormWindowBase::setDefaultDesignerGrid(settings.defaultGrid());
483 qdesigner_internal::ActionEditor::setObjectNamingMode(settings.objectNamingMode());
487
488
489
490
491QDesignerIntrospectionInterface *QDesignerFormEditorInterface::introspection()
const
493 return d->m_introspection;
497
498
499
500
501
502void QDesignerFormEditorInterface::setIntrospection(QDesignerIntrospectionInterface *introspection)
504 delete d->m_introspection;
505 d->m_introspection = introspection;
509
510
511
512
513QString QDesignerFormEditorInterface::resourceLocation()
const
516 return u":/qt-project.org/formeditor/images/mac"_s;
518 return u":/qt-project.org/formeditor/images/win"_s;
523
524
525
526
528QDesignerDialogGuiInterface *QDesignerFormEditorInterface::dialogGui()
const
530 return d->m_dialogGui;
534
535
536
537
539void QDesignerFormEditorInterface::setDialogGui(QDesignerDialogGuiInterface *dialogGui)
541 delete d->m_dialogGui;
542 d->m_dialogGui = dialogGui;
546
547
548
549
550
551
553QObjectList QDesignerFormEditorInterface::pluginInstances()
const
555 return d->m_pluginManager->instances();
559
560
561
562
563
564
566QIcon QDesignerFormEditorInterface::createIcon(
const QString &name)
568 return qdesigner_internal::createIconSet(name);