本文整理汇总了C++中MythUIType::ConnectDependants方法的典型用法代码示例。如果您正苦于以下问题:C++ MythUIType::ConnectDependants方法的具体用法?C++ MythUIType::ConnectDependants怎么用?C++ MythUIType::ConnectDependants使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythUIType
的用法示例。
在下文中一共展示了MythUIType::ConnectDependants方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doLoad
//.........这里部分代码省略.........
}
f.close();
QDomElement docElem = doc.documentElement();
QDomNode n = docElem.firstChild();
while (!n.isNull())
{
QDomElement e = n.toElement();
if (!e.isNull())
{
if (e.tagName() == "include")
{
QString include = getFirstText(e);
if (!include.isEmpty())
LoadBaseTheme(include);
}
if (onlywindows && e.tagName() == "window")
{
QString name = e.attribute("name", "");
QString include = e.attribute("include", "");
if (name.isEmpty())
{
VERBOSE_XML(VB_GENERAL, LOG_ERR, filename, e,
"Window needs a name");
return false;
}
if (!include.isEmpty())
LoadBaseTheme(include);
if (name == windowname)
{
ParseChildren(filename, e, parent, showWarnings);
return true;
}
}
if (!onlywindows)
{
QString type = e.tagName();
if (type == "font" || type == "fontdef")
{
bool global = (GetGlobalObjectStore() == parent);
MythFontProperties *font = MythFontProperties::ParseFromXml(
filename, e, parent, global, showWarnings);
if (!global && font)
{
QString name = e.attribute("name");
parent->AddFont(name, font);
}
delete font;
}
else if (type == "imagetype" ||
type == "textarea" ||
type == "group" ||
type == "textedit" ||
type == "button" ||
type == "buttonlist" ||
type == "buttonlist2" ||
type == "buttontree" ||
type == "spinbox" ||
type == "checkbox" ||
type == "statetype" ||
type == "window" ||
type == "clock" ||
type == "progressbar" ||
type == "scrollbar" ||
type == "webbrowser" ||
type == "guidegrid" ||
type == "shape" ||
type == "editbar" ||
type == "video")
{
// We don't want widgets in base.xml
// depending on each other so ignore dependsMap
QMap<QString, QString> dependsMap;
MythUIType *uitype = NULL;
uitype = ParseUIType(filename, e, type, parent,
NULL, showWarnings, dependsMap);
if (uitype)
uitype->ConnectDependants(true);
}
else
{
VERBOSE_XML(VB_GENERAL, LOG_ERR, filename, e,
"Unknown widget type");
}
}
}
n = n.nextSibling();
}
if (onlywindows)
return false;
return true;
}