4#ifndef QDESIGNER_RESOURCE_H
5#define QDESIGNER_RESOURCE_H
10#include <QtCore/qhash.h>
11#include <QtCore/qstack.h>
12#include <QtCore/qlist.h>
17class DomCustomWidgets;
21class QDesignerFormEditorInterface;
29class QDesignerDockWidget;
45 bool copy(QIODevice *dev,
const FormBuilderClipboard &selection)
override;
46 DomUI *
copy(
const FormBuilderClipboard &selection)
override;
56 DomUI *
readUi(QIODevice *dev);
60 using QEditorFormBuilder::create;
61 using QEditorFormBuilder::createDom;
68 void applyProperties(QObject *o,
const QList<DomProperty*> &properties)
override;
70 DomProperty *createProperty(QObject *object,
const QString &propertyName,
const QVariant &value) override;
72 QWidget *createWidget(
const QString &widgetName,
QWidget *parentWidget,
const QString &name) override;
73 QLayout *createLayout(
const QString &layoutName, QObject *parent,
const QString &name) override;
78 bool addItem(DomLayoutItem *ui_item, QLayoutItem *item, QLayout *layout)
override;
82 DomLayout *
createDom(QLayout *layout, DomLayout *ui_layout, DomWidget *ui_parentWidget)
override;
83 DomLayoutItem *
createDom(QLayoutItem *item, DomLayout *ui_layout, DomWidget *ui_parentWidget)
override;
86 QActionGroup *
create(DomActionGroup *ui_action_group, QObject *parent)
override;
93 QAction *createAction(QObject *parent,
const QString &name) override;
94 QActionGroup *createActionGroup(QObject *parent,
const QString &name) override;
96 bool checkProperty(QObject *obj,
const QString &prop)
const override;
98 DomWidget *
saveWidget(QTabWidget *widget, DomWidget *ui_parentWidget);
99 DomWidget *
saveWidget(QStackedWidget *widget, DomWidget *ui_parentWidget);
100 DomWidget *
saveWidget(QToolBox *widget, DomWidget *ui_parentWidget);
102 DomWidget *
saveWidget(QToolBar *toolBar, DomWidget *ui_parentWidget);
103 DomWidget *
saveWidget(QDesignerDockWidget *dockWidget, DomWidget *ui_parentWidget);
104 DomWidget *
saveWidget(QWizardPage *wizardPage, DomWidget *ui_parentWidget);
110 void layoutInfo(DomLayout *layout, QObject *parent,
int *margin,
int *spacing)
override;
114 void changeObjectName(QObject *o, QString name);
115 DomProperty *applyProperStdSetAttribute(QObject *object,
const QString &propertyName, DomProperty *property);
118 DomResources *saveResources(
const QStringList &qrcPaths);
119 bool canCompressSpacings(QObject *object)
const;
120 QStringList mergeWithLoadedPaths(
const QStringList &paths)
const;
121 void applyAttributesToPropertySheet(
const DomWidget *ui_widget,
QWidget *widget);
124 void addCustomWidgetsToWidgetDatabase(DomCustomWidgetList& list);
127 QHash<QString, QString> m_internal_to_qt;
128 QHash<QString, QString> m_qt_to_internal;
129 QStack<QLayout*> m_chain;
130 QHash<QDesignerWidgetDataBaseItemInterface*,
bool> m_usedCustomWidgets;
DomActionGroup * createDom(QActionGroup *actionGroup) override
QWidget * load(QIODevice *dev, QWidget *parentWidget) override
Loads an XML representation of a widget from the given device, and constructs a new widget with the s...
bool addItem(DomLayoutItem *ui_item, QLayoutItem *item, QLayout *layout) override
void addMenuAction(QAction *action) override
DomLayoutItem * createDom(QLayoutItem *item, DomLayout *ui_layout, DomWidget *ui_parentWidget) override
DomActionRef * createActionRefDom(QAction *action) override
DomLayout * createDom(QLayout *layout, DomLayout *ui_layout, DomWidget *ui_parentWidget) override
void applyProperties(QObject *o, const QList< DomProperty * > &properties) override
void createCustomWidgets(DomCustomWidgets *) override
QLayout * create(DomLayout *ui_layout, QLayout *layout, QWidget *parentWidget) override
void applyTabStops(QWidget *widget, DomTabStops *tabStops) override
DomWidget * saveWidget(QToolBar *toolBar, DomWidget *ui_parentWidget)
DomCustomWidgets * saveCustomWidgets() override
DomWidget * saveWidget(QDesignerDockWidget *dockWidget, DomWidget *ui_parentWidget)
DomUI * copy(const FormBuilderClipboard &selection) override
QAction * create(DomAction *ui_action, QObject *parent) override
DomUI * readUi(QIODevice *dev)
QActionGroup * create(DomActionGroup *ui_action_group, QObject *parent) override
DomWidget * saveWidget(QWizardPage *wizardPage, DomWidget *ui_parentWidget)
void saveDom(DomUI *ui, QWidget *widget) override
void createResources(DomResources *) override
void save(QIODevice *dev, QWidget *widget) override
Saves an XML representation of the given widget to the specified device in the standard UI file forma...
QLayoutItem * create(DomLayoutItem *ui_layoutItem, QLayout *layout, QWidget *parentWidget) override
DomResources * saveResources() override
QWidget * create(DomUI *ui, QWidget *parentWidget) override
QWidget * loadUi(DomUI *ui, QWidget *parentWidget)
void loadExtraInfo(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget) override
void setSaveRelative(bool relative)
QDesignerResource(FormWindow *fw)
DomWidget * createDom(QWidget *widget, DomWidget *ui_parentWidget, bool recursive=true) override
DomWidget * saveWidget(QTabWidget *widget, DomWidget *ui_parentWidget)
DomWidget * saveWidget(QToolBox *widget, DomWidget *ui_parentWidget)
FormBuilderClipboard paste(DomUI *ui, QWidget *widgetParent, QObject *actionParent=nullptr) override
DomWidget * saveWidget(QWidget *widget, QDesignerContainerExtension *container, DomWidget *ui_parentWidget)
bool addItem(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget) override
void layoutInfo(DomLayout *layout, QObject *parent, int *margin, int *spacing) override
FormBuilderClipboard paste(QIODevice *dev, QWidget *widgetParent, QObject *actionParent=nullptr) override
QList< DomProperty * > computeProperties(QObject *obj) override
DomWidget * saveWidget(QStackedWidget *widget, DomWidget *ui_parentWidget)
QWidget * create(DomWidget *ui_widget, QWidget *parentWidget) override
DomTabStops * saveTabStops() override
bool saveRelative() const
DomAction * createDom(QAction *action) override
bool copy(QIODevice *dev, const FormBuilderClipboard &selection) override
~QDesignerResource() override
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
static unsigned mouseFlags(Qt::KeyboardModifiers mod)
static void insertNames(const QDesignerMetaDataBaseInterface *metaDataBase, Iterator it, const Iterator &end, QObject *excludedObject, QSet< QString > &nameSet)
static void clearObjectInspectorSelection(const QDesignerFormEditorInterface *core)
static bool canDragWidgetInLayout(const QDesignerFormEditorInterface *core, QWidget *w)
@ ToggleSelectionModifier
static bool isDescendant(const QWidget *parent, const QWidget *child)
static QSet< QString > languageKeywords()
static QWidget * findSelectedParent(QDesignerFormWindowInterface *fw, const QWidget *w, bool selected)
#define QDESIGNER_SHARED_EXPORT
QRect apply(QRect rect) const