本文整理汇总了C++中MythScreenType::SetVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ MythScreenType::SetVisible方法的具体用法?C++ MythScreenType::SetVisible怎么用?C++ MythScreenType::SetVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythScreenType
的用法示例。
在下文中一共展示了MythScreenType::SetVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetText
//.........这里部分代码省略.........
iconpath = map["iconpath"];
else
iconpath = ChannelUtil::GetIcon(chanid);
if (!iconpath.isEmpty())
{
QString iconurl =
gCoreContext->GetMasterHostPrefix("ChannelIcons",
iconpath);
icon->SetFilename(iconurl);
icon->Load(false);
}
}
}
if (map.contains("inetref"))
{
MythUIImage *cover = dynamic_cast<MythUIImage *> (win->GetChild("coverart"));
if (cover && map.contains("coverartpath"))
{
QString coverpath = map["coverartpath"];
cover->SetFilename(coverpath);
cover->Load(false);
}
MythUIImage *fanart = dynamic_cast<MythUIImage *> (win->GetChild("fanart"));
if (fanart && map.contains("fanartpath"))
{
QString fanartpath = map["fanartpath"];
fanart->SetFilename(fanartpath);
fanart->Load(false);
}
MythUIImage *banner = dynamic_cast<MythUIImage *> (win->GetChild("banner"));
if (banner && map.contains("bannerpath"))
{
QString bannerpath = map["bannerpath"];
banner->SetFilename(bannerpath);
banner->Load(false);
}
MythUIImage *screenshot = dynamic_cast<MythUIImage *> (win->GetChild("screenshot"));
if (screenshot && map.contains("screenshotpath"))
{
QString screenshotpath = map["screenshotpath"];
screenshot->SetFilename(screenshotpath);
screenshot->Load(false);
}
}
if (map.contains("nightmode"))
{
MythUIStateType *state = dynamic_cast<MythUIStateType *> (win->GetChild("nightmode"));
if (state)
state->DisplayState(map["nightmode"]);
}
if (map.contains("mediatype"))
{
MythUIStateType *state = dynamic_cast<MythUIStateType *> (win->GetChild("mediatype"));
if (state)
state->DisplayState(map["mediatype"]);
}
MythUIProgressBar *bar =
dynamic_cast<MythUIProgressBar *>(win->GetChild("elapsedpercent"));
if (bar)
{
int startts = map["startts"].toInt();
int endts = map["endts"].toInt();
int nowts = MythDate::current().toTime_t();
if (startts > nowts)
{
bar->SetUsed(0);
}
else if (endts < nowts)
{
bar->SetUsed(1000);
}
else
{
int duration = endts - startts;
if (duration > 0)
bar->SetUsed(1000 * (nowts - startts) / duration);
else
bar->SetUsed(0);
}
bar->SetVisible(startts > 0);
bar->SetStart(0);
bar->SetTotal(1000);
}
win->SetVisible(true);
if (win == m_Dialog)
{
ChannelEditor *edit = dynamic_cast<ChannelEditor*>(m_Dialog);
if (edit)
edit->SetText(map);
}
else
win->SetTextFromMap(map);
SetExpiry(window, timeout);
}