20#ifndef LIBREPCB_EDITOR_SCHEMATICCLIPBOARDDATA_H
21#define LIBREPCB_EDITOR_SCHEMATICCLIPBOARDDATA_H
44class TransactionalDirectory;
45class TransactionalFileSystem;
60 static constexpr const char*
tagname =
"component";
93 value(node.getChild(
"value/@0").getValue()),
130 static constexpr const char*
tagname =
"symbol";
158 position(node.getChild(
"position")),
180 return (
uuid != rhs.uuid) ||
189 static constexpr const char*
tagname =
"netsegment";
235 const QString& path = "") noexcept;
256 std::unique_ptr<QMimeData>
toMimeData()
const;
257 static std::unique_ptr<SchematicClipboardData>
fromMimeData(
258 const QMimeData* mime);
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
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
void ensureLineBreak()
Definition sexpression.cpp:206
void appendChild(std::unique_ptr< SExpression > child)
Definition sexpression.cpp:217
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 SchematicClipboardData class.
Definition schematicclipboarddata.h:56
SerializableObjectList< ComponentInstance, ComponentInstance > mComponentInstances
Definition schematicclipboarddata.h:272
static QString getMimeType() noexcept
Definition schematicclipboarddata.cpp:145
TextList mTexts
Definition schematicclipboarddata.h:276
std::unique_ptr< QMimeData > toMimeData() const
Definition schematicclipboarddata.cpp:95
PolygonList & getPolygons() noexcept
Definition schematicclipboarddata.h:252
SerializableObjectList< NetSegment, NetSegment > & getNetSegments() noexcept
Definition schematicclipboarddata.h:249
const AssemblyVariantList & getAssemblyVariants() noexcept
Definition schematicclipboarddata.h:238
std::unique_ptr< TransactionalDirectory > getDirectory(const QString &path="") noexcept
Definition schematicclipboarddata.cpp:85
SerializableObjectList< SymbolInstance, SymbolInstance > mSymbolInstances
Definition schematicclipboarddata.h:273
TextList & getTexts() noexcept
Definition schematicclipboarddata.h:253
SerializableObjectList< SymbolInstance, SymbolInstance > & getSymbolInstances() noexcept
Definition schematicclipboarddata.h:246
SerializableObjectList< NetSegment, NetSegment > mNetSegments
Definition schematicclipboarddata.h:274
const Point & getCursorPos() const noexcept
Definition schematicclipboarddata.h:237
SerializableObjectList< ComponentInstance, ComponentInstance > & getComponentInstances() noexcept
Definition schematicclipboarddata.h:242
Uuid mSchematicUuid
Definition schematicclipboarddata.h:268
SchematicClipboardData(const SchematicClipboardData &other)=delete
std::shared_ptr< TransactionalFileSystem > mFileSystem
Definition schematicclipboarddata.h:267
PolygonList mPolygons
Definition schematicclipboarddata.h:275
static std::unique_ptr< SchematicClipboardData > fromMimeData(const QMimeData *mime)
Definition schematicclipboarddata.cpp:130
AssemblyVariantList mAssemblyVariants
Definition schematicclipboarddata.h:270
SchematicClipboardData()=delete
SchematicClipboardData & operator=(const SchematicClipboardData &rhs)=delete
const Uuid & getSchematicUuid() const noexcept
Definition schematicclipboarddata.h:236
~SchematicClipboardData() noexcept
Definition schematicclipboarddata.cpp:73
Point mCursorPos
Definition schematicclipboarddata.h:269
Definition occmodel.cpp:76
type_safe::constrained_type< QString, CircuitIdentifierConstraint, CircuitIdentifierVerifier > CircuitIdentifier
Definition circuitidentifier.h:95
AttributeKey deserialize(const SExpression &node)
Definition attributekey.h:104
Definition schematicclipboarddata.h:59
QString value
Definition schematicclipboarddata.h:66
ComponentInstance(const SExpression &node)
Definition schematicclipboarddata.h:88
Uuid libComponentUuid
Definition schematicclipboarddata.h:63
Uuid libVariantUuid
Definition schematicclipboarddata.h:64
Uuid uuid
Definition schematicclipboarddata.h:62
bool lockAssembly
Definition schematicclipboarddata.h:69
ComponentInstance(const Uuid &uuid, const Uuid &libComponentUuid, const Uuid &libVariantUuid, const CircuitIdentifier &name, const QString &value, const AttributeList &attributes, const ComponentAssemblyOptionList &assemblyOptions, bool lockParts)
Definition schematicclipboarddata.h:73
Signal< ComponentInstance > onEdited
Dummy event, not used.
Definition schematicclipboarddata.h:71
AttributeList attributes
Definition schematicclipboarddata.h:67
void serialize(SExpression &root) const
Definition schematicclipboarddata.h:102
static constexpr const char * tagname
Definition schematicclipboarddata.h:60
const Uuid & getUuid() const noexcept
Required for librepcb::SerializableObjectList::contains()
Definition schematicclipboarddata.h:100
CircuitIdentifier name
Definition schematicclipboarddata.h:65
ComponentAssemblyOptionList assemblyOptions
Definition schematicclipboarddata.h:68
bool operator!=(const ComponentInstance &rhs) noexcept
Definition schematicclipboarddata.h:120
Definition schematicclipboarddata.h:188
JunctionList junctions
Definition schematicclipboarddata.h:192
NetLabelList labels
Definition schematicclipboarddata.h:194
NetLineList lines
Definition schematicclipboarddata.h:193
NetSegment(const SExpression &node)
Definition schematicclipboarddata.h:200
NetSegment(const CircuitIdentifier &netName)
Definition schematicclipboarddata.h:197
void serialize(SExpression &root) const
Definition schematicclipboarddata.h:207
static constexpr const char * tagname
Definition schematicclipboarddata.h:189
bool operator!=(const NetSegment &rhs) noexcept
Definition schematicclipboarddata.h:219
Signal< NetSegment > onEdited
Dummy event, not used.
Definition schematicclipboarddata.h:195
CircuitIdentifier netName
Definition schematicclipboarddata.h:191
Definition schematicclipboarddata.h:129
Uuid uuid
Definition schematicclipboarddata.h:132
Angle rotation
Definition schematicclipboarddata.h:136
SymbolInstance(const SExpression &node)
Definition schematicclipboarddata.h:154
SymbolInstance(const Uuid &uuid, const Uuid &componentInstanceUuid, const Uuid &symbolVariantItemUuid, const Point &position, const Angle &rotation, bool mirrored, const TextList &texts)
Definition schematicclipboarddata.h:142
bool mirrored
Definition schematicclipboarddata.h:137
void serialize(SExpression &root) const
Definition schematicclipboarddata.h:164
static constexpr const char * tagname
Definition schematicclipboarddata.h:130
bool operator!=(const SymbolInstance &rhs) noexcept
Definition schematicclipboarddata.h:179
Uuid componentInstanceUuid
Definition schematicclipboarddata.h:133
TextList texts
Definition schematicclipboarddata.h:138
Uuid symbolVariantItemUuid
Definition schematicclipboarddata.h:134
Point position
Definition schematicclipboarddata.h:135
Signal< SymbolInstance > onEdited
Dummy event, not used.
Definition schematicclipboarddata.h:140