LibrePCB Developers Documentation
Theme Class Referencefinal

Theme class as used by librepcb::WorkspaceSettingsItem_Themes. More...

#include <theme.h>

+ Collaboration diagram for Theme:

Classes

struct  Color
 

Public Types

enum class  GridStyle : int
 

Public Member Functions

 Theme (const Uuid &uuid=Uuid::createRandom(), const QString &name="Unnamed") noexcept
 
 Theme (const Uuid &uuid, const QString &name, const Theme &copyFrom) noexcept
 
 Theme (const Theme &other) noexcept
 
 ~Theme () noexcept
 
const UuidgetUuid () const noexcept
 
const QString & getName () const noexcept
 
const QList< ThemeColor > & getColors () const noexcept
 
const ThemeColorgetColor (const QString &identifier) const noexcept
 
GridStyle getSchematicGridStyle () const noexcept
 
GridStyle getBoardGridStyle () const noexcept
 
void setName (const QString &name) noexcept
 
void setColors (const QList< ThemeColor > &colors) noexcept
 
void setSchematicGridStyle (GridStyle style) noexcept
 
void setBoardGridStyle (GridStyle style) noexcept
 
void restoreDefaults () noexcept
 
void load (const SExpression &root)
 
void serialize (SExpression &root) const
 
bool operator== (const Theme &rhs) const noexcept
 
bool operator!= (const Theme &rhs) const noexcept
 
Themeoperator= (const Theme &rhs) noexcept
 

Static Public Member Functions

static const QSet< QString > & getCopperColorNames () noexcept
 
static QString getGrabAreaColorName (const QString &outlineColorName) noexcept
 

Private Member Functions

void addColor (const QString &id, const char *category, const char *name, const QColor &primary, const QColor &secondary, const QString &nameSuffix=QString()) noexcept
 
SExpressionaddNode (const QString &name) noexcept
 

Private Attributes

QMap< QString, SExpressionmNodes
 
Uuid mUuid
 
QString mName
 
QList< ThemeColormColors
 
GridStyle mSchematicGridStyle
 
GridStyle mBoardGridStyle
 

Detailed Description

Member Enumeration Documentation

◆ GridStyle

enum class GridStyle : int
strong
Enumerator
None 
Dots 
Lines 

Constructor & Destructor Documentation

◆ Theme() [1/3]

Theme ( const Uuid uuid = Uuid::createRandom(),
const QString &  name = "Unnamed" 
)
explicitnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Theme() [2/3]

Theme ( const Uuid uuid,
const QString &  name,
const Theme copyFrom 
)
noexcept

◆ Theme() [3/3]

Theme ( const Theme other)
noexcept

◆ ~Theme()

~Theme ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getName()

const QString & getName ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getColors()

const QList< ThemeColor > & getColors ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getColor()

const ThemeColor & getColor ( const QString &  identifier) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSchematicGridStyle()

GridStyle getSchematicGridStyle ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getBoardGridStyle()

GridStyle getBoardGridStyle ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ setName()

void setName ( const QString &  name)
noexcept

◆ setColors()

void setColors ( const QList< ThemeColor > &  colors)
noexcept
+ Here is the call graph for this function:

◆ setSchematicGridStyle()

void setSchematicGridStyle ( GridStyle  style)
noexcept

◆ setBoardGridStyle()

void setBoardGridStyle ( GridStyle  style)
noexcept

◆ restoreDefaults()

void restoreDefaults ( )
noexcept
+ Here is the call graph for this function:

◆ load()

void load ( const SExpression root)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

void serialize ( SExpression root) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==()

bool operator== ( const Theme rhs) const
noexcept

◆ operator!=()

bool operator!= ( const Theme rhs) const
inlinenoexcept

◆ operator=()

Theme & operator= ( const Theme rhs)
noexcept

◆ getCopperColorNames()

const QSet< QString > & getCopperColorNames ( )
staticnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGrabAreaColorName()

QString getGrabAreaColorName ( const QString &  outlineColorName)
staticnoexcept
+ Here is the caller graph for this function:

◆ addColor()

void addColor ( const QString &  id,
const char *  category,
const char *  name,
const QColor &  primary,
const QColor &  secondary,
const QString &  nameSuffix = QString() 
)
privatenoexcept

◆ addNode()

SExpression & addNode ( const QString &  name)
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mNodes

QMap<QString, SExpression> mNodes
private

◆ mUuid

Uuid mUuid
private

◆ mName

QString mName
private

◆ mColors

QList<ThemeColor> mColors
private

◆ mSchematicGridStyle

GridStyle mSchematicGridStyle
private

◆ mBoardGridStyle

GridStyle mBoardGridStyle
private

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