20#ifndef LIBREPCB_CORE_WORKSPACESETTINGSITEM_GENERICVALUE_H
21#define LIBREPCB_CORE_WORKSPACESETTINGSITEM_GENERICVALUE_H
51 const QString& key,
const T& defaultValue,
52 QObject* parent =
nullptr) noexcept
70 void set(
const T& value)
noexcept {
The SExpression class.
Definition: sexpression.h:69
SExpression & getChild(int index)
Definition: sexpression.cpp:86
void appendChild(std::unique_ptr< SExpression > child)
Definition: sexpression.cpp:217
Generic implementation of librepcb::WorkspaceSettingsItem for simple, value-type settings.
Definition: workspacesettingsitem_genericvalue.h:44
void loadImpl(const SExpression &root) override
Load value from S-Expression node.
Definition: workspacesettingsitem_genericvalue.h:97
T mCurrentValue
Current value.
Definition: workspacesettingsitem_genericvalue.h:110
WorkspaceSettingsItem_GenericValue(const WorkspaceSettingsItem_GenericValue &other)=delete
WorkspaceSettingsItem_GenericValue(const QString &key, const T &defaultValue, QObject *parent=nullptr) noexcept
Definition: workspacesettingsitem_genericvalue.h:50
void set(const T &value) noexcept
Set the value.
Definition: workspacesettingsitem_genericvalue.h:70
T mDefaultValue
Initial, default value.
Definition: workspacesettingsitem_genericvalue.h:109
WorkspaceSettingsItem_GenericValue()=delete
~WorkspaceSettingsItem_GenericValue() noexcept
Definition: workspacesettingsitem_genericvalue.h:56
WorkspaceSettingsItem_GenericValue & operator=(const WorkspaceSettingsItem_GenericValue &rhs)=delete
void serializeImpl(SExpression &root) const override
Serialize the value into S-Expression node.
Definition: workspacesettingsitem_genericvalue.h:104
const T & getDefault() const noexcept
Get the default value.
Definition: workspacesettingsitem_genericvalue.h:82
const T & get() const noexcept
Get the current value.
Definition: workspacesettingsitem_genericvalue.h:63
virtual void restoreDefaultImpl() noexcept override
Restore default value.
Definition: workspacesettingsitem_genericvalue.h:92
Base class for all workspace settings items.
Definition: workspacesettingsitem.h:49
void valueModified() noexcept
Definition: workspacesettingsitem.cpp:48
Definition: occmodel.cpp:77