LibrePCB Developers Documentation
WorkspaceSettingsItem_KeyboardShortcuts Class Referencefinal

Implementation of librepcb::WorkspaceSettingsItem to store keyboard shortcuts settings. More...

#include <workspacesettingsitem_keyboardshortcuts.h>

+ Inheritance diagram for WorkspaceSettingsItem_KeyboardShortcuts:
+ Collaboration diagram for WorkspaceSettingsItem_KeyboardShortcuts:

Public Member Functions

 WorkspaceSettingsItem_KeyboardShortcuts ()=delete
 
 WorkspaceSettingsItem_KeyboardShortcuts (const WorkspaceSettingsItem_KeyboardShortcuts &other)=delete
 
 WorkspaceSettingsItem_KeyboardShortcuts (QObject *parent=nullptr) noexcept
 
 ~WorkspaceSettingsItem_KeyboardShortcuts () noexcept
 
const QMap< QString, QList< QKeySequence > > & get () const noexcept
 
void set (const QMap< QString, QList< QKeySequence >> &overrides) noexcept
 
WorkspaceSettingsItem_KeyboardShortcutsoperator= (const WorkspaceSettingsItem_KeyboardShortcuts &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...
 

Private Attributes

QMap< QString, SExpressionmNodes
 
QMap< QString, QList< QKeySequence > > mOverrides
 

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 keyboard shortcuts settings.

Constructor & Destructor Documentation

◆ WorkspaceSettingsItem_KeyboardShortcuts() [1/3]

◆ WorkspaceSettingsItem_KeyboardShortcuts() [2/3]

◆ WorkspaceSettingsItem_KeyboardShortcuts() [3/3]

WorkspaceSettingsItem_KeyboardShortcuts ( QObject *  parent = nullptr)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~WorkspaceSettingsItem_KeyboardShortcuts()

+ Here is the caller graph for this function:

Member Function Documentation

◆ get()

const QMap<QString, QList<QKeySequence> >& get ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set()

void set ( const QMap< QString, QList< QKeySequence >> &  overrides)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

+ 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:

Member Data Documentation

◆ mNodes

QMap<QString, SExpression> mNodes
private

◆ mOverrides

QMap<QString, QList<QKeySequence> > mOverrides
private

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