1 #ifndef XMLPARSEBASE_H_
2 #define XMLPARSEBASE_H_
14 #define VERBOSE_XML(type, level, filename, element, msg) \
15 LOG(type, level, LOC + QString("%1\n\t\t\t" \
16 "Location: %2 @ %3\n\t\t\t" \
17 "Name: '%4'\tType: '%5'") \
18 .arg(msg).arg(filename).arg((element).lineNumber()) \
19 .arg((element).attribute("name", "")).arg((element).tagName()))
25 static QString getFirstText(QDomElement &element);
26 static bool parseBool(
const QString &text);
27 static bool parseBool(QDomElement &element);
28 static MythPoint parsePoint(
const QString &text,
bool normalize =
true);
29 static MythPoint parsePoint(QDomElement &element,
bool normalize =
true);
30 static QSize parseSize(
const QString &text,
bool normalize =
true);
31 static QSize parseSize(QDomElement &element,
bool normalize =
true);
32 static MythRect parseRect(
const QString &text,
bool normalize =
true);
33 static MythRect parseRect(QDomElement &element,
bool normalize =
true);
34 static int parseAlignment(
const QString &text);
35 static int parseAlignment(QDomElement &element);
36 static QBrush parseGradient(
const QDomElement &element);
37 static QString parseText(QDomElement &element);
39 static void ClearGlobalObjectStore(
void);
41 static void ParseChildren(
42 const QString &
filename, QDomElement &element,
48 QDomElement &element,
const QString &
type,
51 QMap<QString, QString> &parentDependsMap);
53 static bool WindowExists(
const QString &xmlfile,
const QString &windowname);
54 static bool LoadWindowFromXML(
const QString &xmlfile,
55 const QString &windowname,
58 static bool LoadBaseTheme(
void);
59 static bool LoadBaseTheme(
const QString &baseTheme);
61 static bool CopyWindowFromBase(
const QString &windowname,
65 static bool doLoad(
const QString &windowname,
MythUIType *parent,
67 bool onlyLoadWindows,
bool showWarnings);
68 static void ConnectDependants(
MythUIType * parent,
69 QMap<QString, QString> &dependsMap);