LibrePCB Developers Documentation
WorkspaceSettingsItem Class Referenceabstract

Base class for all workspace settings items. More...

#include <workspacesettingsitem.h>

+ Inheritance diagram for WorkspaceSettingsItem:
+ Collaboration diagram for WorkspaceSettingsItem:


void edited ()
 Signal to notify about changes of the settings value. More...

Public Member Functions

 WorkspaceSettingsItem (QObject *parent=nullptr) noexcept
 WorkspaceSettingsItem (const WorkspaceSettingsItem &other)=delete
 ~WorkspaceSettingsItem () noexcept
virtual void restoreDefault () noexcept=0
 Restore default value. More...
virtual void load (const SExpression &root)=0
 Load value from S-Expression node. More...
virtual void serialize (SExpression &root) const =0
 Serialize the value into S-Expression node. More...
WorkspaceSettingsItemoperator= (const WorkspaceSettingsItem &rhs)=delete

Detailed Description

Constructor & Destructor Documentation

◆ WorkspaceSettingsItem() [1/2]

WorkspaceSettingsItem ( QObject *  parent = nullptr)

◆ WorkspaceSettingsItem() [2/2]

WorkspaceSettingsItem ( const WorkspaceSettingsItem other)

◆ ~WorkspaceSettingsItem()

~WorkspaceSettingsItem ( )

Member Function Documentation

◆ restoreDefault()

virtual void restoreDefault ( )
pure virtualnoexcept

◆ load()

virtual void load ( const SExpression root)
pure virtual

Load value from S-Expression node.

rootRoot node of the settings file.
Implementation must emit the edited() signal.
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).

Implemented in WorkspaceSettingsItem_GenericValueList< T >, WorkspaceSettingsItem_GenericValueList< QList< QUrl > >, WorkspaceSettingsItem_GenericValueList< QStringList >, WorkspaceSettingsItem_GenericValue< T >, WorkspaceSettingsItem_GenericValue< librepcb::LengthUnit >, WorkspaceSettingsItem_GenericValue< QString >, WorkspaceSettingsItem_GenericValue< bool >, WorkspaceSettingsItem_GenericValue< uint >, and WorkspaceSettingsItem_GenericValue< PdfOpenBehavior >.

+ Here is the caller graph for this function:

◆ serialize()

virtual void serialize ( SExpression root) const
pure virtual

◆ operator=()

WorkspaceSettingsItem& operator= ( const WorkspaceSettingsItem rhs)

◆ edited

void edited ( )

Signal to notify about changes of the settings value.

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: