20 #ifndef LIBREPCB_CORE_WORKSPACESETTINGSITEM_H 21 #define LIBREPCB_CORE_WORKSPACESETTINGSITEM_H 26 #include "../serialization/sexpression.h" 56 QObject* parent =
nullptr) noexcept;
virtual void loadImpl(const SExpression &root)=0
Load value from S-Expression node.
void serialize(SExpression &root) const
Serialize the value into S-Expression nodes.
Definition: workspacesettingsitem.cpp:66
virtual void restoreDefaultImpl() noexcept=0
Restore default value.
WorkspaceSettingsItem & operator=(const WorkspaceSettingsItem &rhs)=delete
Definition: occmodel.cpp:77
bool mIsDefault
Setting is at default value.
Definition: workspacesettingsitem.h:144
void valueModified() noexcept
Definition: workspacesettingsitem.cpp:48
bool isDefaultValue() const noexcept
Check whether this setting is at its default value (not modified)
Definition: workspacesettingsitem.h:73
WorkspaceSettingsItem()=delete
void load(const SExpression &root)
Load value from S-Expression file.
Definition: workspacesettingsitem.cpp:60
bool isEdited() const noexcept
Check whether this setting was edited sinc the last load or save.
Definition: workspacesettingsitem.h:81
void restoreDefault() noexcept
Restore default value.
Definition: workspacesettingsitem.cpp:54
void edited()
Signal to notify about changes of the settings value.
Base class for all workspace settings items.
Definition: workspacesettingsitem.h:49
virtual ~WorkspaceSettingsItem() noexcept
Definition: workspacesettingsitem.cpp:41
virtual void serializeImpl(SExpression &root) const =0
Serialize the value into S-Expression node.
bool mEdited
Edited since last load or save.
Definition: workspacesettingsitem.h:145
QString mKey
Key used for serialization.
Definition: workspacesettingsitem.h:143
const QString & getKey() const noexcept
Get the setting key used for serialization.
Definition: workspacesettingsitem.h:65
The SExpression class.
Definition: sexpression.h:69