blob: 713e9bde087620a9a5fae6f34d74a508d482ca99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
#pragma once
/*
* Copyright (C) 2012-2015 Team KODI
* http://kodi.tv
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with KODI; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
#include "addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDSP.h"
#include "cores/AudioEngine/Engines/ActiveAE/AudioDSPAddons/ActiveAEDSPMode.h"
#include "dialogs/GUIDialogContextMenu.h"
#include "guilib/GUIDialog.h"
#include "view/GUIViewControl.h"
class CGUIDialogBusy;
namespace ActiveAE
{
class CGUIDialogAudioDSPManager : public CGUIDialog
{
public:
CGUIDialogAudioDSPManager(void);
~CGUIDialogAudioDSPManager(void) override;
bool OnMessage(CGUIMessage& message) override;
bool OnAction(const CAction& action) override;
void OnWindowLoaded(void) override;
void OnWindowUnload(void) override;
bool HasListItems() const override { return true; };
protected:
void OnInitWindow() override;
void OnDeinitWindow(int nextWindowID) override;
virtual bool OnPopupMenu(int iItem, int listType);
virtual bool OnContextButton(int itemNumber, CONTEXT_BUTTON button, int listType);
virtual bool OnActionMove(const CAction &action);
virtual bool OnMessageClick(CGUIMessage &message);
bool OnClickListAvailable(CGUIMessage &message);
bool OnClickListActive(CGUIMessage &message);
bool OnClickRadioContinuousSaving(CGUIMessage &message);
bool OnClickApplyChanges(CGUIMessage &message);
bool OnClickClearActiveModes(CGUIMessage &message);
void SetItemsUnchanged(void);
private:
void Clear(void);
void Update(void);
void SaveList(void);
void Renumber(void);
bool UpdateDatabase(CGUIDialogBusy* pDlgBusy);
void SetSelectedModeType(void);
//! helper function prototypes
static void helper_LogError(const char *function);
static int helper_TranslateModeType(std::string ModeString);
static CFileItem *helper_CreateModeListItem(CActiveAEDSPModePtr &ModePointer, AE_DSP_MENUHOOK_CAT &MenuHook, int *ContinuesNo);
static int helper_GetDialogId(CActiveAEDSPModePtr &ModePointer, AE_DSP_MENUHOOK_CAT &MenuHook, AE_DSP_ADDON &Addon, std::string AddonName);
static AE_DSP_MENUHOOK_CAT helper_GetMenuHookCategory(int CurrentType);
bool m_bMovingMode;
bool m_bContainsChanges;
bool m_bContinuousSaving; // if true, all settings are directly saved
int m_iCurrentType;
int m_iSelected[AE_DSP_MODE_TYPE_MAX];
CFileItemList* m_activeItems[AE_DSP_MODE_TYPE_MAX];
CFileItemList* m_availableItems[AE_DSP_MODE_TYPE_MAX];
CGUIViewControl m_availableViewControl;
CGUIViewControl m_activeViewControl;
};
}
|