20#ifndef LIBREPCB_CORE_LAYER_H
21#define LIBREPCB_CORE_LAYER_H
41 Q_DECLARE_TR_FUNCTIONS(
Layer)
45 enum class Flag : quint32 {
54 SolderPaste = (1 << 22),
55 BoardEdge = (1 << 23),
56 PackageOutline = (1 << 24),
57 PackageCourtyard = (1 << 25),
58 PolygonsRepresentAreas = (1 << 26),
60 Q_DECLARE_FLAGS(Flags,
Flag)
74 const QString&
getId() const noexcept {
return mId; }
207 bool operator==(const
Layer& rhs) const noexcept {
return this == &rhs; }
263 static const QVector<const
Layer*>&
all() noexcept;
274 static const
Layer&
get(const QString&
id);
287 Layer(const QString&
id, const QString& nameTr, const QString& themeColor,
288 Flags flags) noexcept;
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:73
The Layer class provides all supported geometry layers.
Definition: layer.h:40
static const Layer & topLegend() noexcept
Definition: layer.cpp:227
static const Layer * copper(int number) noexcept
Definition: layer.cpp:387
const QString & getNameTr() const noexcept
Get the name of the Layer (human readable and translated)
Definition: layer.h:81
static const Layer & symbolNames() noexcept
Definition: layer.cpp:128
bool isBottom() const noexcept
Check if this is a bottom board layer.
Definition: layer.h:125
static const Layer & boardGuide() noexcept
Definition: layer.cpp:197
const Layer & mirrored(int innerLayers=-1) const noexcept
Mirror this layer to the other board side.
Definition: layer.cpp:59
static const Layer & boardSheetFrames() noexcept
Definition: layer.cpp:146
static const Layer & symbolOutlines() noexcept
Definition: layer.cpp:116
static int innerCopperCount() noexcept
Definition: layer.cpp:383
static const Layer & topSolderPaste() noexcept
Definition: layer.cpp:313
static bool lessThan(const Layer *a, const Layer *b) noexcept
Comparison for sorting layers by function.
Definition: layer.cpp:458
static const Layer & topFinish() noexcept
Definition: layer.cpp:327
static const Layer & schematicDocumentation() noexcept
Definition: layer.cpp:98
static const Layer & schematicGuide() noexcept
Definition: layer.cpp:110
static const Layer & topCourtyard() noexcept
Definition: layer.cpp:269
bool isBoardEdge() const noexcept
Check if this is a layer defining the board edge.
Definition: layer.h:158
bool isTop() const noexcept
Check if this is a top board layer.
Definition: layer.h:111
static const Layer & botCopper() noexcept
Definition: layer.cpp:357
static const QVector< const Layer * > & all() noexcept
Get a list of all available layers.
Definition: layer.cpp:397
static const Layer & boardPlatedCutouts() noexcept
Definition: layer.cpp:166
static const Layer & botSolderPaste() noexcept
Definition: layer.cpp:320
const QString mNameTr
Definition: layer.h:292
const QString & getThemeColor() const noexcept
Get the name of the corresponding theme color.
Definition: layer.h:90
static const Layer & boardOutlines() noexcept
Definition: layer.cpp:152
static const Layer & get(const QString &id)
Get a layer by its identifier.
Definition: layer.cpp:449
static const Layer & symbolValues() noexcept
Definition: layer.cpp:134
static const Layer & topNames() noexcept
Definition: layer.cpp:203
static const Layer & botGlue() noexcept
Definition: layer.cpp:345
static const Layer & botDocumentation() noexcept
Definition: layer.cpp:246
const QString & getId() const noexcept
Get the identifier used for serialization.
Definition: layer.h:74
static const Layer & boardAlignment() noexcept
Definition: layer.cpp:179
static const Layer & botPackageOutlines() noexcept
Definition: layer.cpp:261
static const Layer & boardDocumentation() noexcept
Definition: layer.cpp:185
static const Layer & topStopMask() noexcept
Definition: layer.cpp:299
bool isBoard() const noexcept
Check if this is a board layer.
Definition: layer.h:104
bool isSchematic() const noexcept
Check if this is a schematic layer.
Definition: layer.h:97
const QString mThemeColor
Definition: layer.h:293
const Flags mFlags
Definition: layer.h:294
static const Layer & boardMeasures() noexcept
Definition: layer.cpp:173
bool isPackageCourtyard() const noexcept
Check if this is a package courtyard layer.
Definition: layer.h:174
static const Layer & botNames() noexcept
Definition: layer.cpp:209
static const Layer & topPackageOutlines() noexcept
Definition: layer.cpp:253
static const Layer & botLegend() noexcept
Definition: layer.cpp:233
static const Layer & topCopper() noexcept
Definition: layer.cpp:351
bool isPackageOutline() const noexcept
Check if this is a package outline layer.
Definition: layer.h:165
static const Layer & symbolPinNames() noexcept
Definition: layer.cpp:140
static const Layer & schematicComments() noexcept
Definition: layer.cpp:104
static const Layer & boardComments() noexcept
Definition: layer.cpp:191
Flag
Definition: layer.h:45
@ NumberMask
Copper layer number (0 = top, 64 = bottom)..
static const Layer & botStopMask() noexcept
Definition: layer.cpp:306
static const Layer & symbolHiddenGrabAreas() noexcept
Definition: layer.cpp:122
bool isSolderPaste() const noexcept
Check if this is a solder paste layer.
Definition: layer.h:146
bool getPolygonsRepresentAreas() const noexcept
Check if polygons on this layers always represent areas.
Definition: layer.h:183
bool operator!=(const Layer &rhs) const noexcept
Definition: layer.h:208
static const Layer & boardCutouts() noexcept
Definition: layer.cpp:159
static const QVector< const Layer * > & innerCopper() noexcept
Definition: layer.cpp:364
static const Layer & botValues() noexcept
Definition: layer.cpp:221
int getCopperNumber() const noexcept
Get the copper layer number.
Definition: layer.h:192
const QString mId
Definition: layer.h:291
static const Layer & schematicSheetFrames() noexcept
Definition: layer.cpp:92
bool isStopMask() const noexcept
Check if this is a stop mask layer.
Definition: layer.h:139
static const Layer & botCourtyard() noexcept
Definition: layer.cpp:277
static const Layer & topValues() noexcept
Definition: layer.cpp:215
static const Layer & topGlue() noexcept
Definition: layer.cpp:339
bool isInner() const noexcept
Check if this is an inner board layer.
Definition: layer.h:118
bool isCopper() const noexcept
Check if this is a copper layer.
Definition: layer.h:132
static const Layer & botFinish() noexcept
Definition: layer.cpp:333
static const Layer & topDocumentation() noexcept
Definition: layer.cpp:239
static const Layer & topHiddenGrabAreas() noexcept
Definition: layer.cpp:285
static const Layer & botHiddenGrabAreas() noexcept
Definition: layer.cpp:292
The Schematic class represents one schematic page of a project and is always part of a circuit.
Definition: schematic.h:74
Definition: occmodel.cpp:77