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;
88 Schematic(
Project& project, std::unique_ptr<TransactionalDirectory> directory,
89 const QString& directoryName,
const Uuid& uuid,
162 return (
this == &rhs);
165 return (
this != &rhs);
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition lengthunit.h:62
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
The SI_BusSegment class.
Definition si_bussegment.h:52
The SI_Image class represents an image in a schematic.
Definition si_image.h:45
The SI_NetSegment class.
Definition si_netsegment.h:55
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:81
QMap< Uuid, SI_Image * > mImages
Definition schematic.h:210
TransactionalDirectory & getDirectory() noexcept
Definition schematic.h:96
const TransactionalDirectory & getDirectory() const noexcept
Definition schematic.h:97
void updateAllLabelAnchors() noexcept
Definition schematic.cpp:441
void setName(const ElementName &name) noexcept
Definition schematic.cpp:108
void netSegmentRemoved(SI_NetSegment &netSegment)
const LengthUnit & getGridUnit() const noexcept
Definition schematic.h:108
PositiveLength mGridInterval
Definition schematic.h:195
const QMap< Uuid, SI_Symbol * > & getSymbols() const noexcept
Definition schematic.h:118
const PositiveLength & getGridInterval() const noexcept
Definition schematic.h:105
void busSegmentRemoved(SI_BusSegment &s)
const QString mDirectoryName
Definition schematic.h:188
LengthUnit mGridUnit
Definition schematic.h:196
void addNetSegment(SI_NetSegment &netsegment)
Definition schematic.cpp:178
void nameChanged(const ElementName &name)
void textAdded(SI_Text &text)
const QMap< Uuid, SI_Text * > & getTexts() const noexcept
Definition schematic.h:144
void removePolygon(SI_Polygon &polygon)
Definition schematic.cpp:224
void polygonAdded(SI_Polygon &polygon)
void removeBusSegment(SI_BusSegment &s)
Definition schematic.cpp:165
const ElementName & getName() const noexcept
Definition schematic.h:104
Uuid mUuid
Definition schematic.h:193
void imageAdded(SI_Image &image)
Schematic(const Schematic &other)=delete
const QMap< Uuid, SI_Polygon * > & getPolygons() const noexcept
Definition schematic.h:137
ElementName mName
Definition schematic.h:194
void removeImage(SI_Image &image)
Definition schematic.cpp:288
bool mIsAddedToProject
Definition schematic.h:190
void addImage(SI_Image &image)
Definition schematic.cpp:266
void busSegmentAdded(SI_BusSegment &s)
void removeText(SI_Text &text)
Definition schematic.cpp:253
void addBusSegment(SI_BusSegment &s)
Definition schematic.cpp:149
void textRemoved(SI_Text &text)
void addText(SI_Text &text)
Definition schematic.cpp:238
void setGridUnit(const LengthUnit &unit) noexcept
Definition schematic.h:115
void symbolAdded(SI_Symbol &symbol)
Project & getProject() const noexcept
Definition schematic.h:94
QMap< Uuid, SI_Symbol * > mSymbols
Definition schematic.h:205
void polygonRemoved(SI_Polygon &polygon)
void imageRemoved(SI_Image &image)
void addToProject()
Definition schematic.cpp:301
void addPolygon(SI_Polygon &polygon)
Definition schematic.cpp:208
QMap< Uuid, SI_BusSegment * > mBusSegments
Definition schematic.h:206
Project & mProject
A reference to the Project object (from the ctor)
Definition schematic.h:187
~Schematic() noexcept
Definition schematic.cpp:76
const QMap< Uuid, SI_BusSegment * > & getBusSegments() const noexcept
Definition schematic.h:123
void removeNetSegment(SI_NetSegment &netsegment)
Definition schematic.cpp:194
void save()
Definition schematic.cpp:386
void netSegmentAdded(SI_NetSegment &netSegment)
const Uuid & getUuid() const noexcept
Definition schematic.h:103
bool operator!=(const Schematic &rhs) const noexcept
Definition schematic.h:164
void symbolRemoved(SI_Symbol &symbol)
QMap< Uuid, SI_Polygon * > mPolygons
Definition schematic.h:208
std::unique_ptr< TransactionalDirectory > mDirectory
Definition schematic.h:189
const QMap< Uuid, SI_Image * > & getImages() const noexcept
Definition schematic.h:149
bool isEmpty() const noexcept
Definition schematic.cpp:98
QMap< Uuid, SI_Text * > mTexts
Definition schematic.h:209
QMap< Uuid, SI_NetSegment * > mNetSegments
Definition schematic.h:207
void removeFromProject()
Definition schematic.cpp:345
void addSymbol(SI_Symbol &symbol)
Definition schematic.cpp:120
void setGridInterval(const PositiveLength &interval) noexcept
Definition schematic.h:112
void removeSymbol(SI_Symbol &symbol)
Definition schematic.cpp:136
const QString & getDirectoryName() const noexcept
Definition schematic.h:95
const QMap< Uuid, SI_NetSegment * > & getNetSegments() const noexcept
Definition schematic.h:130
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:56
Definition occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition elementname.h:84