Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Action setting implementation. More...
#include <Setting.h>
Public Member Functions | |
CSettingAction (const std::string &id, CSettingsManager *settingsManager=nullptr) | |
CSettingAction (const std::string &id, int label, CSettingsManager *settingsManager=nullptr) | |
CSettingAction (const std::string &id, const CSettingAction &setting) | |
~CSettingAction () override=default | |
std::shared_ptr< CSetting > | Clone (const std::string &id) const override |
void | MergeDetails (const CSetting &other) override |
bool | Deserialize (const TiXmlNode *node, bool update=false) override |
Deserializes the given XML node into the properties of the setting object. | |
SettingType | GetType () const override |
bool | FromString (const std::string &value) override |
std::string | ToString () const override |
bool | Equals (const std::string &value) const override |
bool | CheckValidity (const std::string &value) const override |
void | Reset () override |
bool | HasData () const |
const std::string & | GetData () const |
void | SetData (const std::string &data) |
Public Member Functions inherited from CSetting | |
CSetting (const std::string &id, CSettingsManager *settingsManager=nullptr) | |
CSetting (const std::string &id, const CSetting &setting) | |
~CSetting () override=default | |
void | MergeBasics (const CSetting &other) |
bool | IsEnabled () const |
bool | GetEnabled () const |
void | SetEnabled (bool enabled) |
bool | IsDefault () const |
const std::string & | GetParent () const |
void | SetParent (const std::string &parentSetting) |
SettingLevel | GetLevel () const |
void | SetLevel (SettingLevel level) |
std::shared_ptr< const ISettingControl > | GetControl () const |
std::shared_ptr< ISettingControl > | GetControl () |
void | SetControl (std::shared_ptr< ISettingControl > control) |
const SettingDependencies & | GetDependencies () const |
void | SetDependencies (const SettingDependencies &dependencies) |
const std::set< CSettingUpdate > & | GetUpdates () const |
void | SetCallback (ISettingCallback *callback) |
bool | IsReference () const |
const std::string & | GetReferencedId () const |
void | SetReferencedId (const std::string &referencedId) |
void | MakeReference (const std::string &referencedId="") |
bool | GetVisible () const |
bool | IsVisible () const override |
Whether the setting object is visible or hidden. | |
void | OnSettingAction (const std::shared_ptr< const CSetting > &setting) override |
The given setting has been activated. | |
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 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. | |
Protected Member Functions | |
virtual void | copy (const CSettingAction &setting) |
Protected Member Functions inherited from CSetting | |
bool | OnSettingChanging (const std::shared_ptr< const CSetting > &setting) override |
The value of the given setting is being changed. | |
void | OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override |
The value of the given setting has changed. | |
bool | OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) override |
The given setting needs to be updated. | |
void | OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName) override |
The given property of the given setting has changed. | |
void | Copy (const CSetting &setting) |
template<class TSetting > | |
std::shared_ptr< TSetting > | shared_from_base () |
Protected Member Functions inherited from ISettingCallback | |
virtual | ~ISettingCallback ()=default |
Protected Attributes | |
std::string | m_data |
Protected Attributes inherited from CSetting | |
ISettingCallback * | m_callback = nullptr |
bool | m_enabled = true |
std::string | m_parentSetting |
SettingLevel | m_level = SettingLevel::Standard |
std::shared_ptr< ISettingControl > | m_control |
SettingDependencies | m_dependencies |
std::set< CSettingUpdate > | m_updates |
bool | m_changed = false |
CSharedSection | m_critical |
std::string | m_referencedId |
Protected Attributes inherited from ISetting | |
std::string | m_id |
CSettingsManager * | m_settingsManager |
Static Protected Attributes | |
static Logger | s_logger |
Static Protected Attributes inherited from ISetting | |
static constexpr int | DefaultLabel = -1 |
Additional Inherited Members | |
Static Public Member Functions inherited from CSetting | |
static bool | DeserializeIdentification (const TiXmlNode *node, std::string &identification, bool &isReference) |
Deserializes the given XML node to retrieve a setting object's identifier and whether the setting is a reference to another setting or not. | |
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. | |
Action setting implementation.
A setting action will trigger a call to the OnSettingAction() callback method when activated.
CSettingAction::CSettingAction | ( | const std::string & | id, |
CSettingsManager * | settingsManager = nullptr ) |
CSettingAction::CSettingAction | ( | const std::string & | id, |
int | label, | ||
CSettingsManager * | settingsManager = nullptr ) |
CSettingAction::CSettingAction | ( | const std::string & | id, |
const CSettingAction & | setting ) |
|
overridedefault |
|
inlineoverridevirtual |
Implements CSetting.
|
overridevirtual |
Implements CSetting.
|
protectedvirtual |
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 from CSetting.
|
inlineoverridevirtual |
Implements CSetting.
|
inlineoverridevirtual |
Implements CSetting.
|
inline |
|
inlineoverridevirtual |
Implements CSetting.
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements CSetting.
|
protected |
|
staticprotected |