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:

Signals

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)
explicitnoexcept

◆ WorkspaceSettingsItem() [2/2]

WorkspaceSettingsItem ( const WorkspaceSettingsItem other)
delete

◆ ~WorkspaceSettingsItem()

~WorkspaceSettingsItem ( )
noexcept

Member Function Documentation

◆ restoreDefault()

virtual void restoreDefault ( )
pure virtualnoexcept

◆ load()

virtual void load ( const SExpression root)
pure virtual

Load value from S-Expression node.

Parameters
rootRoot node of the settings file.
Note
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)
delete

◆ edited

void edited ( )
signal

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: