![]() |
LibrePCB Developers Documentation
|
Generic implementation of librepcb::WorkspaceSettingsItem for simple, value-type settings. More...
#include <workspacesettingsitem_genericvalue.h>
Inheritance diagram for WorkspaceSettingsItem_GenericValue< T >:
Collaboration diagram for WorkspaceSettingsItem_GenericValue< T >:Public Member Functions | |
| WorkspaceSettingsItem_GenericValue ()=delete | |
| WorkspaceSettingsItem_GenericValue (const WorkspaceSettingsItem_GenericValue &other)=delete | |
| WorkspaceSettingsItem_GenericValue (const QString &key, const T &defaultValue, QObject *parent=nullptr) noexcept | |
| ~WorkspaceSettingsItem_GenericValue () noexcept | |
| const T & | get () const noexcept |
| Get the current value. | |
| void | set (const T &value) noexcept |
| Set the value. | |
| const T & | getDefault () const noexcept |
| Get the default value. | |
| WorkspaceSettingsItem_GenericValue & | operator= (const WorkspaceSettingsItem_GenericValue &rhs)=delete |
Public Member Functions inherited from WorkspaceSettingsItem | |
| WorkspaceSettingsItem ()=delete | |
| WorkspaceSettingsItem (const QString &key, QObject *parent=nullptr) noexcept | |
| WorkspaceSettingsItem (const WorkspaceSettingsItem &other)=delete | |
| virtual | ~WorkspaceSettingsItem () noexcept |
| const QString & | getKey () const noexcept |
| Get the setting key used for serialization. | |
| bool | isDefaultValue () const noexcept |
| Check whether this setting is at its default value (not modified) | |
| bool | isEdited () const noexcept |
| Check whether this setting was edited sinc the last load or save. | |
| void | restoreDefault () noexcept |
| Restore default value. | |
| void | load (const SExpression &root) |
| Load value from S-Expression file. | |
| void | serialize (SExpression &root) const |
| Serialize the value into S-Expression nodes. | |
| WorkspaceSettingsItem & | operator= (const WorkspaceSettingsItem &rhs)=delete |
Private Member Functions | |
| virtual void | restoreDefaultImpl () noexcept override |
| Restore default value. | |
| void | loadImpl (const SExpression &root) override |
| Load value from S-Expression node. | |
| void | serializeImpl (SExpression &root) const override |
| Serialize the value into S-Expression node. | |
Private Attributes | |
| T | mDefaultValue |
| Initial, default value. | |
| T | mCurrentValue |
| Current value. | |
Additional Inherited Members | |
Signals inherited from WorkspaceSettingsItem | |
| void | edited () |
| Signal to notify about changes of the settings value. | |
Protected Member Functions inherited from WorkspaceSettingsItem | |
| void | valueModified () noexcept |
Generic implementation of librepcb::WorkspaceSettingsItem for simple, value-type settings.
|
delete |
|
delete |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Get the current value.
Here is the caller graph for this function:
|
inlinenoexcept |
Set the value.
| value | The new value |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
Get the default value.
|
delete |
|
inlineoverrideprivatevirtualnoexcept |
Restore default value.
Implements WorkspaceSettingsItem.
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Load value from S-Expression node.
| root | S-Expression node of the settings element. |
Implements WorkspaceSettingsItem.
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Serialize the value into S-Expression node.
| root | S-Expression node to be updated. |
Implements WorkspaceSettingsItem.
Here is the call graph for this function:
|
private |
Initial, default value.
|
private |
Current value.