当前位置: 首页>>代码示例>>C++>>正文


C++ CPVRChannelGroupPtr::GetNextGroup方法代码示例

本文整理汇总了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;
}
开发者ID:OV3RDOSE,项目名称:xbmc,代码行数:16,代码来源:GUIWindowPVRChannels.cpp

示例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;
}
开发者ID:crckmc,项目名称:xbmc-boblight,代码行数:20,代码来源:GUIWindowPVRChannels.cpp

示例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);
}
开发者ID:Mankee,项目名称:xbmc,代码行数:18,代码来源:GUIDialogPVRChannelsOSD.cpp

示例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);
}
开发者ID:ace20022,项目名称:kodi-cmake,代码行数:24,代码来源:GUIDialogPVRChannelsOSD.cpp

示例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);
}
开发者ID:AFFLUENTSOCIETY,项目名称:SPMC,代码行数:79,代码来源:GUIDialogPVRChannelsOSD.cpp


注:本文中的CPVRChannelGroupPtr::GetNextGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。