本文整理汇总了C++中ProgramInfo::QueryIsDeleteCandidate方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::QueryIsDeleteCandidate方法的具体用法?C++ ProgramInfo::QueryIsDeleteCandidate怎么用?C++ ProgramInfo::QueryIsDeleteCandidate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::QueryIsDeleteCandidate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: customEvent
void StatusBox::customEvent(QEvent *event)
{
if (event->type() == DialogCompletionEvent::kEventType)
{
DialogCompletionEvent *dce = (DialogCompletionEvent*)(event);
QString resultid = dce->GetId();
int buttonnum = dce->GetResult();
if (resultid == "LogAck")
{
if (buttonnum == 1)
{
QString sql = dce->GetData().toString();
MSqlQuery query(MSqlQuery::InitCon());
query.prepare("UPDATE mythlog SET acknowledged = 1 "
"WHERE logid = :LOGID ;");
query.bindValue(":LOGID", sql);
if (!query.exec())
MythDB::DBError("StatusBox::customEvent -- LogAck", query);
m_logList->RemoveItem(m_logList->GetItemCurrent());
}
}
else if (resultid == "LogAckAll")
{
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());
}
//.........这里部分代码省略.........