20#ifndef LIBREPCB_CORE_PCBCOLOR_H
21#define LIBREPCB_CORE_PCBCOLOR_H
46 enum class Flag : quint32 {
50 Q_DECLARE_FLAGS(Flags,
Flag)
64 const QString&
getId() const noexcept {
return mId; }
130 static const QVector<const
PcbColor*>&
all() noexcept;
144 PcbColor(const QString&
id, const QString& nameTr, Flags flags,
145 const QColor& solderResistColor,
146 const QColor& silkscreenColor) noexcept;
Predefined colors relevant for PCB fabrication.
Definition pcbcolor.h:41
const QString & getNameTr() const noexcept
Get the name of the color (human readable and translated)
Definition pcbcolor.h:71
bool isAvailableForSilkscreen() const noexcept
Check if this color is available for silkscreen.
Definition pcbcolor.h:103
bool operator!=(const PcbColor &rhs) const noexcept
Definition pcbcolor.h:110
static const PcbColor & blackMatte() noexcept
Definition pcbcolor.cpp:88
static const PcbColor & greenMatte() noexcept
Definition pcbcolor.cpp:112
static const PcbColor & green() noexcept
Definition pcbcolor.cpp:106
static const PcbColor & blue() noexcept
Definition pcbcolor.cpp:94
const QColor mSolderResistColor
Definition pcbcolor.h:152
static const QVector< const PcbColor * > & all() noexcept
Get a list of all available colors.
Definition pcbcolor.cpp:151
static const PcbColor & white() noexcept
Definition pcbcolor.cpp:130
const QString mNameTr
Definition pcbcolor.h:150
static const PcbColor & yellow() noexcept
Definition pcbcolor.cpp:137
static const PcbColor & other() noexcept
Definition pcbcolor.cpp:144
static const PcbColor & black() noexcept
Definition pcbcolor.cpp:81
const QString & getId() const noexcept
Get the identifier used for serialization.
Definition pcbcolor.h:64
const QColor & toSilkscreenColor() const noexcept
Get the actual color for silkscreen rendering.
Definition pcbcolor.cpp:72
bool operator==(const PcbColor &rhs) const noexcept
Definition pcbcolor.h:109
const Flags mFlags
Definition pcbcolor.h:151
const QColor & toSolderResistColor() const noexcept
Get the actual color for solder resist rendering.
Definition pcbcolor.cpp:67
const QColor mSilkscreenColor
Definition pcbcolor.h:153
bool isAvailableForSolderResist() const noexcept
Check if this color is available for solder resist.
Definition pcbcolor.h:94
Flag
Definition pcbcolor.h:46
@ Silkscreen
Color available for silkscreen.
@ SolderResist
Color available for solder resist.
static const PcbColor & purple() noexcept
Definition pcbcolor.cpp:118
PcbColor & operator=(const PcbColor &rhs) noexcept=delete
const QString mId
Definition pcbcolor.h:149
static const PcbColor & get(const QString &id)
Get a color by its identifier.
Definition pcbcolor.cpp:176
static const PcbColor & red() noexcept
Definition pcbcolor.cpp:124
static const PcbColor & clear() noexcept
Definition pcbcolor.cpp:100
Definition occmodel.cpp:76