00001 #ifndef XMLPARSEBASE_H_
00002 #define XMLPARSEBASE_H_
00003
00004 #include <qdom.h>
00005 #include <qpoint.h>
00006 #include <qrect.h>
00007 #include <qstring.h>
00008
00009 class MythUIType;
00010 class MythScreenType;
00011
00012 class XMLParseBase
00013 {
00014 public:
00015 static QString getFirstText(QDomElement &element);
00016 static bool parseBool(const QString &text);
00017 static bool parseBool(QDomElement &element);
00018 static QPoint parsePoint(const QString &text, bool normalize = true);
00019 static QPoint parsePoint(QDomElement &element, bool normalize = true);
00020 static QSize parseSize(const QString &text, bool normalize = true);
00021 static QSize parseSize(QDomElement &element, bool normalize = true);
00022 static QRect parseRect(const QString &text, bool normalize = true);
00023 static QRect parseRect(QDomElement &element, bool normalize = true);
00024
00025 static MythUIType *GetGlobalObjectStore(void);
00026 static void ClearGlobalObjectStore(void);
00027
00028
00029 static MythUIType *ParseChildren(QDomElement &element, MythUIType *parent);
00030
00031
00032 static MythUIType *ParseUIType(QDomElement &element, const QString &type,
00033 MythUIType *parent,
00034 MythScreenType *screen = NULL);
00035
00036 static bool LoadWindowFromXML(const QString &xmlfile,
00037 const QString &windowname,
00038 MythUIType *parent);
00039
00040 static bool LoadBaseTheme(void);
00041
00042 static bool CopyWindowFromBase(const QString &windowname,
00043 MythScreenType *win);
00044
00045 private:
00046 static bool doLoad(const QString &windowname, MythUIType *parent,
00047 const QString &filename, bool onlywindows = true);
00048 };
00049
00050 #endif