13 #ifndef XMLSERIALIZER_H
14 #define XMLSERIALIZER_H
16 #include <QXmlStreamWriter>
19 #include <QStringList>
37 QXmlStreamWriter *m_pXmlWriter {
nullptr};
39 bool m_bIsRoot {
true};
44 void BeginObject(
const QString &sName,
const QObject *pObject )
override;
45 void EndObject (
const QString &sName,
const QObject *pObject )
override;
48 const QVariant &vValue,
49 const QMetaObject *pMetaParent,
50 const QMetaProperty *pMetaProp )
override;
52 void RenderValue (
const QString &sName,
const QVariant &vValue );
54 void RenderEnum (
const QString &sName ,
55 const QVariant &vValue,
56 const QMetaProperty *pMetaProp );
59 void RenderStringList(
const QString &sName,
const QStringList &list );
60 void RenderList (
const QString &sName,
const QVariantList &list );
61 void RenderMap (
const QString &sName,
const QVariantMap &map );
63 static QString GetItemName (
const QString &sName );
65 static QString GetContentName (
const QString &sName,
66 const QMetaObject *pMetaObject,
67 const QMetaProperty *pMetaProp );
69 static QString FindOptionValue (
const QStringList &sOptions,
70 const QString &sName );
74 bool PropertiesAsAttributes {
true};
86 #endif // XMLSERIALIZER_H