20#ifndef LIBREPCB_EDITOR_SCHEMATICGRAPHICSSCENE_H
21#define LIBREPCB_EDITOR_SCHEMATICGRAPHICSSCENE_H
26#include "../../graphics/graphicsscene.h"
51class IF_GraphicsLayerProvider;
52class PolygonGraphicsItem;
98 std::shared_ptr<
const QSet<const NetSignal*>> highlightedNetSignals,
99 QObject* parent =
nullptr) noexcept;
104 const QHash<SI_Symbol*, std::shared_ptr<SGI_Symbol>>&
getSymbols() noexcept {
107 const QHash<SI_SymbolPin*, std::shared_ptr<SGI_SymbolPin>>&
111 const QHash<SI_NetPoint*, std::shared_ptr<SGI_NetPoint>>&
115 const QHash<SI_NetLine*, std::shared_ptr<SGI_NetLine>>&
119 const QHash<SI_NetLabel*, std::shared_ptr<SGI_NetLabel>>&
123 const QHash<SI_Polygon*, std::shared_ptr<PolygonGraphicsItem>>&
127 const QHash<SI_Text*, std::shared_ptr<SGI_Text>>&
getTexts() noexcept {
The NetSignal class.
Definition: netsignal.h:50
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition: point.h:79
The SI_NetLabel class.
Definition: si_netlabel.h:49
The SI_NetLine class.
Definition: si_netline.h:65
The SI_NetPoint class.
Definition: si_netpoint.h:44
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_SymbolPin class.
Definition: si_symbolpin.h:52
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
The GraphicsScene class.
Definition: graphicsscene.h:45
The IF_GraphicsLayerProvider class defines an interface for classes which provide layers.
Definition: graphicslayer.h:111
The PolygonGraphicsItem class.
Definition: polygongraphicsitem.h:48
The SGI_NetLabel class.
Definition: sgi_netlabel.h:50
The SGI_NetLine class.
Definition: sgi_netline.h:49
The SGI_NetPoint class.
Definition: sgi_netpoint.h:49
The SGI_Symbol class.
Definition: sgi_symbol.h:52
The SGI_SymbolPin class.
Definition: sgi_symbolpin.h:53
The SGI_Text class.
Definition: sgi_text.h:50
The SchematicGraphicsScene class.
Definition: schematicgraphicsscene.h:67
void removeNetPoint(SI_NetPoint &netPoint) noexcept
Definition: schematicgraphicsscene.cpp:359
void removeNetPointsAndNetLines(const QList< SI_NetPoint * > &netPoints, const QList< SI_NetLine * > &netLines) noexcept
Definition: schematicgraphicsscene.cpp:340
std::shared_ptr< const QSet< const NetSignal * > > mHighlightedNetSignals
Definition: schematicgraphicsscene.h:166
void addPolygon(SI_Polygon &polygon) noexcept
Definition: schematicgraphicsscene.cpp:399
void removePolygon(SI_Polygon &polygon) noexcept
Definition: schematicgraphicsscene.cpp:408
const QHash< SI_Text *, std::shared_ptr< SGI_Text > > & getTexts() noexcept
Definition: schematicgraphicsscene.h:127
QHash< SI_NetPoint *, std::shared_ptr< SGI_NetPoint > > mNetPoints
Definition: schematicgraphicsscene.h:169
const QHash< SI_NetLabel *, std::shared_ptr< SGI_NetLabel > > & getNetLabels() noexcept
Definition: schematicgraphicsscene.h:120
Schematic & mSchematic
Definition: schematicgraphicsscene.h:164
void removeNetSegment(SI_NetSegment &netSegment) noexcept
Definition: schematicgraphicsscene.cpp:308
void clearSelection() noexcept
Definition: schematicgraphicsscene.cpp:188
void removeNetLabel(SI_NetLabel &netLabel) noexcept
Definition: schematicgraphicsscene.cpp:391
void removeText(SI_Text &text) noexcept
Definition: schematicgraphicsscene.cpp:424
const QHash< SI_NetLine *, std::shared_ptr< SGI_NetLine > > & getNetLines() noexcept
Definition: schematicgraphicsscene.h:116
QHash< SI_Polygon *, std::shared_ptr< PolygonGraphicsItem > > mPolygons
Definition: schematicgraphicsscene.h:172
ZValue
Z-values of all items in a schematic (to define the stacking order)
Definition: schematicgraphicsscene.h:80
@ ZValue_VisibleNetPoints
For visible librepcb::SI_NetPoint items.
Definition: schematicgraphicsscene.h:90
@ ZValue_HiddenNetPoints
Foror hidden librepcb::SI_NetPoint items.
Definition: schematicgraphicsscene.h:89
@ ZValue_NetLabels
For librepcb::SI_NetLabel items.
Definition: schematicgraphicsscene.h:87
@ ZValue_Texts
For librepcb::SI_Text items.
Definition: schematicgraphicsscene.h:86
@ ZValue_Default
this is the default value (behind all other items)
Definition: schematicgraphicsscene.h:81
@ ZValue_SymbolPins
For librepcb::SI_SymbolPin items.
Definition: schematicgraphicsscene.h:84
@ ZValue_Symbols
For librepcb::SI_Symbol items.
Definition: schematicgraphicsscene.h:83
@ ZValue_NetLines
For librepcb::SI_NetLine items.
Definition: schematicgraphicsscene.h:88
@ ZValue_TextAnchors
For librepcb::SI_Text anchor lines.
Definition: schematicgraphicsscene.h:82
@ ZValue_Polygons
For librepcb::SI_Polygon items.
Definition: schematicgraphicsscene.h:85
void removeNetLine(SI_NetLine &netLine) noexcept
Definition: schematicgraphicsscene.cpp:375
void addNetLine(SI_NetLine &netLine) noexcept
Definition: schematicgraphicsscene.cpp:367
const IF_GraphicsLayerProvider & mLayerProvider
Definition: schematicgraphicsscene.h:165
void addNetPointsAndNetLines(const QList< SI_NetPoint * > &netPoints, const QList< SI_NetLine * > &netLines) noexcept
Definition: schematicgraphicsscene.cpp:329
void addNetSegment(SI_NetSegment &netSegment) noexcept
Definition: schematicgraphicsscene.cpp:288
QHash< SI_Text *, std::shared_ptr< SGI_Text > > mTexts
Definition: schematicgraphicsscene.h:173
void addSymbolPin(SI_SymbolPin &pin, std::weak_ptr< SGI_Symbol > symbol) noexcept
Definition: schematicgraphicsscene.cpp:271
QHash< SI_Symbol *, std::shared_ptr< SGI_Symbol > > mSymbols
Definition: schematicgraphicsscene.h:167
const QHash< SI_Symbol *, std::shared_ptr< SGI_Symbol > > & getSymbols() noexcept
Definition: schematicgraphicsscene.h:104
const QHash< SI_NetPoint *, std::shared_ptr< SGI_NetPoint > > & getNetPoints() noexcept
Definition: schematicgraphicsscene.h:112
void addText(SI_Text &text) noexcept
Definition: schematicgraphicsscene.cpp:416
const QHash< SI_Polygon *, std::shared_ptr< PolygonGraphicsItem > > & getPolygons() noexcept
Definition: schematicgraphicsscene.h:124
void removeSymbolPin(SI_SymbolPin &pin) noexcept
Definition: schematicgraphicsscene.cpp:280
SchematicGraphicsScene()=delete
void addNetPoint(SI_NetPoint &netPoint) noexcept
Definition: schematicgraphicsscene.cpp:351
Schematic & getSchematic() noexcept
Definition: schematicgraphicsscene.h:103
QHash< SI_NetLabel *, std::shared_ptr< SGI_NetLabel > > mNetLabels
Definition: schematicgraphicsscene.h:171
void addNetLabel(SI_NetLabel &netLabel) noexcept
Definition: schematicgraphicsscene.cpp:383
QHash< SI_NetLine *, std::shared_ptr< SGI_NetLine > > mNetLines
Definition: schematicgraphicsscene.h:170
QHash< SI_SymbolPin *, std::shared_ptr< SGI_SymbolPin > > mSymbolPins
Definition: schematicgraphicsscene.h:168
void selectAll() noexcept
Definition: schematicgraphicsscene.cpp:126
void removeSymbol(SI_Symbol &symbol) noexcept
Definition: schematicgraphicsscene.cpp:251
void selectItemsInRect(const Point &p1, const Point &p2) noexcept
Definition: schematicgraphicsscene.cpp:150
void addSymbol(SI_Symbol &symbol) noexcept
Definition: schematicgraphicsscene.cpp:231
void updateHighlightedNetSignals() noexcept
Definition: schematicgraphicsscene.cpp:212
const QHash< SI_SymbolPin *, std::shared_ptr< SGI_SymbolPin > > & getSymbolPins() noexcept
Definition: schematicgraphicsscene.h:108
SchematicGraphicsScene(const SchematicGraphicsScene &other)=delete
Definition: occmodel.cpp:77