本文整理汇总了C++中RecordingInfo::AddHistory方法的典型用法代码示例。如果您正苦于以下问题:C++ RecordingInfo::AddHistory方法的具体用法?C++ RecordingInfo::AddHistory怎么用?C++ RecordingInfo::AddHistory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecordingInfo
的用法示例。
在下文中一共展示了RecordingInfo::AddHistory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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 == "schedulenotscheduled")
{
if (!qVariantCanConvert<RecordingInfo>(dce->GetData()))
return;
RecordingInfo recInfo = qVariantValue<RecordingInfo>
(dce->GetData());
if (resulttext == tr("Record only this showing"))
recInfo.ApplyRecordStateChange(kSingleRecord);
else if (resulttext == tr("Record all showings"))
recInfo.ApplyRecordStateChange(kAllRecord);
else if (resulttext == tr("Record one showing of this episode"))
{
recInfo.ApplyRecordStateChange(kOneRecord, false);
recInfo.GetRecordingRule()->m_filter |= 64; // This episode
recInfo.GetRecordingRule()->Save();
}
else if (resulttext == tr("Record all showings on this channel"))
{
recInfo.ApplyRecordStateChange(kAllRecord, false);
recInfo.GetRecordingRule()->m_filter |= 1024; // This channel
recInfo.GetRecordingRule()->Save();
}
else if (resulttext == tr("Record with more options"))
{
EditScheduled(&recInfo);
}
}
else if (resultid == "schedulenotrecording")
{
if (!qVariantCanConvert<RecordingInfo>(dce->GetData()))
return;
RecordingInfo recInfo = qVariantValue<RecordingInfo>
(dce->GetData());
if (resulttext == tr("Restart recording this showing"))
recInfo.ReactivateRecording();
else if (resulttext == tr("Record this showing anyway"))
{
recInfo.ApplyRecordStateChange(kOverrideRecord);
if (recInfo.GetRecordingStartTime() < MythDate::current())
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.SetRecordingStatus(rsNeverRecord);
recInfo.SetScheduledStartTime(MythDate::current());
recInfo.SetScheduledEndTime(recInfo.GetRecordingStartTime());
recInfo.AddHistory(true, true);
}
else if (resulttext == tr("Delete override rule") ||
resulttext == tr("Delete recording rule"))
recInfo.ApplyRecordStateChange(kNotRecording);
else if (resulttext == tr("Edit override options") ||
resulttext == tr("Edit recording options"))
{
EditScheduled(&recInfo);
}
else if (resulttext == tr("Override this showing with options"))
{
MakeOverride(&recInfo);
}
}
else if (resultid == "schedulerecording")
{
if (!qVariantCanConvert<RecordingInfo>(dce->GetData()))
return;
RecordingInfo recInfo = qVariantValue<RecordingInfo>
(dce->GetData());
if (resulttext == tr("Restart recording this showing"))
recInfo.ReactivateRecording();
else if (resulttext == tr("Stop recording this showing"))
{
ProgramInfo pginfo(
recInfo.GetChanID(), recInfo.GetRecordingStartTime());
if (pginfo.GetChanID())
RemoteStopRecording(&pginfo);
}
else if (resulttext == tr("Don't record this showing"))
recInfo.ApplyRecordStateChange(kDontRecord);
else if (resulttext == tr("Never record this episode"))
{
recInfo.SetRecordingStatus(rsNeverRecord);
//.........这里部分代码省略.........