本文整理汇总了C++中ProgramInfo::SaveAutoExpire方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::SaveAutoExpire方法的具体用法?C++ ProgramInfo::SaveAutoExpire怎么用?C++ ProgramInfo::SaveAutoExpire使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::SaveAutoExpire方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: customEvent
//.........这里部分代码省略.........
if (buttonnum == 1)
{
MSqlQuery query(MSqlQuery::InitCon());
query.prepare("UPDATE mythlog SET acknowledged = 1 "
"WHERE priority <= :PRIORITY ;");
query.bindValue(":PRIORITY", m_minLevel);
if (!query.exec())
MythDB::DBError("StatusBox::customEvent -- LogAckAll",
query);
doLogEntries();
}
}
else if (resultid == "JobDelete")
{
if (buttonnum == 1)
{
int jobID = dce->GetData().toInt();
JobQueue::DeleteJob(jobID);
m_logList->RemoveItem(m_logList->GetItemCurrent());
}
}
else if (resultid == "JobRequeue")
{
if (buttonnum == 1)
{
int jobID = dce->GetData().toInt();
JobQueue::ChangeJobStatus(jobID, JOB_QUEUED);
doJobQueueStatus();
}
}
else if (resultid == "JobModify")
{
int jobID = dce->GetData().toInt();
if (buttonnum == 0)
{
if (JobQueue::GetJobStatus(jobID) == JOB_PAUSED)
JobQueue::ResumeJob(jobID);
else
JobQueue::PauseJob(jobID);
}
else if (buttonnum == 1)
{
JobQueue::StopJob(jobID);
}
doJobQueueStatus();
}
else if (resultid == "AutoExpireManage")
{
ProgramInfo* rec = qVariantValue<ProgramInfo*>(dce->GetData());
// button 2 is "No Change"
if (!rec || buttonnum == 2)
return;
// button 1 is "Delete Now"
if ((buttonnum == 0) && rec->QueryIsDeleteCandidate())
{
if (!RemoteDeleteRecording(
rec->GetChanID(), rec->GetRecordingStartTime(),
false, false))
{
LOG(VB_GENERAL, LOG_ERR, QString("Failed to delete recording: %1").arg(rec->GetTitle()));
return;
}
}
// button 1 is "Move To Default Group" or "UnDelete" or "Disable AutoExpire"
else if (buttonnum == 1)
{
if ((rec)->GetRecordingGroup() == "Deleted")
{
RemoteUndeleteRecording(
rec->GetChanID(), rec->GetRecordingStartTime());
}
else
{
rec->SaveAutoExpire(kDisableAutoExpire);
if ((rec)->GetRecordingGroup() == "LiveTV")
{
RecordingInfo ri(*rec);
ri.ApplyRecordRecGroupChange("Default");
*rec = ri;
}
}
}
// remove the changed recording from the expire list
delete m_expList[m_logList->GetCurrentPos()];
m_expList.erase(m_expList.begin() + m_logList->GetCurrentPos());
int pos = m_logList->GetCurrentPos();
int topPos = m_logList->GetTopItemPos();
doAutoExpireList(false);
m_logList->SetItemCurrent(pos, topPos);
}
}
}