本文整理汇总了C++中MythScreenStack类的典型用法代码示例。如果您正苦于以下问题:C++ MythScreenStack类的具体用法?C++ MythScreenStack怎么用?C++ MythScreenStack使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MythScreenStack类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: locker
void RSSEditor::slotNewSite()
{
QMutexLocker locker(&m_lock);
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
RSSEditPopup *rsseditpopup = new RSSEditPopup("", false, mainStack, "rsseditpopup");
if (rsseditpopup->Create())
{
connect(rsseditpopup, SIGNAL(saving()), this,
SLOT(listChanged()));
mainStack->AddScreen(rsseditpopup);
}
else
{
delete rsseditpopup;
}
}
示例2: tr
/**
* \brief Change the view.
*/
void MythControls::ChangeView(void)
{
QString label = tr("Change View");
MythScreenStack *popupStack =
GetMythMainWindow()->GetStack("popup stack");
m_menuPopup =
new MythDialogBox(label, popupStack, "mcviewmenu");
if (m_menuPopup->Create())
popupStack->AddScreen(m_menuPopup);
m_menuPopup->SetReturnEvent(this, "view");
m_menuPopup->AddButton(tr("Actions By Context"));
m_menuPopup->AddButton(tr("Contexts By Key"));
m_menuPopup->AddButton(tr("Keys By Context"));
}
示例3: startRipper
static void startRipper(void)
{
loadMusic();
#if defined HAVE_CDIO
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
Ripper *rip = new Ripper(mainStack, chooseCD());
if (rip->Create())
{
mainStack->AddScreen(rip);
QObject::connect(rip, SIGNAL(ripFinished()),
gMusicData, SLOT(reloadMusic()),
Qt::QueuedConnection);
}
else
delete rip;
#endif
}
示例4: QString
void ChannelRecPriority::upcoming()
{
MythUIButtonListItem *item = m_channelList->GetItemCurrent();
if (!item)
return;
ChannelInfo *chanInfo = item->GetData().value<ChannelInfo *>();
if (!chanInfo || chanInfo->chanid < 1)
return;
QString chanID = QString("%1").arg(chanInfo->chanid);
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
ProgLister *pl = new ProgLister(mainStack, plChannel, chanID, "");
if (pl->Create())
mainStack->AddScreen(pl);
else
delete pl;
}
示例5: GetMythMainWindow
void GameHandler::CreateProgress(QString message)
{
if (m_progressDlg)
return;
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
m_progressDlg = new MythUIProgressDialog(message, popupStack,
"gameprogress");
if (m_progressDlg->Create())
{
popupStack->AddScreen(m_progressDlg, false);
}
else
{
delete m_progressDlg;
m_progressDlg = NULL;
}
}
示例6: GetMythMainWindow
void ZMEvents::playPressed(void)
{
if (!m_eventList || m_eventList->empty())
return;
m_savedPosition = m_eventGrid->GetCurrentPos();
Event *event = m_eventList->at(m_savedPosition);
if (event)
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
ZMPlayer *player = new ZMPlayer(mainStack, "ZMPlayer",
m_eventList, &m_savedPosition);
connect(player, SIGNAL(Exiting()), this, SLOT(playerExited()));
if (player->Create())
mainStack->AddScreen(player);
}
}
示例7: RunNetTree
static int RunNetTree(void)
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
DialogType type = static_cast<DialogType>(gCoreContext->GetNumSetting(
"mythnetvision.ViewMode", DLG_TREE));
NetTree *nettree = new NetTree(type, mainStack, "mythnettree");
if (nettree->Create())
{
mainStack->AddScreen(nettree);
return 0;
}
else
{
delete nettree;
return -1;
}
}
示例8: RecordingRule
void ProgramRecPriority::remove(void)
{
MythUIButtonListItem *item = m_programList->GetItemCurrent();
if (!item)
return;
ProgramRecPriorityInfo *pgRecInfo =
item->GetData().value<ProgramRecPriorityInfo*>();
if (!pgRecInfo ||
(pgRecInfo->recType == kTemplateRecord &&
pgRecInfo->GetCategory()
.compare("Default", Qt::CaseInsensitive) == 0))
{
return;
}
RecordingRule *record = new RecordingRule();
record->m_recordID = pgRecInfo->GetRecordingRuleID();
if (!record->Load())
{
delete record;
return;
}
QString message = tr("Delete '%1' %2 rule?").arg(record->m_title)
.arg(toString(pgRecInfo->GetRecordingRuleType()));
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythConfirmationDialog *okPopup = new MythConfirmationDialog(popupStack,
message, true);
okPopup->SetReturnEvent(this, "deleterule");
okPopup->SetData(qVariantFromValue(record));
if (okPopup->Create())
popupStack->AddScreen(okPopup);
else
delete okPopup;
}
示例9: handleMedia
static int handleMedia(const QString &url, const QString &directory, const QString &filename,
const QString &, const QString &, int, int, const QString &, int,
const QString &, const QString &, bool)
{
if (url.isEmpty())
{
LOG(VB_GENERAL, LOG_ERR, "MythBrowser: handleMedia got empty url!");
return 1;
}
QStringList urls = url.split(" ", QString::SkipEmptyParts);
float zoom = gCoreContext->GetSetting("WebBrowserZoomLevel", "1.0").toFloat();
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
if (urls[0].startsWith("mythflash://"))
{
MythFlashPlayer *flashplayer = new MythFlashPlayer(mainStack, urls);
if (flashplayer->Create())
mainStack->AddScreen(flashplayer);
else
delete flashplayer;
}
else
{
MythBrowser *mythbrowser = new MythBrowser(mainStack, urls, zoom);
if (!directory.isEmpty())
mythbrowser->setDefaultSaveDirectory(directory);
if (!filename.isEmpty())
mythbrowser->setDefaultSaveFilename(filename);
if (mythbrowser->Create())
mainStack->AddScreen(mythbrowser);
else
delete mythbrowser;
}
return 0;
}
示例10: tr
void SearchView::ShowMenu(void)
{
if (GetFocusWidget() == m_tracksList)
{
QString label = tr("Search Actions");
MythMenu *menu = new MythMenu(label, this, "searchviewmenu");
MythUIButtonListItem *item = m_tracksList->GetItemCurrent();
if (item)
{
MusicMetadata *mdata = qVariantValue<MusicMetadata*> (item->GetData());
if (mdata)
{
if (gPlayer->getCurrentPlaylist() && gPlayer->getCurrentPlaylist()->checkTrack(mdata->ID()))
menu->AddItem(tr("Remove From Playlist"));
else
{
menu->AddItem(tr("Add To Playlist"));
menu->AddItem(tr("Add To Playlist And Play"));
}
}
}
if (GetFocusWidget() == m_tracksList || GetFocusWidget() == m_currentPlaylist)
menu->AddItem(tr("Search List..."));
menu->AddItem(tr("More Options"), NULL, createSubMenu());
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(menu, popupStack, "actionmenu");
if (menuPopup->Create())
popupStack->AddScreen(menuPopup);
else
delete menu;
}
else
MusicCommon::ShowMenu();
}
示例11: GetMythMainWindow
void GameUI::showInfo()
{
MythGenericTree *node = m_gameUITree->GetCurrentNode();
if (isLeaf(node))
{
RomInfo *romInfo = qVariantValue<RomInfo *>(node->GetData());
if (!romInfo)
return;
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
GameDetailsPopup *details_dialog =
new GameDetailsPopup(mainStack, romInfo);
if (details_dialog->Create())
{
mainStack->AddScreen(details_dialog);
details_dialog->SetReturnEvent(this, "detailsPopup");
}
else
delete details_dialog;
}
}
示例12: startImport
static void startImport(void)
{
if (!checkStorageGroup())
return;
gMusicData->loadMusic();
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
ImportMusicDialog *import = new ImportMusicDialog(mainStack);
if (import->Create())
{
mainStack->AddScreen(import);
QObject::connect(import, SIGNAL(importFinished()),
gMusicData, SLOT(reloadMusic()),
Qt::QueuedConnection);
}
else
delete import;
}
示例13: GetMythMainWindow
void EditAlbumartDialog::startCopyImageToTag(void)
{
QString lastLocation = gCoreContext->GetSetting("MusicLastImageLocation", "/");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUIFileBrowser *fb = new MythUIFileBrowser(popupStack, lastLocation);
fb->SetTypeFilter(QDir::AllDirs | QDir::Files | QDir::Readable);
QStringList filters;
filters << "*.png" << "*.jpg" << "*.jpeg" << "*.gif";
fb->SetNameFilter(filters);
if (fb->Create())
{
fb->SetReturnEvent(this, "imagelocation");
popupStack->AddScreen(fb);
}
else
delete fb;
}
示例14: GetScreenStack
void GameUI::edit(void)
{
MythGenericTree *node = m_gameUITree->GetCurrentNode();
if (isLeaf(node))
{
RomInfo *romInfo = qVariantValue<RomInfo *>(node->GetData());
MythScreenStack *screenStack = GetScreenStack();
EditRomInfoDialog *md_editor = new EditRomInfoDialog(screenStack,
"mythgameeditmetadata", romInfo);
if (md_editor->Create())
{
screenStack->AddScreen(md_editor);
md_editor->SetReturnEvent(this, "editMetadata");
}
else
delete md_editor;
}
}
示例15: GetMythMainWindow
void ProgLister::ShowSortMenu(void)
{
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythDialogBox *menuPopup = new MythDialogBox(
tr("Sort Options"), popupStack, "menuPopup");
if (!menuPopup->Create())
{
delete menuPopup;
return;
}
menuPopup->SetReturnEvent(this, "sortmenu");
menuPopup->AddButton(tr("Reverse Sort Order"));
menuPopup->AddButton(tr("Sort By Title"));
menuPopup->AddButton(tr("Sort By Time"));
menuPopup->AddButton(tr("Cancel"));
popupStack->AddScreen(menuPopup);
}