kodi
ApplicationSettingsHandling.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 "settings/ISubSettings.h"
12 #include "settings/lib/ISettingCallback.h"
13 #include "settings/lib/ISettingsHandler.h"
14 
20  public ISettingsHandler,
21  public ISubSettings
22 {
23 protected:
24  void RegisterSettings();
25  void UnregisterSettings();
26 
27  bool Load(const TiXmlNode* settings) override;
28  bool Save(TiXmlNode* settings) const override;
29  void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
30  void OnSettingAction(const std::shared_ptr<const CSetting>& setting) override;
31  bool OnSettingUpdate(const std::shared_ptr<CSetting>& setting,
32  const char* oldSettingId,
33  const TiXmlNode* oldSettingNode) override;
34 };
Definition: ISettingCallback.h:16
Definition: settings.py:1
Interface defining methods being called by the settings system if an action is performed on multiple/...
Definition: ISettingsHandler.h:16
bool Save(TiXmlNode *settings) const override
Save settings to the given XML node.
Definition: ApplicationSettingsHandling.cpp:209
bool Load(const TiXmlNode *settings) override
Load settings from the given XML node.
Definition: ApplicationSettingsHandling.cpp:202
void OnSettingChanged(const std::shared_ptr< const CSetting > &setting) override
The value of the given setting has changed.
Definition: ApplicationSettingsHandling.cpp:106
Class handling application support for settings.
Definition: ApplicationSettingsHandling.h:19
void OnSettingAction(const std::shared_ptr< const CSetting > &setting) override
The given setting has been activated.
Definition: ApplicationSettingsHandling.cpp:138
bool OnSettingUpdate(const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) override
The given setting needs to be updated.
Definition: ApplicationSettingsHandling.cpp:176
Interface defining methods to load additional setting values from an XML file being loaded by the set...
Definition: ISubSettings.h:18