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


C++ MythConfirmationDialog类代码示例

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


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

示例1: tr

void ExitPrompter::masterPromptExit()
{
    if (gCoreContext->IsMasterHost() && needsMFDBReminder())
    {
        QString label = tr("If you've added or altered channels,"
                           " please run 'mythfilldatabase' on the"
                           " master backend to populate the"
                           " database with guide information.");

        MythConfirmationDialog *dia = new MythConfirmationDialog(m_d->stk,
                                                                 label,
                                                                 false);
        if (!dia->Create())
        {
            VERBOSE(VB_IMPORTANT, "Can't create fill DB prompt?");
            delete dia;
            quit();
        }
        else
        {
            dia->SetReturnEvent(this, "mythfillprompt");
            m_d->stk->AddScreen(dia);
        }
    }
    else
        quit();
}
开发者ID:Openivo,项目名称:mythtv,代码行数:27,代码来源:exitprompt.cpp

示例2: GetMythMainWindow

bool RipStatus::keyPressEvent(QKeyEvent *event)
{
    if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event))
        return true;

    bool handled = false;
    QStringList actions;
    handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions);

    for (int i = 0; i < actions.size() && !handled; i++)
    {
        QString action = actions[i];
        handled = true;


        if (action == "ESCAPE" &&
            m_ripperThread && m_ripperThread->isRunning())
        {
            MythConfirmationDialog *dialog =
                ShowOkPopup(tr("Cancel ripping the CD?"), this, NULL, true);
            if (dialog)
                dialog->SetReturnEvent(this, "stop_ripping");
        }
        else
            handled = false;
    }

    if (!handled && MythScreenType::keyPressEvent(event))
        handled = true;

    return handled;
}
开发者ID:Olti,项目名称:mythtv,代码行数:32,代码来源:cdrip.cpp

示例3: RecordingRule

void ViewScheduled::deleteRule()
{
    MythUIButtonListItem *item = m_schedulesList->GetItemCurrent();

    if (!item)
        return;

    ProgramInfo *pginfo = qVariantValue<ProgramInfo*>(item->GetData());
    if (!pginfo)
        return;

    RecordingRule *record = new RecordingRule();
    if (!record->LoadByProgram(pginfo))
    {
        delete record;
        return;
    }

    QString message = tr("Delete '%1' %2 rule?").arg(record->m_title)
        .arg(toString(pginfo->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;
}
开发者ID:DocOnDev,项目名称:mythtv,代码行数:34,代码来源:viewscheduled.cpp

示例4: GetMythMainWindow

bool StatusBox::keyPressEvent(QKeyEvent *event)
{
    if (GetFocusWidget()->keyPressEvent(event))
        return true;

    bool handled = false;
    QStringList actions;
    handled = GetMythMainWindow()->TranslateKeyPress("Status", event, actions);

    for (int i = 0; i < actions.size() && !handled; ++i)
    {
        QString action = actions[i];
        handled = true;

        QRegExp logNumberKeys( "^[12345678]$" );

        MythUIButtonListItem* currentButton = m_categoryList->GetItemCurrent();
        QString currentItem;
        if (currentButton)
            currentItem = currentButton->GetText();

        handled = true;

        if (action == "MENU")
        {
            if (currentItem == tr("Log Entries"))
            {
                QString message = tr("Acknowledge all log entries at "
                                     "this priority level or lower?");

                MythConfirmationDialog *confirmPopup =
                        new MythConfirmationDialog(m_popupStack, message);

                confirmPopup->SetReturnEvent(this, "LogAckAll");

                if (confirmPopup->Create())
                    m_popupStack->AddScreen(confirmPopup, false);
            }
        }
        else if ((currentItem == tr("Log Entries")) &&
                 (logNumberKeys.indexIn(action) == 0))
        {
            m_minLevel = action.toInt();
            if (m_helpText)
                m_helpText->SetText(tr("Setting priority level to %1")
                                    .arg(m_minLevel));
            if (m_justHelpText)
                m_justHelpText->SetText(tr("Setting priority level to %1")
                                        .arg(m_minLevel));
            doLogEntries();
        }
        else
            handled = false;
    }

    if (!handled && MythScreenType::keyPressEvent(event))
        handled = true;

    return handled;
}
开发者ID:killerkiwi,项目名称:mythtv,代码行数:60,代码来源:statusbox.cpp

示例5: HideConnectionFailurePopup

void MythContextPrivate::HideConnectionFailurePopup(void)
{
    MythConfirmationDialog *dlg = this->MBEconnectPopup;
    this->MBEconnectPopup = NULL;
    if (dlg)
        dlg->Close();
}
开发者ID:ChristopherNeufeld,项目名称:mythtv,代码行数:7,代码来源:mythcontext.cpp

示例6: GetCurrent

void ProgLister::ShowDeleteRuleMenu(void)
{
    ProgramInfo *pi = GetCurrent();

    if (!pi || !pi->GetRecordingRuleID())
        return;

    RecordingRule *record = new RecordingRule();
    if (!record->LoadByProgram(pi))
    {
        delete record;
        return;
    }

    QString message = tr("Delete '%1' %2 rule?").arg(record->m_title)
        .arg(toString(pi->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;
}
开发者ID:gdenning,项目名称:mythtv,代码行数:30,代码来源:proglist.cpp

示例7: showWarningDialog

void showWarningDialog(const QString msg)
{
    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    MythConfirmationDialog *dialog = new MythConfirmationDialog(popupStack, msg, false);

    if (dialog->Create())
        popupStack->AddScreen(dialog);
}
开发者ID:fastcat,项目名称:mythtv,代码行数:8,代码来源:archiveutil.cpp

示例8: MythConfirmationDialog

void GeneralSetupWizard::slotSubmit(void)
{
    QString message = QObject::tr("Would you like to share your "
                          "hardware profile with the MythTV developers? "
                          "Profiles are anonymous and are a great way to "
                          "help with future development.");
    MythConfirmationDialog *confirmdialog =
            new MythConfirmationDialog(m_popupStack,message);

    if (confirmdialog->Create())
        m_popupStack->AddScreen(confirmdialog);

    connect(confirmdialog, SIGNAL(haveResult(bool)),
            SLOT(OnSubmitPromptReturn(bool)));
}
开发者ID:aravilife,项目名称:mythtv-stabilize2,代码行数:15,代码来源:setupwizard_general.cpp

示例9: tr

void ImportIconsWizard::askSubmit(const QString& strParam)
{
    m_strParam = strParam;
    QString message = tr("You now have the opportunity to transmit your "
                         "choices back to mythtv.org so that others can "
                         "benefit from your selections.");

    MythConfirmationDialog *confirmPopup =
        new MythConfirmationDialog(m_popupStack, message);

    confirmPopup->SetReturnEvent(this, "submitresults");

    if (confirmPopup->Create())
        m_popupStack->AddScreen(confirmPopup, false);
}
开发者ID:samuelschen,项目名称:mythtv,代码行数:15,代码来源:importicons.cpp

示例10: tr

void NetTree::slotDeleteVideo()
{
    QString message = tr("Are you sure you want to delete this file?");

    MythConfirmationDialog *confirmdialog =
            new MythConfirmationDialog(m_popupStack,message);

    if (confirmdialog->Create())
    {
        m_popupStack->AddScreen(confirmdialog);
        connect(confirmdialog, SIGNAL(haveResult(bool)),
                SLOT(doDeleteVideo(bool)));
    }
    else
        delete confirmdialog;
}
开发者ID:JackOfMostTrades,项目名称:mythtv,代码行数:16,代码来源:nettree.cpp

示例11: GetMythMainWindow

void BookmarkManager::slotDeleteMarked(void)
{
    if (GetMarkedCount() == 0)
        return;

    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");

    QString message = tr("Are you sure you want to delete the marked bookmarks?");

    MythConfirmationDialog *dialog = new MythConfirmationDialog(popupStack, message, true);

    if (dialog->Create())
        popupStack->AddScreen(dialog);

    connect(dialog, SIGNAL(haveResult(bool)),
            this, SLOT(slotDoDeleteMarked(bool)));
}
开发者ID:DragonStalker,项目名称:mythtv,代码行数:17,代码来源:bookmarkmanager.cpp

示例12: locker

void NetSearch::doDownloadAndPlay()
{
    QMutexLocker locker(&m_lock);

    ResultItem *item =
          qVariantValue<ResultItem *>(m_searchResultList->GetDataValue());

    if (!item)
        return;

    VERBOSE(VB_GENERAL, QString("Downloading and Inserting %1 "
                                "into Recordings").arg(item->GetTitle()));

    QString filename = getDownloadFilename(item);

    // Does the file already exist?
    bool exists;
    if (filename.startsWith("myth://"))
        exists = RemoteFile::Exists(filename);
    else
        exists = QFile::exists(filename);

    if (exists)
    {
        QString message = tr("This file already downloaded to:\n%1").arg(filename);

        MythConfirmationDialog *confirmdialog =
            new MythConfirmationDialog(m_popupStack,message, false);

        if (confirmdialog->Create())
            m_popupStack->AddScreen(confirmdialog);
        else
            delete confirmdialog;

        return;
    }

    if (m_progress)
        m_progress->SetVisible(true);

    // Initialize the download
    m_redirects = 0;
    m_currentDownload = filename;

}
开发者ID:afljafa,项目名称:mythtv,代码行数:45,代码来源:netsearch.cpp

示例13: it

void OSD::CheckExpiry(void)
{
    QDateTime now = MythDate::current();
    QMutableHashIterator<MythScreenType*, QDateTime> it(m_ExpireTimes);
    while (it.hasNext())
    {
        it.next();
        if (it.value() < now)
        {
            if (it.key() == m_Dialog)
                DialogQuit();
            else
                HideWindow(m_Children.key(it.key()));
        }
        else if (it.key() == m_Dialog)
        {
            if (!m_PulsedDialogText.isEmpty() && now > m_NextPulseUpdate)
            {
                QString newtext = m_PulsedDialogText;
                MythDialogBox *dialog = dynamic_cast<MythDialogBox*>(m_Dialog);
                if (dialog)
                {
                    // The disambiguation string must be an empty string
                    // and not a NULL to get extracted by the Qt tools.
                    QString replace = QCoreApplication::translate("(Common)",
                                          "%n second(s)",
                                          "",
#if QT_VERSION < 0x050000
                                          QCoreApplication::UnicodeUTF8,
#endif
                                          now.secsTo(it.value()));
                    dialog->SetText(newtext.replace("%d", replace));
                }
                MythConfirmationDialog *cdialog = dynamic_cast<MythConfirmationDialog*>(m_Dialog);
                if (cdialog)
                {
                    QString replace = QString::number(now.secsTo(it.value()));
                    cdialog->SetMessage(newtext.replace("%d", replace));
                }
                m_NextPulseUpdate = now.addSecs(1);
            }
        }
    }
}
开发者ID:jshattoc,项目名称:mythtv,代码行数:44,代码来源:osd.cpp

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

示例15: locker

void RSSEditor::slotDeleteSite()
{
    QMutexLocker locker(&m_lock);

    QString message = tr("Are you sure you want to unsubscribe from this feed?");

    MythScreenStack *m_popupStack = GetMythMainWindow()->GetStack("popup stack");

    MythConfirmationDialog *confirmdialog =
            new MythConfirmationDialog(m_popupStack,message);

    if (confirmdialog->Create())
    {
        m_popupStack->AddScreen(confirmdialog);

        connect(confirmdialog, SIGNAL(haveResult(bool)),
                SLOT(doDeleteSite(bool)));
    }
    else
        delete confirmdialog;
}
开发者ID:Cougar,项目名称:mythtv,代码行数:21,代码来源:rsseditor.cpp


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