2 * Copyright (C) 2005-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 "addons/Scraper.h"
12 #include "settings/dialogs/GUIDialogSettingsManualBase.h"
23 class CGUIDialogContentSettings
: public CGUIDialogSettingsManualBase
26 CGUIDialogContentSettings();
28 // specialization of CGUIWindow
29 bool HasListItems() const override
{ return true; }
31 CONTENT_TYPE
GetContent() const { return m_content
; }
32 void SetContent(CONTENT_TYPE content
);
35 const ADDON::ScraperPtr
& GetScraper() const { return m_scraper
; }
36 void SetScraper(ADDON::ScraperPtr scraper
) { m_scraper
= std::move(scraper
); }
38 void SetScanSettings(const KODI::VIDEO::SScanSettings
& scanSettings
);
39 bool GetScanRecursive() const { return m_scanRecursive
; }
40 bool GetUseDirectoryNames() const { return m_useDirectoryNames
; }
41 bool GetContainsSingleItem() const { return m_containsSingleItem
; }
42 bool GetExclude() const { return m_exclude
; }
43 bool GetNoUpdating() const { return m_noUpdating
; }
44 bool GetUseAllExternalAudio() const { return m_allExternalAudio
; }
46 static bool Show(ADDON::ScraperPtr
& scraper
, CONTENT_TYPE content
= CONTENT_NONE
);
47 static bool Show(ADDON::ScraperPtr
& scraper
,
48 KODI::VIDEO::SScanSettings
& settings
,
49 CONTENT_TYPE content
= CONTENT_NONE
);
52 // specializations of CGUIWindow
53 void OnInitWindow() override
;
55 // implementations of ISettingCallback
56 void OnSettingChanged(const std::shared_ptr
<const CSetting
>& setting
) override
;
57 void OnSettingAction(const std::shared_ptr
<const CSetting
>& setting
) override
;
59 // specialization of CGUIDialogSettingsBase
60 bool AllowResettingSettings() const override
{ return false; }
62 void SetupView() override
;
64 // specialization of CGUIDialogSettingsManualBase
65 void InitializeSettings() override
;
68 void SetLabel2(const std::string
&settingid
, const std::string
&label
);
69 void ToggleState(const std::string
&settingid
, bool enabled
);
70 using CGUIDialogSettingsManualBase::SetFocus
;
71 void SetFocusToSetting(const std::string
& settingid
);
74 * @brief The currently selected content type
76 CONTENT_TYPE m_content
= CONTENT_NONE
;
78 * @brief The selected content type at dialog creation
80 CONTENT_TYPE m_originalContent
= CONTENT_NONE
;
82 * @brief The currently selected scraper
84 ADDON::ScraperPtr m_scraper
;
86 bool m_showScanSettings
= false;
87 bool m_scanRecursive
= false;
88 bool m_useDirectoryNames
= false;
89 bool m_containsSingleItem
= false;
90 bool m_exclude
= false;
91 bool m_noUpdating
= false;
92 bool m_allExternalAudio
= false;