20#ifndef LIBREPCB_CORE_THEME_H
21#define LIBREPCB_CORE_THEME_H
26#include "../serialization/sexpression.h"
27#include "../types/uuid.h"
45 Q_DECLARE_TR_FUNCTIONS(
Theme)
131 const QString& name =
"Unnamed") noexcept;
132 Theme(const
Uuid& uuid, const QString& name, const
Theme& copyFrom) noexcept;
147 void setName(
const QString& name)
noexcept;
148 void setColors(
const QList<ThemeColor>& colors)
noexcept;
158 bool operator==(const
Theme& rhs) const noexcept;
159 bool operator!=(const
Theme& rhs) const noexcept {
return !(*
this == rhs); }
167 void addColor(const QString&
id, const
char* category, const
char* name,
168 const QColor& primary, const QColor& secondary,
169 const QString& nameSuffix = QString()) noexcept;
The SExpression class.
Definition sexpression.h:69
Color settings as used by librepcb::Theme.
Definition themecolor.h:43
Theme class as used by librepcb::WorkspaceSettingsItem_Themes.
Definition theme.h:44
GridStyle mBoardGridStyle
Definition theme.h:179
const ThemeColor & getColor(const QString &identifier) const noexcept
Definition theme.cpp:214
GridStyle mSchematicGridStyle
Definition theme.h:178
GridStyle
Definition theme.h:49
static QString getGrabAreaColorName(const QString &outlineColorName) noexcept
Definition theme.cpp:357
const QList< ThemeColor > & getColors() const noexcept
Definition theme.h:139
const QString & getName() const noexcept
Definition theme.h:138
static const QSet< QString > & getCopperColorNames() noexcept
Definition theme.cpp:345
Uuid mUuid
Definition theme.h:175
QList< ThemeColor > mColors
Definition theme.h:177
QMap< QString, SExpression > mNodes
Definition theme.h:173
void load(const SExpression &root)
Definition theme.cpp:285
QString mName
Definition theme.h:176
Theme & operator=(const Theme &rhs) noexcept
Definition theme.cpp:331
void setSchematicGridStyle(GridStyle style) noexcept
Definition theme.cpp:263
GridStyle getSchematicGridStyle() const noexcept
Definition theme.h:141
SExpression & addNode(const QString &name) noexcept
Definition theme.cpp:380
void serialize(SExpression &root) const
Definition theme.cpp:307
const Uuid & getUuid() const noexcept
Definition theme.h:137
void setBoardGridStyle(GridStyle style) noexcept
Definition theme.cpp:270
void restoreDefaults() noexcept
Definition theme.cpp:281
GridStyle getBoardGridStyle() const noexcept
Definition theme.h:144
void setColors(const QList< ThemeColor > &colors) noexcept
Definition theme.cpp:234
void addColor(const QString &id, const char *category, const char *name, const QColor &primary, const QColor &secondary, const QString &nameSuffix=QString()) noexcept
Definition theme.cpp:373
void setName(const QString &name) noexcept
Definition theme.cpp:230
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
static Uuid createRandom() noexcept
Create a new random UUID.
Definition uuid.cpp:104
Definition occmodel.cpp:76
static constexpr const char * sSchematicOverlays
Definition theme.h:58
static constexpr const char * sBoardPlatedCutouts
Definition theme.h:86
static constexpr const char * sSchematicPinNumbers
Definition theme.h:78
static constexpr const char * sBoardCourtyardTop
Definition theme.h:107
static constexpr const char * sBoardCopperTop
Definition theme.h:123
static constexpr const char * sBoardSolderPasteBot
Definition theme.h:118
static constexpr const char * sBoardGlueBot
Definition theme.h:122
static constexpr const char * sSchematicComments
Definition theme.h:67
static constexpr const char * sBoardGrabAreasTop
Definition theme.h:109
static constexpr const char * sSchematicInfoBox
Definition theme.h:59
static constexpr const char * sBoardHiddenGrabAreasTop
Definition theme.h:111
static constexpr const char * sSchematicNetLabelAnchors
Definition theme.h:65
static constexpr const char * sSchematicOptionalPins
Definition theme.h:74
static constexpr const char * sSchematicGrabAreas
Definition theme.h:70
static constexpr const char * sBoardDocumentationBot
Definition theme.h:104
static constexpr const char * sBoardCopperInner
Definition theme.h:124
static constexpr const char * sBoardDrcMarker
Definition theme.h:83
static constexpr const char * sBoardValuesTop
Definition theme.h:99
static constexpr const char * sBoardSelection
Definition theme.h:82
static constexpr const char * sBoardFinishBot
Definition theme.h:120
static constexpr const char * sSchematicDocumentation
Definition theme.h:66
static constexpr const char * sBoardDocumentationTop
Definition theme.h:103
static constexpr const char * sBoardZones
Definition theme.h:90
static constexpr const char * sBoardBackground
Definition theme.h:79
static constexpr const char * sSchematicPinNames
Definition theme.h:77
static constexpr const char * sBoardPackageOutlinesTop
Definition theme.h:105
static constexpr const char * sSchematicPinLines
Definition theme.h:76
static constexpr const char * sBoardHiddenGrabAreasBot
Definition theme.h:112
static constexpr const char * sBoardDocumentation
Definition theme.h:94
static constexpr const char * sBoardValuesBot
Definition theme.h:100
static constexpr const char * sSchematicNames
Definition theme.h:72
static constexpr const char * sBoardNamesTop
Definition theme.h:97
static constexpr const char * sBoardPackageOutlinesBot
Definition theme.h:106
static constexpr const char * sSchematicHiddenGrabAreas
Definition theme.h:71
static constexpr const char * sBoardSolderPasteTop
Definition theme.h:117
static constexpr const char * sBoardOverlays
Definition theme.h:80
static constexpr const char * sBoardMeasures
Definition theme.h:92
static constexpr const char * sBoardCourtyardBot
Definition theme.h:108
static constexpr const char * sBoardGlueTop
Definition theme.h:121
static constexpr const char * sBoardGrabAreasBot
Definition theme.h:110
static constexpr const char * sBoardNamesBot
Definition theme.h:98
static constexpr const char * sBoardPads
Definition theme.h:88
static constexpr const char * sBoardStopMaskTop
Definition theme.h:115
static constexpr const char * sSchematicSelection
Definition theme.h:60
static constexpr const char * sBoardAirWires
Definition theme.h:91
static constexpr const char * sSchematicReferences
Definition theme.h:61
static constexpr const char * sSchematicNetLabels
Definition theme.h:64
static constexpr const char * sBoardVias
Definition theme.h:89
static constexpr const char * sBoardInfoBox
Definition theme.h:81
static constexpr const char * sSchematicGuide
Definition theme.h:68
static constexpr const char * sBoardFrames
Definition theme.h:84
static constexpr const char * sBoardReferencesBot
Definition theme.h:114
static constexpr const char * sBoardReferencesTop
Definition theme.h:113
static constexpr const char * sSchematicRequiredPins
Definition theme.h:75
static constexpr const char * sBoardComments
Definition theme.h:95
static constexpr const char * sBoardGuide
Definition theme.h:96
static constexpr const char * sBoardLegendTop
Definition theme.h:101
static constexpr const char * sBoardOutlines
Definition theme.h:85
static constexpr const char * sSchematicBackground
Definition theme.h:57
static constexpr const char * sBoardStopMaskBot
Definition theme.h:116
static constexpr const char * sBoardLegendBot
Definition theme.h:102
static constexpr const char * sSchematicOutlines
Definition theme.h:69
static constexpr const char * sSchematicFrames
Definition theme.h:62
static constexpr const char * sSchematicValues
Definition theme.h:73
static constexpr const char * sBoardFinishTop
Definition theme.h:119
static constexpr const char * sBoardAlignment
Definition theme.h:93
static constexpr const char * sBoardCopperBot
Definition theme.h:125
static constexpr const char * sBoardHoles
Definition theme.h:87
static constexpr const char * sSchematicWires
Definition theme.h:63