Group of settings being part of a category.
More...
#include <SettingSection.h>
|
| CSettingGroup (const std::string &id, CSettingsManager *settingsManager=nullptr) |
| Creates a new setting group with the given identifier. More...
|
|
bool | Deserialize (const TiXmlNode *node, bool update=false) override |
| Deserializes the given XML node into the properties of the setting object. More...
|
|
const SettingList & | GetSettings () const |
| Gets the full list of settings belonging to the setting group. More...
|
|
SettingList | GetSettings (SettingLevel level) const |
| Gets the list of settings assigned to the given setting level (or below) and that meet the requirements conditions belonging to the setting group. More...
|
|
bool | ContainsVisibleSettings (const SettingLevel level) const |
|
void | AddSetting (const std::shared_ptr< CSetting > &setting) |
|
void | AddSettings (const SettingList &settings) |
|
bool | ReplaceSetting (const std::shared_ptr< const CSetting > ¤tSetting, const std::shared_ptr< CSetting > &newSetting) |
|
std::shared_ptr< const ISettingControl > | GetControl () const |
|
std::shared_ptr< ISettingControl > | GetControl () |
|
void | SetControl (std::shared_ptr< ISettingControl > control) |
|
| ISetting (const std::string &id, CSettingsManager *settingsManager=nullptr) |
| Creates a new setting object with the given identifier. 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...
|
|
std::string | m_id |
|
CSettingsManager * | m_settingsManager |
|
static constexpr int | DefaultLabel = -1 |
|
Group of settings being part of a category.
- See also
- CSettingCategory
-
CSetting
◆ CSettingGroup()
CSettingGroup::CSettingGroup |
( |
const std::string & |
id, |
|
|
CSettingsManager * |
settingsManager = nullptr |
|
) |
| |
Creates a new setting group with the given identifier.
- Parameters
-
id | Identifier of the setting group |
settingsManager | Reference to the settings manager |
◆ Deserialize()
bool CSettingGroup::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
-
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 from ISetting.
◆ GetSettings() [1/2]
const SettingList& CSettingGroup::GetSettings |
( |
void |
| ) |
const |
|
inline |
Gets the full list of settings belonging to the setting group.
- Returns
- Full list of settings belonging to the setting group
◆ GetSettings() [2/2]
SettingList CSettingGroup::GetSettings |
( |
SettingLevel |
level | ) |
const |
Gets the list of settings assigned to the given setting level (or below) and that meet the requirements conditions belonging to the setting group.
- Parameters
-
level | Level the settings should be assigned to |
- Returns
- List of settings belonging to the setting group
The documentation for this class was generated from the following files: