Generic implementation of librepcb::WorkspaceSettingsItem for simple, value-type settings.
More...
#include <workspacesettingsitem_genericvalue.h>
template<typename T>
class librepcb::WorkspaceSettingsItem_GenericValue< T >
Generic implementation of librepcb::WorkspaceSettingsItem for simple, value-type settings.
◆ WorkspaceSettingsItem_GenericValue() [1/3]
◆ WorkspaceSettingsItem_GenericValue() [2/3]
◆ WorkspaceSettingsItem_GenericValue() [3/3]
◆ ~WorkspaceSettingsItem_GenericValue()
◆ get()
Get the current value.
- Returns
- Current value
◆ set()
template<typename T >
void set |
( |
const T & |
value | ) |
|
|
inlinenoexcept |
Set the value.
- Parameters
-
◆ getDefault()
template<typename T >
const T & getDefault |
( |
| ) |
const |
|
inlinenoexcept |
Get the default value.
- Returns
- Default value
◆ operator=()
◆ restoreDefaultImpl()
template<typename T >
virtual void restoreDefaultImpl |
( |
| ) |
|
|
inlineoverrideprivatevirtualnoexcept |
◆ loadImpl()
template<typename T >
|
inlineoverrideprivatevirtual |
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).
Implements WorkspaceSettingsItem.
◆ serializeImpl()
template<typename T >
|
inlineoverrideprivatevirtual |
Serialize the value into S-Expression node.
- Parameters
-
root | S-Expression node to be updated. |
Implements WorkspaceSettingsItem.
◆ mDefaultValue
◆ mCurrentValue
The documentation for this class was generated from the following file: