diff options
Diffstat (limited to 'src/tools/uic/ui4.h')
-rw-r--r-- | src/tools/uic/ui4.h | 2314 |
1 files changed, 800 insertions, 1514 deletions
diff --git a/src/tools/uic/ui4.h b/src/tools/uic/ui4.h index 820d2c5f8c..1710147342 100644 --- a/src/tools/uic/ui4.h +++ b/src/tools/uic/ui4.h @@ -45,6 +45,7 @@ #include <qlist.h> #include <qstring.h> #include <qstringlist.h> +#include <qvector.h> #include <qxmlstream.h> #include <qglobal.h> @@ -85,15 +86,9 @@ class DomAction; class DomActionRef; class DomButtonGroup; class DomButtonGroups; -class DomImages; -class DomImage; -class DomImageData; class DomCustomWidgets; class DomHeader; class DomCustomWidget; -class DomProperties; -class DomPropertyData; -class DomSizePolicyData; class DomLayoutDefault; class DomLayoutFunction; class DomTabStops; @@ -134,8 +129,6 @@ class DomConnections; class DomConnection; class DomConnectionHints; class DomConnectionHint; -class DomScript; -class DomWidgetData; class DomDesignerData; class DomSlots; class DomPropertySpecifications; @@ -147,31 +140,35 @@ class DomStringPropertySpecification; */ class QDESIGNER_UILIB_EXPORT DomUI { + Q_DISABLE_COPY(DomUI) public: - DomUI(); + DomUI() = default; ~DomUI(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeVersion() const { return m_has_attr_version; } inline QString attributeVersion() const { return m_attr_version; } - inline void setAttributeVersion(const QString& a) { m_attr_version = a; m_has_attr_version = true; } + inline void setAttributeVersion(const QString &a) { m_attr_version = a; m_has_attr_version = true; } inline void clearAttributeVersion() { m_has_attr_version = false; } inline bool hasAttributeLanguage() const { return m_has_attr_language; } inline QString attributeLanguage() const { return m_attr_language; } - inline void setAttributeLanguage(const QString& a) { m_attr_language = a; m_has_attr_language = true; } + inline void setAttributeLanguage(const QString &a) { m_attr_language = a; m_has_attr_language = true; } inline void clearAttributeLanguage() { m_has_attr_language = false; } inline bool hasAttributeDisplayname() const { return m_has_attr_displayname; } inline QString attributeDisplayname() const { return m_attr_displayname; } - inline void setAttributeDisplayname(const QString& a) { m_attr_displayname = a; m_has_attr_displayname = true; } + inline void setAttributeDisplayname(const QString &a) { m_attr_displayname = a; m_has_attr_displayname = true; } inline void clearAttributeDisplayname() { m_has_attr_displayname = false; } + inline bool hasAttributeIdbasedtr() const { return m_has_attr_idbasedtr; } + inline bool attributeIdbasedtr() const { return m_attr_idbasedtr; } + inline void setAttributeIdbasedtr(bool a) { m_attr_idbasedtr = a; m_has_attr_idbasedtr = true; } + inline void clearAttributeIdbasedtr() { m_has_attr_idbasedtr = false; } + inline bool hasAttributeStdsetdef() const { return m_has_attr_stdsetdef; } inline int attributeStdsetdef() const { return m_attr_stdsetdef; } inline void setAttributeStdsetdef(int a) { m_attr_stdsetdef = a; m_has_attr_stdsetdef = true; } @@ -184,141 +181,135 @@ public: // child element accessors inline QString elementAuthor() const { return m_author; } - void setElementAuthor(const QString& a); + void setElementAuthor(const QString &a); inline bool hasElementAuthor() const { return m_children & Author; } void clearElementAuthor(); inline QString elementComment() const { return m_comment; } - void setElementComment(const QString& a); + void setElementComment(const QString &a); inline bool hasElementComment() const { return m_children & Comment; } void clearElementComment(); inline QString elementExportMacro() const { return m_exportMacro; } - void setElementExportMacro(const QString& a); + void setElementExportMacro(const QString &a); inline bool hasElementExportMacro() const { return m_children & ExportMacro; } void clearElementExportMacro(); inline QString elementClass() const { return m_class; } - void setElementClass(const QString& a); + void setElementClass(const QString &a); inline bool hasElementClass() const { return m_children & Class; } void clearElementClass(); - inline DomWidget* elementWidget() const { return m_widget; } - DomWidget* takeElementWidget(); - void setElementWidget(DomWidget* a); + inline DomWidget *elementWidget() const { return m_widget; } + DomWidget *takeElementWidget(); + void setElementWidget(DomWidget *a); inline bool hasElementWidget() const { return m_children & Widget; } void clearElementWidget(); - inline DomLayoutDefault* elementLayoutDefault() const { return m_layoutDefault; } - DomLayoutDefault* takeElementLayoutDefault(); - void setElementLayoutDefault(DomLayoutDefault* a); + inline DomLayoutDefault *elementLayoutDefault() const { return m_layoutDefault; } + DomLayoutDefault *takeElementLayoutDefault(); + void setElementLayoutDefault(DomLayoutDefault *a); inline bool hasElementLayoutDefault() const { return m_children & LayoutDefault; } void clearElementLayoutDefault(); - inline DomLayoutFunction* elementLayoutFunction() const { return m_layoutFunction; } - DomLayoutFunction* takeElementLayoutFunction(); - void setElementLayoutFunction(DomLayoutFunction* a); + inline DomLayoutFunction *elementLayoutFunction() const { return m_layoutFunction; } + DomLayoutFunction *takeElementLayoutFunction(); + void setElementLayoutFunction(DomLayoutFunction *a); inline bool hasElementLayoutFunction() const { return m_children & LayoutFunction; } void clearElementLayoutFunction(); inline QString elementPixmapFunction() const { return m_pixmapFunction; } - void setElementPixmapFunction(const QString& a); + void setElementPixmapFunction(const QString &a); inline bool hasElementPixmapFunction() const { return m_children & PixmapFunction; } void clearElementPixmapFunction(); - inline DomCustomWidgets* elementCustomWidgets() const { return m_customWidgets; } - DomCustomWidgets* takeElementCustomWidgets(); - void setElementCustomWidgets(DomCustomWidgets* a); + inline DomCustomWidgets *elementCustomWidgets() const { return m_customWidgets; } + DomCustomWidgets *takeElementCustomWidgets(); + void setElementCustomWidgets(DomCustomWidgets *a); inline bool hasElementCustomWidgets() const { return m_children & CustomWidgets; } void clearElementCustomWidgets(); - inline DomTabStops* elementTabStops() const { return m_tabStops; } - DomTabStops* takeElementTabStops(); - void setElementTabStops(DomTabStops* a); + inline DomTabStops *elementTabStops() const { return m_tabStops; } + DomTabStops *takeElementTabStops(); + void setElementTabStops(DomTabStops *a); inline bool hasElementTabStops() const { return m_children & TabStops; } void clearElementTabStops(); - inline DomImages* elementImages() const { return m_images; } - DomImages* takeElementImages(); - void setElementImages(DomImages* a); - inline bool hasElementImages() const { return m_children & Images; } - void clearElementImages(); - - inline DomIncludes* elementIncludes() const { return m_includes; } - DomIncludes* takeElementIncludes(); - void setElementIncludes(DomIncludes* a); + inline DomIncludes *elementIncludes() const { return m_includes; } + DomIncludes *takeElementIncludes(); + void setElementIncludes(DomIncludes *a); inline bool hasElementIncludes() const { return m_children & Includes; } void clearElementIncludes(); - inline DomResources* elementResources() const { return m_resources; } - DomResources* takeElementResources(); - void setElementResources(DomResources* a); + inline DomResources *elementResources() const { return m_resources; } + DomResources *takeElementResources(); + void setElementResources(DomResources *a); inline bool hasElementResources() const { return m_children & Resources; } void clearElementResources(); - inline DomConnections* elementConnections() const { return m_connections; } - DomConnections* takeElementConnections(); - void setElementConnections(DomConnections* a); + inline DomConnections *elementConnections() const { return m_connections; } + DomConnections *takeElementConnections(); + void setElementConnections(DomConnections *a); inline bool hasElementConnections() const { return m_children & Connections; } void clearElementConnections(); - inline DomDesignerData* elementDesignerdata() const { return m_designerdata; } - DomDesignerData* takeElementDesignerdata(); - void setElementDesignerdata(DomDesignerData* a); + inline DomDesignerData *elementDesignerdata() const { return m_designerdata; } + DomDesignerData *takeElementDesignerdata(); + void setElementDesignerdata(DomDesignerData *a); inline bool hasElementDesignerdata() const { return m_children & Designerdata; } void clearElementDesignerdata(); - inline DomSlots* elementSlots() const { return m_slots; } - DomSlots* takeElementSlots(); - void setElementSlots(DomSlots* a); + inline DomSlots *elementSlots() const { return m_slots; } + DomSlots *takeElementSlots(); + void setElementSlots(DomSlots *a); inline bool hasElementSlots() const { return m_children & Slots; } void clearElementSlots(); - inline DomButtonGroups* elementButtonGroups() const { return m_buttonGroups; } - DomButtonGroups* takeElementButtonGroups(); - void setElementButtonGroups(DomButtonGroups* a); + inline DomButtonGroups *elementButtonGroups() const { return m_buttonGroups; } + DomButtonGroups *takeElementButtonGroups(); + void setElementButtonGroups(DomButtonGroups *a); inline bool hasElementButtonGroups() const { return m_children & ButtonGroups; } void clearElementButtonGroups(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_version; - bool m_has_attr_version; + bool m_has_attr_version = false; QString m_attr_language; - bool m_has_attr_language; + bool m_has_attr_language = false; QString m_attr_displayname; - bool m_has_attr_displayname; + bool m_has_attr_displayname = false; + + bool m_attr_idbasedtr = false; + bool m_has_attr_idbasedtr = false; - int m_attr_stdsetdef; - bool m_has_attr_stdsetdef; + int m_attr_stdsetdef = 0; + bool m_has_attr_stdsetdef = false; - int m_attr_stdSetDef; - bool m_has_attr_stdSetDef; + int m_attr_stdSetDef = 0; + bool m_has_attr_stdSetDef = false; // child element data - uint m_children; + uint m_children = 0; QString m_author; QString m_comment; QString m_exportMacro; QString m_class; - DomWidget* m_widget; - DomLayoutDefault* m_layoutDefault; - DomLayoutFunction* m_layoutFunction; + DomWidget *m_widget = nullptr; + DomLayoutDefault *m_layoutDefault = nullptr; + DomLayoutFunction *m_layoutFunction = nullptr; QString m_pixmapFunction; - DomCustomWidgets* m_customWidgets; - DomTabStops* m_tabStops; - DomImages* m_images; - DomIncludes* m_includes; - DomResources* m_resources; - DomConnections* m_connections; - DomDesignerData* m_designerdata; - DomSlots* m_slots; - DomButtonGroups* m_buttonGroups; + DomCustomWidgets *m_customWidgets = nullptr; + DomTabStops *m_tabStops = nullptr; + DomIncludes *m_includes = nullptr; + DomResources *m_resources = nullptr; + DomConnections *m_connections = nullptr; + DomDesignerData *m_designerdata = nullptr; + DomSlots *m_slots = nullptr; + DomButtonGroups *m_buttonGroups = nullptr; + enum Child { Author = 1, Comment = 2, @@ -330,586 +321,388 @@ private: PixmapFunction = 128, CustomWidgets = 256, TabStops = 512, - Images = 1024, - Includes = 2048, - Resources = 4096, - Connections = 8192, - Designerdata = 16384, - Slots = 32768, - ButtonGroups = 65536 + Includes = 1024, + Resources = 2048, + Connections = 4096, + Designerdata = 8192, + Slots = 16384, + ButtonGroups = 32768 }; - - DomUI(const DomUI &other); - void operator = (const DomUI&other); }; class QDESIGNER_UILIB_EXPORT DomIncludes { + Q_DISABLE_COPY(DomIncludes) public: - DomIncludes(); + DomIncludes() = default; ~DomIncludes(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline QList<DomInclude*> elementInclude() const { return m_include; } - void setElementInclude(const QList<DomInclude*>& a); + inline QVector<DomInclude *> elementInclude() const { return m_include; } + void setElementInclude(const QVector<DomInclude *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - QList<DomInclude*> m_include; + uint m_children = 0; + QVector<DomInclude *> m_include; + enum Child { Include = 1 }; - - DomIncludes(const DomIncludes &other); - void operator = (const DomIncludes&other); }; class QDESIGNER_UILIB_EXPORT DomInclude { + Q_DISABLE_COPY(DomInclude) public: - DomInclude(); + DomInclude() = default; ~DomInclude(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; + inline QString text() const { return m_text; } inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeLocation() const { return m_has_attr_location; } inline QString attributeLocation() const { return m_attr_location; } - inline void setAttributeLocation(const QString& a) { m_attr_location = a; m_has_attr_location = true; } + inline void setAttributeLocation(const QString &a) { m_attr_location = a; m_has_attr_location = true; } inline void clearAttributeLocation() { m_has_attr_location = false; } inline bool hasAttributeImpldecl() const { return m_has_attr_impldecl; } inline QString attributeImpldecl() const { return m_attr_impldecl; } - inline void setAttributeImpldecl(const QString& a) { m_attr_impldecl = a; m_has_attr_impldecl = true; } + inline void setAttributeImpldecl(const QString &a) { m_attr_impldecl = a; m_has_attr_impldecl = true; } inline void clearAttributeImpldecl() { m_has_attr_impldecl = false; } - // child element accessors private: QString m_text; - void clear(bool clear_all = true); // attribute data QString m_attr_location; - bool m_has_attr_location; + bool m_has_attr_location = false; QString m_attr_impldecl; - bool m_has_attr_impldecl; - - // child element data - uint m_children; - - DomInclude(const DomInclude &other); - void operator = (const DomInclude&other); + bool m_has_attr_impldecl = false; }; class QDESIGNER_UILIB_EXPORT DomResources { + Q_DISABLE_COPY(DomResources) public: - DomResources(); + DomResources() = default; ~DomResources(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } // child element accessors - inline QList<DomResource*> elementInclude() const { return m_include; } - void setElementInclude(const QList<DomResource*>& a); + inline QVector<DomResource *> elementInclude() const { return m_include; } + void setElementInclude(const QVector<DomResource *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; // child element data - uint m_children; - QList<DomResource*> m_include; + uint m_children = 0; + QVector<DomResource *> m_include; + enum Child { Include = 1 }; - - DomResources(const DomResources &other); - void operator = (const DomResources&other); }; class QDESIGNER_UILIB_EXPORT DomResource { + Q_DISABLE_COPY(DomResource) public: - DomResource(); + DomResource() = default; ~DomResource(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeLocation() const { return m_has_attr_location; } inline QString attributeLocation() const { return m_attr_location; } - inline void setAttributeLocation(const QString& a) { m_attr_location = a; m_has_attr_location = true; } + inline void setAttributeLocation(const QString &a) { m_attr_location = a; m_has_attr_location = true; } inline void clearAttributeLocation() { m_has_attr_location = false; } - // child element accessors private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_location; - bool m_has_attr_location; - - // child element data - uint m_children; - - DomResource(const DomResource &other); - void operator = (const DomResource&other); + bool m_has_attr_location = false; }; class QDESIGNER_UILIB_EXPORT DomActionGroup { + Q_DISABLE_COPY(DomActionGroup) public: - DomActionGroup(); + DomActionGroup() = default; ~DomActionGroup(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } // child element accessors - inline QList<DomAction*> elementAction() const { return m_action; } - void setElementAction(const QList<DomAction*>& a); + inline QVector<DomAction *> elementAction() const { return m_action; } + void setElementAction(const QVector<DomAction *> &a); - inline QList<DomActionGroup*> elementActionGroup() const { return m_actionGroup; } - void setElementActionGroup(const QList<DomActionGroup*>& a); + inline QVector<DomActionGroup *> elementActionGroup() const { return m_actionGroup; } + void setElementActionGroup(const QVector<DomActionGroup *> &a); inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty*>& a); + void setElementAttribute(const QList<DomProperty *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; // child element data - uint m_children; - QList<DomAction*> m_action; - QList<DomActionGroup*> m_actionGroup; + uint m_children = 0; + QVector<DomAction *> m_action; + QVector<DomActionGroup *> m_actionGroup; QList<DomProperty*> m_property; QList<DomProperty*> m_attribute; + enum Child { Action = 1, ActionGroup = 2, Property = 4, Attribute = 8 }; - - DomActionGroup(const DomActionGroup &other); - void operator = (const DomActionGroup&other); }; class QDESIGNER_UILIB_EXPORT DomAction { + Q_DISABLE_COPY(DomAction) public: - DomAction(); + DomAction() = default; ~DomAction(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } inline bool hasAttributeMenu() const { return m_has_attr_menu; } inline QString attributeMenu() const { return m_attr_menu; } - inline void setAttributeMenu(const QString& a) { m_attr_menu = a; m_has_attr_menu = true; } + inline void setAttributeMenu(const QString &a) { m_attr_menu = a; m_has_attr_menu = true; } inline void clearAttributeMenu() { m_has_attr_menu = false; } // child element accessors inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty*>& a); + void setElementAttribute(const QList<DomProperty *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; QString m_attr_menu; - bool m_has_attr_menu; + bool m_has_attr_menu = false; // child element data - uint m_children; + uint m_children = 0; QList<DomProperty*> m_property; QList<DomProperty*> m_attribute; + enum Child { Property = 1, Attribute = 2 }; - - DomAction(const DomAction &other); - void operator = (const DomAction&other); }; class QDESIGNER_UILIB_EXPORT DomActionRef { + Q_DISABLE_COPY(DomActionRef) public: - DomActionRef(); + DomActionRef() = default; ~DomActionRef(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } - // child element accessors private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - - DomActionRef(const DomActionRef &other); - void operator = (const DomActionRef&other); + bool m_has_attr_name = false; }; class QDESIGNER_UILIB_EXPORT DomButtonGroup { + Q_DISABLE_COPY(DomButtonGroup) public: - DomButtonGroup(); + DomButtonGroup() = default; ~DomButtonGroup(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } // child element accessors inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty*>& a); + void setElementAttribute(const QList<DomProperty *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; // child element data - uint m_children; + uint m_children = 0; QList<DomProperty*> m_property; QList<DomProperty*> m_attribute; + enum Child { Property = 1, Attribute = 2 }; - - DomButtonGroup(const DomButtonGroup &other); - void operator = (const DomButtonGroup&other); }; class QDESIGNER_UILIB_EXPORT DomButtonGroups { + Q_DISABLE_COPY(DomButtonGroups) public: - DomButtonGroups(); + DomButtonGroups() = default; ~DomButtonGroups(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline QList<DomButtonGroup*> elementButtonGroup() const { return m_buttonGroup; } - void setElementButtonGroup(const QList<DomButtonGroup*>& a); + inline QVector<DomButtonGroup *> elementButtonGroup() const { return m_buttonGroup; } + void setElementButtonGroup(const QVector<DomButtonGroup *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - QList<DomButtonGroup*> m_buttonGroup; - enum Child { - ButtonGroup = 1 - }; - - DomButtonGroups(const DomButtonGroups &other); - void operator = (const DomButtonGroups&other); -}; + uint m_children = 0; + QVector<DomButtonGroup *> m_buttonGroup; -class QDESIGNER_UILIB_EXPORT DomImages { -public: - DomImages(); - ~DomImages(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList<DomImage*> elementImage() const { return m_image; } - void setElementImage(const QList<DomImage*>& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList<DomImage*> m_image; - enum Child { - Image = 1 - }; - - DomImages(const DomImages &other); - void operator = (const DomImages&other); -}; - -class QDESIGNER_UILIB_EXPORT DomImage { -public: - DomImage(); - ~DomImage(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeName() const { return m_has_attr_name; } - inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } - inline void clearAttributeName() { m_has_attr_name = false; } - - // child element accessors - inline DomImageData* elementData() const { return m_data; } - DomImageData* takeElementData(); - void setElementData(DomImageData* a); - inline bool hasElementData() const { return m_children & Data; } - void clearElementData(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - DomImageData* m_data; enum Child { - Data = 1 + ButtonGroup = 1 }; - - DomImage(const DomImage &other); - void operator = (const DomImage&other); -}; - -class QDESIGNER_UILIB_EXPORT DomImageData { -public: - DomImageData(); - ~DomImageData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeFormat() const { return m_has_attr_format; } - inline QString attributeFormat() const { return m_attr_format; } - inline void setAttributeFormat(const QString& a) { m_attr_format = a; m_has_attr_format = true; } - inline void clearAttributeFormat() { m_has_attr_format = false; } - - inline bool hasAttributeLength() const { return m_has_attr_length; } - inline int attributeLength() const { return m_attr_length; } - inline void setAttributeLength(int a) { m_attr_length = a; m_has_attr_length = true; } - inline void clearAttributeLength() { m_has_attr_length = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_format; - bool m_has_attr_format; - - int m_attr_length; - bool m_has_attr_length; - - // child element data - uint m_children; - - DomImageData(const DomImageData &other); - void operator = (const DomImageData&other); }; class QDESIGNER_UILIB_EXPORT DomCustomWidgets { + Q_DISABLE_COPY(DomCustomWidgets) public: - DomCustomWidgets(); + DomCustomWidgets() = default; ~DomCustomWidgets(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline QList<DomCustomWidget*> elementCustomWidget() const { return m_customWidget; } - void setElementCustomWidget(const QList<DomCustomWidget*>& a); + inline QVector<DomCustomWidget *> elementCustomWidget() const { return m_customWidget; } + void setElementCustomWidget(const QVector<DomCustomWidget *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - QList<DomCustomWidget*> m_customWidget; + uint m_children = 0; + QVector<DomCustomWidget *> m_customWidget; + enum Child { CustomWidget = 1 }; - - DomCustomWidgets(const DomCustomWidgets &other); - void operator = (const DomCustomWidgets&other); }; class QDESIGNER_UILIB_EXPORT DomHeader { + Q_DISABLE_COPY(DomHeader) public: - DomHeader(); + DomHeader() = default; ~DomHeader(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; + inline QString text() const { return m_text; } inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeLocation() const { return m_has_attr_location; } inline QString attributeLocation() const { return m_attr_location; } - inline void setAttributeLocation(const QString& a) { m_attr_location = a; m_has_attr_location = true; } + inline void setAttributeLocation(const QString &a) { m_attr_location = a; m_has_attr_location = true; } inline void clearAttributeLocation() { m_has_attr_location = false; } - // child element accessors private: QString m_text; - void clear(bool clear_all = true); // attribute data QString m_attr_location; - bool m_has_attr_location; - - // child element data - uint m_children; - - DomHeader(const DomHeader &other); - void operator = (const DomHeader&other); + bool m_has_attr_location = false; }; class QDESIGNER_UILIB_EXPORT DomCustomWidget { + Q_DISABLE_COPY(DomCustomWidget) public: - DomCustomWidget(); + DomCustomWidget() = default; ~DomCustomWidget(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline QString elementClass() const { return m_class; } - void setElementClass(const QString& a); + void setElementClass(const QString &a); inline bool hasElementClass() const { return m_children & Class; } void clearElementClass(); inline QString elementExtends() const { return m_extends; } - void setElementExtends(const QString& a); + void setElementExtends(const QString &a); inline bool hasElementExtends() const { return m_children & Extends; } void clearElementExtends(); - inline DomHeader* elementHeader() const { return m_header; } - DomHeader* takeElementHeader(); - void setElementHeader(DomHeader* a); + inline DomHeader *elementHeader() const { return m_header; } + DomHeader *takeElementHeader(); + void setElementHeader(DomHeader *a); inline bool hasElementHeader() const { return m_children & Header; } void clearElementHeader(); - inline DomSize* elementSizeHint() const { return m_sizeHint; } - DomSize* takeElementSizeHint(); - void setElementSizeHint(DomSize* a); + inline DomSize *elementSizeHint() const { return m_sizeHint; } + DomSize *takeElementSizeHint(); + void setElementSizeHint(DomSize *a); inline bool hasElementSizeHint() const { return m_children & SizeHint; } void clearElementSizeHint(); inline QString elementAddPageMethod() const { return m_addPageMethod; } - void setElementAddPageMethod(const QString& a); + void setElementAddPageMethod(const QString &a); inline bool hasElementAddPageMethod() const { return m_children & AddPageMethod; } void clearElementAddPageMethod(); @@ -918,60 +711,37 @@ public: inline bool hasElementContainer() const { return m_children & Container; } void clearElementContainer(); - inline DomSizePolicyData* elementSizePolicy() const { return m_sizePolicy; } - DomSizePolicyData* takeElementSizePolicy(); - void setElementSizePolicy(DomSizePolicyData* a); - inline bool hasElementSizePolicy() const { return m_children & SizePolicy; } - void clearElementSizePolicy(); - inline QString elementPixmap() const { return m_pixmap; } - void setElementPixmap(const QString& a); + void setElementPixmap(const QString &a); inline bool hasElementPixmap() const { return m_children & Pixmap; } void clearElementPixmap(); - inline DomScript* elementScript() const { return m_script; } - DomScript* takeElementScript(); - void setElementScript(DomScript* a); - inline bool hasElementScript() const { return m_children & Script; } - void clearElementScript(); - - inline DomProperties* elementProperties() const { return m_properties; } - DomProperties* takeElementProperties(); - void setElementProperties(DomProperties* a); - inline bool hasElementProperties() const { return m_children & Properties; } - void clearElementProperties(); - - inline DomSlots* elementSlots() const { return m_slots; } - DomSlots* takeElementSlots(); - void setElementSlots(DomSlots* a); + inline DomSlots *elementSlots() const { return m_slots; } + DomSlots *takeElementSlots(); + void setElementSlots(DomSlots *a); inline bool hasElementSlots() const { return m_children & Slots; } void clearElementSlots(); - inline DomPropertySpecifications* elementPropertyspecifications() const { return m_propertyspecifications; } - DomPropertySpecifications* takeElementPropertyspecifications(); - void setElementPropertyspecifications(DomPropertySpecifications* a); + inline DomPropertySpecifications *elementPropertyspecifications() const { return m_propertyspecifications; } + DomPropertySpecifications *takeElementPropertyspecifications(); + void setElementPropertyspecifications(DomPropertySpecifications *a); inline bool hasElementPropertyspecifications() const { return m_children & Propertyspecifications; } void clearElementPropertyspecifications(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; + uint m_children = 0; QString m_class; QString m_extends; - DomHeader* m_header; - DomSize* m_sizeHint; + DomHeader *m_header = nullptr; + DomSize *m_sizeHint = nullptr; QString m_addPageMethod; - int m_container; - DomSizePolicyData* m_sizePolicy; + int m_container = 0; QString m_pixmap; - DomScript* m_script; - DomProperties* m_properties; - DomSlots* m_slots; - DomPropertySpecifications* m_propertyspecifications; + DomSlots *m_slots = nullptr; + DomPropertySpecifications *m_propertyspecifications = nullptr; + enum Child { Class = 1, Extends = 2, @@ -979,130 +749,20 @@ private: SizeHint = 8, AddPageMethod = 16, Container = 32, - SizePolicy = 64, - Pixmap = 128, - Script = 256, - Properties = 512, - Slots = 1024, - Propertyspecifications = 2048 - }; - - DomCustomWidget(const DomCustomWidget &other); - void operator = (const DomCustomWidget&other); -}; - -class QDESIGNER_UILIB_EXPORT DomProperties { -public: - DomProperties(); - ~DomProperties(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList<DomPropertyData*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomPropertyData*>& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList<DomPropertyData*> m_property; - enum Child { - Property = 1 + Pixmap = 64, + Slots = 128, + Propertyspecifications = 256 }; - - DomProperties(const DomProperties &other); - void operator = (const DomProperties&other); -}; - -class QDESIGNER_UILIB_EXPORT DomPropertyData { -public: - DomPropertyData(); - ~DomPropertyData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeType() const { return m_has_attr_type; } - inline QString attributeType() const { return m_attr_type; } - inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; } - inline void clearAttributeType() { m_has_attr_type = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_type; - bool m_has_attr_type; - - // child element data - uint m_children; - - DomPropertyData(const DomPropertyData &other); - void operator = (const DomPropertyData&other); -}; - -class QDESIGNER_UILIB_EXPORT DomSizePolicyData { -public: - DomSizePolicyData(); - ~DomSizePolicyData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline int elementHorData() const { return m_horData; } - void setElementHorData(int a); - inline bool hasElementHorData() const { return m_children & HorData; } - void clearElementHorData(); - - inline int elementVerData() const { return m_verData; } - void setElementVerData(int a); - inline bool hasElementVerData() const { return m_children & VerData; } - void clearElementVerData(); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - int m_horData; - int m_verData; - enum Child { - HorData = 1, - VerData = 2 - }; - - DomSizePolicyData(const DomSizePolicyData &other); - void operator = (const DomSizePolicyData&other); }; class QDESIGNER_UILIB_EXPORT DomLayoutDefault { + Q_DISABLE_COPY(DomLayoutDefault) public: - DomLayoutDefault(); + DomLayoutDefault() = default; ~DomLayoutDefault(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeSpacing() const { return m_has_attr_spacing; } @@ -1115,202 +775,167 @@ public: inline void setAttributeMargin(int a) { m_attr_margin = a; m_has_attr_margin = true; } inline void clearAttributeMargin() { m_has_attr_margin = false; } - // child element accessors private: - QString m_text; - void clear(bool clear_all = true); - // attribute data - int m_attr_spacing; - bool m_has_attr_spacing; - - int m_attr_margin; - bool m_has_attr_margin; + int m_attr_spacing = 0; + bool m_has_attr_spacing = false; - // child element data - uint m_children; - - DomLayoutDefault(const DomLayoutDefault &other); - void operator = (const DomLayoutDefault&other); + int m_attr_margin = 0; + bool m_has_attr_margin = false; }; class QDESIGNER_UILIB_EXPORT DomLayoutFunction { + Q_DISABLE_COPY(DomLayoutFunction) public: - DomLayoutFunction(); + DomLayoutFunction() = default; ~DomLayoutFunction(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeSpacing() const { return m_has_attr_spacing; } inline QString attributeSpacing() const { return m_attr_spacing; } - inline void setAttributeSpacing(const QString& a) { m_attr_spacing = a; m_has_attr_spacing = true; } + inline void setAttributeSpacing(const QString &a) { m_attr_spacing = a; m_has_attr_spacing = true; } inline void clearAttributeSpacing() { m_has_attr_spacing = false; } inline bool hasAttributeMargin() const { return m_has_attr_margin; } inline QString attributeMargin() const { return m_attr_margin; } - inline void setAttributeMargin(const QString& a) { m_attr_margin = a; m_has_attr_margin = true; } + inline void setAttributeMargin(const QString &a) { m_attr_margin = a; m_has_attr_margin = true; } inline void clearAttributeMargin() { m_has_attr_margin = false; } - // child element accessors private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_spacing; - bool m_has_attr_spacing; + bool m_has_attr_spacing = false; QString m_attr_margin; - bool m_has_attr_margin; - - // child element data - uint m_children; - - DomLayoutFunction(const DomLayoutFunction &other); - void operator = (const DomLayoutFunction&other); + bool m_has_attr_margin = false; }; class QDESIGNER_UILIB_EXPORT DomTabStops { + Q_DISABLE_COPY(DomTabStops) public: - DomTabStops(); + DomTabStops() = default; ~DomTabStops(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline QStringList elementTabStop() const { return m_tabStop; } - void setElementTabStop(const QStringList& a); + void setElementTabStop(const QStringList &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; + uint m_children = 0; QStringList m_tabStop; + enum Child { TabStop = 1 }; - - DomTabStops(const DomTabStops &other); - void operator = (const DomTabStops&other); }; class QDESIGNER_UILIB_EXPORT DomLayout { + Q_DISABLE_COPY(DomLayout) public: - DomLayout(); + DomLayout() = default; ~DomLayout(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeClass() const { return m_has_attr_class; } inline QString attributeClass() const { return m_attr_class; } - inline void setAttributeClass(const QString& a) { m_attr_class = a; m_has_attr_class = true; } + inline void setAttributeClass(const QString &a) { m_attr_class = a; m_has_attr_class = true; } inline void clearAttributeClass() { m_has_attr_class = false; } inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } inline bool hasAttributeStretch() const { return m_has_attr_stretch; } inline QString attributeStretch() const { return m_attr_stretch; } - inline void setAttributeStretch(const QString& a) { m_attr_stretch = a; m_has_attr_stretch = true; } + inline void setAttributeStretch(const QString &a) { m_attr_stretch = a; m_has_attr_stretch = true; } inline void clearAttributeStretch() { m_has_attr_stretch = false; } inline bool hasAttributeRowStretch() const { return m_has_attr_rowStretch; } inline QString attributeRowStretch() const { return m_attr_rowStretch; } - inline void setAttributeRowStretch(const QString& a) { m_attr_rowStretch = a; m_has_attr_rowStretch = true; } + inline void setAttributeRowStretch(const QString &a) { m_attr_rowStretch = a; m_has_attr_rowStretch = true; } inline void clearAttributeRowStretch() { m_has_attr_rowStretch = false; } inline bool hasAttributeColumnStretch() const { return m_has_attr_columnStretch; } inline QString attributeColumnStretch() const { return m_attr_columnStretch; } - inline void setAttributeColumnStretch(const QString& a) { m_attr_columnStretch = a; m_has_attr_columnStretch = true; } + inline void setAttributeColumnStretch(const QString &a) { m_attr_columnStretch = a; m_has_attr_columnStretch = true; } inline void clearAttributeColumnStretch() { m_has_attr_columnStretch = false; } inline bool hasAttributeRowMinimumHeight() const { return m_has_attr_rowMinimumHeight; } inline QString attributeRowMinimumHeight() const { return m_attr_rowMinimumHeight; } - inline void setAttributeRowMinimumHeight(const QString& a) { m_attr_rowMinimumHeight = a; m_has_attr_rowMinimumHeight = true; } + inline void setAttributeRowMinimumHeight(const QString &a) { m_attr_rowMinimumHeight = a; m_has_attr_rowMinimumHeight = true; } inline void clearAttributeRowMinimumHeight() { m_has_attr_rowMinimumHeight = false; } inline bool hasAttributeColumnMinimumWidth() const { return m_has_attr_columnMinimumWidth; } inline QString attributeColumnMinimumWidth() const { return m_attr_columnMinimumWidth; } - inline void setAttributeColumnMinimumWidth(const QString& a) { m_attr_columnMinimumWidth = a; m_has_attr_columnMinimumWidth = true; } + inline void setAttributeColumnMinimumWidth(const QString &a) { m_attr_columnMinimumWidth = a; m_has_attr_columnMinimumWidth = true; } inline void clearAttributeColumnMinimumWidth() { m_has_attr_columnMinimumWidth = false; } // child element accessors inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty*>& a); + void setElementAttribute(const QList<DomProperty *> &a); - inline QList<DomLayoutItem*> elementItem() const { return m_item; } - void setElementItem(const QList<DomLayoutItem*>& a); + inline QVector<DomLayoutItem *> elementItem() const { return m_item; } + void setElementItem(const QVector<DomLayoutItem *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_class; - bool m_has_attr_class; + bool m_has_attr_class = false; QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; QString m_attr_stretch; - bool m_has_attr_stretch; + bool m_has_attr_stretch = false; QString m_attr_rowStretch; - bool m_has_attr_rowStretch; + bool m_has_attr_rowStretch = false; QString m_attr_columnStretch; - bool m_has_attr_columnStretch; + bool m_has_attr_columnStretch = false; QString m_attr_rowMinimumHeight; - bool m_has_attr_rowMinimumHeight; + bool m_has_attr_rowMinimumHeight = false; QString m_attr_columnMinimumWidth; - bool m_has_attr_columnMinimumWidth; + bool m_has_attr_columnMinimumWidth = false; // child element data - uint m_children; + uint m_children = 0; QList<DomProperty*> m_property; QList<DomProperty*> m_attribute; - QList<DomLayoutItem*> m_item; + QVector<DomLayoutItem *> m_item; + enum Child { Property = 1, Attribute = 2, Item = 4 }; - - DomLayout(const DomLayout &other); - void operator = (const DomLayout&other); }; class QDESIGNER_UILIB_EXPORT DomLayoutItem { + Q_DISABLE_COPY(DomLayoutItem) public: - DomLayoutItem(); + DomLayoutItem() = default; ~DomLayoutItem(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeRow() const { return m_has_attr_row; } @@ -1335,126 +960,107 @@ public: inline bool hasAttributeAlignment() const { return m_has_attr_alignment; } inline QString attributeAlignment() const { return m_attr_alignment; } - inline void setAttributeAlignment(const QString& a) { m_attr_alignment = a; m_has_attr_alignment = true; } + inline void setAttributeAlignment(const QString &a) { m_attr_alignment = a; m_has_attr_alignment = true; } inline void clearAttributeAlignment() { m_has_attr_alignment = false; } // child element accessors enum Kind { Unknown = 0, Widget, Layout, Spacer }; inline Kind kind() const { return m_kind; } - inline DomWidget* elementWidget() const { return m_widget; } - DomWidget* takeElementWidget(); - void setElementWidget(DomWidget* a); + inline DomWidget *elementWidget() const { return m_widget; } + DomWidget *takeElementWidget(); + void setElementWidget(DomWidget *a); - inline DomLayout* elementLayout() const { return m_layout; } - DomLayout* takeElementLayout(); - void setElementLayout(DomLayout* a); + inline DomLayout *elementLayout() const { return m_layout; } + DomLayout *takeElementLayout(); + void setElementLayout(DomLayout *a); - inline DomSpacer* elementSpacer() const { return m_spacer; } - DomSpacer* takeElementSpacer(); - void setElementSpacer(DomSpacer* a); + inline DomSpacer *elementSpacer() const { return m_spacer; } + DomSpacer *takeElementSpacer(); + void setElementSpacer(DomSpacer *a); private: - QString m_text; - void clear(bool clear_all = true); + void clear(); // attribute data - int m_attr_row; - bool m_has_attr_row; + int m_attr_row = 0; + bool m_has_attr_row = false; - int m_attr_column; - bool m_has_attr_column; + int m_attr_column = 0; + bool m_has_attr_column = false; - int m_attr_rowSpan; - bool m_has_attr_rowSpan; + int m_attr_rowSpan = 0; + bool m_has_attr_rowSpan = false; - int m_attr_colSpan; - bool m_has_attr_colSpan; + int m_attr_colSpan = 0; + bool m_has_attr_colSpan = false; QString m_attr_alignment; - bool m_has_attr_alignment; + bool m_has_attr_alignment = false; // child element data - Kind m_kind; - DomWidget* m_widget; - DomLayout* m_layout; - DomSpacer* m_spacer; - - DomLayoutItem(const DomLayoutItem &other); - void operator = (const DomLayoutItem&other); + Kind m_kind = Unknown; + DomWidget *m_widget = nullptr; + DomLayout *m_layout = nullptr; + DomSpacer *m_spacer = nullptr; }; class QDESIGNER_UILIB_EXPORT DomRow { + Q_DISABLE_COPY(DomRow) public: - DomRow(); + DomRow() = default; ~DomRow(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; + uint m_children = 0; QList<DomProperty*> m_property; + enum Child { Property = 1 }; - - DomRow(const DomRow &other); - void operator = (const DomRow&other); }; class QDESIGNER_UILIB_EXPORT DomColumn { + Q_DISABLE_COPY(DomColumn) public: - DomColumn(); + DomColumn() = default; ~DomColumn(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; + uint m_children = 0; QList<DomProperty*> m_property; + enum Child { Property = 1 }; - - DomColumn(const DomColumn &other); - void operator = (const DomColumn&other); }; class QDESIGNER_UILIB_EXPORT DomItem { + Q_DISABLE_COPY(DomItem) public: - DomItem(); + DomItem() = default; ~DomItem(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeRow() const { return m_has_attr_row; } @@ -1469,54 +1075,48 @@ public: // child element accessors inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); - inline QList<DomItem*> elementItem() const { return m_item; } - void setElementItem(const QList<DomItem*>& a); + inline QVector<DomItem *> elementItem() const { return m_item; } + void setElementItem(const QVector<DomItem *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data - int m_attr_row; - bool m_has_attr_row; + int m_attr_row = 0; + bool m_has_attr_row = false; - int m_attr_column; - bool m_has_attr_column; + int m_attr_column = 0; + bool m_has_attr_column = false; // child element data - uint m_children; + uint m_children = 0; QList<DomProperty*> m_property; - QList<DomItem*> m_item; + QVector<DomItem *> m_item; + enum Child { Property = 1, Item = 2 }; - - DomItem(const DomItem &other); - void operator = (const DomItem&other); }; class QDESIGNER_UILIB_EXPORT DomWidget { + Q_DISABLE_COPY(DomWidget) public: - DomWidget(); + DomWidget() = default; ~DomWidget(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeClass() const { return m_has_attr_class; } inline QString attributeClass() const { return m_attr_class; } - inline void setAttributeClass(const QString& a) { m_attr_class = a; m_has_attr_class = true; } + inline void setAttributeClass(const QString &a) { m_attr_class = a; m_has_attr_class = true; } inline void clearAttributeClass() { m_has_attr_class = false; } inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } inline bool hasAttributeNative() const { return m_has_attr_native; } @@ -1526,146 +1126,124 @@ public: // child element accessors inline QStringList elementClass() const { return m_class; } - void setElementClass(const QStringList& a); + void setElementClass(const QStringList &a); inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); - - inline QList<DomScript*> elementScript() const { return m_script; } - void setElementScript(const QList<DomScript*>& a); - - inline QList<DomWidgetData*> elementWidgetData() const { return m_widgetData; } - void setElementWidgetData(const QList<DomWidgetData*>& a); + void setElementProperty(const QList<DomProperty *> &a); inline QList<DomProperty*> elementAttribute() const { return m_attribute; } - void setElementAttribute(const QList<DomProperty*>& a); + void setElementAttribute(const QList<DomProperty *> &a); - inline QList<DomRow*> elementRow() const { return m_row; } - void setElementRow(const QList<DomRow*>& a); + inline QVector<DomRow *> elementRow() const { return m_row; } + void setElementRow(const QVector<DomRow *> &a); - inline QList<DomColumn*> elementColumn() const { return m_column; } - void setElementColumn(const QList<DomColumn*>& a); + inline QVector<DomColumn *> elementColumn() const { return m_column; } + void setElementColumn(const QVector<DomColumn *> &a); - inline QList<DomItem*> elementItem() const { return m_item; } - void setElementItem(const QList<DomItem*>& a); + inline QVector<DomItem *> elementItem() const { return m_item; } + void setElementItem(const QVector<DomItem *> &a); - inline QList<DomLayout*> elementLayout() const { return m_layout; } - void setElementLayout(const QList<DomLayout*>& a); + inline QVector<DomLayout *> elementLayout() const { return m_layout; } + void setElementLayout(const QVector<DomLayout *> &a); - inline QList<DomWidget*> elementWidget() const { return m_widget; } - void setElementWidget(const QList<DomWidget*>& a); + inline QVector<DomWidget *> elementWidget() const { return m_widget; } + void setElementWidget(const QVector<DomWidget *> &a); - inline QList<DomAction*> elementAction() const { return m_action; } - void setElementAction(const QList<DomAction*>& a); + inline QVector<DomAction *> elementAction() const { return m_action; } + void setElementAction(const QVector<DomAction *> &a); - inline QList<DomActionGroup*> elementActionGroup() const { return m_actionGroup; } - void setElementActionGroup(const QList<DomActionGroup*>& a); + inline QVector<DomActionGroup *> elementActionGroup() const { return m_actionGroup; } + void setElementActionGroup(const QVector<DomActionGroup *> &a); - inline QList<DomActionRef*> elementAddAction() const { return m_addAction; } - void setElementAddAction(const QList<DomActionRef*>& a); + inline QVector<DomActionRef *> elementAddAction() const { return m_addAction; } + void setElementAddAction(const QVector<DomActionRef *> &a); inline QStringList elementZOrder() const { return m_zOrder; } - void setElementZOrder(const QStringList& a); + void setElementZOrder(const QStringList &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_class; - bool m_has_attr_class; + bool m_has_attr_class = false; QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; - bool m_attr_native; - bool m_has_attr_native; + bool m_attr_native = false; + bool m_has_attr_native = false; // child element data - uint m_children; + uint m_children = 0; QStringList m_class; QList<DomProperty*> m_property; - QList<DomScript*> m_script; - QList<DomWidgetData*> m_widgetData; QList<DomProperty*> m_attribute; - QList<DomRow*> m_row; - QList<DomColumn*> m_column; - QList<DomItem*> m_item; - QList<DomLayout*> m_layout; - QList<DomWidget*> m_widget; - QList<DomAction*> m_action; - QList<DomActionGroup*> m_actionGroup; - QList<DomActionRef*> m_addAction; + QVector<DomRow *> m_row; + QVector<DomColumn *> m_column; + QVector<DomItem *> m_item; + QVector<DomLayout *> m_layout; + QVector<DomWidget *> m_widget; + QVector<DomAction *> m_action; + QVector<DomActionGroup *> m_actionGroup; + QVector<DomActionRef *> m_addAction; QStringList m_zOrder; + enum Child { Class = 1, Property = 2, - Script = 4, - WidgetData = 8, - Attribute = 16, - Row = 32, - Column = 64, - Item = 128, - Layout = 256, - Widget = 512, - Action = 1024, - ActionGroup = 2048, - AddAction = 4096, - ZOrder = 8192 + Attribute = 4, + Row = 8, + Column = 16, + Item = 32, + Layout = 64, + Widget = 128, + Action = 256, + ActionGroup = 512, + AddAction = 1024, + ZOrder = 2048 }; - - DomWidget(const DomWidget &other); - void operator = (const DomWidget&other); }; class QDESIGNER_UILIB_EXPORT DomSpacer { + Q_DISABLE_COPY(DomSpacer) public: - DomSpacer(); + DomSpacer() = default; ~DomSpacer(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } // child element accessors inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; // child element data - uint m_children; + uint m_children = 0; QList<DomProperty*> m_property; + enum Child { Property = 1 }; - - DomSpacer(const DomSpacer &other); - void operator = (const DomSpacer&other); }; class QDESIGNER_UILIB_EXPORT DomColor { + Q_DISABLE_COPY(DomColor) public: - DomColor(); + DomColor() = default; ~DomColor(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeAlpha() const { return m_has_attr_alpha; } @@ -1690,37 +1268,31 @@ public: void clearElementBlue(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data - int m_attr_alpha; - bool m_has_attr_alpha; + int m_attr_alpha = 0; + bool m_has_attr_alpha = false; // child element data - uint m_children; - int m_red; - int m_green; - int m_blue; + uint m_children = 0; + int m_red = 0; + int m_green = 0; + int m_blue = 0; + enum Child { Red = 1, Green = 2, Blue = 4 }; - - DomColor(const DomColor &other); - void operator = (const DomColor&other); }; class QDESIGNER_UILIB_EXPORT DomGradientStop { + Q_DISABLE_COPY(DomGradientStop) public: - DomGradientStop(); + DomGradientStop() = default; ~DomGradientStop(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributePosition() const { return m_has_attr_position; } @@ -1729,40 +1301,34 @@ public: inline void clearAttributePosition() { m_has_attr_position = false; } // child element accessors - inline DomColor* elementColor() const { return m_color; } - DomColor* takeElementColor(); - void setElementColor(DomColor* a); + inline DomColor *elementColor() const { return m_color; } + DomColor *takeElementColor(); + void setElementColor(DomColor *a); inline bool hasElementColor() const { return m_children & Color; } void clearElementColor(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data - double m_attr_position; - bool m_has_attr_position; + double m_attr_position = 0.0; + bool m_has_attr_position = false; // child element data - uint m_children; - DomColor* m_color; + uint m_children = 0; + DomColor *m_color = nullptr; + enum Child { Color = 1 }; - - DomGradientStop(const DomGradientStop &other); - void operator = (const DomGradientStop&other); }; class QDESIGNER_UILIB_EXPORT DomGradient { + Q_DISABLE_COPY(DomGradient) public: - DomGradient(); + DomGradient() = default; ~DomGradient(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeStartX() const { return m_has_attr_startX; } @@ -1817,270 +1383,238 @@ public: inline bool hasAttributeType() const { return m_has_attr_type; } inline QString attributeType() const { return m_attr_type; } - inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; } + inline void setAttributeType(const QString &a) { m_attr_type = a; m_has_attr_type = true; } inline void clearAttributeType() { m_has_attr_type = false; } inline bool hasAttributeSpread() const { return m_has_attr_spread; } inline QString attributeSpread() const { return m_attr_spread; } - inline void setAttributeSpread(const QString& a) { m_attr_spread = a; m_has_attr_spread = true; } + inline void setAttributeSpread(const QString &a) { m_attr_spread = a; m_has_attr_spread = true; } inline void clearAttributeSpread() { m_has_attr_spread = false; } inline bool hasAttributeCoordinateMode() const { return m_has_attr_coordinateMode; } inline QString attributeCoordinateMode() const { return m_attr_coordinateMode; } - inline void setAttributeCoordinateMode(const QString& a) { m_attr_coordinateMode = a; m_has_attr_coordinateMode = true; } + inline void setAttributeCoordinateMode(const QString &a) { m_attr_coordinateMode = a; m_has_attr_coordinateMode = true; } inline void clearAttributeCoordinateMode() { m_has_attr_coordinateMode = false; } // child element accessors - inline QList<DomGradientStop*> elementGradientStop() const { return m_gradientStop; } - void setElementGradientStop(const QList<DomGradientStop*>& a); + inline QVector<DomGradientStop *> elementGradientStop() const { return m_gradientStop; } + void setElementGradientStop(const QVector<DomGradientStop *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data - double m_attr_startX; - bool m_has_attr_startX; + double m_attr_startX = 0.0; + bool m_has_attr_startX = false; - double m_attr_startY; - bool m_has_attr_startY; + double m_attr_startY = 0.0; + bool m_has_attr_startY = false; - double m_attr_endX; - bool m_has_attr_endX; + double m_attr_endX = 0.0; + bool m_has_attr_endX = false; - double m_attr_endY; - bool m_has_attr_endY; + double m_attr_endY = 0.0; + bool m_has_attr_endY = false; - double m_attr_centralX; - bool m_has_attr_centralX; + double m_attr_centralX = 0.0; + bool m_has_attr_centralX = false; - double m_attr_centralY; - bool m_has_attr_centralY; + double m_attr_centralY = 0.0; + bool m_has_attr_centralY = false; - double m_attr_focalX; - bool m_has_attr_focalX; + double m_attr_focalX = 0.0; + bool m_has_attr_focalX = false; - double m_attr_focalY; - bool m_has_attr_focalY; + double m_attr_focalY = 0.0; + bool m_has_attr_focalY = false; - double m_attr_radius; - bool m_has_attr_radius; + double m_attr_radius = 0.0; + bool m_has_attr_radius = false; - double m_attr_angle; - bool m_has_attr_angle; + double m_attr_angle = 0.0; + bool m_has_attr_angle = false; QString m_attr_type; - bool m_has_attr_type; + bool m_has_attr_type = false; QString m_attr_spread; - bool m_has_attr_spread; + bool m_has_attr_spread = false; QString m_attr_coordinateMode; - bool m_has_attr_coordinateMode; + bool m_has_attr_coordinateMode = false; // child element data - uint m_children; - QList<DomGradientStop*> m_gradientStop; + uint m_children = 0; + QVector<DomGradientStop *> m_gradientStop; + enum Child { GradientStop = 1 }; - - DomGradient(const DomGradient &other); - void operator = (const DomGradient&other); }; class QDESIGNER_UILIB_EXPORT DomBrush { + Q_DISABLE_COPY(DomBrush) public: - DomBrush(); + DomBrush() = default; ~DomBrush(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeBrushStyle() const { return m_has_attr_brushStyle; } inline QString attributeBrushStyle() const { return m_attr_brushStyle; } - inline void setAttributeBrushStyle(const QString& a) { m_attr_brushStyle = a; m_has_attr_brushStyle = true; } + inline void setAttributeBrushStyle(const QString &a) { m_attr_brushStyle = a; m_has_attr_brushStyle = true; } inline void clearAttributeBrushStyle() { m_has_attr_brushStyle = false; } // child element accessors enum Kind { Unknown = 0, Color, Texture, Gradient }; inline Kind kind() const { return m_kind; } - inline DomColor* elementColor() const { return m_color; } - DomColor* takeElementColor(); - void setElementColor(DomColor* a); + inline DomColor *elementColor() const { return m_color; } + DomColor *takeElementColor(); + void setElementColor(DomColor *a); - inline DomProperty* elementTexture() const { return m_texture; } - DomProperty* takeElementTexture(); - void setElementTexture(DomProperty* a); + inline DomProperty *elementTexture() const { return m_texture; } + DomProperty *takeElementTexture(); + void setElementTexture(DomProperty *a); - inline DomGradient* elementGradient() const { return m_gradient; } - DomGradient* takeElementGradient(); - void setElementGradient(DomGradient* a); + inline DomGradient *elementGradient() const { return m_gradient; } + DomGradient *takeElementGradient(); + void setElementGradient(DomGradient *a); private: - QString m_text; - void clear(bool clear_all = true); + void clear(); // attribute data QString m_attr_brushStyle; - bool m_has_attr_brushStyle; + bool m_has_attr_brushStyle = false; // child element data - Kind m_kind; - DomColor* m_color; - DomProperty* m_texture; - DomGradient* m_gradient; - - DomBrush(const DomBrush &other); - void operator = (const DomBrush&other); + Kind m_kind = Unknown; + DomColor *m_color = nullptr; + DomProperty *m_texture = nullptr; + DomGradient *m_gradient = nullptr; }; class QDESIGNER_UILIB_EXPORT DomColorRole { + Q_DISABLE_COPY(DomColorRole) public: - DomColorRole(); + DomColorRole() = default; ~DomColorRole(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeRole() const { return m_has_attr_role; } inline QString attributeRole() const { return m_attr_role; } - inline void setAttributeRole(const QString& a) { m_attr_role = a; m_has_attr_role = true; } + inline void setAttributeRole(const QString &a) { m_attr_role = a; m_has_attr_role = true; } inline void clearAttributeRole() { m_has_attr_role = false; } // child element accessors - inline DomBrush* elementBrush() const { return m_brush; } - DomBrush* takeElementBrush(); - void setElementBrush(DomBrush* a); + inline DomBrush *elementBrush() const { return m_brush; } + DomBrush *takeElementBrush(); + void setElementBrush(DomBrush *a); inline bool hasElementBrush() const { return m_children & Brush; } void clearElementBrush(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_role; - bool m_has_attr_role; + bool m_has_attr_role = false; // child element data - uint m_children; - DomBrush* m_brush; + uint m_children = 0; + DomBrush *m_brush = nullptr; + enum Child { Brush = 1 }; - - DomColorRole(const DomColorRole &other); - void operator = (const DomColorRole&other); }; class QDESIGNER_UILIB_EXPORT DomColorGroup { + Q_DISABLE_COPY(DomColorGroup) public: - DomColorGroup(); + DomColorGroup() = default; ~DomColorGroup(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline QList<DomColorRole*> elementColorRole() const { return m_colorRole; } - void setElementColorRole(const QList<DomColorRole*>& a); + inline QVector<DomColorRole *> elementColorRole() const { return m_colorRole; } + void setElementColorRole(const QVector<DomColorRole *> &a); - inline QList<DomColor*> elementColor() const { return m_color; } - void setElementColor(const QList<DomColor*>& a); + inline QVector<DomColor *> elementColor() const { return m_color; } + void setElementColor(const QVector<DomColor *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - QList<DomColorRole*> m_colorRole; - QList<DomColor*> m_color; + uint m_children = 0; + QVector<DomColorRole *> m_colorRole; + QVector<DomColor *> m_color; + enum Child { ColorRole = 1, Color = 2 }; - - DomColorGroup(const DomColorGroup &other); - void operator = (const DomColorGroup&other); }; class QDESIGNER_UILIB_EXPORT DomPalette { + Q_DISABLE_COPY(DomPalette) public: - DomPalette(); + DomPalette() = default; ~DomPalette(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline DomColorGroup* elementActive() const { return m_active; } - DomColorGroup* takeElementActive(); - void setElementActive(DomColorGroup* a); + inline DomColorGroup *elementActive() const { return m_active; } + DomColorGroup *takeElementActive(); + void setElementActive(DomColorGroup *a); inline bool hasElementActive() const { return m_children & Active; } void clearElementActive(); - inline DomColorGroup* elementInactive() const { return m_inactive; } - DomColorGroup* takeElementInactive(); - void setElementInactive(DomColorGroup* a); + inline DomColorGroup *elementInactive() const { return m_inactive; } + DomColorGroup *takeElementInactive(); + void setElementInactive(DomColorGroup *a); inline bool hasElementInactive() const { return m_children & Inactive; } void clearElementInactive(); - inline DomColorGroup* elementDisabled() const { return m_disabled; } - DomColorGroup* takeElementDisabled(); - void setElementDisabled(DomColorGroup* a); + inline DomColorGroup *elementDisabled() const { return m_disabled; } + DomColorGroup *takeElementDisabled(); + void setElementDisabled(DomColorGroup *a); inline bool hasElementDisabled() const { return m_children & Disabled; } void clearElementDisabled(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - DomColorGroup* m_active; - DomColorGroup* m_inactive; - DomColorGroup* m_disabled; + uint m_children = 0; + DomColorGroup *m_active = nullptr; + DomColorGroup *m_inactive = nullptr; + DomColorGroup *m_disabled = nullptr; + enum Child { Active = 1, Inactive = 2, Disabled = 4 }; - - DomPalette(const DomPalette &other); - void operator = (const DomPalette&other); }; class QDESIGNER_UILIB_EXPORT DomFont { + Q_DISABLE_COPY(DomFont) public: - DomFont(); + DomFont() = default; ~DomFont(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline QString elementFamily() const { return m_family; } - void setElementFamily(const QString& a); + void setElementFamily(const QString &a); inline bool hasElementFamily() const { return m_children & Family; } void clearElementFamily(); @@ -2120,7 +1654,7 @@ public: void clearElementAntialiasing(); inline QString elementStyleStrategy() const { return m_styleStrategy; } - void setElementStyleStrategy(const QString& a); + void setElementStyleStrategy(const QString &a); inline bool hasElementStyleStrategy() const { return m_children & StyleStrategy; } void clearElementStyleStrategy(); @@ -2130,22 +1664,20 @@ public: void clearElementKerning(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; + uint m_children = 0; QString m_family; - int m_pointSize; - int m_weight; - bool m_italic; - bool m_bold; - bool m_underline; - bool m_strikeOut; - bool m_antialiasing; + int m_pointSize = 0; + int m_weight = 0; + bool m_italic = false; + bool m_bold = false; + bool m_underline = false; + bool m_strikeOut = false; + bool m_antialiasing = false; QString m_styleStrategy; - bool m_kerning; + bool m_kerning = false; + enum Child { Family = 1, PointSize = 2, @@ -2158,22 +1690,17 @@ private: StyleStrategy = 256, Kerning = 512 }; - - DomFont(const DomFont &other); - void operator = (const DomFont&other); }; class QDESIGNER_UILIB_EXPORT DomPoint { + Q_DISABLE_COPY(DomPoint) public: - DomPoint(); + DomPoint() = default; ~DomPoint(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline int elementX() const { return m_x; } void setElementX(int a); @@ -2186,34 +1713,27 @@ public: void clearElementY(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - int m_x; - int m_y; + uint m_children = 0; + int m_x = 0; + int m_y = 0; + enum Child { X = 1, Y = 2 }; - - DomPoint(const DomPoint &other); - void operator = (const DomPoint&other); }; class QDESIGNER_UILIB_EXPORT DomRect { + Q_DISABLE_COPY(DomRect) public: - DomRect(); + DomRect() = default; ~DomRect(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline int elementX() const { return m_x; } void setElementX(int a); @@ -2236,86 +1756,69 @@ public: void clearElementHeight(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - int m_x; - int m_y; - int m_width; - int m_height; + uint m_children = 0; + int m_x = 0; + int m_y = 0; + int m_width = 0; + int m_height = 0; + enum Child { X = 1, Y = 2, Width = 4, Height = 8 }; - - DomRect(const DomRect &other); - void operator = (const DomRect&other); }; class QDESIGNER_UILIB_EXPORT DomLocale { + Q_DISABLE_COPY(DomLocale) public: - DomLocale(); + DomLocale() = default; ~DomLocale(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeLanguage() const { return m_has_attr_language; } inline QString attributeLanguage() const { return m_attr_language; } - inline void setAttributeLanguage(const QString& a) { m_attr_language = a; m_has_attr_language = true; } + inline void setAttributeLanguage(const QString &a) { m_attr_language = a; m_has_attr_language = true; } inline void clearAttributeLanguage() { m_has_attr_language = false; } inline bool hasAttributeCountry() const { return m_has_attr_country; } inline QString attributeCountry() const { return m_attr_country; } - inline void setAttributeCountry(const QString& a) { m_attr_country = a; m_has_attr_country = true; } + inline void setAttributeCountry(const QString &a) { m_attr_country = a; m_has_attr_country = true; } inline void clearAttributeCountry() { m_has_attr_country = false; } - // child element accessors private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_language; - bool m_has_attr_language; + bool m_has_attr_language = false; QString m_attr_country; - bool m_has_attr_country; - - // child element data - uint m_children; - - DomLocale(const DomLocale &other); - void operator = (const DomLocale&other); + bool m_has_attr_country = false; }; class QDESIGNER_UILIB_EXPORT DomSizePolicy { + Q_DISABLE_COPY(DomSizePolicy) public: - DomSizePolicy(); + DomSizePolicy() = default; ~DomSizePolicy(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeHSizeType() const { return m_has_attr_hSizeType; } inline QString attributeHSizeType() const { return m_attr_hSizeType; } - inline void setAttributeHSizeType(const QString& a) { m_attr_hSizeType = a; m_has_attr_hSizeType = true; } + inline void setAttributeHSizeType(const QString &a) { m_attr_hSizeType = a; m_has_attr_hSizeType = true; } inline void clearAttributeHSizeType() { m_has_attr_hSizeType = false; } inline bool hasAttributeVSizeType() const { return m_has_attr_vSizeType; } inline QString attributeVSizeType() const { return m_attr_vSizeType; } - inline void setAttributeVSizeType(const QString& a) { m_attr_vSizeType = a; m_has_attr_vSizeType = true; } + inline void setAttributeVSizeType(const QString &a) { m_attr_vSizeType = a; m_has_attr_vSizeType = true; } inline void clearAttributeVSizeType() { m_has_attr_vSizeType = false; } // child element accessors @@ -2340,44 +1843,37 @@ public: void clearElementVerStretch(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_hSizeType; - bool m_has_attr_hSizeType; + bool m_has_attr_hSizeType = false; QString m_attr_vSizeType; - bool m_has_attr_vSizeType; + bool m_has_attr_vSizeType = false; // child element data - uint m_children; - int m_hSizeType; - int m_vSizeType; - int m_horStretch; - int m_verStretch; + uint m_children = 0; + int m_hSizeType = 0; + int m_vSizeType = 0; + int m_horStretch = 0; + int m_verStretch = 0; + enum Child { HSizeType = 1, VSizeType = 2, HorStretch = 4, VerStretch = 8 }; - - DomSizePolicy(const DomSizePolicy &other); - void operator = (const DomSizePolicy&other); }; class QDESIGNER_UILIB_EXPORT DomSize { + Q_DISABLE_COPY(DomSize) public: - DomSize(); + DomSize() = default; ~DomSize(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline int elementWidth() const { return m_width; } void setElementWidth(int a); @@ -2390,34 +1886,27 @@ public: void clearElementHeight(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - int m_width; - int m_height; + uint m_children = 0; + int m_width = 0; + int m_height = 0; + enum Child { Width = 1, Height = 2 }; - - DomSize(const DomSize &other); - void operator = (const DomSize&other); }; class QDESIGNER_UILIB_EXPORT DomDate { + Q_DISABLE_COPY(DomDate) public: - DomDate(); + DomDate() = default; ~DomDate(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline int elementYear() const { return m_year; } void setElementYear(int a); @@ -2435,36 +1924,29 @@ public: void clearElementDay(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - int m_year; - int m_month; - int m_day; + uint m_children = 0; + int m_year = 0; + int m_month = 0; + int m_day = 0; + enum Child { Year = 1, Month = 2, Day = 4 }; - - DomDate(const DomDate &other); - void operator = (const DomDate&other); }; class QDESIGNER_UILIB_EXPORT DomTime { + Q_DISABLE_COPY(DomTime) public: - DomTime(); + DomTime() = default; ~DomTime(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline int elementHour() const { return m_hour; } void setElementHour(int a); @@ -2482,36 +1964,29 @@ public: void clearElementSecond(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - int m_hour; - int m_minute; - int m_second; + uint m_children = 0; + int m_hour = 0; + int m_minute = 0; + int m_second = 0; + enum Child { Hour = 1, Minute = 2, Second = 4 }; - - DomTime(const DomTime &other); - void operator = (const DomTime&other); }; class QDESIGNER_UILIB_EXPORT DomDateTime { + Q_DISABLE_COPY(DomDateTime) public: - DomDateTime(); + DomDateTime() = default; ~DomDateTime(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline int elementHour() const { return m_hour; } void setElementHour(int a); @@ -2544,18 +2019,16 @@ public: void clearElementDay(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - int m_hour; - int m_minute; - int m_second; - int m_year; - int m_month; - int m_day; + uint m_children = 0; + int m_hour = 0; + int m_minute = 0; + int m_second = 0; + int m_year = 0; + int m_month = 0; + int m_day = 0; + enum Child { Hour = 1, Minute = 2, @@ -2564,197 +2037,192 @@ private: Month = 16, Day = 32 }; - - DomDateTime(const DomDateTime &other); - void operator = (const DomDateTime&other); }; class QDESIGNER_UILIB_EXPORT DomStringList { + Q_DISABLE_COPY(DomStringList) public: - DomStringList(); + DomStringList() = default; ~DomStringList(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeNotr() const { return m_has_attr_notr; } inline QString attributeNotr() const { return m_attr_notr; } - inline void setAttributeNotr(const QString& a) { m_attr_notr = a; m_has_attr_notr = true; } + inline void setAttributeNotr(const QString &a) { m_attr_notr = a; m_has_attr_notr = true; } inline void clearAttributeNotr() { m_has_attr_notr = false; } inline bool hasAttributeComment() const { return m_has_attr_comment; } inline QString attributeComment() const { return m_attr_comment; } - inline void setAttributeComment(const QString& a) { m_attr_comment = a; m_has_attr_comment = true; } + inline void setAttributeComment(const QString &a) { m_attr_comment = a; m_has_attr_comment = true; } inline void clearAttributeComment() { m_has_attr_comment = false; } inline bool hasAttributeExtraComment() const { return m_has_attr_extraComment; } inline QString attributeExtraComment() const { return m_attr_extraComment; } - inline void setAttributeExtraComment(const QString& a) { m_attr_extraComment = a; m_has_attr_extraComment = true; } + inline void setAttributeExtraComment(const QString &a) { m_attr_extraComment = a; m_has_attr_extraComment = true; } inline void clearAttributeExtraComment() { m_has_attr_extraComment = false; } + inline bool hasAttributeId() const { return m_has_attr_id; } + inline QString attributeId() const { return m_attr_id; } + inline void setAttributeId(const QString &a) { m_attr_id = a; m_has_attr_id = true; } + inline void clearAttributeId() { m_has_attr_id = false; } + // child element accessors inline QStringList elementString() const { return m_string; } - void setElementString(const QStringList& a); + void setElementString(const QStringList &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_notr; - bool m_has_attr_notr; + bool m_has_attr_notr = false; QString m_attr_comment; - bool m_has_attr_comment; + bool m_has_attr_comment = false; QString m_attr_extraComment; - bool m_has_attr_extraComment; + bool m_has_attr_extraComment = false; + + QString m_attr_id; + bool m_has_attr_id = false; // child element data - uint m_children; + uint m_children = 0; QStringList m_string; + enum Child { String = 1 }; - - DomStringList(const DomStringList &other); - void operator = (const DomStringList&other); }; class QDESIGNER_UILIB_EXPORT DomResourcePixmap { + Q_DISABLE_COPY(DomResourcePixmap) public: - DomResourcePixmap(); + DomResourcePixmap() = default; ~DomResourcePixmap(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; + inline QString text() const { return m_text; } inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeResource() const { return m_has_attr_resource; } inline QString attributeResource() const { return m_attr_resource; } - inline void setAttributeResource(const QString& a) { m_attr_resource = a; m_has_attr_resource = true; } + inline void setAttributeResource(const QString &a) { m_attr_resource = a; m_has_attr_resource = true; } inline void clearAttributeResource() { m_has_attr_resource = false; } inline bool hasAttributeAlias() const { return m_has_attr_alias; } inline QString attributeAlias() const { return m_attr_alias; } - inline void setAttributeAlias(const QString& a) { m_attr_alias = a; m_has_attr_alias = true; } + inline void setAttributeAlias(const QString &a) { m_attr_alias = a; m_has_attr_alias = true; } inline void clearAttributeAlias() { m_has_attr_alias = false; } - // child element accessors private: QString m_text; - void clear(bool clear_all = true); // attribute data QString m_attr_resource; - bool m_has_attr_resource; + bool m_has_attr_resource = false; QString m_attr_alias; - bool m_has_attr_alias; - - // child element data - uint m_children; - - DomResourcePixmap(const DomResourcePixmap &other); - void operator = (const DomResourcePixmap&other); + bool m_has_attr_alias = false; }; class QDESIGNER_UILIB_EXPORT DomResourceIcon { + Q_DISABLE_COPY(DomResourceIcon) public: - DomResourceIcon(); + DomResourceIcon() = default; ~DomResourceIcon(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; + inline QString text() const { return m_text; } inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeTheme() const { return m_has_attr_theme; } inline QString attributeTheme() const { return m_attr_theme; } - inline void setAttributeTheme(const QString& a) { m_attr_theme = a; m_has_attr_theme = true; } + inline void setAttributeTheme(const QString &a) { m_attr_theme = a; m_has_attr_theme = true; } inline void clearAttributeTheme() { m_has_attr_theme = false; } inline bool hasAttributeResource() const { return m_has_attr_resource; } inline QString attributeResource() const { return m_attr_resource; } - inline void setAttributeResource(const QString& a) { m_attr_resource = a; m_has_attr_resource = true; } + inline void setAttributeResource(const QString &a) { m_attr_resource = a; m_has_attr_resource = true; } inline void clearAttributeResource() { m_has_attr_resource = false; } // child element accessors - inline DomResourcePixmap* elementNormalOff() const { return m_normalOff; } - DomResourcePixmap* takeElementNormalOff(); - void setElementNormalOff(DomResourcePixmap* a); + inline DomResourcePixmap *elementNormalOff() const { return m_normalOff; } + DomResourcePixmap *takeElementNormalOff(); + void setElementNormalOff(DomResourcePixmap *a); inline bool hasElementNormalOff() const { return m_children & NormalOff; } void clearElementNormalOff(); - inline DomResourcePixmap* elementNormalOn() const { return m_normalOn; } - DomResourcePixmap* takeElementNormalOn(); - void setElementNormalOn(DomResourcePixmap* a); + inline DomResourcePixmap *elementNormalOn() const { return m_normalOn; } + DomResourcePixmap *takeElementNormalOn(); + void setElementNormalOn(DomResourcePixmap *a); inline bool hasElementNormalOn() const { return m_children & NormalOn; } void clearElementNormalOn(); - inline DomResourcePixmap* elementDisabledOff() const { return m_disabledOff; } - DomResourcePixmap* takeElementDisabledOff(); - void setElementDisabledOff(DomResourcePixmap* a); + inline DomResourcePixmap *elementDisabledOff() const { return m_disabledOff; } + DomResourcePixmap *takeElementDisabledOff(); + void setElementDisabledOff(DomResourcePixmap *a); inline bool hasElementDisabledOff() const { return m_children & DisabledOff; } void clearElementDisabledOff(); - inline DomResourcePixmap* elementDisabledOn() const { return m_disabledOn; } - DomResourcePixmap* takeElementDisabledOn(); - void setElementDisabledOn(DomResourcePixmap* a); + inline DomResourcePixmap *elementDisabledOn() const { return m_disabledOn; } + DomResourcePixmap *takeElementDisabledOn(); + void setElementDisabledOn(DomResourcePixmap *a); inline bool hasElementDisabledOn() const { return m_children & DisabledOn; } void clearElementDisabledOn(); - inline DomResourcePixmap* elementActiveOff() const { return m_activeOff; } - DomResourcePixmap* takeElementActiveOff(); - void setElementActiveOff(DomResourcePixmap* a); + inline DomResourcePixmap *elementActiveOff() const { return m_activeOff; } + DomResourcePixmap *takeElementActiveOff(); + void setElementActiveOff(DomResourcePixmap *a); inline bool hasElementActiveOff() const { return m_children & ActiveOff; } void clearElementActiveOff(); - inline DomResourcePixmap* elementActiveOn() const { return m_activeOn; } - DomResourcePixmap* takeElementActiveOn(); - void setElementActiveOn(DomResourcePixmap* a); + inline DomResourcePixmap *elementActiveOn() const { return m_activeOn; } + DomResourcePixmap *takeElementActiveOn(); + void setElementActiveOn(DomResourcePixmap *a); inline bool hasElementActiveOn() const { return m_children & ActiveOn; } void clearElementActiveOn(); - inline DomResourcePixmap* elementSelectedOff() const { return m_selectedOff; } - DomResourcePixmap* takeElementSelectedOff(); - void setElementSelectedOff(DomResourcePixmap* a); + inline DomResourcePixmap *elementSelectedOff() const { return m_selectedOff; } + DomResourcePixmap *takeElementSelectedOff(); + void setElementSelectedOff(DomResourcePixmap *a); inline bool hasElementSelectedOff() const { return m_children & SelectedOff; } void clearElementSelectedOff(); - inline DomResourcePixmap* elementSelectedOn() const { return m_selectedOn; } - DomResourcePixmap* takeElementSelectedOn(); - void setElementSelectedOn(DomResourcePixmap* a); + inline DomResourcePixmap *elementSelectedOn() const { return m_selectedOn; } + DomResourcePixmap *takeElementSelectedOn(); + void setElementSelectedOn(DomResourcePixmap *a); inline bool hasElementSelectedOn() const { return m_children & SelectedOn; } void clearElementSelectedOn(); private: QString m_text; - void clear(bool clear_all = true); // attribute data QString m_attr_theme; - bool m_has_attr_theme; + bool m_has_attr_theme = false; QString m_attr_resource; - bool m_has_attr_resource; + bool m_has_attr_resource = false; // child element data - uint m_children; - DomResourcePixmap* m_normalOff; - DomResourcePixmap* m_normalOn; - DomResourcePixmap* m_disabledOff; - DomResourcePixmap* m_disabledOn; - DomResourcePixmap* m_activeOff; - DomResourcePixmap* m_activeOn; - DomResourcePixmap* m_selectedOff; - DomResourcePixmap* m_selectedOn; + uint m_children = 0; + DomResourcePixmap *m_normalOff = nullptr; + DomResourcePixmap *m_normalOn = nullptr; + DomResourcePixmap *m_disabledOff = nullptr; + DomResourcePixmap *m_disabledOn = nullptr; + DomResourcePixmap *m_activeOff = nullptr; + DomResourcePixmap *m_activeOn = nullptr; + DomResourcePixmap *m_selectedOff = nullptr; + DomResourcePixmap *m_selectedOn = nullptr; + enum Child { NormalOff = 1, NormalOn = 2, @@ -2765,70 +2233,67 @@ private: SelectedOff = 64, SelectedOn = 128 }; - - DomResourceIcon(const DomResourceIcon &other); - void operator = (const DomResourceIcon&other); }; class QDESIGNER_UILIB_EXPORT DomString { + Q_DISABLE_COPY(DomString) public: - DomString(); + DomString() = default; ~DomString(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; + inline QString text() const { return m_text; } inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeNotr() const { return m_has_attr_notr; } inline QString attributeNotr() const { return m_attr_notr; } - inline void setAttributeNotr(const QString& a) { m_attr_notr = a; m_has_attr_notr = true; } + inline void setAttributeNotr(const QString &a) { m_attr_notr = a; m_has_attr_notr = true; } inline void clearAttributeNotr() { m_has_attr_notr = false; } inline bool hasAttributeComment() const { return m_has_attr_comment; } inline QString attributeComment() const { return m_attr_comment; } - inline void setAttributeComment(const QString& a) { m_attr_comment = a; m_has_attr_comment = true; } + inline void setAttributeComment(const QString &a) { m_attr_comment = a; m_has_attr_comment = true; } inline void clearAttributeComment() { m_has_attr_comment = false; } inline bool hasAttributeExtraComment() const { return m_has_attr_extraComment; } inline QString attributeExtraComment() const { return m_attr_extraComment; } - inline void setAttributeExtraComment(const QString& a) { m_attr_extraComment = a; m_has_attr_extraComment = true; } + inline void setAttributeExtraComment(const QString &a) { m_attr_extraComment = a; m_has_attr_extraComment = true; } inline void clearAttributeExtraComment() { m_has_attr_extraComment = false; } - // child element accessors + inline bool hasAttributeId() const { return m_has_attr_id; } + inline QString attributeId() const { return m_attr_id; } + inline void setAttributeId(const QString &a) { m_attr_id = a; m_has_attr_id = true; } + inline void clearAttributeId() { m_has_attr_id = false; } + private: QString m_text; - void clear(bool clear_all = true); // attribute data QString m_attr_notr; - bool m_has_attr_notr; + bool m_has_attr_notr = false; QString m_attr_comment; - bool m_has_attr_comment; + bool m_has_attr_comment = false; QString m_attr_extraComment; - bool m_has_attr_extraComment; + bool m_has_attr_extraComment = false; - // child element data - uint m_children; - - DomString(const DomString &other); - void operator = (const DomString&other); + QString m_attr_id; + bool m_has_attr_id = false; }; class QDESIGNER_UILIB_EXPORT DomPointF { + Q_DISABLE_COPY(DomPointF) public: - DomPointF(); + DomPointF() = default; ~DomPointF(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline double elementX() const { return m_x; } void setElementX(double a); @@ -2841,34 +2306,27 @@ public: void clearElementY(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - double m_x; - double m_y; + uint m_children = 0; + double m_x = 0.0; + double m_y = 0.0; + enum Child { X = 1, Y = 2 }; - - DomPointF(const DomPointF &other); - void operator = (const DomPointF&other); }; class QDESIGNER_UILIB_EXPORT DomRectF { + Q_DISABLE_COPY(DomRectF) public: - DomRectF(); + DomRectF() = default; ~DomRectF(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline double elementX() const { return m_x; } void setElementX(double a); @@ -2891,38 +2349,31 @@ public: void clearElementHeight(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - double m_x; - double m_y; - double m_width; - double m_height; + uint m_children = 0; + double m_x = 0.0; + double m_y = 0.0; + double m_width = 0.0; + double m_height = 0.0; + enum Child { X = 1, Y = 2, Width = 4, Height = 8 }; - - DomRectF(const DomRectF &other); - void operator = (const DomRectF&other); }; class QDESIGNER_UILIB_EXPORT DomSizeF { + Q_DISABLE_COPY(DomSizeF) public: - DomSizeF(); + DomSizeF() = default; ~DomSizeF(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline double elementWidth() const { return m_width; } void setElementWidth(double a); @@ -2935,34 +2386,27 @@ public: void clearElementHeight(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - double m_width; - double m_height; + uint m_children = 0; + double m_width = 0.0; + double m_height = 0.0; + enum Child { Width = 1, Height = 2 }; - - DomSizeF(const DomSizeF &other); - void operator = (const DomSizeF&other); }; class QDESIGNER_UILIB_EXPORT DomChar { + Q_DISABLE_COPY(DomChar) public: - DomChar(); + DomChar() = default; ~DomChar(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline int elementUnicode() const { return m_unicode; } void setElementUnicode(int a); @@ -2970,69 +2414,56 @@ public: void clearElementUnicode(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - int m_unicode; + uint m_children = 0; + int m_unicode = 0; + enum Child { Unicode = 1 }; - - DomChar(const DomChar &other); - void operator = (const DomChar&other); }; class QDESIGNER_UILIB_EXPORT DomUrl { + Q_DISABLE_COPY(DomUrl) public: - DomUrl(); + DomUrl() = default; ~DomUrl(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline DomString* elementString() const { return m_string; } - DomString* takeElementString(); - void setElementString(DomString* a); + inline DomString *elementString() const { return m_string; } + DomString *takeElementString(); + void setElementString(DomString *a); inline bool hasElementString() const { return m_children & String; } void clearElementString(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - DomString* m_string; + uint m_children = 0; + DomString *m_string = nullptr; + enum Child { String = 1 }; - - DomUrl(const DomUrl &other); - void operator = (const DomUrl&other); }; class QDESIGNER_UILIB_EXPORT DomProperty { + Q_DISABLE_COPY(DomProperty) public: - DomProperty(); + DomProperty() = default; ~DomProperty(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } inline bool hasAttributeStdset() const { return m_has_attr_stdset; } @@ -3045,70 +2476,70 @@ public: inline Kind kind() const { return m_kind; } inline QString elementBool() const { return m_bool; } - void setElementBool(const QString& a); + void setElementBool(const QString &a); - inline DomColor* elementColor() const { return m_color; } - DomColor* takeElementColor(); - void setElementColor(DomColor* a); + inline DomColor *elementColor() const { return m_color; } + DomColor *takeElementColor(); + void setElementColor(DomColor *a); inline QString elementCstring() const { return m_cstring; } - void setElementCstring(const QString& a); + void setElementCstring(const QString &a); inline int elementCursor() const { return m_cursor; } void setElementCursor(int a); inline QString elementCursorShape() const { return m_cursorShape; } - void setElementCursorShape(const QString& a); + void setElementCursorShape(const QString &a); inline QString elementEnum() const { return m_enum; } - void setElementEnum(const QString& a); + void setElementEnum(const QString &a); - inline DomFont* elementFont() const { return m_font; } - DomFont* takeElementFont(); - void setElementFont(DomFont* a); + inline DomFont *elementFont() const { return m_font; } + DomFont *takeElementFont(); + void setElementFont(DomFont *a); - inline DomResourceIcon* elementIconSet() const { return m_iconSet; } - DomResourceIcon* takeElementIconSet(); - void setElementIconSet(DomResourceIcon* a); + inline DomResourceIcon *elementIconSet() const { return m_iconSet; } + DomResourceIcon *takeElementIconSet(); + void setElementIconSet(DomResourceIcon *a); - inline DomResourcePixmap* elementPixmap() const { return m_pixmap; } - DomResourcePixmap* takeElementPixmap(); - void setElementPixmap(DomResourcePixmap* a); + inline DomResourcePixmap *elementPixmap() const { return m_pixmap; } + DomResourcePixmap *takeElementPixmap(); + void setElementPixmap(DomResourcePixmap *a); - inline DomPalette* elementPalette() const { return m_palette; } - DomPalette* takeElementPalette(); - void setElementPalette(DomPalette* a); + inline DomPalette *elementPalette() const { return m_palette; } + DomPalette *takeElementPalette(); + void setElementPalette(DomPalette *a); - inline DomPoint* elementPoint() const { return m_point; } - DomPoint* takeElementPoint(); - void setElementPoint(DomPoint* a); + inline DomPoint *elementPoint() const { return m_point; } + DomPoint *takeElementPoint(); + void setElementPoint(DomPoint *a); - inline DomRect* elementRect() const { return m_rect; } - DomRect* takeElementRect(); - void setElementRect(DomRect* a); + inline DomRect *elementRect() const { return m_rect; } + DomRect *takeElementRect(); + void setElementRect(DomRect *a); inline QString elementSet() const { return m_set; } - void setElementSet(const QString& a); + void setElementSet(const QString &a); - inline DomLocale* elementLocale() const { return m_locale; } - DomLocale* takeElementLocale(); - void setElementLocale(DomLocale* a); + inline DomLocale *elementLocale() const { return m_locale; } + DomLocale *takeElementLocale(); + void setElementLocale(DomLocale *a); - inline DomSizePolicy* elementSizePolicy() const { return m_sizePolicy; } - DomSizePolicy* takeElementSizePolicy(); - void setElementSizePolicy(DomSizePolicy* a); + inline DomSizePolicy *elementSizePolicy() const { return m_sizePolicy; } + DomSizePolicy *takeElementSizePolicy(); + void setElementSizePolicy(DomSizePolicy *a); - inline DomSize* elementSize() const { return m_size; } - DomSize* takeElementSize(); - void setElementSize(DomSize* a); + inline DomSize *elementSize() const { return m_size; } + DomSize *takeElementSize(); + void setElementSize(DomSize *a); - inline DomString* elementString() const { return m_string; } - DomString* takeElementString(); - void setElementString(DomString* a); + inline DomString *elementString() const { return m_string; } + DomString *takeElementString(); + void setElementString(DomString *a); - inline DomStringList* elementStringList() const { return m_stringList; } - DomStringList* takeElementStringList(); - void setElementStringList(DomStringList* a); + inline DomStringList *elementStringList() const { return m_stringList; } + DomStringList *takeElementStringList(); + void setElementStringList(DomStringList *a); inline int elementNumber() const { return m_number; } void setElementNumber(int a); @@ -3119,40 +2550,40 @@ public: inline double elementDouble() const { return m_double; } void setElementDouble(double a); - inline DomDate* elementDate() const { return m_date; } - DomDate* takeElementDate(); - void setElementDate(DomDate* a); + inline DomDate *elementDate() const { return m_date; } + DomDate *takeElementDate(); + void setElementDate(DomDate *a); - inline DomTime* elementTime() const { return m_time; } - DomTime* takeElementTime(); - void setElementTime(DomTime* a); + inline DomTime *elementTime() const { return m_time; } + DomTime *takeElementTime(); + void setElementTime(DomTime *a); - inline DomDateTime* elementDateTime() const { return m_dateTime; } - DomDateTime* takeElementDateTime(); - void setElementDateTime(DomDateTime* a); + inline DomDateTime *elementDateTime() const { return m_dateTime; } + DomDateTime *takeElementDateTime(); + void setElementDateTime(DomDateTime *a); - inline DomPointF* elementPointF() const { return m_pointF; } - DomPointF* takeElementPointF(); - void setElementPointF(DomPointF* a); + inline DomPointF *elementPointF() const { return m_pointF; } + DomPointF *takeElementPointF(); + void setElementPointF(DomPointF *a); - inline DomRectF* elementRectF() const { return m_rectF; } - DomRectF* takeElementRectF(); - void setElementRectF(DomRectF* a); + inline DomRectF *elementRectF() const { return m_rectF; } + DomRectF *takeElementRectF(); + void setElementRectF(DomRectF *a); - inline DomSizeF* elementSizeF() const { return m_sizeF; } - DomSizeF* takeElementSizeF(); - void setElementSizeF(DomSizeF* a); + inline DomSizeF *elementSizeF() const { return m_sizeF; } + DomSizeF *takeElementSizeF(); + void setElementSizeF(DomSizeF *a); inline qlonglong elementLongLong() const { return m_longLong; } void setElementLongLong(qlonglong a); - inline DomChar* elementChar() const { return m_char; } - DomChar* takeElementChar(); - void setElementChar(DomChar* a); + inline DomChar *elementChar() const { return m_char; } + DomChar *takeElementChar(); + void setElementChar(DomChar *a); - inline DomUrl* elementUrl() const { return m_url; } - DomUrl* takeElementUrl(); - void setElementUrl(DomUrl* a); + inline DomUrl *elementUrl() const { return m_url; } + DomUrl *takeElementUrl(); + void setElementUrl(DomUrl *a); inline uint elementUInt() const { return m_UInt; } void setElementUInt(uint a); @@ -3160,142 +2591,127 @@ public: inline qulonglong elementULongLong() const { return m_uLongLong; } void setElementULongLong(qulonglong a); - inline DomBrush* elementBrush() const { return m_brush; } - DomBrush* takeElementBrush(); - void setElementBrush(DomBrush* a); + inline DomBrush *elementBrush() const { return m_brush; } + DomBrush *takeElementBrush(); + void setElementBrush(DomBrush *a); private: - QString m_text; - void clear(bool clear_all = true); + void clear(); // attribute data QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; - int m_attr_stdset; - bool m_has_attr_stdset; + int m_attr_stdset = 0; + bool m_has_attr_stdset = false; // child element data - Kind m_kind; + Kind m_kind = Unknown; QString m_bool; - DomColor* m_color; + DomColor *m_color = nullptr; QString m_cstring; - int m_cursor; + int m_cursor = 0; QString m_cursorShape; QString m_enum; - DomFont* m_font; - DomResourceIcon* m_iconSet; - DomResourcePixmap* m_pixmap; - DomPalette* m_palette; - DomPoint* m_point; - DomRect* m_rect; + DomFont *m_font = nullptr; + DomResourceIcon *m_iconSet = nullptr; + DomResourcePixmap *m_pixmap = nullptr; + DomPalette *m_palette = nullptr; + DomPoint *m_point = nullptr; + DomRect *m_rect = nullptr; QString m_set; - DomLocale* m_locale; - DomSizePolicy* m_sizePolicy; - DomSize* m_size; - DomString* m_string; - DomStringList* m_stringList; - int m_number; - float m_float; - double m_double; - DomDate* m_date; - DomTime* m_time; - DomDateTime* m_dateTime; - DomPointF* m_pointF; - DomRectF* m_rectF; - DomSizeF* m_sizeF; - qlonglong m_longLong; - DomChar* m_char; - DomUrl* m_url; - uint m_UInt; - qulonglong m_uLongLong; - DomBrush* m_brush; - - DomProperty(const DomProperty &other); - void operator = (const DomProperty&other); + DomLocale *m_locale = nullptr; + DomSizePolicy *m_sizePolicy = nullptr; + DomSize *m_size = nullptr; + DomString *m_string = nullptr; + DomStringList *m_stringList = nullptr; + int m_number = 0; + float m_float = 0.0; + double m_double = 0.0; + DomDate *m_date = nullptr; + DomTime *m_time = nullptr; + DomDateTime *m_dateTime = nullptr; + DomPointF *m_pointF = nullptr; + DomRectF *m_rectF = nullptr; + DomSizeF *m_sizeF = nullptr; + qlonglong m_longLong = 0; + DomChar *m_char = nullptr; + DomUrl *m_url = nullptr; + uint m_UInt = 0; + qulonglong m_uLongLong = 0; + DomBrush *m_brush = nullptr; }; class QDESIGNER_UILIB_EXPORT DomConnections { + Q_DISABLE_COPY(DomConnections) public: - DomConnections(); + DomConnections() = default; ~DomConnections(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline QList<DomConnection*> elementConnection() const { return m_connection; } - void setElementConnection(const QList<DomConnection*>& a); + inline QVector<DomConnection *> elementConnection() const { return m_connection; } + void setElementConnection(const QVector<DomConnection *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - QList<DomConnection*> m_connection; + uint m_children = 0; + QVector<DomConnection *> m_connection; + enum Child { Connection = 1 }; - - DomConnections(const DomConnections &other); - void operator = (const DomConnections&other); }; class QDESIGNER_UILIB_EXPORT DomConnection { + Q_DISABLE_COPY(DomConnection) public: - DomConnection(); + DomConnection() = default; ~DomConnection(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline QString elementSender() const { return m_sender; } - void setElementSender(const QString& a); + void setElementSender(const QString &a); inline bool hasElementSender() const { return m_children & Sender; } void clearElementSender(); inline QString elementSignal() const { return m_signal; } - void setElementSignal(const QString& a); + void setElementSignal(const QString &a); inline bool hasElementSignal() const { return m_children & Signal; } void clearElementSignal(); inline QString elementReceiver() const { return m_receiver; } - void setElementReceiver(const QString& a); + void setElementReceiver(const QString &a); inline bool hasElementReceiver() const { return m_children & Receiver; } void clearElementReceiver(); inline QString elementSlot() const { return m_slot; } - void setElementSlot(const QString& a); + void setElementSlot(const QString &a); inline bool hasElementSlot() const { return m_children & Slot; } void clearElementSlot(); - inline DomConnectionHints* elementHints() const { return m_hints; } - DomConnectionHints* takeElementHints(); - void setElementHints(DomConnectionHints* a); + inline DomConnectionHints *elementHints() const { return m_hints; } + DomConnectionHints *takeElementHints(); + void setElementHints(DomConnectionHints *a); inline bool hasElementHints() const { return m_children & Hints; } void clearElementHints(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; + uint m_children = 0; QString m_sender; QString m_signal; QString m_receiver; QString m_slot; - DomConnectionHints* m_hints; + DomConnectionHints *m_hints = nullptr; + enum Child { Sender = 1, Signal = 2, @@ -3303,56 +2719,45 @@ private: Slot = 8, Hints = 16 }; - - DomConnection(const DomConnection &other); - void operator = (const DomConnection&other); }; class QDESIGNER_UILIB_EXPORT DomConnectionHints { + Q_DISABLE_COPY(DomConnectionHints) public: - DomConnectionHints(); + DomConnectionHints() = default; ~DomConnectionHints(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline QList<DomConnectionHint*> elementHint() const { return m_hint; } - void setElementHint(const QList<DomConnectionHint*>& a); + inline QVector<DomConnectionHint *> elementHint() const { return m_hint; } + void setElementHint(const QVector<DomConnectionHint *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - QList<DomConnectionHint*> m_hint; + uint m_children = 0; + QVector<DomConnectionHint *> m_hint; + enum Child { Hint = 1 }; - - DomConnectionHints(const DomConnectionHints &other); - void operator = (const DomConnectionHints&other); }; class QDESIGNER_UILIB_EXPORT DomConnectionHint { + Q_DISABLE_COPY(DomConnectionHint) public: - DomConnectionHint(); + DomConnectionHint() = default; ~DomConnectionHint(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeType() const { return m_has_attr_type; } inline QString attributeType() const { return m_attr_type; } - inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; } + inline void setAttributeType(const QString &a) { m_attr_type = a; m_has_attr_type = true; } inline void clearAttributeType() { m_has_attr_type = false; } // child element accessors @@ -3367,278 +2772,159 @@ public: void clearElementY(); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_type; - bool m_has_attr_type; + bool m_has_attr_type = false; // child element data - uint m_children; - int m_x; - int m_y; + uint m_children = 0; + int m_x = 0; + int m_y = 0; + enum Child { X = 1, Y = 2 }; - - DomConnectionHint(const DomConnectionHint &other); - void operator = (const DomConnectionHint&other); -}; - -class QDESIGNER_UILIB_EXPORT DomScript { -public: - DomScript(); - ~DomScript(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - inline bool hasAttributeSource() const { return m_has_attr_source; } - inline QString attributeSource() const { return m_attr_source; } - inline void setAttributeSource(const QString& a) { m_attr_source = a; m_has_attr_source = true; } - inline void clearAttributeSource() { m_has_attr_source = false; } - - inline bool hasAttributeLanguage() const { return m_has_attr_language; } - inline QString attributeLanguage() const { return m_attr_language; } - inline void setAttributeLanguage(const QString& a) { m_attr_language = a; m_has_attr_language = true; } - inline void clearAttributeLanguage() { m_has_attr_language = false; } - - // child element accessors -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - QString m_attr_source; - bool m_has_attr_source; - - QString m_attr_language; - bool m_has_attr_language; - - // child element data - uint m_children; - - DomScript(const DomScript &other); - void operator = (const DomScript&other); -}; - -class QDESIGNER_UILIB_EXPORT DomWidgetData { -public: - DomWidgetData(); - ~DomWidgetData(); - - void read(QXmlStreamReader &reader); - void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - - // attribute accessors - // child element accessors - inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); - -private: - QString m_text; - void clear(bool clear_all = true); - - // attribute data - // child element data - uint m_children; - QList<DomProperty*> m_property; - enum Child { - Property = 1 - }; - - DomWidgetData(const DomWidgetData &other); - void operator = (const DomWidgetData&other); }; class QDESIGNER_UILIB_EXPORT DomDesignerData { + Q_DISABLE_COPY(DomDesignerData) public: - DomDesignerData(); + DomDesignerData() = default; ~DomDesignerData(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline QList<DomProperty*> elementProperty() const { return m_property; } - void setElementProperty(const QList<DomProperty*>& a); + void setElementProperty(const QList<DomProperty *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; + uint m_children = 0; QList<DomProperty*> m_property; + enum Child { Property = 1 }; - - DomDesignerData(const DomDesignerData &other); - void operator = (const DomDesignerData&other); }; class QDESIGNER_UILIB_EXPORT DomSlots { + Q_DISABLE_COPY(DomSlots) public: - DomSlots(); + DomSlots() = default; ~DomSlots(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors inline QStringList elementSignal() const { return m_signal; } - void setElementSignal(const QStringList& a); + void setElementSignal(const QStringList &a); inline QStringList elementSlot() const { return m_slot; } - void setElementSlot(const QStringList& a); + void setElementSlot(const QStringList &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; + uint m_children = 0; QStringList m_signal; QStringList m_slot; + enum Child { Signal = 1, Slot = 2 }; - - DomSlots(const DomSlots &other); - void operator = (const DomSlots&other); }; class QDESIGNER_UILIB_EXPORT DomPropertySpecifications { + Q_DISABLE_COPY(DomPropertySpecifications) public: - DomPropertySpecifications(); + DomPropertySpecifications() = default; ~DomPropertySpecifications(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } - // attribute accessors // child element accessors - inline QList<DomPropertyToolTip*> elementTooltip() const { return m_tooltip; } - void setElementTooltip(const QList<DomPropertyToolTip*>& a); + inline QVector<DomPropertyToolTip *> elementTooltip() const { return m_tooltip; } + void setElementTooltip(const QVector<DomPropertyToolTip *> &a); - inline QList<DomStringPropertySpecification*> elementStringpropertyspecification() const { return m_stringpropertyspecification; } - void setElementStringpropertyspecification(const QList<DomStringPropertySpecification*>& a); + inline QVector<DomStringPropertySpecification *> elementStringpropertyspecification() const { return m_stringpropertyspecification; } + void setElementStringpropertyspecification(const QVector<DomStringPropertySpecification *> &a); private: - QString m_text; - void clear(bool clear_all = true); - // attribute data // child element data - uint m_children; - QList<DomPropertyToolTip*> m_tooltip; - QList<DomStringPropertySpecification*> m_stringpropertyspecification; + uint m_children = 0; + QVector<DomPropertyToolTip *> m_tooltip; + QVector<DomStringPropertySpecification *> m_stringpropertyspecification; + enum Child { Tooltip = 1, Stringpropertyspecification = 2 }; - - DomPropertySpecifications(const DomPropertySpecifications &other); - void operator = (const DomPropertySpecifications&other); }; class QDESIGNER_UILIB_EXPORT DomPropertyToolTip { + Q_DISABLE_COPY(DomPropertyToolTip) public: - DomPropertyToolTip(); + DomPropertyToolTip() = default; ~DomPropertyToolTip(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } - // child element accessors private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_name; - bool m_has_attr_name; - - // child element data - uint m_children; - - DomPropertyToolTip(const DomPropertyToolTip &other); - void operator = (const DomPropertyToolTip&other); + bool m_has_attr_name = false; }; class QDESIGNER_UILIB_EXPORT DomStringPropertySpecification { + Q_DISABLE_COPY(DomStringPropertySpecification) public: - DomStringPropertySpecification(); + DomStringPropertySpecification() = default; ~DomStringPropertySpecification(); void read(QXmlStreamReader &reader); void write(QXmlStreamWriter &writer, const QString &tagName = QString()) const; - inline QString text() const { return m_text; } - inline void setText(const QString &s) { m_text = s; } // attribute accessors inline bool hasAttributeName() const { return m_has_attr_name; } inline QString attributeName() const { return m_attr_name; } - inline void setAttributeName(const QString& a) { m_attr_name = a; m_has_attr_name = true; } + inline void setAttributeName(const QString &a) { m_attr_name = a; m_has_attr_name = true; } inline void clearAttributeName() { m_has_attr_name = false; } inline bool hasAttributeType() const { return m_has_attr_type; } inline QString attributeType() const { return m_attr_type; } - inline void setAttributeType(const QString& a) { m_attr_type = a; m_has_attr_type = true; } + inline void setAttributeType(const QString &a) { m_attr_type = a; m_has_attr_type = true; } inline void clearAttributeType() { m_has_attr_type = false; } inline bool hasAttributeNotr() const { return m_has_attr_notr; } inline QString attributeNotr() const { return m_attr_notr; } - inline void setAttributeNotr(const QString& a) { m_attr_notr = a; m_has_attr_notr = true; } + inline void setAttributeNotr(const QString &a) { m_attr_notr = a; m_has_attr_notr = true; } inline void clearAttributeNotr() { m_has_attr_notr = false; } - // child element accessors private: - QString m_text; - void clear(bool clear_all = true); - // attribute data QString m_attr_name; - bool m_has_attr_name; + bool m_has_attr_name = false; QString m_attr_type; - bool m_has_attr_type; + bool m_has_attr_type = false; QString m_attr_notr; - bool m_has_attr_notr; - - // child element data - uint m_children; - - DomStringPropertySpecification(const DomStringPropertySpecification &other); - void operator = (const DomStringPropertySpecification&other); + bool m_has_attr_notr = false; }; |