本文整理汇总了C++中RecordingInfo::ApplyNeverRecord方法的典型用法代码示例。如果您正苦于以下问题:C++ RecordingInfo::ApplyNeverRecord方法的具体用法?C++ RecordingInfo::ApplyNeverRecord怎么用?C++ RecordingInfo::ApplyNeverRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecordingInfo
的用法示例。
在下文中一共展示了RecordingInfo::ApplyNeverRecord方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddDontRecordSchedule
bool Dvr::AddDontRecordSchedule(int nChanId, const QDateTime &dStartTime,
bool bNeverRecord)
{
bool bResult = true;
if (nChanId <= 0 || !dStartTime.isValid())
throw QString("Program does not exist.");
ProgramInfo *pi = LoadProgramFromProgram(nChanId, dStartTime.toUTC());
if (!pi)
throw QString("Program does not exist.");
// Why RecordingInfo instead of ProgramInfo? Good question ...
RecordingInfo recInfo = RecordingInfo(*pi);
delete pi;
if (bNeverRecord)
{
recInfo.ApplyNeverRecord();
}
else
recInfo.ApplyRecordStateChange(kDontRecord);
return bResult;
}
示例2: customEvent
void ScheduleCommon::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
QString resulttext = dce->GetResultText();
if (resultid == "editrecording")
{
if (!dce->GetData().canConvert<RecordingInfo>())
return;
RecordingInfo recInfo = dce->GetData().value<RecordingInfo>();
if (resulttext == tr("Record this showing"))
{
if (recInfo.GetRecordingRuleType() == kNotRecording)
recInfo.ApplyRecordStateChange(kSingleRecord);
else
{
recInfo.ApplyRecordStateChange(kOverrideRecord);
if (recInfo.GetRecordingStartTime() < MythDate::current())
recInfo.ReactivateRecording();
}
}
else if (resulttext == tr("Record all showings"))
recInfo.ApplyRecordStateChange(kAllRecord);
else if (resulttext == tr("Record one showing (this episode)") ||
resulttext == tr("Record one showing"))
{
recInfo.ApplyRecordStateChange(kOneRecord, false);
recInfo.GetRecordingRule()->m_filter |= 64; // This episode
recInfo.GetRecordingRule()->Save();
}
else if (resulttext == tr("Record all showings (this channel)"))
{
recInfo.ApplyRecordStateChange(kAllRecord, false);
recInfo.GetRecordingRule()->m_filter |= 1024; // This channel
recInfo.GetRecordingRule()->Save();
}
else if (resulttext == tr("Stop this recording"))
{
RemoteStopRecording(&recInfo);
}
else if (resulttext == tr("Modify recording options") ||
resulttext == tr("Add override rule"))
{
if (recInfo.GetRecordingRuleType() == kSingleRecord ||
recInfo.GetRecordingRuleType() == kOverrideRecord ||
recInfo.GetRecordingRuleType() == kOneRecord)
EditScheduled(&recInfo);
else
MakeOverride(&recInfo);
}
else if (resulttext == tr("Restart this recording"))
recInfo.ReactivateRecording();
else if (resulttext == tr("Forget previous recording"))
recInfo.ForgetHistory();
else if (resulttext == tr("Don't record this showing"))
recInfo.ApplyRecordStateChange(kDontRecord);
else if (resulttext == tr("Never record this episode"))
{
recInfo.ApplyNeverRecord();
}
else if (resulttext == tr("Edit recording rule") ||
resulttext == tr("Edit override rule"))
EditScheduled(&recInfo);
else if (resulttext == tr("Delete recording rule") ||
resulttext == tr("Delete override rule"))
recInfo.ApplyRecordStateChange(kNotRecording);
}
}
}