本文整理汇总了C++中MythDialogBox::SetReturnEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ MythDialogBox::SetReturnEvent方法的具体用法?C++ MythDialogBox::SetReturnEvent怎么用?C++ MythDialogBox::SetReturnEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythDialogBox
的用法示例。
在下文中一共展示了MythDialogBox::SetReturnEvent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showSaveMenu
void EditMetadataCommon::showSaveMenu()
{
updateMetadata();
if (!hasMetadataChanged())
{
Close();
return;
}
QString label = tr("Save Changes?");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menu = new MythDialogBox(label, popupStack, "savechangesmenu");
if (!menu->Create())
{
delete menu;
return;
}
menu->SetReturnEvent(this, "savechangesmenu");
if (metadataOnly)
menu->AddButton(tr("Save Changes"), SLOT(saveToMetadata()));
else
menu->AddButton(tr("Save Changes"), SLOT(saveAll()));
menu->AddButton(tr("Exit/Do Not Save"), SLOT(cleanupAndClose()));
menu->AddButton(tr("Cancel"));
popupStack->AddScreen(menu);
}
示例2: handleExit
void ExitPrompter::handleExit()
{
QStringList problems;
// Look for common problems
if (CheckSetup(problems))
{
problems.push_back(QString());
problems.push_back(tr("Do you want to go back and fix this(these) "
"problem(s)?", 0, problems.size()));
MythDialogBox *dia = new MythDialogBox(problems.join("\n"),
m_d->stk, "exit prompt");
if (!dia->Create())
{
VERBOSE(VB_IMPORTANT, "Can't create Exit Prompt dialog?");
delete dia;
quit();
}
dia->SetReturnEvent(this, "problemprompt");
dia->AddButton(tr("Yes please"));
dia->AddButton(tr("No, I know what I am doing"),
SLOT(masterPromptExit()));
m_d->stk->AddScreen(dia);
}
else
masterPromptExit();
}
示例3: showMenu
void GameUI::showMenu()
{
MythGenericTree *node = m_gameUITree->GetCurrentNode();
MythScreenStack *popupStack = GetMythMainWindow()->
GetStack("popup stack");
MythDialogBox *showMenuPopup =
new MythDialogBox(node->GetText(), popupStack, "showMenuPopup");
if (showMenuPopup->Create())
{
showMenuPopup->SetReturnEvent(this, "showMenuPopup");
showMenuPopup->AddButton(tr("Scan For Changes"));
if (isLeaf(node))
{
RomInfo *romInfo = qVariantValue<RomInfo *>(node->GetData());
if (romInfo)
{
showMenuPopup->AddButton(tr("Show Information"));
if (romInfo->Favorite())
showMenuPopup->AddButton(tr("Remove Favorite"));
else
showMenuPopup->AddButton(tr("Make Favorite"));
showMenuPopup->AddButton(tr("Retrieve Details"));
showMenuPopup->AddButton(tr("Edit Details"));
}
}
popupStack->AddScreen(showMenuPopup);
}
else
delete showMenuPopup;
}
示例4: showSortMenu
void ProgramRecPriority::showSortMenu(void)
{
QString label = tr("Sort Options");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(label, popupStack, "menuPopup");
if (menuPopup->Create())
{
menuPopup->SetReturnEvent(this, "sortmenu");
menuPopup->AddButton(tr("Reverse Sort Order"));
menuPopup->AddButton(tr("Sort By Title"));
menuPopup->AddButton(tr("Sort By Priority"));
menuPopup->AddButton(tr("Sort By Type"));
menuPopup->AddButton(tr("Sort By Count"));
menuPopup->AddButton(tr("Sort By Record Count"));
menuPopup->AddButton(tr("Sort By Last Recorded"));
menuPopup->AddButton(tr("Sort By Average Delay"));
popupStack->AddScreen(menuPopup);
}
else
{
delete menuPopup;
}
}
示例5: ShowMenu
void ChannelRecPriority::ShowMenu()
{
MythUIButtonListItem *item = m_channelList->GetItemCurrent();
if (!item)
return;
QString label = tr("Channel Options");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(label, popupStack,
"chanrecmenupopup");
if (!menuPopup->Create())
{
delete menuPopup;
menuPopup = nullptr;
return;
}
menuPopup->SetReturnEvent(this, "options");
menuPopup->AddButton(tr("Program List"));
//menuPopup->AddButton(tr("Reset All Priorities"));
popupStack->AddScreen(menuPopup);
}
示例6: showMenu
void ProgramRecPriority::showMenu(void)
{
QString label = tr("Options");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(label, popupStack, "menuPopup");
if (menuPopup->Create())
{
menuPopup->SetReturnEvent(this, "menu");
menuPopup->AddButton(tr("Increase Priority"));
menuPopup->AddButton(tr("Decrease Priority"));
menuPopup->AddButton(tr("Sort"), NULL, true);
menuPopup->AddButton(tr("Program Details"));
menuPopup->AddButton(tr("Upcoming"));
menuPopup->AddButton(tr("Custom Edit"));
menuPopup->AddButton(tr("Delete Rule"));
menuPopup->AddButton(tr("New Template"));
popupStack->AddScreen(menuPopup);
}
else
{
delete menuPopup;
}
}
示例7: showUnitsPopup
void ScreenSetup::showUnitsPopup(const QString &name, ScreenListInfo *si)
{
if (!si)
return;
QString label = QString("%1 %2").arg(name).arg(tr("Change Units"));
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(label, popupStack,
"weatherunitspopup");
if (menuPopup->Create())
{
popupStack->AddScreen(menuPopup);
menuPopup->SetReturnEvent(this, "units");
menuPopup->AddButton(tr("English Units"), qVariantFromValue(si));
menuPopup->AddButton(tr("SI Units"), qVariantFromValue(si));
}
else
{
delete menuPopup;
}
}
示例8: ShowMenu
void ViewScheduled::ShowMenu(void)
{
QString label = tr("Options");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(label, popupStack, "menuPopup");
if (menuPopup->Create())
{
menuPopup->SetReturnEvent(this, "menu");
if (m_showAll)
menuPopup->AddButton(tr("Show Important"));
else
menuPopup->AddButton(tr("Show All"));
menuPopup->AddButton(tr("Program Details"));
menuPopup->AddButton(tr("Upcoming by title"));
menuPopup->AddButton(tr("Upcoming scheduled"));
menuPopup->AddButton(tr("Custom Edit"));
menuPopup->AddButton(tr("Delete Rule"));
menuPopup->AddButton(tr("Show Cards"));
menuPopup->AddButton(tr("Show Inputs"));
menuPopup->AddButton(tr("Cancel"));
popupStack->AddScreen(menuPopup);
}
else
{
delete menuPopup;
}
}
示例9: promptForRemoval
void GameHandler::promptForRemoval(GameScan scan)
{
QString filename = scan.Rom();
QString RomPath = scan.RomFullPath();
if (m_RemoveAll)
purgeGameDB(filename , RomPath);
if (m_KeepAll || m_RemoveAll)
return;
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *removalPopup = new MythDialogBox(
tr("%1 appears to be missing.\nRemove it from the database?")
.arg(filename), popupStack, "chooseSystemPopup");
if (removalPopup->Create())
{
removalPopup->SetReturnEvent(this, "removalPopup");
removalPopup->AddButton(tr("No"));
removalPopup->AddButton(tr("No to all"));
removalPopup->AddButton(tr("Yes"), qVariantFromValue(scan));
removalPopup->AddButton(tr("Yes to all"), qVariantFromValue(scan));
popupStack->AddScreen(removalPopup);
}
else
delete removalPopup;
}
示例10: showMenu
void EditMetadataDialog::showMenu(void )
{
QString label = tr("Options");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menu = new MythDialogBox(label, popupStack, "optionsmenu");
if (!menu->Create())
{
delete menu;
return;
}
menu->SetReturnEvent(this, "optionsmenu");
menu->AddButton(tr("Edit Albumart Images"));
menu->AddButton(tr("Search Internet For Artist Image"));
menu->AddButton(tr("Search Internet For Album Image"));
menu->AddButton(tr("Search Internet For Genre Image"));
menu->AddButton(tr("Check Track Length"));
menu->AddButton(tr("Cancel"));
popupStack->AddScreen(menu);
}
示例11: showTypeMenu
void EditAlbumartDialog::showTypeMenu(bool changeType)
{
if (changeType && m_coverartList->GetCount() == 0)
return;
QString label;
if (changeType)
label = tr("Change Image Type");
else
label = tr("What image type do you want to use for this image?");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menu = new MythDialogBox(label, popupStack, "typemenu");
if (!menu->Create())
{
delete menu;
return;
}
ImageType imageType = IT_UNKNOWN;
if (changeType)
menu->SetReturnEvent(this, "changetypemenu");
else
{
menu->SetReturnEvent(this, "asktypemenu");
imageType = AlbumArtImages::guessImageType(m_imageFilename);
}
menu->AddButton(m_albumArt->getTypeName(IT_UNKNOWN), qVariantFromValue((int)IT_UNKNOWN), false, (imageType == IT_UNKNOWN));
menu->AddButton(m_albumArt->getTypeName(IT_FRONTCOVER), qVariantFromValue((int)IT_FRONTCOVER), false, (imageType == IT_FRONTCOVER));
menu->AddButton(m_albumArt->getTypeName(IT_BACKCOVER), qVariantFromValue((int)IT_BACKCOVER), false, (imageType == IT_BACKCOVER));
menu->AddButton(m_albumArt->getTypeName(IT_CD), qVariantFromValue((int)IT_CD), false, (imageType == IT_CD));
menu->AddButton(m_albumArt->getTypeName(IT_INLAY), qVariantFromValue((int)IT_INLAY), false, (imageType == IT_INLAY));
menu->AddButton(m_albumArt->getTypeName(IT_ARTIST), qVariantFromValue((int)IT_ARTIST), false, (imageType == IT_ARTIST));
popupStack->AddScreen(menu);
}
示例12: ShowMenu
void ThumbFinder::ShowMenu()
{
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(tr("Menu"), popupStack, "actionmenu");
if (menuPopup->Create())
popupStack->AddScreen(menuPopup);
menuPopup->SetReturnEvent(this, "action");
menuPopup->AddButton(tr("Exit, Save Thumbnails"), SLOT(savePressed()));
menuPopup->AddButton(tr("Exit, Don't Save Thumbnails"), SLOT(cancelPressed()));
}
示例13: ShowMenu
void ExportNative::ShowMenu()
{
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(tr("Menu"), popupStack, "actionmenu");
if (menuPopup->Create())
popupStack->AddScreen(menuPopup);
menuPopup->SetReturnEvent(this, "action");
menuPopup->AddButton(tr("Remove Item"), SLOT(removeItem()));
}
示例14: showMenu
void VideoSelector::showMenu()
{
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(tr("Menu"), popupStack, "actionmenu");
if (menuPopup->Create())
popupStack->AddScreen(menuPopup);
menuPopup->SetReturnEvent(this, "action");
menuPopup->AddButton(tr("Clear All"), SLOT(clearAll()));
menuPopup->AddButton(tr("Select All"), SLOT(selectAll()));
}
示例15: channelIconImport
void ChannelEditor::channelIconImport(void)
{
if (m_channelList->GetCount() == 0)
{
ShowOkPopup(tr("Add some channels first!"));
return;
}
int channelID = 0;
MythUIButtonListItem *item = m_channelList->GetItemCurrent();
if (item)
channelID = item->GetData().toInt();
// Get selected channel name from database
QString querystr = QString("SELECT channel.name FROM channel "
"WHERE chanid='%1'").arg(channelID);
QString channelname;
MSqlQuery query(MSqlQuery::InitCon());
query.prepare(querystr);
if (query.exec() && query.next())
{
channelname = query.value(0).toString();
}
QString label = tr("Icon Import Options");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menu = new MythDialogBox(label, popupStack, "iconoptmenu");
if (menu->Create())
{
menu->SetReturnEvent(this, "iconimportopt");
menu->AddButton(tr("Download all icons..."));
menu->AddButton(tr("Rescan for missing icons..."));
if (!channelname.isEmpty())
menu->AddButton(tr("Download icon for %1").arg(channelname),
channelname);
popupStack->AddScreen(menu);
}
else
{
delete menu;
return;
}
}