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