本文整理汇总了C++中MythDialogBox::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ MythDialogBox::Reset方法的具体用法?C++ MythDialogBox::Reset怎么用?C++ MythDialogBox::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythDialogBox
的用法示例。
在下文中一共展示了MythDialogBox::Reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DialogShow
void OSD::DialogShow(const QString &window, const QString &text, int updatefor)
{
if (m_Dialog)
{
QString current = m_Dialog->objectName();
if (current != window)
{
DialogQuit();
}
else
{
MythDialogBox *dialog = dynamic_cast<MythDialogBox*>(m_Dialog);
if (dialog)
dialog->Reset();
DialogSetText(text);
}
}
if (!m_Dialog)
{
OverrideUIScale();
MythScreenType *dialog;
if (window == OSD_DLG_EDITOR)
dialog = new ChannelEditor(m_ParentObject, window.toLatin1());
else if (window == OSD_DLG_CONFIRM)
dialog = new MythConfirmationDialog(NULL, text, false);
else
dialog = new MythDialogBox(text, NULL, window.toLatin1(), false, true);
dialog->SetPainter(m_CurrentPainter);
if (dialog->Create())
{
PositionWindow(dialog);
m_Dialog = dialog;
MythDialogBox *dbox = dynamic_cast<MythDialogBox*>(m_Dialog);
if (dbox)
dbox->SetReturnEvent(m_ParentObject, window);
MythConfirmationDialog *cbox = dynamic_cast<MythConfirmationDialog*>(m_Dialog);
if (cbox)
{
cbox->SetReturnEvent(m_ParentObject, window);
cbox->SetData("DIALOG_CONFIRM_X_X");
}
m_Children.insert(window, m_Dialog);
}
else
{
RevertUIScale();
delete dialog;
return;
}
RevertUIScale();
}
if (updatefor)
{
m_NextPulseUpdate = MythDate::current();
m_PulsedDialogText = text;
SetExpiry(window, kOSDTimeout_None, updatefor);
}
DialogBack();
HideAll(true, m_Dialog);
m_Dialog->SetVisible(true);
}