本文整理汇总了C++中ProgramInfo::GetRecordingRuleType方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::GetRecordingRuleType方法的具体用法?C++ ProgramInfo::GetRecordingRuleType怎么用?C++ ProgramInfo::GetRecordingRuleType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::GetRecordingRuleType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deleteRule
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;
}
示例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;
}
示例3: showStatus
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;
}