1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#ifndef XMLPARSEBASE_H_
#define XMLPARSEBASE_H_
#include <QString>
#include "mythrect.h"
class MythUIType;
class MythScreenType;
class QDomElement;
void VERBOSE_XML(
unsigned int verbose_type,
const QString &filename, const QDomElement &element, QString msg);
class MPUBLIC XMLParseBase
{
public:
static QString getFirstText(QDomElement &element);
static bool parseBool(const QString &text);
static bool parseBool(QDomElement &element);
static MythPoint parsePoint(const QString &text, bool normalize = true);
static MythPoint parsePoint(QDomElement &element, bool normalize = true);
static QSize parseSize(const QString &text, bool normalize = true);
static QSize parseSize(QDomElement &element, bool normalize = true);
static MythRect parseRect(const QString &text, bool normalize = true);
static MythRect parseRect(QDomElement &element, bool normalize = true);
static int parseAlignment(const QString &text);
static int parseAlignment(QDomElement &element);
static MythUIType *GetGlobalObjectStore(void);
static void ClearGlobalObjectStore(void);
static void ParseChildren(
const QString &filename, QDomElement &element,
MythUIType *parent, bool showWarnings);
// parse one and return it.
static MythUIType *ParseUIType(
const QString &filename,
QDomElement &element, const QString &type,
MythUIType *parent, MythScreenType *screen,
bool showWarnings);
static bool WindowExists(const QString &xmlfile, const QString &windowname);
static bool LoadWindowFromXML(const QString &xmlfile,
const QString &windowname,
MythUIType *parent);
static bool LoadBaseTheme(void);
static bool CopyWindowFromBase(const QString &windowname,
MythScreenType *win);
private:
static bool doLoad(const QString &windowname, MythUIType *parent,
const QString &filename,
bool onlyLoadWindows, bool showWarnings);
};
#endif
|