xbmc
GUIDialogProfileSettings.h
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 
17 {
18 public:
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 
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 };
void OnSettingAction(const std::shared_ptr< const CSetting > &setting) override
The given setting has been activated.
Definition: GUIDialogProfileSettings.cpp:217
void OnSettingChanged(const std::shared_ptr< const CSetting > &setting) override
The value of the given setting has changed.
Definition: GUIDialogProfileSettings.cpp:197
Class for handling lock status.
Definition: Profile.h:24
static bool GetProfilePath(std::string &directory, bool isDefault)
Prompt for a change in profile path.
Definition: GUIDialogProfileSettings.cpp:361
Definition: GUIDialogProfileSettings.h:16
Definition: GUIDialogSettingsManualBase.h:37