Class sh::configuration::ConfigurationValue¶
-
class
sh::configuration
::
ConfigurationValue
¶ Abstract base class for a configuration value which is managed in the Tuning dialog.
Each instance can get and set the value associated to it.
You should typically not need to override it. See sh::configuration::ConfigurationManager. See Shallot documentation for more details.
Subclassed by sh::configuration::ConfigurationManager::ConfigurationValueImpl
Public Functions
-
ConfigurationValue
(QString name, QVariant deflt, QString desc, QString longdesc, ConfigurationCategory cat, ConfigurationValueType *valuetype, QString changehint)¶
-
int
getConfigValueInt
()¶ Returns the current value of this instance as integer.
-
double
getConfigValueFloat
()¶ Returns the current value of this instance as floating point number.
-
bool
getConfigValueBool
()¶ Returns the current value of this instance as boolean.
-
QString
getConfigValueString
()¶ Returns the current value of this instance as string.
-
QVariant
getConfigValueVariant
() = 0¶ Returns the current value of this instance as variant.
-
void
setConfigValue
(QVariant value) = 0¶ Sets a new configuration value.
-
bool
mayChange
() = 0¶ Returns if changes are allowed.
-
void
consumeValue
(QObject *o, std::function<void()> h)¶ Adds a consumer function, triggered directly and whenever the value changes.
- Parameters
o
: For lifetime monitoring.
-
QString
name
()¶ Returns the internal name of this configuration.
-
QString
description
()¶ Returns the short description of this configuration.
-
QString
longDescription
()¶ Returns the long description of this configuration.
-
ConfigurationCategory
category
()¶ Returns the category of this configuration (mainly for UI structuring).
-
QString
changeHint
()¶ Returns the change hint text of this configuration.
-
QVariant
defaultValue
()¶ Returns the default value of this configuration.
-
ConfigurationValueType *
valueType
()¶ Returns the value type of this configuration.
Public Static Functions
-
ConfigurationValueType *
valueTypeString
()¶ Returns the string type for configuration values.
-
ConfigurationValueType *
valueTypeInteger
()¶ Returns the integer type for configuration values.
-
ConfigurationValueType *
valueTypeFloat
()¶ Returns the floating point number type for configuration values.
-
ConfigurationValueType *
valueTypeBoolean
()¶ Returns the boolean type for configuration values.
-
ConfigurationValueType *
valueTypeLocalFilePath
()¶ Returns the filepath type for configuration values.
Friends
- friend class ConfigurationManager
- friend class ConfigurationValueType
-