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 OnPopupMenu(int itemNumber);
57  bool OnContextButton(int itemNumber, int button);
58  bool OnActionMove(const CAction& action);
59 
60  std::shared_ptr<CPVRChannelGroup> m_selectedGroup;
61  bool m_bIsRadio;
62  bool m_movingItem{false};
63  bool m_allowReorder{false};
64 
65  int m_iSelectedUngroupedChannel = 0;
66  int m_iSelectedGroupMember = 0;
67  int m_iSelectedChannelGroup = 0;
68 
69  CFileItemList * m_ungroupedChannels;
70  CFileItemList * m_groupMembers;
71  CFileItemList * m_channelGroups;
72 
73  CGUIViewControl m_viewUngroupedChannels;
74  CGUIViewControl m_viewGroupMembers;
75  CGUIViewControl m_viewChannelGroups;
76 
77  CPVRThumbLoader m_thumbLoader;
78  };
79 }
Definition: GUIViewControl.h:19
Definition: ContextMenuManager.h:24
Represents a list of files.
Definition: FileItem.h:721
void OnInitWindow() override
Called on window open.
Definition: GUIDialogPVRGroupManager.cpp:525
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