Configuration
Description
The Configuration object is used as a base class of other configuration objects. Mostly it is used to generate a custom configuration group in the configuration tab of the fluentum dashboard. Also it saves the settings taken.
- › Inherits:
- › Inherited by:
ApplicationConfiguration, NetworkConfiguration, SystemConfiguration
Overview
Properties
Methods
Signals
Enumerations
Properties
error
This property holds the most recently occurred error or Configuration.NoError if no error occurred. If the same error occurs multiple times this property does not change. Use the errorOccurred() signal to detect multiple occurrences of the same error.
- › Type:
- › Signal:
errorChanged()
- › Attributes:
Readonly
errorString
This property holds the current human readable error string corresponding to the current value in the error property. It may include additional information such as failure reasons or locations.
- › Type:
String
- › Signal:
errorStringChanged()
- › Attributes:
Readonly
name
This property holds the name property which usually is used as headline in the configuration tab of fluentum.
- › Type:
String
- › Signal:
nameChanged()
- › Attributes:
Writable
objects
This property holds a list of ConfigurationObject objects which should be saved.
- › Type:
- › Signal:
objectsChanged()
- › Attributes:
Readonly
saveMode
This property holds the save mode of this configuration.
- › Type:
- › Default:
- › Signal:
saveModeChanged()
- › Attributes:
Writable
storage
This property holds the Storage where the configuration will be saved.
- › Type:
- › Signal:
storageChanged()
- › Attributes:
Writable
Methods
load()
This method loads the configuration from configured storage.
remove()
This method removes the configuration file from storage.
This method was introduced in InCore 2.7.
save()
This method saves the configuration to the configured storage.
toDataMap()
This method is similar to Object.serializeProperties() but only returns the serialized DataObject.data properties of each ConfigurationItem.
This method was introduced in InCore 2.6.
- › Returns:
Map
Signals
aboutToBeUpdated()
This signal is emitted before the configuration is being updated through object deserialization, e.g. when using in conjunction with an JsonRpcService and loading settings through RPC calls.
errorOccurred()
This signal is emitted whenever an error has occurred, regardless of whether the error property has changed or not. In contrast to the change notification signal of the error property this signal is also emitted several times if a certain error occurs several times in succession.
objectsDataChanged(SignedInteger index)
This signal is emitted whenever the List.dataChanged() signal is emitted, i.e. the item at index in the objects list itself emitted the dataChanged() signal.
updated()
This signal is emitted after the configuration has been updated through object deserialization, e.g. when using in conjunction with an JsonRpcService and loading settings through RPC calls.
Enumerations
Error
This enumeration describes all errors which can occur in Configuration objects. The most recently occurred error is stored in the error property.
Name |
Value |
Description |
|---|---|---|
|
|
No error occurred or was detected. |
|
|
Could not open configuration file for reading. |
|
|
Could not open configuration file for writing. |
|
|
Could not parse configuration file. |
SaveMode
This enumeration describes when and under which circumstances the configuration is saved to the configured storage.
Name |
Value |
Description |
|---|---|---|
|
|
Save configuration manually whenever save() is called. |
|
|
Save configuration whenever settings are updated through property deserialization. |