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


C++ RecordingInfo::toString方法代码示例

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


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

示例1: ShowNotScheduledDialog

/**
*  \brief Creates a dialog displaying current recording status and options
*         available
*/
void ScheduleCommon::ShowNotScheduledDialog(const RecordingInfo& recinfo)
{
    QString message = recinfo.toString(ProgramInfo::kTitleSubtitle, " - ");

    message += "\n\n";
    message += toDescription(recinfo.GetRecordingStatus(),
                             recinfo.GetRecordingRuleType(),
                             recinfo.GetRecordingStartTime());

    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    MythDialogBox *menuPopup = new MythDialogBox(message, popupStack,
                                                 "notSchedOptionPopup", true);

    if (menuPopup->Create())
    {
        menuPopup->SetReturnEvent(this, "schedulenotscheduled");

        QDateTime now = MythDate::current();

        if (recinfo.GetRecordingEndTime() > now)
            menuPopup->AddButton(tr("Record only this showing"),
                                 qVariantFromValue(recinfo));

        menuPopup->AddButton(tr("Record all showings"),
                             qVariantFromValue(recinfo));

        if (!recinfo.IsGeneric())
            menuPopup->AddButton(tr("Record one showing of this episode"),
                                 qVariantFromValue(recinfo));

        menuPopup->AddButton(tr("Record all showings on this channel"),
                             qVariantFromValue(recinfo));

        menuPopup->AddButton(tr("Record with more options"),
                             qVariantFromValue(recinfo));

        popupStack->AddScreen(menuPopup);
    }
    else
        delete menuPopup;
}
开发者ID:,项目名称:,代码行数:45,代码来源:

示例2: ShowNotRecordingDialog

/**
*  \brief Creates a dialog displaying current recording status and options
*         available
*/
void ScheduleCommon::ShowNotRecordingDialog(const RecordingInfo& recinfo)
{
    QString timeFormat = gCoreContext->GetSetting("TimeFormat", "h:mm AP");

    QString message = recinfo.toString(ProgramInfo::kTitleSubtitle, " - ");

    message += "\n\n";
    message += toDescription(recinfo.GetRecordingStatus(),
                             recinfo.GetRecordingRuleType(),
                             recinfo.GetRecordingStartTime());

    if (recinfo.GetRecordingStatus() == rsConflict ||
        recinfo.GetRecordingStatus() == rsLaterShowing)
    {
        vector<ProgramInfo *> *confList = RemoteGetConflictList(&recinfo);

        if (!confList->empty())
        {
            message += " ";
            message += tr("The following programs will be recorded instead:");
            message += "\n";
        }

        uint maxi = 0;
        for (; confList->begin() != confList->end() && maxi < 4; maxi++)
        {
            ProgramInfo *p = *confList->begin();
            message += QString("%1 - %2  %3\n")
                .arg(p->GetRecordingStartTime()
                     .toLocalTime().toString(timeFormat))
                .arg(p->GetRecordingEndTime()
                     .toLocalTime().toString(timeFormat))
                .arg(p->toString(ProgramInfo::kTitleSubtitle, " - "));
            delete p;
            confList->erase(confList->begin());
        }
        message += "\n";
        while (!confList->empty())
        {
            delete confList->back();
            confList->pop_back();
        }
        delete confList;
    }

    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    MythDialogBox *menuPopup = new MythDialogBox(message, popupStack,
                                                 "notRecOptionPopup", true);

    if (menuPopup->Create())
    {
        menuPopup->SetReturnEvent(this, "schedulenotrecording");

        QDateTime now = MythDate::current();

        if ((recinfo.GetRecordingStartTime() < now) &&
            (recinfo.GetRecordingEndTime() > now) &&
            (recinfo.GetRecordingStatus() != rsDontRecord) &&
            (recinfo.GetRecordingStatus() != rsNotListed))
        {
            menuPopup->AddButton(tr("Restart recording this showing"),
                                 qVariantFromValue(recinfo));
        }

        if (recinfo.GetRecordingEndTime() > now)
        {
            if ((recinfo.GetRecordingRuleType() != kSingleRecord &&
                recinfo.GetRecordingRuleType() != kOverrideRecord) &&
                (recinfo.GetRecordingStatus() == rsDontRecord ||
                recinfo.GetRecordingStatus() == rsPreviousRecording ||
                recinfo.GetRecordingStatus() == rsCurrentRecording ||
                recinfo.GetRecordingStatus() == rsEarlierShowing ||
                recinfo.GetRecordingStatus() == rsNeverRecord ||
                recinfo.GetRecordingStatus() == rsRepeat ||
                recinfo.GetRecordingStatus() == rsInactive ||
                recinfo.GetRecordingStatus() == rsLaterShowing))
            {
                menuPopup->AddButton(tr("Record this showing anyway"),
                                    qVariantFromValue(recinfo));
                if (recinfo.GetRecordingStatus() == rsPreviousRecording ||
                    recinfo.GetRecordingStatus() == rsNeverRecord)
                {
                    menuPopup->AddButton(tr("Forget previous recording"),
                                        qVariantFromValue(recinfo));
                }
            }

            if (recinfo.GetRecordingRuleType() != kOverrideRecord &&
                recinfo.GetRecordingRuleType() != kDontRecord)
            {
                if (recinfo.GetRecordingRuleType() != kSingleRecord &&
                    recinfo.GetRecordingStatus() != rsPreviousRecording &&
                    recinfo.GetRecordingStatus() != rsCurrentRecording &&
                    recinfo.GetRecordingStatus() != rsNeverRecord &&
                    recinfo.GetRecordingStatus() != rsNotListed)
                {
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:

示例3: ShowRecordingDialog

/**
*  \brief Creates a dialog displaying current recording status and options
*         available
*/
void ScheduleCommon::ShowRecordingDialog(const RecordingInfo& recinfo)
{
    QString message = recinfo.toString(ProgramInfo::kTitleSubtitle, " - ");

    message += "\n\n";
    message += toDescription(recinfo.GetRecordingStatus(),
                             recinfo.GetRecordingRuleType(),
                             recinfo.GetRecordingStartTime());

    MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
    MythDialogBox *menuPopup = new MythDialogBox(message, popupStack,
                                                 "recOptionPopup", true);

    if (menuPopup->Create())
    {
        menuPopup->SetReturnEvent(this, "schedulerecording");

        QDateTime now = MythDate::current();

        if (recinfo.GetRecordingStartTime() < now &&
            recinfo.GetRecordingEndTime() > now)
        {
            if (recinfo.GetRecordingStatus() != rsRecording &&
                recinfo.GetRecordingStatus() != rsTuning &&
                recinfo.GetRecordingStatus() != rsOtherRecording && 
                recinfo.GetRecordingStatus() != rsOtherTuning)
                menuPopup->AddButton(tr("Restart recording this showing"),
                                     qVariantFromValue(recinfo));
            else
                menuPopup->AddButton(tr("Stop recording this showing"),
                                     qVariantFromValue(recinfo));
        }

        if (recinfo.GetRecordingEndTime() > now)
        {
            if (recinfo.GetRecordingRuleType() != kSingleRecord &&
                recinfo.GetRecordingRuleType() != kOverrideRecord)
            {
                if (recinfo.GetRecordingStartTime() > now)
                {
                    menuPopup->AddButton(tr("Don't record this showing"),
                                         qVariantFromValue(recinfo));
                }

                const RecordingDupMethodType dupmethod =
                    recinfo.GetDuplicateCheckMethod();

                if (recinfo.GetRecordingStatus() != rsRecording &&
                    recinfo.GetRecordingStatus() != rsTuning &&
                    recinfo.GetRecordingStatus() != rsOtherRecording &&
                    recinfo.GetRecordingStatus() != rsOtherTuning &&
                    recinfo.GetRecordingRuleType() != kOneRecord &&
                    !((recinfo.GetFindID() == 0 ||
                       !IsFindApplicable(recinfo)) &&
                      recinfo.GetCategoryType() == "series" &&
                      recinfo.GetProgramID().contains(QRegExp("0000$"))) &&
                    ((!(dupmethod & kDupCheckNone) &&
                      !recinfo.GetProgramID().isEmpty() &&
                      (recinfo.GetFindID() != 0 ||
                       !IsFindApplicable(recinfo))) ||
                     ((dupmethod & kDupCheckSub) &&
                      !recinfo.GetSubtitle().isEmpty()) ||
                     ((dupmethod & kDupCheckDesc) &&
                      !recinfo.GetDescription().isEmpty()) ||
                     ((dupmethod & kDupCheckSubThenDesc) &&
                      (!recinfo.GetSubtitle().isEmpty() ||
                       !recinfo.GetDescription().isEmpty())) ))
                    {
                        menuPopup->AddButton(tr("Never record this episode"),
                                             qVariantFromValue(recinfo));
                    }
            }

            if (recinfo.GetRecordingRuleType() != kOverrideRecord &&
                recinfo.GetRecordingRuleType() != kDontRecord)
            {
                if (recinfo.GetRecordingStatus() == rsRecording ||
                    recinfo.GetRecordingStatus() == rsTuning ||
                    recinfo.GetRecordingStatus() == rsOtherRecording ||
                    recinfo.GetRecordingStatus() == rsOtherTuning)
                {
                    menuPopup->AddButton(tr("Edit options for this showing"),
                                         qVariantFromValue(recinfo));
                }
                else
                {
                    if (recinfo.GetRecordingRuleType() != kSingleRecord)
                    {
                        menuPopup->AddButton(tr("Override this showing with options"),
                                             qVariantFromValue(recinfo));
                    }

                }
            }

            if (recinfo.GetRecordingRuleType() == kOverrideRecord ||
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:


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