20#ifndef LIBREPCB_CORE_LAYER_H
21#define LIBREPCB_CORE_LAYER_H
43 Q_DECLARE_TR_FUNCTIONS(
Layer)
47 enum class Flag : quint32 {
56 SolderPaste = (1 << 22),
57 BoardEdge = (1 << 23),
58 PackageOutline = (1 << 24),
59 PackageCourtyard = (1 << 25),
60 PolygonsRepresentAreas = (1 << 26),
62 Q_DECLARE_FLAGS(Flags,
Flag)
76 const QString&
getId() const noexcept {
return mId; }
209 bool operator==(const
Layer& rhs) const noexcept {
return this == &rhs; }
265 static const QVector<const
Layer*>&
all() noexcept;
276 static const
Layer&
get(const QString&
id);
289 Layer(const QString&
id, const QString& nameTr, const QString& themeColor,
290 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:42
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:83
static const Layer & symbolNames() noexcept
Definition: layer.cpp:128
bool isBottom() const noexcept
Check if this is a bottom board layer.
Definition: layer.h:127
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:160
bool isTop() const noexcept
Check if this is a top board layer.
Definition: layer.h:113
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:294
const QString & getThemeColor() const noexcept
Get the name of the corresponding theme color.
Definition: layer.h:92
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:76
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:106
bool isSchematic() const noexcept
Check if this is a schematic layer.
Definition: layer.h:99
const QString mThemeColor
Definition: layer.h:295
const Flags mFlags
Definition: layer.h:296
static const Layer & boardMeasures() noexcept
Definition: layer.cpp:173
bool isPackageCourtyard() const noexcept
Check if this is a package courtyard layer.
Definition: layer.h:176
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:167
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:47
@ 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:148
bool getPolygonsRepresentAreas() const noexcept
Check if polygons on this layers always represent areas.
Definition: layer.h:185
bool operator!=(const Layer &rhs) const noexcept
Definition: layer.h:210
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:194
const QString mId
Definition: layer.h:293
static const Layer & schematicSheetFrames() noexcept
Definition: layer.cpp:92
bool isStopMask() const noexcept
Check if this is a stop mask layer.
Definition: layer.h:141
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:120
bool isCopper() const noexcept
Check if this is a copper layer.
Definition: layer.h:134
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