Wp.SettingsSpec¶
Fields¶
None
Methods¶
|
|
|
|
|
Details¶
- class Wp.SettingsSpec¶
WpSettingSpec holds the specification of a setting.
- check_value(value)¶
- Parameters:
value (
Wp.SpaJson
) – the value to check- Returns:
True
if the value is compatible with the spec,False
otherwise- Return type:
Checks whether a value is compatible with the spec or not.
- get_default_value()¶
- Returns:
the default value of the settings spec
- Return type:
Gets the default value of a settings spec.
- get_description()¶
- Returns:
the description of the settings spec
- Return type:
Gets the description of a settings spec.
- get_max_value()¶
- Returns:
the maximum value of the settings spec, or
None
if the spec type is notWp.SettingsSpecType.INT
orWp.SettingsSpecType.FLOAT
- Return type:
Wp.SpaJson
orNone
Gets the maximum value of a settings spec.
- get_min_value()¶
- Returns:
the minimum value of the settings spec, or
None
if the spec type is notWp.SettingsSpecType.INT
orWp.SettingsSpecType.FLOAT
- Return type:
Wp.SpaJson
orNone
Gets the minimum value of a settings spec.
- get_value_type()¶
- Returns:
the type of the settings spec
- Return type:
Gets the type of a settings spec.
- ref()¶
- Returns:
self with an additional reference count on it
- Return type:
Increases the reference count of a settings spec object.
- unref()¶
Decreases the reference count on self and frees it when the ref count reaches zero.