本文整理汇总了C++中CPVRTimerInfoTag::Title方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRTimerInfoTag::Title方法的具体用法?C++ CPVRTimerInfoTag::Title怎么用?C++ CPVRTimerInfoTag::Title使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRTimerInfoTag
的用法示例。
在下文中一共展示了CPVRTimerInfoTag::Title方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateNextTimer
void CPVRGUIInfo::UpdateNextTimer(void)
{
CStdString strNextRecordingTitle;
CStdString strNextRecordingChannelName;
CStdString strNextRecordingChannelIcon;
CStdString strNextRecordingTime;
CStdString strNextTimerInfo;
CFileItemPtr tag = g_PVRTimers->GetNextActiveTimer();
if (tag && tag->HasPVRTimerInfoTag())
{
CPVRTimerInfoTag *timer = tag->GetPVRTimerInfoTag();
strNextRecordingTitle.Format("%s", timer->Title());
strNextRecordingChannelName.Format("%s", timer->ChannelName());
strNextRecordingChannelIcon.Format("%s", timer->ChannelIcon());
strNextRecordingTime.Format("%s", timer->StartAsLocalTime().GetAsLocalizedDateTime(false, false));
strNextTimerInfo.Format("%s %s %s %s",
g_localizeStrings.Get(19106),
timer->StartAsLocalTime().GetAsLocalizedDate(true),
g_localizeStrings.Get(19107),
timer->StartAsLocalTime().GetAsLocalizedTime("HH:mm", false));
}
CSingleLock lock(m_critSection);
m_strNextRecordingTitle = strNextRecordingTitle;
m_strNextRecordingChannelName = strNextRecordingChannelName;
m_strNextRecordingChannelIcon = strNextRecordingChannelIcon;
m_strNextRecordingTime = strNextRecordingTime;
m_strNextTimerInfo = strNextTimerInfo;
}
示例2: UpdateTimersToggle
void CPVRGUIInfo::UpdateTimersToggle(void)
{
if (!TimerInfoToggle())
return;
CStdString strActiveTimerTitle;
CStdString strActiveTimerChannelName;
CStdString strActiveTimerChannelIcon;
CStdString strActiveTimerTime;
/* safe to fetch these unlocked, since they're updated from the same thread as this one */
if (m_iRecordingTimerAmount > 0)
{
vector<CFileItemPtr> activeTags = g_PVRTimers->GetActiveRecordings();
if (m_iTimerInfoToggleCurrent < activeTags.size() && activeTags.at(m_iTimerInfoToggleCurrent)->HasPVRTimerInfoTag())
{
CPVRTimerInfoTag *tag = activeTags.at(m_iTimerInfoToggleCurrent)->GetPVRTimerInfoTag();
strActiveTimerTitle.Format("%s", tag->Title());
strActiveTimerChannelName.Format("%s", tag->ChannelName());
strActiveTimerChannelIcon.Format("%s", tag->ChannelIcon());
strActiveTimerTime.Format("%s", tag->StartAsLocalTime().GetAsLocalizedDateTime(false, false));
}
}
CSingleLock lock(m_critSection);
m_strActiveTimerTitle = strActiveTimerTitle;
m_strActiveTimerChannelName = strActiveTimerChannelName;
m_strActiveTimerChannelIcon = strActiveTimerChannelIcon;
m_strActiveTimerTime = strActiveTimerTime;
}
示例3: ActionDeleteTimer
bool CGUIWindowPVRCommon::ActionDeleteTimer(CFileItem *item)
{
bool bReturn = false;
/* check if the timer tag is valid */
CPVRTimerInfoTag *timerTag = item->GetPVRTimerInfoTag();
if (!timerTag || timerTag->ClientIndex() < 0)
return bReturn;
/* show a confirmation dialog */
CGUIDialogYesNo* pDialog = (CGUIDialogYesNo*)g_windowManager.GetWindow(WINDOW_DIALOG_YES_NO);
if (!pDialog)
return false;
pDialog->SetHeading(122);
pDialog->SetLine(0, 19040);
pDialog->SetLine(1, "");
pDialog->SetLine(2, timerTag->Title());
pDialog->DoModal();
/* prompt for the user's confirmation */
if (!pDialog->IsConfirmed())
return bReturn;
/* delete the timer */
if (CPVRManager::GetTimers()->DeleteTimer(*item))
{
UpdateData();
bReturn = true;
}
return bReturn;
}