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.
11 #include "dialogs/GUIDialogContextMenu.h"
12 #include "guilib/GUIDialog.h"
13 #include "view/GUIViewControl.h"
24 class CPVRChannelGroup
;
27 class CGUIDialogPVRChannelManager
: public CGUIDialog
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
);
43 void OnInitWindow() override
;
44 void OnDeinitWindow(int nextWindowID
) override
;
49 void PromptAndSaveList();
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
;
91 CFileItemList
* m_channelItems
;
92 CGUIViewControl m_viewControl
;
94 std::vector
<std::shared_ptr
<CPVRClient
>> m_clientsWithSettingsList
;