Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CSettingCategory Class Reference

Category of groups of settings being part of a section. More...

#include <SettingSection.h>

Inheritance diagram for CSettingCategory:
ISetting

Public Member Functions

 CSettingCategory (const std::string &id, CSettingsManager *settingsManager=nullptr)
 Creates a new setting category with the given identifier.
 
 ~CSettingCategory () override=default
 
bool Deserialize (const TiXmlNode *node, bool update=false) override
 Deserializes the given XML node into the properties of the setting object.
 
const SettingGroupListGetGroups () const
 Gets the full list of setting groups belonging to the setting category.
 
SettingGroupList GetGroups (SettingLevel level) const
 Gets the list of setting groups belonging to the setting category that contain settings assigned to the given setting level (or below) and that meet the requirements and visibility conditions.
 
bool CanAccess () const
 Whether the setting category can be accessed or not.
 
void AddGroup (const SettingGroupPtr &group)
 
void AddGroupToFront (const SettingGroupPtr &group)
 
void AddGroups (const SettingGroupList &groups)
 
- Public Member Functions inherited from ISetting
 ISetting (const std::string &id, CSettingsManager *settingsManager=nullptr)
 Creates a new setting object with the given identifier.
 
virtual ~ISetting ()=default
 
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.
 

Additional Inherited Members

- Static Public Member Functions inherited from ISetting
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 inherited from ISetting
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 inherited from ISetting
std::string m_id
 
CSettingsManagerm_settingsManager
 
- Static Protected Attributes inherited from ISetting
static constexpr int DefaultLabel = -1
 

Detailed Description

Category of groups of settings being part of a section.

See also
CSettingSection
CSettingGroup

Constructor & Destructor Documentation

◆ CSettingCategory()

CSettingCategory::CSettingCategory ( const std::string & id,
CSettingsManager * settingsManager = nullptr )

Creates a new setting category with the given identifier.

Parameters
idIdentifier of the setting category
settingsManagerReference to the settings manager

◆ ~CSettingCategory()

CSettingCategory::~CSettingCategory ( )
overridedefault

Member Function Documentation

◆ AddGroup()

void CSettingCategory::AddGroup ( const SettingGroupPtr & group)

◆ AddGroups()

void CSettingCategory::AddGroups ( const SettingGroupList & groups)

◆ AddGroupToFront()

void CSettingCategory::AddGroupToFront ( const SettingGroupPtr & group)

◆ CanAccess()

bool CSettingCategory::CanAccess ( ) const

Whether the setting category can be accessed or not.

Returns
True if the setting category can be accessed, false otherwise

◆ Deserialize()

bool CSettingCategory::Deserialize ( const TiXmlNode * node,
bool update = false )
overridevirtual

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
nodeXML node containing the properties of the setting object
updateWhether to perform checks for mandatory properties or not
Returns
True if deserialization was successful, false otherwise

Reimplemented from ISetting.

◆ GetGroups() [1/2]

const SettingGroupList & CSettingCategory::GetGroups ( ) const
inline

Gets the full list of setting groups belonging to the setting category.

Returns
Full list of setting groups belonging to the setting category

◆ GetGroups() [2/2]

SettingGroupList CSettingCategory::GetGroups ( SettingLevel level) const

Gets the list of setting groups belonging to the setting category that contain settings assigned to the given setting level (or below) and that meet the requirements and visibility conditions.

Parameters
levelLevel the settings should be assigned to
Returns
List of setting groups belonging to the setting category

The documentation for this class was generated from the following files: