20#ifndef LIBREPCB_EDITOR_BOARDCLIPBOARDDATA_H
21#define LIBREPCB_EDITOR_BOARDCLIPBOARDDATA_H
52class TransactionalDirectory;
53class TransactionalFileSystem;
68 static constexpr const char*
tagname =
"device";
101 position(node.getChild(
"position")),
144 static constexpr const char*
tagname =
"netsegment";
157 node.getChild(
"net/@0"))),
176 return (
netName != rhs.netName) || (
vias != rhs.vias) ||
182 static constexpr const char*
tagname =
"plane";
222 node.getChild(
"net/@0"))),
230 node.getChild(
"connect_style/@0"))),
259 return (
uuid != rhs.uuid) || (
layer != rhs.layer) ||
280 const QString& path = "") noexcept;
299 std::unique_ptr<QMimeData>
toMimeData()
const;
300 static std::unique_ptr<BoardClipboardData>
fromMimeData(
301 const QMimeData* mime);
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The BI_Plane class.
Definition bi_plane.h:52
ConnectStyle
Definition bi_plane.h:68
The BoardHoleData class.
Definition boardholedata.h:45
The BoardPolygonData class.
Definition boardpolygondata.h:45
The BoardStrokeTextData class.
Definition boardstroketextdata.h:49
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition boardstroketextdata.cpp:242
The BoardZoneData class.
Definition boardzonedata.h:44
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:57
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition path.cpp:348
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition point.cpp:136
The SExpression class.
Definition sexpression.h:69
SExpression & appendList(const QString &name)
Definition sexpression.cpp:212
QList< SExpression * > getChildren(Type type) noexcept
Definition sexpression.cpp:94
void ensureLineBreak()
Definition sexpression.cpp:206
void appendChild(std::unique_ptr< SExpression > child)
Definition sexpression.cpp:217
int append(const std::shared_ptr< T > &obj) noexcept
Definition serializableobjectlist.h:342
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition serializableobjectlist.h:379
The Signal class is used to emit signals on non-QObject derived classes.
Definition signalslot.h:65
Helper class to access a subdirectory of TransactionalFileSystem.
Definition transactionaldirectory.h:51
Transactional librepcb::FileSystem implementation.
Definition transactionalfilesystem.h:71
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The BoardClipboardData class.
Definition boardclipboarddata.h:64
QMap< std::pair< Uuid, Uuid >, Point > mPadPositions
Definition boardclipboarddata.h:320
Uuid mBoardUuid
Definition boardclipboarddata.h:311
static QString getMimeType() noexcept
Definition boardclipboarddata.cpp:193
std::unique_ptr< QMimeData > toMimeData() const
Definition boardclipboarddata.cpp:122
QMap< std::pair< Uuid, Uuid >, Point > & getPadPositions() noexcept
Definition boardclipboarddata.h:294
SerializableObjectList< Device, Device > & getDevices() noexcept
Definition boardclipboarddata.h:283
SerializableObjectList< NetSegment, NetSegment > & getNetSegments() noexcept
Definition boardclipboarddata.h:286
std::unique_ptr< TransactionalDirectory > getDirectory(const QString &path="") noexcept
Definition boardclipboarddata.cpp:112
BoardClipboardData & operator=(const BoardClipboardData &rhs)=delete
SerializableObjectList< Device, Device > mDevices
Definition boardclipboarddata.h:313
QList< BoardZoneData > & getZones() noexcept
Definition boardclipboarddata.h:290
BoardClipboardData()=delete
SerializableObjectList< NetSegment, NetSegment > mNetSegments
Definition boardclipboarddata.h:314
QList< BoardHoleData > & getHoles() noexcept
Definition boardclipboarddata.h:293
const Uuid & getBoardUuid() const noexcept
Definition boardclipboarddata.h:281
SerializableObjectList< Plane, Plane > mPlanes
Definition boardclipboarddata.h:315
const Point & getCursorPos() const noexcept
Definition boardclipboarddata.h:282
QList< BoardZoneData > mZones
Definition boardclipboarddata.h:316
QList< BoardStrokeTextData > & getStrokeTexts() noexcept
Definition boardclipboarddata.h:292
QList< BoardPolygonData > & getPolygons() noexcept
Definition boardclipboarddata.h:291
QList< BoardStrokeTextData > mStrokeTexts
Definition boardclipboarddata.h:318
static std::unique_ptr< BoardClipboardData > fromMimeData(const QMimeData *mime)
Definition boardclipboarddata.cpp:178
std::shared_ptr< TransactionalFileSystem > mFileSystem
Definition boardclipboarddata.h:310
~BoardClipboardData() noexcept
Definition boardclipboarddata.cpp:94
bool isEmpty() const noexcept
Definition boardclipboarddata.cpp:106
BoardClipboardData(const BoardClipboardData &other)=delete
QList< BoardPolygonData > mPolygons
Definition boardclipboarddata.h:317
QList< BoardHoleData > mHoles
Definition boardclipboarddata.h:319
SerializableObjectList< Plane, Plane > & getPlanes() noexcept
Definition boardclipboarddata.h:289
Point mCursorPos
Definition boardclipboarddata.h:312
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< QString, CircuitIdentifierConstraint, CircuitIdentifierVerifier > CircuitIdentifier
Definition circuitidentifier.h:95
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
AttributeKey deserialize(const SExpression &node)
Definition attributekey.h:104
Definition boardclipboarddata.h:67
bool locked
Definition boardclipboarddata.h:76
QList< BoardStrokeTextData > strokeTexts
Definition boardclipboarddata.h:78
Device(const Uuid &componentUuid, const Uuid &libDeviceUuid, const Uuid &libFootprintUuid, const Point &position, const Angle &rotation, bool mirrored, bool locked, const AttributeList &attributes, const QList< BoardStrokeTextData > &strokeTexts)
Definition boardclipboarddata.h:81
Angle rotation
Definition boardclipboarddata.h:74
Device(const SExpression &node)
Definition boardclipboarddata.h:97
Uuid componentUuid
Definition boardclipboarddata.h:70
bool mirrored
Definition boardclipboarddata.h:75
bool operator!=(const Device &rhs) noexcept
Definition boardclipboarddata.h:133
AttributeList attributes
Definition boardclipboarddata.h:77
void serialize(SExpression &root) const
Definition boardclipboarddata.h:113
static constexpr const char * tagname
Definition boardclipboarddata.h:68
Uuid libFootprintUuid
Definition boardclipboarddata.h:72
Signal< Device > onEdited
Dummy event, not used.
Definition boardclipboarddata.h:79
Point position
Definition boardclipboarddata.h:73
Uuid libDeviceUuid
Definition boardclipboarddata.h:71
Definition boardclipboarddata.h:143
JunctionList junctions
Definition boardclipboarddata.h:148
std::optional< CircuitIdentifier > netName
Definition boardclipboarddata.h:146
TraceList traces
Definition boardclipboarddata.h:149
NetSegment(const std::optional< CircuitIdentifier > &netName)
Definition boardclipboarddata.h:152
ViaList vias
Definition boardclipboarddata.h:147
NetSegment(const SExpression &node)
Definition boardclipboarddata.h:155
void serialize(SExpression &root) const
Definition boardclipboarddata.h:163
static constexpr const char * tagname
Definition boardclipboarddata.h:144
bool operator!=(const NetSegment &rhs) noexcept
Definition boardclipboarddata.h:175
Signal< NetSegment > onEdited
Dummy event, not used.
Definition boardclipboarddata.h:150
Definition boardclipboarddata.h:181
bool locked
Definition boardclipboarddata.h:195
Plane(const Uuid &uuid, const Layer &layer, const std::optional< CircuitIdentifier > &netSignalName, const Path &outline, const UnsignedLength &minWidth, const UnsignedLength &minClearance, bool keepIslands, int priority, BI_Plane::ConnectStyle connectStyle, const PositiveLength &thermalGap, const PositiveLength &thermalSpokeWidth, bool locked)
Definition boardclipboarddata.h:198
Uuid uuid
Definition boardclipboarddata.h:184
bool keepIslands
Definition boardclipboarddata.h:190
Plane(const SExpression &node)
Definition boardclipboarddata.h:218
Path outline
Definition boardclipboarddata.h:187
bool operator!=(const Plane &rhs) noexcept
Definition boardclipboarddata.h:258
UnsignedLength minClearance
Definition boardclipboarddata.h:189
UnsignedLength minWidth
Definition boardclipboarddata.h:188
PositiveLength thermalSpokeWidth
Definition boardclipboarddata.h:194
void serialize(SExpression &root) const
Definition boardclipboarddata.h:238
static constexpr const char * tagname
Definition boardclipboarddata.h:182
BI_Plane::ConnectStyle connectStyle
Definition boardclipboarddata.h:192
int priority
Definition boardclipboarddata.h:191
const Layer * layer
Definition boardclipboarddata.h:185
PositiveLength thermalGap
Definition boardclipboarddata.h:193
std::optional< CircuitIdentifier > netSignalName
Definition boardclipboarddata.h:186
Signal< Plane > onEdited
Dummy event, not used.
Definition boardclipboarddata.h:196