本文整理汇总了C++中CPVRChannelGroupPtr::GetNextGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannelGroupPtr::GetNextGroup方法的具体用法?C++ CPVRChannelGroupPtr::GetNextGroup怎么用?C++ CPVRChannelGroupPtr::GetNextGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannelGroupPtr
的用法示例。
在下文中一共展示了CPVRChannelGroupPtr::GetNextGroup方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SelectNextGroup
CPVRChannelGroupPtr CGUIWindowPVRChannels::SelectNextGroup(void)
{
CPVRChannelGroupPtr currentGroup = SelectedGroup();
CPVRChannelGroupPtr nextGroup = currentGroup->GetNextGroup();
while (nextGroup && *nextGroup != *currentGroup && nextGroup->Size() == 0)
nextGroup = nextGroup->GetNextGroup();
/* always update so users can reset the list */
if (nextGroup)
{
SetSelectedGroup(nextGroup);
UpdateData();
}
return m_selectedGroup;
}
示例2: SelectNextGroup
CPVRChannelGroupPtr CGUIWindowPVRChannels::SelectNextGroup(void)
{
CPVRChannelGroupPtr currentGroup = SelectedGroup();
CPVRChannelGroupPtr nextGroup = currentGroup->GetNextGroup();
while (nextGroup && nextGroup->Size() == 0 &&
// break if the group matches
*nextGroup != *currentGroup &&
// or if we hit the first group
!nextGroup->IsInternalGroup())
nextGroup = nextGroup->GetNextGroup();
/* always update so users can reset the list */
if (nextGroup)
{
SetSelectedGroup(nextGroup);
UpdateData();
}
return m_selectedGroup;
}
示例3: OnAction
bool CGUIDialogPVRChannelsOSD::OnAction(const CAction &action)
{
switch (action.GetID())
{
case ACTION_PREVIOUS_CHANNELGROUP:
case ACTION_NEXT_CHANNELGROUP:
{
CPVRChannelGroupPtr group = GetPlayingGroup();
CPVRChannelGroupPtr nextGroup = action.GetID() == ACTION_NEXT_CHANNELGROUP ? group->GetNextGroup() : group->GetPreviousGroup();
g_PVRManager.SetPlayingGroup(nextGroup);
SetLastSelectedItem(group->GroupID());
Update();
return true;
}
}
return CGUIDialog::OnAction(action);
}
示例4: OnAction
bool CGUIDialogPVRChannelsOSD::OnAction(const CAction &action)
{
switch (action.GetID())
{
case ACTION_PREVIOUS_CHANNELGROUP:
case ACTION_NEXT_CHANNELGROUP:
{
// save control states and currently selected item of group
SaveControlStates();
// switch to next or previous group
CPVRChannelGroupPtr group = GetPlayingGroup();
CPVRChannelGroupPtr nextGroup = action.GetID() == ACTION_NEXT_CHANNELGROUP ? group->GetNextGroup() : group->GetPreviousGroup();
g_PVRManager.SetPlayingGroup(nextGroup);
Update();
// restore control states and previously selected item of group
RestoreControlStates();
return true;
}
}
return CGUIDialog::OnAction(action);
}
示例5: OnMessage
bool CGUIDialogPVRChannelsOSD::OnMessage(CGUIMessage& message)
{
switch (message.GetMessage())
{
case GUI_MSG_WINDOW_DEINIT:
{
if (m_group)
{
g_PVRManager.SetPlayingGroup(m_group);
SetLastSelectedItem(m_group->GroupID());
}
Clear();
}
break;
case GUI_MSG_WINDOW_INIT:
{
/* Close dialog immediately if now TV or radio channel is playing */
if (!g_PVRManager.IsPlaying())
{
Close();
return true;
}
m_group = GetPlayingGroup();
CGUIWindow::OnMessage(message);
Update(true);
return true;
}
break;
case GUI_MSG_CLICKED:
{
int iControl = message.GetSenderId();
if (m_viewControl.HasControl(iControl)) // list/thumb control
{
int iItem = m_viewControl.GetSelectedItem();
int iAction = message.GetParam1();
if (iAction == ACTION_SELECT_ITEM || iAction == ACTION_MOUSE_LEFT_CLICK)
{
/* Switch to channel */
GotoChannel(iItem);
return true;
}
else if (iAction == ACTION_SHOW_INFO || iAction == ACTION_MOUSE_RIGHT_CLICK)
{
/* Show information Dialog */
ShowInfo(iItem);
return true;
}
}
}
break;
case GUI_MSG_MOVE:
{
int iAction = message.GetParam1();
if (iAction == ACTION_MOVE_RIGHT || iAction == ACTION_MOVE_LEFT)
{
CPVRChannelGroupPtr group = GetPlayingGroup();
CPVRChannelGroupPtr nextGroup = iAction == ACTION_MOVE_RIGHT ? group->GetNextGroup() : group->GetPreviousGroup();
g_PVRManager.SetPlayingGroup(nextGroup);
SetLastSelectedItem(group->GroupID());
Update();
return true;
}
}
break;
}
return CGUIDialog::OnMessage(message);
}