Debian Codegraph @

xbmc/profiles/dialogs/GUIDialogProfileSettings.h

raw
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #pragma once
10
11 #include "profiles/Profile.h"
12 #include "settings/dialogs/GUIDialogSettingsManualBase.h"
13
14 #include <string>
15
16 class CGUIDialogProfileSettings : public CGUIDialogSettingsManualBase
17 {
18 public:
19 CGUIDialogProfileSettings();
20 ~CGUIDialogProfileSettings() override;
21
22 static bool ShowForProfile(unsigned int iProfile, bool firstLogin = false);
23
24 protected:
25 // specializations of CGUIWindow
26 void OnWindowLoaded() override;
27
28 // implementations of ISettingCallback
29 void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
30 void OnSettingAction(const std::shared_ptr<const CSetting>& setting) override;
31
32 // specialization of CGUIDialogSettingsBase
33 bool AllowResettingSettings() const override { return false; }
34 bool Save() override { return true; }
35 void OnCancel() override;
36 void SetupView() override;
37
38 // specialization of CGUIDialogSettingsManualBase
39 void InitializeSettings() override;
40
41 /*! \brief Prompt for a change in profile path
42 \param directory Current directory for the profile, new profile directory will be returned here
43 \param isDefault whether this is the default profile or not
44 \return true if the profile path has been changed, false otherwise.
45 */
46 static bool GetProfilePath(std::string &directory, bool isDefault);
47
48 void UpdateProfileImage();
49 void updateProfileDirectory();
50
51 bool m_needsSaving = false;
52 std::string m_name;
53 std::string m_thumb;
54 std::string m_directory;
55 int m_sourcesMode;
56 int m_dbMode;
57 bool m_isDefault;
58 bool m_isNewUser;
59 bool m_showDetails;
60
61 CProfile::CLock m_locks;
62 };