Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Interface defining the base of all setting objects. More...
#include <ISetting.h>
Public Member Functions | |
ISetting (const std::string &id, CSettingsManager *settingsManager=nullptr) | |
Creates a new setting object with the given identifier. | |
virtual | ~ISetting ()=default |
virtual bool | Deserialize (const TiXmlNode *node, bool update=false) |
Deserializes the given XML node into the properties of the setting object. | |
const std::string & | GetId () const |
Gets the identifier of the setting object. | |
virtual bool | IsVisible () const |
Whether the setting object is visible or hidden. | |
virtual void | SetVisible (bool visible) |
Sets the visibility state of the setting object. | |
int | GetLabel () const |
Gets the localizeable label ID of the setting group. | |
void | SetLabel (int label) |
Sets the localizeable label ID of the setting group. | |
int | GetHelp () const |
Gets the localizeable help ID of the setting group. | |
void | SetHelp (int help) |
Sets the localizeable help ID of the setting group. | |
virtual bool | MeetsRequirements () const |
Whether the setting object meets all necessary requirements. | |
virtual void | CheckRequirements () |
Checks if the setting object meets all necessary requirements. | |
virtual void | SetRequirementsMet (bool requirementsMet) |
Sets whether the setting object meets all necessary requirements. | |
Static Public Member Functions | |
static bool | DeserializeIdentification (const TiXmlNode *node, std::string &identification) |
Deserializes the given XML node to retrieve a setting object's identifier. | |
Static Protected Member Functions | |
static bool | DeserializeIdentificationFromAttribute (const TiXmlNode *node, const std::string &attribute, std::string &identification) |
Deserializes the given XML node to retrieve a setting object's identifier from the given attribute. | |
Protected Attributes | |
std::string | m_id |
CSettingsManager * | m_settingsManager |
Static Protected Attributes | |
static constexpr int | DefaultLabel = -1 |
Interface defining the base of all setting objects.
ISetting::ISetting | ( | const std::string & | id, |
CSettingsManager * | settingsManager = nullptr ) |
Creates a new setting object with the given identifier.
id | Identifier of the setting object |
settingsManager | Reference to the settings manager |
|
virtualdefault |
|
virtual |
Checks if the setting object meets all necessary requirements.
Deserializes the given XML node into the properties of the setting object.
If the update parameter is true, the checks for mandatory properties are skipped and values are only updated.
node | XML node containing the properties of the setting object |
update | Whether to perform checks for mandatory properties or not |
Reimplemented in CSetting, CSettingAction, CSettingAddon, CSettingBool, CSettingCategory, CSettingGroup, CSettingInt, CSettingList, CSettingNumber, CSettingPath, CSettingSection, and CSettingString.
|
static |
Deserializes the given XML node to retrieve a setting object's identifier.
node | XML node containing a setting object's identifier |
identification | Will contain the deserialized setting object's identifier |
|
staticprotected |
Deserializes the given XML node to retrieve a setting object's identifier from the given attribute.
node | XML node containing a setting object's identifier |
attribute | Attribute which contains the setting object's identifier |
identification | Will contain the deserialized setting object's identifier |
|
inline |
Gets the localizeable help ID of the setting group.
|
inline |
Gets the identifier of the setting object.
|
inline |
Gets the localizeable label ID of the setting group.
|
inlinevirtual |
Whether the setting object is visible or hidden.
Reimplemented in CSetting.
|
inlinevirtual |
Whether the setting object meets all necessary requirements.
Sets the localizeable help ID of the setting group.
label | Localizeable help ID of the setting group |
Sets the localizeable label ID of the setting group.
label | Localizeable label ID of the setting group |
Sets whether the setting object meets all necessary requirements.
visible | Whether the setting object meets all necessary requirements or not |
Sets the visibility state of the setting object.
visible | Whether the setting object shall be visible or not |
|
staticconstexprprotected |
|
protected |
|
protected |