本文整理汇总了C++中RecordingInfo::GetChanID方法的典型用法代码示例。如果您正苦于以下问题:C++ RecordingInfo::GetChanID方法的具体用法?C++ RecordingInfo::GetChanID怎么用?C++ RecordingInfo::GetChanID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecordingInfo
的用法示例。
在下文中一共展示了RecordingInfo::GetChanID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UnDeleteRecording
bool Dvr::UnDeleteRecording(int RecordedId,
int chanid, const QDateTime &recstarttsRaw)
{
if ((RecordedId <= 0) &&
(chanid <= 0 || !recstarttsRaw.isValid()))
throw QString("Recorded ID or Channel ID and StartTime appears invalid.");
RecordingInfo ri;
if (RecordedId > 0)
ri = RecordingInfo(RecordedId);
else
ri = RecordingInfo(chanid, recstarttsRaw.toUTC());
if (ri.GetChanID() && ri.HasPathname())
{
QString cmd = QString("UNDELETE_RECORDING %1 %2")
.arg(ri.GetChanID())
.arg(ri.GetRecordingStartTime(MythDate::ISODate));
MythEvent me(cmd);
gCoreContext->dispatch(me);
return true;
}
return false;
}
示例2: clone
/// \brief Copies important fields from other RecordingInfo.
void RecordingInfo::clone(const RecordingInfo &other,
bool ignore_non_serialized_data)
{
bool is_same =
(chanid && recstartts.isValid() && startts.isValid() &&
chanid == other.GetChanID() &&
recstartts == other.GetRecordingStartTime() &&
startts == other.GetScheduledStartTime());
ProgramInfo::clone(other, ignore_non_serialized_data);
if (!is_same)
{
delete record;
record = NULL;
}
if (!ignore_non_serialized_data)
{
oldrecstatus = other.oldrecstatus;
savedrecstatus = other.savedrecstatus;
future = other.future;
schedorder = other.schedorder;
mplexid = other.mplexid;
desiredrecstartts = other.desiredrecstartts;
desiredrecendts = other.desiredrecendts;
}
}
示例3: StopRecording
bool Dvr::StopRecording(int RecordedId)
{
if (RecordedId <= 0)
throw QString("Recorded ID is invalid.");
RecordingInfo ri = RecordingInfo(RecordedId);
if (ri.GetChanID())
{
QString cmd = QString("STOP_RECORDING %1 %2")
.arg(ri.GetChanID())
.arg(ri.GetRecordingStartTime(MythDate::ISODate));
MythEvent me(cmd);
gCoreContext->dispatch(me);
return true;
}
else
throw QString("RecordID %1 not found").arg(RecordedId);
return false;
}
示例4: 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);
//.........这里部分代码省略.........