Interface defining the base of all setting objects.
More...
#include <ISetting.h>
|
| ISetting (const std::string &id, CSettingsManager *settingsManager=nullptr) |
| Creates a new setting object with the given identifier. More...
|
|
virtual bool | Deserialize (const TiXmlNode *node, bool update=false) |
| Deserializes the given XML node into the properties of the setting object. More...
|
|
const std::string & | GetId () const |
| Gets the identifier of the setting object. More...
|
|
virtual bool | IsVisible () const |
| Whether the setting object is visible or hidden. More...
|
|
virtual void | SetVisible (bool visible) |
| Sets the visibility state of the setting object. More...
|
|
int | GetLabel () const |
| Gets the localizeable label ID of the setting group. More...
|
|
void | SetLabel (int label) |
| Sets the localizeable label ID of the setting group. More...
|
|
int | GetHelp () const |
| Gets the localizeable help ID of the setting group. More...
|
|
void | SetHelp (int help) |
| Sets the localizeable help ID of the setting group. More...
|
|
virtual bool | MeetsRequirements () const |
| Whether the setting object meets all necessary requirements. More...
|
|
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. More...
|
|
|
static bool | DeserializeIdentification (const TiXmlNode *node, std::string &identification) |
| Deserializes the given XML node to retrieve a setting object's identifier. More...
|
|
|
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. More...
|
|
|
static constexpr int | DefaultLabel = -1 |
|
Interface defining the base of all setting objects.
◆ ISetting()
ISetting::ISetting |
( |
const std::string & |
id, |
|
|
CSettingsManager * |
settingsManager = nullptr |
|
) |
| |
Creates a new setting object with the given identifier.
- Parameters
-
id | Identifier of the setting object |
settingsManager | Reference to the settings manager |
◆ Deserialize()
bool ISetting::Deserialize |
( |
const TiXmlNode * |
node, |
|
|
bool |
update = false |
|
) |
| |
|
virtual |
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.
- Parameters
-
node | XML node containing the properties of the setting object |
update | Whether to perform checks for mandatory properties or not |
- Returns
- True if deserialization was successful, false otherwise
Reimplemented in CSettingAction, CSettingString, CSettingNumber, CSettingInt, CSettingBool, CSettingList, CSettingSection, CSettingCategory, CSetting, CSettingGroup, CSettingAddon, and CSettingPath.
◆ DeserializeIdentification()
bool ISetting::DeserializeIdentification |
( |
const TiXmlNode * |
node, |
|
|
std::string & |
identification |
|
) |
| |
|
static |
Deserializes the given XML node to retrieve a setting object's identifier.
- Parameters
-
node | XML node containing a setting object's identifier |
identification | Will contain the deserialized setting object's identifier |
- Returns
- True if a setting object's identifier was deserialized, false otherwise
◆ DeserializeIdentificationFromAttribute()
bool ISetting::DeserializeIdentificationFromAttribute |
( |
const TiXmlNode * |
node, |
|
|
const std::string & |
attribute, |
|
|
std::string & |
identification |
|
) |
| |
|
staticprotected |
Deserializes the given XML node to retrieve a setting object's identifier from the given attribute.
- Parameters
-
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 |
- Returns
- True if a setting object's identifier was deserialized, false otherwise
◆ GetHelp()
int ISetting::GetHelp |
( |
| ) |
const |
|
inline |
Gets the localizeable help ID of the setting group.
- Returns
- Localizeable help ID of the setting group
◆ GetId()
const std::string& ISetting::GetId |
( |
| ) |
const |
|
inline |
Gets the identifier of the setting object.
- Returns
- Identifier of the setting object
◆ GetLabel()
int ISetting::GetLabel |
( |
| ) |
const |
|
inline |
Gets the localizeable label ID of the setting group.
- Returns
- Localizeable label ID of the setting group
◆ IsVisible()
virtual bool ISetting::IsVisible |
( |
| ) |
const |
|
inlinevirtual |
Whether the setting object is visible or hidden.
- Returns
- True if the setting object is visible, false otherwise
Reimplemented in CSetting.
◆ MeetsRequirements()
virtual bool ISetting::MeetsRequirements |
( |
| ) |
const |
|
inlinevirtual |
Whether the setting object meets all necessary requirements.
- Returns
- True if the setting object meets all necessary requirements, false otherwise
◆ SetHelp()
void ISetting::SetHelp |
( |
int |
help | ) |
|
|
inline |
Sets the localizeable help ID of the setting group.
- Parameters
-
label | Localizeable help ID of the setting group |
◆ SetLabel()
void ISetting::SetLabel |
( |
int |
label | ) |
|
|
inline |
Sets the localizeable label ID of the setting group.
- Parameters
-
label | Localizeable label ID of the setting group |
◆ SetRequirementsMet()
virtual void ISetting::SetRequirementsMet |
( |
bool |
requirementsMet | ) |
|
|
inlinevirtual |
Sets whether the setting object meets all necessary requirements.
- Parameters
-
visible | Whether the setting object meets all necessary requirements or not |
◆ SetVisible()
virtual void ISetting::SetVisible |
( |
bool |
visible | ) |
|
|
inlinevirtual |
Sets the visibility state of the setting object.
- Parameters
-
visible | Whether the setting object shall be visible or not |
The documentation for this class was generated from the following files:
- xbmc/settings/lib/ISetting.h
- xbmc/settings/lib/ISetting.cpp