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