MythTV  master
mythxmlplistserialiser.h
Go to the documentation of this file.
1 #ifndef MYTHXMLPLISTSERIALISER_H
2 #define MYTHXMLPLISTSERIALISER_H
3 
4 // Qt
5 #include <QXmlStreamWriter>
6 
7 // MythTV
9 
10 #define XML_PLIST_SERIALIZER_VERSION "1.1"
11 
13 {
14  public:
15  MythXMLPListSerialiser(const QString& Name, const QVariant& Value);
16 
17  protected:
18  void AddObject (const QString& Name, const QVariant& Value);
19  void AddValue (const QString& Name, const QVariant& Value, bool NeedKey = true);
20  void AddQObject (const QString& Name, const QObject* Object);
21  void AddStringList(const QString& Name, const QVariant& Values);
22  void AddList (const QString& Name, const QVariantList& Values);
23  void AddMap (const QString& Name, const QVariantMap& Map);
24  void AddProperty (const QString& Name, const QVariant& Value,
25  const QMetaObject* MetaObject, const QMetaProperty* MetaProperty);
26 
27  private:
28  Q_DISABLE_COPY(MythXMLPListSerialiser)
29  static QString GetItemName(const QString& Name);
30  static QString GetContentName(const QString &Name, const QMetaObject* MetaObject);
31  QXmlStreamWriter m_writer;
32 };
33 #endif
MythXMLPListSerialiser::AddQObject
void AddQObject(const QString &Name, const QObject *Object)
Definition: mythxmlplistserialiser.cpp:118
MythXMLPListSerialiser::AddMap
void AddMap(const QString &Name, const QVariantMap &Map)
Definition: mythxmlplistserialiser.cpp:207
MythXMLPListSerialiser::GetItemName
static QString GetItemName(const QString &Name)
Definition: mythxmlplistserialiser.cpp:217
MythXMLPListSerialiser::m_writer
QXmlStreamWriter m_writer
Definition: mythxmlplistserialiser.h:31
MythSerialiser
Definition: mythserialiser.h:14
MythXMLPListSerialiser
Definition: mythxmlplistserialiser.h:12
MythXMLPListSerialiser::GetContentName
static QString GetContentName(const QString &Name, const QMetaObject *MetaObject)
FIXME We shouldn't be doing this on the fly.
Definition: mythxmlplistserialiser.cpp:228
MythXMLPListSerialiser::AddObject
void AddObject(const QString &Name, const QVariant &Value)
Definition: mythxmlplistserialiser.cpp:31
MythXMLPListSerialiser::MythXMLPListSerialiser
MythXMLPListSerialiser(const QString &Name, const QVariant &Value)
Definition: mythxmlplistserialiser.cpp:10
mythserialiser.h
MythXMLPListSerialiser::AddList
void AddList(const QString &Name, const QVariantList &Values)
Definition: mythxmlplistserialiser.cpp:180
Name
Definition: channelsettings.cpp:71
MythXMLPListSerialiser::AddStringList
void AddStringList(const QString &Name, const QVariant &Values)
Definition: mythxmlplistserialiser.cpp:170
MythXMLPListSerialiser::AddValue
void AddValue(const QString &Name, const QVariant &Value, bool NeedKey=true)
Definition: mythxmlplistserialiser.cpp:37
MythXMLPListSerialiser::AddProperty
void AddProperty(const QString &Name, const QVariant &Value, const QMetaObject *MetaObject, const QMetaProperty *MetaProperty)
Definition: mythxmlplistserialiser.cpp:156