xbmc
GUIDialogPVRGroupManager.h
1 /*
2  * Copyright (C) 2012-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "guilib/GUIDialog.h"
12 #include "pvr/PVRThumbLoader.h"
13 #include "view/GUIViewControl.h"
14 
15 #include <memory>
16 
17 class CFileItemList;
18 class CGUIMessage;
19 
20 namespace PVR
21 {
22  class CPVRChannelGroup;
23 
25  {
26  public:
28  ~CGUIDialogPVRGroupManager() override;
29  bool OnMessage(CGUIMessage& message) override;
30  bool OnAction(const CAction& action) override;
31  void OnWindowLoaded() override;
32  void OnWindowUnload() override;
33 
34  void SetRadio(bool bIsRadio);
35 
36  protected:
37  void OnInitWindow() override;
38  void OnDeinitWindow(int nextWindowID) override;
39 
40  private:
41  void Clear();
42  void ClearSelectedGroupsThumbnail();
43  void Update();
44  bool PersistChanges();
45  bool ActionButtonOk(const CGUIMessage& message);
46  bool ActionButtonNewGroup(const CGUIMessage& message);
47  bool ActionButtonDeleteGroup(const CGUIMessage& message);
48  bool ActionButtonRenameGroup(const CGUIMessage& message);
49  bool ActionButtonUngroupedChannels(const CGUIMessage& message);
50  bool ActionButtonGroupMembers(const CGUIMessage& message);
51  bool ActionButtonChannelGroups(const CGUIMessage& message);
52  bool ActionButtonHideGroup(const CGUIMessage& message);
53  bool ActionButtonToggleRadioTV(const CGUIMessage& message);
54  bool ActionButtonRecreateThumbnail(const CGUIMessage& message);
55  bool OnMessageClick(const CGUIMessage& message);
56  bool OnActionMove(const CAction& action);
57 
58  std::shared_ptr<CPVRChannelGroup> m_selectedGroup;
59  bool m_bIsRadio;
60 
61  int m_iSelectedUngroupedChannel = 0;
62  int m_iSelectedGroupMember = 0;
63  int m_iSelectedChannelGroup = 0;
64 
65  CFileItemList * m_ungroupedChannels;
66  CFileItemList * m_groupMembers;
67  CFileItemList * m_channelGroups;
68 
69  CGUIViewControl m_viewUngroupedChannels;
70  CGUIViewControl m_viewGroupMembers;
71  CGUIViewControl m_viewChannelGroups;
72 
73  CPVRThumbLoader m_thumbLoader;
74  };
75 }
Definition: GUIViewControl.h:19
Definition: ContextMenuManager.h:24
Represents a list of files.
Definition: FileItem.h:713
void OnInitWindow() override
Called on window open.
Definition: GUIDialogPVRGroupManager.cpp:398
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: GUIDialog.h:35
Definition: GUIMessage.h:365
Definition: GUIDialogPVRGroupManager.h:24
Definition: PVRThumbLoader.h:18