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


C++ ProgramInfo::GetRecordingRuleID方法代码示例

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


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

示例1: CopyRuleInetrefsToRecordings

void LookerUpper::CopyRuleInetrefsToRecordings()
{
    QMap< QString, ProgramInfo* > recMap;
    QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
    QMap< QString, bool > isJobRunning = ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);

    ProgramList progList;

    LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );

    for( int n = 0; n < (int)progList.size(); n++)
    {
        ProgramInfo *pginfo = new ProgramInfo(*(progList[n]));
        if (pginfo && pginfo->GetInetRef().isEmpty())
        {
            RecordingRule *rule = new RecordingRule();
            rule->m_recordID = pginfo->GetRecordingRuleID();
            rule->Load();
            if (!rule->m_inetref.isEmpty())
            {
                QString msg = QString("%1").arg(pginfo->GetTitle());
                if (!pginfo->GetSubtitle().isEmpty())
                    msg += QString(": %1").arg(pginfo->GetSubtitle());
                msg += " has no inetref, but its recording rule does. Copying...";
                LOG(VB_GENERAL, LOG_INFO, msg);
                pginfo->SaveInetRef(rule->m_inetref);
            }
            delete rule;
        }
        delete pginfo;
    }
}
开发者ID:Saner2oo2,项目名称:mythtv,代码行数:32,代码来源:lookup.cpp

示例2: ShowDeleteRuleMenu

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

示例3: ShowPrevious

/**
*  \brief Show the previous recordings for this recording rule
*/
void ScheduleCommon::ShowPrevious(void) const
{
    ProgramInfo *pginfo = GetCurrentProgram();
    if (!pginfo)
        return;

    ShowPrevious(pginfo->GetRecordingRuleID(), pginfo->GetTitle());
}
开发者ID:garybuhrmaster,项目名称:mythtv,代码行数:11,代码来源:schedulecommon.cpp

示例4: ShowUpcoming

/**
*  \brief Show the upcoming recordings for this title
*/
void ScheduleCommon::ShowUpcoming(void) const
{
    ProgramInfo *pginfo = GetCurrentProgram();
    if (!pginfo)
        return;

    if (pginfo->GetChanID() == 0 &&
        pginfo->GetRecordingRuleID() > 0)
        return ShowUpcomingScheduled();

    ShowUpcoming(pginfo->GetTitle(), pginfo->GetSeriesID());
}
开发者ID:garybuhrmaster,项目名称:mythtv,代码行数:15,代码来源:schedulecommon.cpp

示例5: ShowPrevious

/**
*  \brief Show the previous recordings for this recording rule
*/
void ScheduleCommon::ShowPrevious(void) const
{
    ProgramInfo *pginfo = GetCurrentProgram();
    if (!pginfo)
        return;

    MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
    ProgLister *pl = new ProgLister(mainStack, pginfo->GetRecordingRuleID(),
                                    pginfo->GetTitle());
    if (pl->Create())
        mainStack->AddScreen(pl);
    else
        delete pl;
}
开发者ID:kmdewaal,项目名称:mythtv,代码行数:17,代码来源:schedulecommon.cpp

示例6: QuickRecord

/**
*  \brief Create a kSingleRecord or bring up recording dialog.
*/
void ScheduleCommon::QuickRecord(void)
{
    ProgramInfo *pginfo = GetCurrentProgram();
    if (!pginfo)
        return;

    if (pginfo->GetRecordingRuleID())
        EditRecording();
    else
    {
        RecordingInfo ri(*pginfo);
        ri.QuickRecord();
        *pginfo = ri;
    }
}
开发者ID:garybuhrmaster,项目名称:mythtv,代码行数:18,代码来源:schedulecommon.cpp

示例7: ShowMenu

void ProgLister::ShowMenu(void)
{
    QString label = tr("Options");

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

    if (!menuPopup->Create())
    {
        delete menuPopup;
        return;
    }

    menuPopup->SetReturnEvent(this, "menu");

    if (m_type != plPreviouslyRecorded)
    {
        menuPopup->AddButton(tr("Choose Search Phrase..."),
                             SLOT(ShowChooseViewMenu()));
    }

    menuPopup->AddButton(tr("Sort"), SLOT(ShowSortMenu()), true);

    if (m_type != plPreviouslyRecorded)
        menuPopup->AddButton(tr("Record"), SLOT(RecordSelected()));

    menuPopup->AddButton(tr("Edit Schedule"),   SLOT(EditScheduled()));
    menuPopup->AddButton(tr("Program Details"), SLOT(ShowDetails()));
    menuPopup->AddButton(tr("Upcoming"),        SLOT(ShowUpcoming()));
    menuPopup->AddButton(tr("Custom Edit"),     SLOT(EditCustom()));

    ProgramInfo *pi = m_itemList[m_progList->GetCurrentPos()];
    if (m_type != plPreviouslyRecorded)
    {
        if (pi && pi->GetRecordingRuleID())
            menuPopup->AddButton(tr("Delete Rule"), SLOT(ShowDeleteRuleMenu()));
    }
    else
    {
        menuPopup->AddButton(
            tr("Delete Episode"), SLOT(ShowDeleteOldEpisodeMenu()));
    }

    menuPopup->AddButton(tr("Cancel"));

    popupStack->AddScreen(menuPopup);
}
开发者ID:gdenning,项目名称:mythtv,代码行数:48,代码来源:proglist.cpp

示例8: LoadList

void ViewScheduled::LoadList(bool useExistingData)
{
    if (m_inFill)
        return;

    m_inFill = true;

    MythUIButtonListItem *currentItem = m_schedulesList->GetItemCurrent();

    QString callsign;
    QDateTime startts, recstartts;

    if (currentItem)
    {
        ProgramInfo *currentpginfo = qVariantValue<ProgramInfo*>
                                                    (currentItem->GetData());
        if (currentpginfo)
        {
            callsign   = currentpginfo->GetChannelSchedulingID();
            startts    = currentpginfo->GetScheduledStartTime();
            recstartts = currentpginfo->GetRecordingStartTime();
        }
    }

    QDateTime now = QDateTime::currentDateTime();

    QMap<int, int> toomanycounts;

    m_schedulesList->Reset();
    if (m_groupList)
        m_groupList->Reset();

    m_recgroupList.clear();

    if (!useExistingData)
        LoadFromScheduler(m_recList, m_conflictBool);

    ProgramList::iterator pit = m_recList.begin();
    QString currentDate;
    m_recgroupList[m_defaultGroup] = ProgramList(false);
    m_recgroupList[m_defaultGroup].setAutoDelete(false);
    while (pit != m_recList.end())
    {
        ProgramInfo *pginfo = *pit;
        const RecStatusType recstatus = pginfo->GetRecordingStatus();
        if ((pginfo->GetRecordingEndTime() >= now ||
             pginfo->GetScheduledEndTime() >= now) &&
            (m_showAll ||
             recstatus <= rsWillRecord ||
             recstatus == rsDontRecord ||
             (recstatus == rsTooManyRecordings &&
              ++toomanycounts[pginfo->GetRecordingRuleID()] <= 1) ||
             (recstatus > rsTooManyRecordings &&
              recstatus != rsRepeat &&
              recstatus != rsNeverRecord)))
        {
            m_cardref[pginfo->GetCardID()]++;
            if (pginfo->GetCardID() > m_maxcard)
                m_maxcard = pginfo->GetCardID();

            m_inputref[pginfo->GetInputID()]++;
            if (pginfo->GetInputID() > m_maxinput)
                m_maxinput = pginfo->GetInputID();

            QDate date = (pginfo->GetRecordingStartTime()).date();
            m_recgroupList[date].push_back(pginfo);
            m_recgroupList[date].setAutoDelete(false);

            m_recgroupList[m_defaultGroup].push_back(pginfo);

            ++pit;
        }
        else
        {
            pit = m_recList.erase(pit);
            continue;
        }
    }

    if (m_groupList)
    {
        QString label;
        QMap<QDate,ProgramList>::iterator dateit = m_recgroupList.begin();
        while (dateit != m_recgroupList.end())
        {
            if (dateit.key().isNull())
                label = tr("All");
            else
                label = dateit.key().toString(m_dateFormat);

            new MythUIButtonListItem(m_groupList, label,
                                     qVariantFromValue(dateit.key()));
            ++dateit;
        }
        if (!m_recgroupList.contains(m_currentGroup))
            m_groupList->SetValueByData(qVariantFromValue(m_currentGroup));
    }

    FillList();

//.........这里部分代码省略.........
开发者ID:DocOnDev,项目名称:mythtv,代码行数:101,代码来源:viewscheduled.cpp


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