Base class for all workspace settings items.
More...
#include <workspacesettingsitem.h>
◆ WorkspaceSettingsItem() [1/3]
◆ WorkspaceSettingsItem() [2/3]
◆ WorkspaceSettingsItem() [3/3]
◆ ~WorkspaceSettingsItem()
◆ getKey()
const QString & getKey |
( |
| ) |
const |
|
inlinenoexcept |
Get the setting key used for serialization.
- Returns
- Serialization key.
◆ isDefaultValue()
bool isDefaultValue |
( |
| ) |
const |
|
inlinenoexcept |
Check whether this setting is at its default value (not modified)
- Return values
-
true | Default is active, value is not stored in settings file. |
false | Value has been modified and is stored in settings file. |
◆ isEdited()
Check whether this setting was edited sinc the last load or save.
- Return values
-
true | Value has been modified. |
false | Value not modified, settings file content is still valid. |
◆ restoreDefault()
◆ load()
Load value from S-Expression file.
- Parameters
-
◆ serialize()
Serialize the value into S-Expression nodes.
- Parameters
-
root | S-Expression node to be updated. |
◆ operator=()
◆ edited
Signal to notify about changes of the settings value.
◆ valueModified()
◆ restoreDefaultImpl()
virtual void restoreDefaultImpl |
( |
| ) |
|
|
protectedpure virtualnoexcept |
Restore default value.
- Note
- Implementation must emit the edited() signal if the value has changed.
Implemented in WorkspaceSettingsItem_GenericValue< T >, WorkspaceSettingsItem_GenericValue< QString >, WorkspaceSettingsItem_GenericValue< librepcb::LengthUnit >, WorkspaceSettingsItem_GenericValue< uint >, WorkspaceSettingsItem_GenericValue< bool >, WorkspaceSettingsItem_GenericValueList< T >, WorkspaceSettingsItem_GenericValueList< QStringList >, WorkspaceSettingsItem_GenericValueList< QList< QUrl > >, WorkspaceSettingsItem_GenericValueList< QSet< QString > >, WorkspaceSettingsItem_KeyboardShortcuts, and WorkspaceSettingsItem_Themes.
◆ loadImpl()
Load value from S-Expression node.
- Parameters
-
root | S-Expression node of the settings element. |
- Note
- Implementation must emit the edited() signal if the value has changed.
-
Implementation must be atomic, i.e. either the value must be loaded completely from file, or left at the old value (in case of errors).
Implemented in WorkspaceSettingsItem_GenericValue< T >, WorkspaceSettingsItem_GenericValue< QString >, WorkspaceSettingsItem_GenericValue< librepcb::LengthUnit >, WorkspaceSettingsItem_GenericValue< uint >, WorkspaceSettingsItem_GenericValue< bool >, WorkspaceSettingsItem_GenericValueList< T >, WorkspaceSettingsItem_GenericValueList< QStringList >, WorkspaceSettingsItem_GenericValueList< QList< QUrl > >, WorkspaceSettingsItem_GenericValueList< QSet< QString > >, WorkspaceSettingsItem_KeyboardShortcuts, and WorkspaceSettingsItem_Themes.
◆ serializeImpl()
Serialize the value into S-Expression node.
- Parameters
-
root | S-Expression node to be updated. |
Implemented in WorkspaceSettingsItem_GenericValue< T >, WorkspaceSettingsItem_GenericValue< QString >, WorkspaceSettingsItem_GenericValue< librepcb::LengthUnit >, WorkspaceSettingsItem_GenericValue< uint >, WorkspaceSettingsItem_GenericValue< bool >, WorkspaceSettingsItem_GenericValueList< T >, WorkspaceSettingsItem_GenericValueList< QStringList >, WorkspaceSettingsItem_GenericValueList< QList< QUrl > >, WorkspaceSettingsItem_GenericValueList< QSet< QString > >, WorkspaceSettingsItem_KeyboardShortcuts, and WorkspaceSettingsItem_Themes.
◆ mKey
Key used for serialization.
◆ mIsDefault
Setting is at default value.
◆ mEdited
Edited since last load or save.
The documentation for this class was generated from the following files: