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