LibrePCB Developers Documentation
WorkspaceSettingsItem_Themes Class Referencefinal

Implementation of librepcb::WorkspaceSettingsItem to store theme configurations. More...

#include <workspacesettingsitem_themes.h>

+ Inheritance diagram for WorkspaceSettingsItem_Themes:
+ Collaboration diagram for WorkspaceSettingsItem_Themes:

Public Member Functions

 WorkspaceSettingsItem_Themes ()=delete
 
 WorkspaceSettingsItem_Themes (const WorkspaceSettingsItem_Themes &other)=delete
 
 WorkspaceSettingsItem_Themes (QObject *parent=nullptr) noexcept
 
 ~WorkspaceSettingsItem_Themes () noexcept
 
const QMap< Uuid, Theme > & getAll () const noexcept
 
const UuidgetActiveUuid () const noexcept
 
const ThemegetActive () const noexcept
 
void setAll (const QMap< Uuid, Theme > &themes) noexcept
 
void setActiveUuid (const Uuid &uuid) noexcept
 
WorkspaceSettingsItem_Themesoperator= (const WorkspaceSettingsItem_Themes &rhs)=delete
 
- Public Member Functions inherited from WorkspaceSettingsItem
 WorkspaceSettingsItem ()=delete
 
 WorkspaceSettingsItem (const QString &key, QObject *parent=nullptr) noexcept
 
 WorkspaceSettingsItem (const WorkspaceSettingsItem &other)=delete
 
virtual ~WorkspaceSettingsItem () noexcept
 
const QString & getKey () const noexcept
 Get the setting key used for serialization. More...
 
bool isDefaultValue () const noexcept
 Check whether this setting is at its default value (not modified) More...
 
bool isEdited () const noexcept
 Check whether this setting was edited sinc the last load or save. More...
 
void restoreDefault () noexcept
 Restore default value. More...
 
void load (const SExpression &root)
 Load value from S-Expression file. More...
 
void serialize (SExpression &root) const
 Serialize the value into S-Expression nodes. More...
 
WorkspaceSettingsItemoperator= (const WorkspaceSettingsItem &rhs)=delete
 

Private Member Functions

virtual void restoreDefaultImpl () noexcept override
 Restore default value. More...
 
void loadImpl (const SExpression &root) override
 Load value from S-Expression node. More...
 
void serializeImpl (SExpression &root) const override
 Serialize the value into S-Expression node. More...
 
void addTheme (const Theme &theme) noexcept
 
void updateActiveTheme () noexcept
 

Private Attributes

QMap< Uuid, ThememThemes
 
Uuid mActiveUuid
 
Theme mActiveTheme
 

Additional Inherited Members

- Signals inherited from WorkspaceSettingsItem
void edited ()
 Signal to notify about changes of the settings value. More...
 
- Protected Member Functions inherited from WorkspaceSettingsItem
void valueModified () noexcept
 

Detailed Description

Implementation of librepcb::WorkspaceSettingsItem to store theme configurations.

Constructor & Destructor Documentation

◆ WorkspaceSettingsItem_Themes() [1/3]

◆ WorkspaceSettingsItem_Themes() [2/3]

◆ WorkspaceSettingsItem_Themes() [3/3]

WorkspaceSettingsItem_Themes ( QObject *  parent = nullptr)
explicitnoexcept

◆ ~WorkspaceSettingsItem_Themes()

Member Function Documentation

◆ getAll()

const QMap<Uuid, Theme>& getAll ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getActiveUuid()

const Uuid& getActiveUuid ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getActive()

const Theme& getActive ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAll()

void setAll ( const QMap< Uuid, Theme > &  themes)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActiveUuid()

void setActiveUuid ( const Uuid uuid)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

WorkspaceSettingsItem_Themes& operator= ( const WorkspaceSettingsItem_Themes rhs)
delete
+ Here is the caller graph for this function:

◆ restoreDefaultImpl()

void restoreDefaultImpl ( )
overrideprivatevirtualnoexcept

Restore default value.

Note
Implementation must emit the edited() signal if the value has changed.

Implements WorkspaceSettingsItem.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadImpl()

void loadImpl ( const SExpression root)
overrideprivatevirtual

Load value from S-Expression node.

Parameters
rootS-Expression node of the settings element.
Note
Implementation must emit the edited() signal if the value has changed.
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).

Implements WorkspaceSettingsItem.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serializeImpl()

void serializeImpl ( SExpression root) const
overrideprivatevirtual

Serialize the value into S-Expression node.

Parameters
rootS-Expression node to be updated.

Implements WorkspaceSettingsItem.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTheme()

void addTheme ( const Theme theme)
privatenoexcept
+ Here is the caller graph for this function:

◆ updateActiveTheme()

void updateActiveTheme ( )
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mThemes

QMap<Uuid, Theme> mThemes
private

◆ mActiveUuid

Uuid mActiveUuid
private

◆ mActiveTheme

Theme mActiveTheme
private

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