本文整理汇总了C++中CEpgInfoTagPtr::PVRChannelName方法的典型用法代码示例。如果您正苦于以下问题:C++ CEpgInfoTagPtr::PVRChannelName方法的具体用法?C++ CEpgInfoTagPtr::PVRChannelName怎么用?C++ CEpgInfoTagPtr::PVRChannelName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEpgInfoTagPtr
的用法示例。
在下文中一共展示了CEpgInfoTagPtr::PVRChannelName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartRecordFile
bool CGUIWindowPVRBase::StartRecordFile(CFileItem *item, bool bAdvanced)
{
if (!item->HasEPGInfoTag())
return false;
const CEpgInfoTagPtr tag = item->GetEPGInfoTag();
CPVRChannelPtr channel = tag->ChannelTag();
if (!channel || !g_PVRManager.CheckParentalLock(channel))
return false;
CFileItemPtr timer = g_PVRTimers->GetTimerForEpgTag(item);
if (timer && timer->HasPVRTimerInfoTag())
{
CGUIDialogOK::ShowAndGetInput(CVariant{19033}, CVariant{19034});
return false;
}
bool bReturn(false);
if (bAdvanced)
{
CPVRTimerInfoTagPtr newTimer = CPVRTimerInfoTag::CreateFromEpg(tag, true);
if (newTimer)
{
CFileItem *newItem = new CFileItem(newTimer);
if (ShowTimerSettings(newItem))
bReturn = g_PVRTimers->AddTimer(newItem->GetPVRTimerInfoTag());
delete newItem;
}
}
else
{
// ask for confirmation before starting a timer
if (!CGUIDialogYesNo::ShowAndGetInput(
CVariant{264} /* "Record" */, CVariant{tag->PVRChannelName()}, CVariant{""}, CVariant{tag->Title()}))
return false;
CPVRTimerInfoTagPtr newTimer = CPVRTimerInfoTag::CreateFromEpg(tag);
if (newTimer)
bReturn = g_PVRTimers->AddTimer(newTimer);
}
return bReturn;
}
示例2: StartRecordFile
bool CGUIWindowPVRBase::StartRecordFile(const CFileItem &item)
{
if (!item.HasEPGInfoTag())
return false;
const CEpgInfoTagPtr tag = item.GetEPGInfoTag();
CPVRChannelPtr channel = tag->ChannelTag();
if (!channel || !g_PVRManager.CheckParentalLock(*channel))
return false;
CFileItemPtr timer = g_PVRTimers->GetTimerForEpgTag(&item);
if (timer && timer->HasPVRTimerInfoTag())
{
CGUIDialogOK::ShowAndGetInput(19033,19034,0,0);
return false;
}
// ask for confirmation before starting a timer
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return false;
pDialog->SetHeading(264);
pDialog->SetLine(0, tag->PVRChannelName());
pDialog->SetLine(1, "");
pDialog->SetLine(2, tag->Title());
pDialog->DoModal();
if (!pDialog->IsConfirmed())
return false;
CPVRTimerInfoTag *newTimer = CPVRTimerInfoTag::CreateFromEpg(*tag);
bool bReturn(false);
if (newTimer)
{
bReturn = g_PVRTimers->AddTimer(*newTimer);
delete newTimer;
}
return bReturn;
}