当前位置: 首页>>代码示例>>C++>>正文


C++ MythDialogBox类代码示例

本文整理汇总了C++中MythDialogBox的典型用法代码示例。如果您正苦于以下问题:C++ MythDialogBox类的具体用法?C++ MythDialogBox怎么用?C++ MythDialogBox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了MythDialogBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: tr

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;
    }
}
开发者ID:Saner2oo2,项目名称:mythtv,代码行数:27,代码来源:programrecpriority.cpp

示例2: QString

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;
    }
}
开发者ID:DaveDaCoda,项目名称:mythtv,代码行数:26,代码来源:weatherSetup.cpp

示例3: tr

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);
}
开发者ID:garybuhrmaster,项目名称:mythtv,代码行数:28,代码来源:channelrecpriority.cpp

示例4: this

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();
}
开发者ID:Openivo,项目名称:mythtv,代码行数:31,代码来源:exitprompt.cpp

示例5: DialogBack

void OSD::DialogBack(QString text, QVariant data, bool exit)
{
    MythDialogBox *dialog = dynamic_cast<MythDialogBox*>(m_Dialog);
    if (dialog)
    {
        dialog->SetBackAction(text, data);
        if (exit)
            dialog->SetExitAction(text, data);
    }
}
开发者ID:jshattoc,项目名称:mythtv,代码行数:10,代码来源:osd.cpp

示例6: GetMythMainWindow

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;
}
开发者ID:iainlane,项目名称:mythtv,代码行数:33,代码来源:gameui.cpp

示例7: CurrentProgram

void ViewScheduleDiff::showStatus(MythUIButtonListItem *item)
{
    ProgramInfo *pi = CurrentProgram();
    if (!pi)
        return;

    QString timeFormat = gCoreContext->GetSetting("TimeFormat", "h:mm AP");

    QString message = pi->toString(ProgramInfo::kTitleSubtitle, " - ");
    message += "\n\n";
    message += RecStatus::toDescription(pi->GetRecordingStatus(),
                             pi->GetRecordingRuleType(),
                             pi->GetRecordingStartTime());

    if (pi->GetRecordingStatus() == RecStatus::Conflict ||
        pi->GetRecordingStatus() == RecStatus::LaterShowing)
    {
        message += " " + QObject::tr("The following programs will be recorded "
                                     "instead:") + "\n\n";

        ProgramList::const_iterator it = m_recListAfter.begin();
        for (; it != m_recListAfter.end(); ++it)
        {
            const ProgramInfo *pa = *it;
            if (pa->GetRecordingStartTime() >= pi->GetRecordingEndTime())
                break;
            if (pa->GetRecordingEndTime() > pi->GetRecordingStartTime() &&
                (pa->GetRecordingStatus() == RecStatus::WillRecord ||
                 pa->GetRecordingStatus() == RecStatus::Recording))
            {
                message += QString("%1 - %2  %3\n")
                    .arg(pa->GetRecordingStartTime()
                         .toLocalTime().toString(timeFormat))
                    .arg(pa->GetRecordingEndTime()
                         .toLocalTime().toString(timeFormat))
                    .arg(pa->toString(ProgramInfo::kTitleSubtitle, " - "));
            }
        }
    }

    QString title = QObject::tr("Program Status");
    MythScreenStack *mainStack = GetMythMainWindow()->GetStack("main stack");
    MythDialogBox   *dlg = new MythDialogBox(title, message, mainStack,
                                             "statusdialog", true);

    if (dlg->Create())
    {
        dlg->AddButton(QObject::tr("OK"));
        mainStack->AddScreen(dlg);
    }
    else
        delete dlg;
}
开发者ID:Saner2oo2,项目名称:mythtv,代码行数:53,代码来源:viewschedulediff.cpp

示例8: GetMythMainWindow

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()));
}
开发者ID:garybuhrmaster,项目名称:mythtv,代码行数:13,代码来源:thumbfinder.cpp

示例9: GetMythMainWindow

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()));
}
开发者ID:tomhughes,项目名称:mythtv,代码行数:13,代码来源:exportnative.cpp

示例10: GetMythMainWindow

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()));
}
开发者ID:Beirdo,项目名称:mythtv-stabilize,代码行数:14,代码来源:videoselector.cpp

示例11: tr

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);
}
开发者ID:daveyboyc,项目名称:mythtv,代码行数:25,代码来源:editmetadata.cpp

示例12: MythMenu

/**
 *  \brief  Shows the popup menu
 */
void GallerySlideView::MenuMain()
{
    // Create the main menu that will contain the submenus above
    MythMenu *menu = new MythMenu(tr("Slideshow Options"), this, "mainmenu");

    ImagePtrK im = m_slides.GetCurrent().GetImageData();
    if (im && im->m_type == kVideoFile)
        menu->AddItem(tr("Play Video"), SLOT(PlayVideo()));

    if (m_playing)
        menu->AddItem(tr("Stop"), SLOT(Stop()));
    else
        menu->AddItem(tr("Start SlideShow"), SLOT(Play()));

    if (gCoreContext->GetNumSetting("GalleryRepeat", 0))
        menu->AddItem(tr("Turn Repeat Off"), SLOT(RepeatOff()));
    else
        menu->AddItem(tr("Turn Repeat On"), SLOT(RepeatOn()));

    MenuTransforms(*menu);

    if (m_uiHideCaptions)
    {
        if (m_showCaptions)
            menu->AddItem(tr("Hide Captions"), SLOT(HideCaptions()));
        else
            menu->AddItem(tr("Show Captions"), SLOT(ShowCaptions()));
    }

    QString details;
    switch (m_infoList.GetState())
    {
    case kBasicInfo: details = tr("More Details"); break;
    case kFullInfo:  details = tr("Less Details"); break;
    default:
    case kNoInfo:    details = tr("Show Details"); break;
    }
    menu->AddItem(details, SLOT(ShowInfo()));

    if (m_infoList.GetState() != kNoInfo)
        menu->AddItem(tr("Hide Details"), SLOT(HideInfo()));

    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    MythDialogBox *menuPopup = new MythDialogBox(menu, popupStack, "menuPopup");
    if (menuPopup->Create())
        popupStack->AddScreen(menuPopup);
    else
        delete menuPopup;
}
开发者ID:dragonian,项目名称:mythtv,代码行数:52,代码来源:galleryslideview.cpp

示例13: GetMythMainWindow

void GameHandler::clearAllGameData(void)
{
    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    MythDialogBox *clearPopup = new MythDialogBox(tr("This will clear all game metadata "
                            "from the database. Are you sure you "
                            "want to do this?"), popupStack, "clearAllPopup");

    if (clearPopup->Create())
    {
        clearPopup->SetReturnEvent(this, "clearAllPopup");
        clearPopup->AddButton(tr("No"));
        clearPopup->AddButton(tr("Yes"));
        popupStack->AddScreen(clearPopup);
    }
    else
        delete clearPopup;
}
开发者ID:killerkiwi,项目名称:mythtv,代码行数:17,代码来源:gamehandler.cpp

示例14: updateMetadata

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);
}
开发者ID:daveyboyc,项目名称:mythtv,代码行数:34,代码来源:editmetadata.cpp

示例15: purgeGameDB

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;
}
开发者ID:killerkiwi,项目名称:mythtv,代码行数:29,代码来源:gamehandler.cpp


注:本文中的MythDialogBox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。