20 #ifndef LIBREPCB_CORE_SCHEMATIC_H 21 #define LIBREPCB_CORE_SCHEMATIC_H 26 #include "../../fileio/filepath.h" 27 #include "../../fileio/transactionaldirectory.h" 28 #include "../../types/elementname.h" 29 #include "../../types/lengthunit.h" 30 #include "../../types/uuid.h" 41 class ComponentInstance;
81 Schematic(
Project& project, std::unique_ptr<TransactionalDirectory> directory,
82 const QString& directoryName,
const Uuid& uuid,
void addSymbol(SI_Symbol &symbol)
Definition: schematic.cpp:110
void addText(SI_Text &text)
Definition: schematic.cpp:199
The SI_Text class represents a text label in a schematic.
Definition: si_text.h:48
const QString & getDirectoryName() const noexcept
Definition: schematic.h:88
void textAdded(SI_Text &text)
QMap< Uuid, SI_NetSegment * > mNetSegments
Definition: schematic.h:168
bool mIsAddedToProject
Definition: schematic.h:159
void polygonAdded(SI_Polygon &polygon)
Schematic & operator=(const Schematic &rhs)=delete
void removeSymbol(SI_Symbol &symbol)
Definition: schematic.cpp:126
void symbolAdded(SI_Symbol &symbol)
Definition: occmodel.cpp:76
const QMap< Uuid, SI_Text * > & getTexts() const noexcept
Definition: schematic.h:127
Uuid mUuid
Definition: schematic.h:162
void polygonRemoved(SI_Polygon &polygon)
bool operator==(const Schematic &rhs) noexcept
Definition: schematic.h:139
TransactionalDirectory & getDirectory() noexcept
Definition: schematic.h:89
~Schematic() noexcept
Definition: schematic.cpp:74
Helper class to access a subdirectory of TransactionalFileSystem.
Definition: transactionaldirectory.h:51
const PositiveLength & getGridInterval() const noexcept
Definition: schematic.h:95
const QMap< Uuid, SI_NetSegment * > & getNetSegments() const noexcept
Definition: schematic.h:113
QMap< Uuid, SI_Polygon * > mPolygons
Definition: schematic.h:169
LengthUnit mGridUnit
Definition: schematic.h:165
void symbolRemoved(SI_Symbol &symbol)
Project & mProject
A reference to the Project object (from the ctor)
Definition: schematic.h:156
void setName(const ElementName &name) noexcept
Definition: schematic.cpp:101
The Schematic class represents one schematic page of a project and is always part of a circuit...
Definition: schematic.h:74
void removeNetSegment(SI_NetSegment &netsegment)
Definition: schematic.cpp:155
void setGridInterval(const PositiveLength &interval) noexcept
Definition: schematic.h:102
QMap< Uuid, SI_Text * > mTexts
Definition: schematic.h:170
void addNetSegment(SI_NetSegment &netsegment)
Definition: schematic.cpp:139
void setGridUnit(const LengthUnit &unit) noexcept
Definition: schematic.h:105
PositiveLength mGridInterval
Definition: schematic.h:164
void removeText(SI_Text &text)
Definition: schematic.cpp:214
const ElementName & getName() const noexcept
Definition: schematic.h:94
void save()
Definition: schematic.cpp:294
const LengthUnit & getGridUnit() const noexcept
Definition: schematic.h:98
const QMap< Uuid, SI_Polygon * > & getPolygons() const noexcept
Definition: schematic.h:120
The Project class represents a whole (opened) project with all its content.
Definition: project.h:71
std::unique_ptr< TransactionalDirectory > mDirectory
Definition: schematic.h:158
bool isEmpty() const noexcept
Definition: schematic.cpp:92
bool operator!=(const Schematic &rhs) noexcept
Definition: schematic.h:140
void updateAllNetLabelAnchors() noexcept
Definition: schematic.cpp:327
void removePolygon(SI_Polygon &polygon)
Definition: schematic.cpp:185
The SI_Symbol class.
Definition: si_symbol.h:54
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:785
void netSegmentRemoved(SI_NetSegment &netSegment)
void textRemoved(SI_Text &text)
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:56
const Uuid & getUuid() const noexcept
Definition: schematic.h:93
void netSegmentAdded(SI_NetSegment &netSegment)
void addPolygon(SI_Polygon &polygon)
Definition: schematic.cpp:169
The SI_Polygon class represents a polygon in a schematic.
Definition: si_polygon.h:47
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition: lengthunit.h:60
ElementName mName
Definition: schematic.h:163
QMap< Uuid, SI_Symbol * > mSymbols
Definition: schematic.h:167
void addToProject()
Definition: schematic.cpp:227
const QString mDirectoryName
Definition: schematic.h:157
const QMap< Uuid, SI_Symbol * > & getSymbols() const noexcept
Definition: schematic.h:108
The SI_NetSegment class.
Definition: si_netsegment.h:53
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition: elementname.h:83
void removeFromProject()
Definition: schematic.cpp:262
Project & getProject() const noexcept
Definition: schematic.h:87