[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / pvr / dialogs / GUIDialogPVRChannelManager.h
blob7dfc88a236617fe0497975271e96fff6037cfbb9
1 /*
2 * Copyright (C) 2012-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "dialogs/GUIDialogContextMenu.h"
12 #include "guilib/GUIDialog.h"
13 #include "view/GUIViewControl.h"
15 #include <memory>
16 #include <vector>
18 class CAction;
19 class CFileItemList;
20 class CGUIMessage;
22 namespace PVR
24 class CPVRChannelGroup;
25 class CPVRClient;
27 class CGUIDialogPVRChannelManager : public CGUIDialog
29 public:
30 CGUIDialogPVRChannelManager();
31 ~CGUIDialogPVRChannelManager() override;
32 bool OnMessage(CGUIMessage& message) override;
33 bool OnAction(const CAction& action) override;
34 void OnWindowLoaded() override;
35 void OnWindowUnload() override;
36 bool HasListItems() const override{ return true; }
37 CFileItemPtr GetCurrentListItem(int offset = 0) override;
39 void Open(const std::shared_ptr<CFileItem>& initialSelection);
40 void SetRadio(bool bIsRadio);
42 protected:
43 void OnInitWindow() override;
44 void OnDeinitWindow(int nextWindowID) override;
46 private:
47 void Clear();
48 void Update();
49 void PromptAndSaveList();
50 void SaveList();
51 void Renumber();
52 void SetData(int iItem);
53 void RenameChannel(const CFileItemPtr& pItem);
55 void ClearChannelOptions();
56 void EnableChannelOptions(bool bEnable);
58 bool OnPopupMenu(int iItem);
59 bool OnContextButton(int itemNumber, CONTEXT_BUTTON button);
60 bool OnActionMove(const CAction& action);
61 bool OnMessageClick(const CGUIMessage& message);
62 bool OnClickListChannels(const CGUIMessage& message);
63 bool OnClickButtonOK();
64 bool OnClickButtonApply();
65 bool OnClickButtonCancel();
66 bool OnClickButtonRadioTV();
67 bool OnClickButtonRadioActive();
68 bool OnClickButtonRadioParentalLocked();
69 bool OnClickButtonEditName();
70 bool OnClickButtonChannelLogo();
71 bool OnClickButtonUseEPG();
72 bool OnClickEPGSourceSpin();
73 bool OnClickButtonGroupManager();
74 bool OnClickButtonNewChannel();
75 bool OnClickButtonRefreshChannelLogos();
77 bool UpdateChannelData(const std::shared_ptr<CFileItem>& pItem,
78 const std::shared_ptr<CPVRChannelGroup>& group);
80 bool HasChangedItems() const;
81 void SetItemChanged(const CFileItemPtr& pItem);
83 bool m_bIsRadio = false;
84 bool m_bMovingMode = false;
85 bool m_bAllowNewChannel = false;
86 bool m_bAllowRenumber = false;
87 bool m_bAllowReorder = false;
89 std::shared_ptr<CFileItem> m_initialSelection;
90 int m_iSelected = 0;
91 CFileItemList* m_channelItems;
92 CGUIViewControl m_viewControl;
94 std::vector<std::shared_ptr<CPVRClient>> m_clientsWithSettingsList;