本文整理汇总了C++中MythUIText::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ MythUIText::Reset方法的具体用法?C++ MythUIText::Reset怎么用?C++ MythUIText::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythUIText
的用法示例。
在下文中一共展示了MythUIText::Reset方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
void AirPlayPictureScreen::Init(void)
{
if (m_airplayImage)
{
if (!m_imageFilename.isEmpty())
{
m_airplayImage->SetFilename(m_imageFilename); // Absolute path, http or SG url
m_airplayImage->Load(); // By default the image is loaded in a background thread, use LoadNow() to load in foreground
}
else
{
// Will default to displaying whatever placeholder image is defined
// in the xml by the themer, means we can show _something_ rather than
// a big empty hole. Generally you always want to call Reset() in
// these circumstances
m_airplayImage->Reset();
}
}
if (m_airplayText)
{
if (!m_imageDescription.isEmpty())
{
m_airplayText->SetText(m_imageDescription);
}
else
{
// Same as above, calling Reset() allows for a sane, themer defined
//default to be displayed
m_airplayText->Reset();
}
}
}
示例2: SetFocusWidget
bool MythScreenType::SetFocusWidget(MythUIType *widget)
{
if (!widget || !widget->IsVisible())
{
QMap<int, MythUIType *>::iterator it = m_FocusWidgetList.begin();
MythUIType *current;
while (it != m_FocusWidgetList.end())
{
current = *it;
if (current->CanTakeFocus() && current->IsVisible())
{
widget = current;
break;
}
++it;
}
}
if (!widget)
return false;
if (m_CurrentFocusWidget == widget)
return true;
MythUIText *helpText = dynamic_cast<MythUIText *>(GetChild("helptext"));
if (helpText)
helpText->Reset();
if (m_CurrentFocusWidget)
m_CurrentFocusWidget->LoseFocus();
m_CurrentFocusWidget = widget;
m_CurrentFocusWidget->TakeFocus();
if (helpText && !widget->GetHelpText().isEmpty())
helpText->SetText(widget->GetHelpText());
return true;
}
示例3: UpdateStatus
void IdleScreen::UpdateStatus(void)
{
QString state = "idle";
if (CheckConnectionToServer())
{
if (m_secondsToShutdown >= 0)
state = "shuttingdown";
else if (RemoteGetRecordingStatus())
state = "recording";
}
else
{
state = "offline";
}
m_statusState->DisplayState(state);
MythUIType* shuttingdown = m_statusState->GetState("shuttingdown");
if (shuttingdown)
{
MythUIText *statusText = dynamic_cast<MythUIText *>(shuttingdown->GetChild("status"));
if (statusText)
{
if (m_secondsToShutdown >= 0)
{
QString status = tr("Backend will shutdown in %n "
"second(s).", "", m_secondsToShutdown);
statusText->SetText(status);
}
else
statusText->Reset();
}
}
}
示例4: DoResetMap
static void DoResetMap(MythUIType *UItype, QHash<QString, QString> &infoMap)
{
if (infoMap.isEmpty())
return;
QList<MythUIType *> *children = UItype->GetAllChildren();
MythUIText *textType;
QMutableListIterator<MythUIType *> i(*children);
while (i.hasNext())
{
MythUIType *type = i.next();
if (!type->IsVisible())
continue;
textType = dynamic_cast<MythUIText *> (type);
if (textType && infoMap.contains(textType->objectName()))
textType->Reset();
MythUIGroup *group = dynamic_cast<MythUIGroup *> (type);
if (group)
DoResetMap(type, infoMap);
}
}