11 #include "SettingRequirement.h" 45 virtual bool Deserialize(
const TiXmlNode *node,
bool update =
false);
52 const std::string&
GetId()
const {
return m_id; }
58 virtual bool IsVisible()
const {
return m_visible; }
64 virtual void SetVisible(
bool visible) { m_visible = visible; }
117 static constexpr
int DefaultLabel = -1;
127 const std::string& attribute,
128 std::string& identification);
134 bool m_visible =
true;
135 int m_label = DefaultLabel;
137 bool m_meetsRequirements =
true;
static bool DeserializeIdentification(const TiXmlNode *node, std::string &identification)
Deserializes the given XML node to retrieve a setting object's identifier.
Definition: ISetting.cpp:49
virtual bool Deserialize(const TiXmlNode *node, bool update=false)
Deserializes the given XML node into the properties of the setting object.
Definition: ISetting.cpp:23
Definition: SettingRequirement.h:42
virtual void SetVisible(bool visible)
Sets the visibility state of the setting object.
Definition: ISetting.h:64
virtual void SetRequirementsMet(bool requirementsMet)
Sets whether the setting object meets all necessary requirements.
Definition: ISetting.h:104
const std::string & GetId() const
Gets the identifier of the setting object.
Definition: ISetting.h:52
void SetLabel(int label)
Sets the localizeable label ID of the setting group.
Definition: ISetting.h:76
Interface defining the base of all setting objects.
Definition: ISetting.h:22
virtual void CheckRequirements()
Checks if the setting object meets all necessary requirements.
Definition: ISetting.cpp:73
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...
Definition: ISetting.cpp:54
virtual bool IsVisible() const
Whether the setting object is visible or hidden.
Definition: ISetting.h:58
int GetLabel() const
Gets the localizeable label ID of the setting group.
Definition: ISetting.h:70
void SetHelp(int help)
Sets the localizeable help ID of the setting group.
Definition: ISetting.h:88
Settings manager responsible for initializing, loading and handling all settings. ...
Definition: SettingsManager.h:41
ISetting(const std::string &id, CSettingsManager *settingsManager=nullptr)
Creates a new setting object with the given identifier.
Definition: ISetting.cpp:17
int GetHelp() const
Gets the localizeable help ID of the setting group.
Definition: ISetting.h:82
virtual bool MeetsRequirements() const
Whether the setting object meets all necessary requirements.
Definition: ISetting.h:94