20#ifndef LIBREPCB_CORE_ZONE_H
21#define LIBREPCB_CORE_ZONE_H
26#include "../serialization/serializableobjectlist.h"
44 Q_DECLARE_TR_FUNCTIONS(
Zone)
52 Q_DECLARE_FLAGS(Layers,
Layer)
54 enum class
Rule : quint32 {
57 NoExposure = (1 << 2),
59 All = NoCopper | NoPlanes | NoExposure | NoDevices,
61 Q_DECLARE_FLAGS(Rules,
Rule)
77 Zone(
const Uuid& uuid, Layers layers, Rules rules,
78 const Path& outline)
noexcept;
119 static constexpr const char*
tagname =
"zone";
132Q_DECLARE_OPERATORS_FOR_FLAGS(librepcb::Zone::Layers)
133Q_DECLARE_OPERATORS_FOR_FLAGS(librepcb::Zone::Rules)
The Layer class provides all supported geometry layers.
Definition: layer.h:42
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition: path.h:58
The SExpression class.
Definition: sexpression.h:69
The Signal class is used to emit signals on non-QObject derived classes.
Definition: signalslot.h:65
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
The Zone class.
Definition: zone.h:43
bool setOutline(const Path &outline) noexcept
Definition: zone.cpp:103
Layers getLayers() const noexcept
Definition: zone.h:84
Layer
Definition: zone.h:47
Rule
Definition: zone.h:54
Uuid mUuid
Definition: zone.h:108
~Zone() noexcept
Definition: zone.cpp:76
Event
Definition: zone.h:64
bool operator!=(const Zone &rhs) const noexcept
Definition: zone.h:104
bool setRules(Rules rules) noexcept
Definition: zone.cpp:93
Signal< Zone, Event > onEdited
Definition: zone.h:70
Rules mRules
Definition: zone.h:110
Zone & operator=(const Zone &rhs) noexcept
Definition: zone.cpp:145
bool operator==(const Zone &rhs) const noexcept
Definition: zone.cpp:137
Path mOutline
Definition: zone.h:111
bool setLayers(Layers layers) noexcept
Definition: zone.cpp:83
Rules getRules() const noexcept
Definition: zone.h:85
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition: zone.cpp:117
const Uuid & getUuid() const noexcept
Definition: zone.h:83
const Path & getOutline() const noexcept
Definition: zone.h:86
Slot< Zone, Event > OnEditedSlot
Definition: zone.h:71
Layers mLayers
Definition: zone.h:109
Definition: occmodel.cpp:77
static constexpr const char * tagname
Definition: zone.h:119