[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / settings / dialogs / GUIDialogContentSettings.h
blobe933280d0d796378ca852de46ddb0a3c65641a18
1 /*
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.
7 */
9 #pragma once
11 #include "addons/Scraper.h"
12 #include "settings/dialogs/GUIDialogSettingsManualBase.h"
14 #include <map>
15 #include <utility>
17 namespace KODI::VIDEO
19 struct SScanSettings;
21 class CFileItemList;
23 class CGUIDialogContentSettings : public CGUIDialogSettingsManualBase
25 public:
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);
33 void ResetContent();
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);
51 protected:
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; }
61 bool Save() override;
62 void SetupView() override;
64 // specialization of CGUIDialogSettingsManualBase
65 void InitializeSettings() override;
67 private:
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);
73 /*!
74 * @brief The currently selected content type
76 CONTENT_TYPE m_content = CONTENT_NONE;
77 /*!
78 * @brief The selected content type at dialog creation
80 CONTENT_TYPE m_originalContent = CONTENT_NONE;
81 /*!
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;