本文整理汇总了C++中CPVRChannelGroupPtr::GetChannelNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannelGroupPtr::GetChannelNumber方法的具体用法?C++ CPVRChannelGroupPtr::GetChannelNumber怎么用?C++ CPVRChannelGroupPtr::GetChannelNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannelGroupPtr
的用法示例。
在下文中一共展示了CPVRChannelGroupPtr::GetChannelNumber方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateChannelSpin
void CGUIDialogPVRGuideSearch::UpdateChannelSpin(void)
{
CGUISpinControlEx *pSpin = (CGUISpinControlEx *)GetControl(CONTROL_SPIN_CHANNELS);
CGUISpinControlEx *pSpinGroups = (CGUISpinControlEx *)GetControl(CONTROL_SPIN_GROUPS);
if (!pSpin || !pSpinGroups)
return;
int iChannelGroup = pSpin->GetValue();
pSpin->Clear();
pSpin->AddLabel(g_localizeStrings.Get(19217), EPG_SEARCH_UNSET);
int iGroupId = (iChannelGroup == EPG_SEARCH_UNSET) ?
XBMC_INTERNAL_GROUP_TV :
iChannelGroup;
CPVRChannelGroupPtr group = g_PVRChannelGroups->GetByIdFromAll(iGroupId);
if (!group)
group = g_PVRChannelGroups->GetGroupAllTV();
for (int iChannelPtr = 0; iChannelPtr < group->Size(); iChannelPtr++)
{
CFileItemPtr channel = group->GetByIndex(iChannelPtr);
if (!channel || !channel->HasPVRChannelInfoTag())
continue;
int iChannelNumber = group->GetChannelNumber(*channel->GetPVRChannelInfoTag());
pSpin->AddLabel(channel->GetPVRChannelInfoTag()->ChannelName().c_str(), iChannelNumber);
}
}
示例2: UpdateChannelSpin
void CGUIDialogPVRGuideSearch::UpdateChannelSpin(void)
{
int iChannelGroup = GetSpinValue(CONTROL_SPIN_GROUPS);
std::vector< std::pair<std::string, int> > labels;
labels.push_back(std::make_pair(g_localizeStrings.Get(19217), EPG_SEARCH_UNSET));
CPVRChannelGroupPtr group;
if (iChannelGroup == EPG_SEARCH_UNSET)
group = g_PVRChannelGroups->GetGroupAll(m_searchFilter->m_bIsRadio);
else
group = g_PVRChannelGroups->GetByIdFromAll(iChannelGroup);
if (!group)
group = g_PVRChannelGroups->GetGroupAll(m_searchFilter->m_bIsRadio);
for (int iChannelPtr = 0; iChannelPtr < group->Size(); iChannelPtr++)
{
CFileItemPtr channel = group->GetByIndex(iChannelPtr);
if (!channel || !channel->HasPVRChannelInfoTag())
continue;
int iChannelNumber = group->GetChannelNumber(*channel->GetPVRChannelInfoTag());
labels.push_back(std::make_pair(channel->GetPVRChannelInfoTag()->ChannelName(), iChannelNumber));
}
SET_CONTROL_LABELS(CONTROL_SPIN_CHANNELS, m_searchFilter->m_iChannelNumber, &labels);
}
示例3: MatchChannelNumber
bool EpgSearchFilter::MatchChannelNumber(const CEpgInfoTag &tag) const
{
bool bReturn(true);
if (m_iChannelNumber != EPG_SEARCH_UNSET && g_PVRManager.IsStarted())
{
CPVRChannelGroupPtr group = (m_iChannelGroup != EPG_SEARCH_UNSET) ? g_PVRChannelGroups->GetByIdFromAll(m_iChannelGroup) : g_PVRChannelGroups->GetGroupAllTV();
if (!group)
group = CPVRManager::Get().ChannelGroups()->GetGroupAllTV();
bReturn = (m_iChannelNumber == (int) group->GetChannelNumber(*tag.ChannelTag()));
}
return bReturn;
}
示例4: MatchChannelNumber
bool CPVREpgSearchFilter::MatchChannelNumber(const CPVREpgInfoTagPtr &tag) const
{
bool bReturn(true);
if (m_channelNumber.IsValid() && CServiceBroker::GetPVRManager().IsStarted())
{
CPVRChannelGroupPtr group = (m_iChannelGroup != EPG_SEARCH_UNSET) ? CServiceBroker::GetPVRManager().ChannelGroups()->GetByIdFromAll(m_iChannelGroup) : CServiceBroker::GetPVRManager().ChannelGroups()->GetGroupAllTV();
if (!group)
group = CServiceBroker::GetPVRManager().ChannelGroups()->GetGroupAllTV();
bReturn = (m_channelNumber == group->GetChannelNumber(tag->Channel()));
}
return bReturn;
}