20#ifndef LIBREPCB_EDITOR_BOARDGRAPHICSSCENE_H
21#define LIBREPCB_EDITOR_BOARDGRAPHICSSCENE_H
26#include "../../graphics/graphicsscene.h"
58class BGI_FootprintPad;
68class IF_GraphicsLayerProvider;
120 std::shared_ptr<
const QSet<const NetSignal*>> highlightedNetSignals,
121 QObject* parent =
nullptr) noexcept;
126 const QHash<BI_Device*, std::shared_ptr<BGI_Device>>&
getDevices() noexcept {
129 const QHash<BI_FootprintPad*, std::shared_ptr<BGI_FootprintPad>>&
133 const QHash<BI_Via*, std::shared_ptr<BGI_Via>>&
getVias() noexcept {
136 const QHash<BI_NetPoint*, std::shared_ptr<BGI_NetPoint>>&
140 const QHash<BI_NetLine*, std::shared_ptr<BGI_NetLine>>&
144 const QHash<BI_Plane*, std::shared_ptr<BGI_Plane>>&
getPlanes() noexcept {
147 const QHash<BI_Zone*, std::shared_ptr<BGI_Zone>>&
getZones() noexcept {
150 const QHash<BI_Polygon*, std::shared_ptr<BGI_Polygon>>&
154 const QHash<BI_StrokeText*, std::shared_ptr<BGI_StrokeText>>&
158 const QHash<BI_Hole*, std::shared_ptr<BGI_Hole>>&
getHoles() noexcept {
161 const QHash<BI_AirWire*, std::shared_ptr<BGI_AirWire>>&
The BI_AirWire class.
Definition: bi_airwire.h:45
The BI_Device class.
Definition: bi_device.h:57
The BI_Hole class.
Definition: bi_hole.h:46
The BI_NetLine class.
Definition: bi_netline.h:71
The BI_NetPoint class.
Definition: bi_netpoint.h:46
The BI_NetSegment class.
Definition: bi_netsegment.h:52
The BI_Plane class.
Definition: bi_plane.h:52
The BI_Polygon class.
Definition: bi_polygon.h:46
The BI_StrokeText class.
Definition: bi_stroketext.h:49
The BI_Via class.
Definition: bi_via.h:44
The BI_Zone class.
Definition: bi_zone.h:46
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:73
The Layer class provides all supported geometry layers.
Definition: layer.h:42
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 BGI_AirWire class.
Definition: bgi_airwire.h:53
The BGI_Device class.
Definition: bgi_device.h:57
The BGI_Hole class.
Definition: bgi_hole.h:47
The BGI_NetLine class.
Definition: bgi_netline.h:51
The BGI_NetPoint class.
Definition: bgi_netpoint.h:46
The BGI_Plane class.
Definition: bgi_plane.h:54
The BGI_Polygon class.
Definition: bgi_polygon.h:48
The BGI_StrokeText class.
Definition: bgi_stroketext.h:51
The BGI_Via class.
Definition: bgi_via.h:53
The BGI_Zone class.
Definition: bgi_zone.h:48
The BoardGraphicsScene class.
Definition: boardgraphicsscene.h:77
ItemZValue
Z Values of all items in a board scene (to define the stacking order)
Definition: boardgraphicsscene.h:91
@ ZValue_CopperBottom
Definition: boardgraphicsscene.h:96
@ ZValue_AirWires
For librepcb::BI_AirWire items.
Definition: boardgraphicsscene.h:112
@ ZValue_InnerTop
Definition: boardgraphicsscene.h:101
@ ZValue_Texts
For librepcb::BI_StrokeText items.
Definition: boardgraphicsscene.h:111
@ ZValue_Default
this is the default value (behind all other items)
Definition: boardgraphicsscene.h:92
@ ZValue_TextsBottom
For librepcb::BI_StrokeText items.
Definition: boardgraphicsscene.h:93
@ ZValue_FootprintPadsBottom
For librepcb::BI_FootprintPad items.
Definition: boardgraphicsscene.h:97
@ ZValue_PlanesBottom
For librepcb::BI_Plane items.
Definition: boardgraphicsscene.h:99
@ ZValue_InnerBottom
Definition: boardgraphicsscene.h:100
@ ZValue_PolygonsBottom
For librepcb::BI_Polygon items.
Definition: boardgraphicsscene.h:94
@ ZValue_PolygonsTop
For librepcb::BI_Polygon items.
Definition: boardgraphicsscene.h:107
@ ZValue_TextsTop
For librepcb::BI_StrokeText items.
Definition: boardgraphicsscene.h:108
@ ZValue_CopperTop
Definition: boardgraphicsscene.h:105
@ ZValue_DevicesTop
For librepcb::BI_Device items.
Definition: boardgraphicsscene.h:106
@ ZValue_FootprintPadsTop
For librepcb::BI_FootprintPad items.
Definition: boardgraphicsscene.h:104
@ ZValue_Holes
For librepcb::BI_Hole items.
Definition: boardgraphicsscene.h:109
@ ZValue_Vias
For librepcb::BI_Via items.
Definition: boardgraphicsscene.h:110
@ ZValue_PlanesTop
For librepcb::BI_Plane items.
Definition: boardgraphicsscene.h:102
@ ZValue_ZonesBottom
For librepcb::BI_Zone items.
Definition: boardgraphicsscene.h:98
@ ZValue_DevicesBottom
For librepcb::BI_Device items.
Definition: boardgraphicsscene.h:95
@ ZValue_ZonesTop
For librepcb::BI_Zone items.
Definition: boardgraphicsscene.h:103
std::shared_ptr< const QSet< const NetSignal * > > mHighlightedNetSignals
Definition: boardgraphicsscene.h:213
const QHash< BI_AirWire *, std::shared_ptr< BGI_AirWire > > & getAirWires() noexcept
Definition: boardgraphicsscene.h:162
const QHash< BI_Polygon *, std::shared_ptr< BGI_Polygon > > & getPolygons() noexcept
Definition: boardgraphicsscene.h:151
void addFootprintPad(BI_FootprintPad &pad, std::weak_ptr< BGI_Device > device) noexcept
Definition: boardgraphicsscene.cpp:375
QHash< BI_StrokeText *, std::shared_ptr< BGI_StrokeText > > mStrokeTexts
Definition: boardgraphicsscene.h:222
void addZone(BI_Zone &zone) noexcept
Definition: boardgraphicsscene.cpp:516
QHash< BI_Plane *, std::shared_ptr< BGI_Plane > > mPlanes
Definition: boardgraphicsscene.h:219
const QHash< BI_Via *, std::shared_ptr< BGI_Via > > & getVias() noexcept
Definition: boardgraphicsscene.h:133
const QHash< BI_FootprintPad *, std::shared_ptr< BGI_FootprintPad > > & getFootprintPads() noexcept
Definition: boardgraphicsscene.h:130
void clearSelection() noexcept
Definition: boardgraphicsscene.cpp:265
BoardGraphicsScene(const BoardGraphicsScene &other)=delete
static qreal getZValueOfCopperLayer(const Layer &layer) noexcept
Definition: boardgraphicsscene.cpp:316
void addAirWire(BI_AirWire &airWire) noexcept
Definition: boardgraphicsscene.cpp:580
Board & getBoard() noexcept
Definition: boardgraphicsscene.h:125
void addPlane(BI_Plane &plane) noexcept
Definition: boardgraphicsscene.cpp:500
void selectNetSegment(BI_NetSegment &netSegment) noexcept
Definition: boardgraphicsscene.cpp:247
void removePolygon(BI_Polygon &polygon) noexcept
Definition: boardgraphicsscene.cpp:540
QHash< BI_Device *, std::shared_ptr< BGI_Device > > mDevices
Definition: boardgraphicsscene.h:214
const QHash< BI_NetLine *, std::shared_ptr< BGI_NetLine > > & getNetLines() noexcept
Definition: boardgraphicsscene.h:141
void removeDevice(BI_Device &device) noexcept
Definition: boardgraphicsscene.cpp:355
void removeNetLine(BI_NetLine &netLine) noexcept
Definition: boardgraphicsscene.cpp:492
void removeFootprintPad(BI_FootprintPad &pad) noexcept
Definition: boardgraphicsscene.cpp:384
void addHole(BI_Hole &hole) noexcept
Definition: boardgraphicsscene.cpp:564
const QHash< BI_Device *, std::shared_ptr< BGI_Device > > & getDevices() noexcept
Definition: boardgraphicsscene.h:126
void addNetPoint(BI_NetPoint &netPoint) noexcept
Definition: boardgraphicsscene.cpp:468
Board & mBoard
Definition: boardgraphicsscene.h:211
const IF_GraphicsLayerProvider & mLayerProvider
Definition: boardgraphicsscene.h:212
QHash< BI_NetPoint *, std::shared_ptr< BGI_NetPoint > > mNetPoints
Definition: boardgraphicsscene.h:217
const QHash< BI_Hole *, std::shared_ptr< BGI_Hole > > & getHoles() noexcept
Definition: boardgraphicsscene.h:158
const QHash< BI_Plane *, std::shared_ptr< BGI_Plane > > & getPlanes() noexcept
Definition: boardgraphicsscene.h:144
void addNetSegmentElements(const QList< BI_Via * > &vias, const QList< BI_NetPoint * > &netPoints, const QList< BI_NetLine * > &netLines) noexcept
Definition: boardgraphicsscene.cpp:424
QHash< BI_Via *, std::shared_ptr< BGI_Via > > mVias
Definition: boardgraphicsscene.h:216
QHash< BI_NetLine *, std::shared_ptr< BGI_NetLine > > mNetLines
Definition: boardgraphicsscene.h:218
void addPolygon(BI_Polygon &polygon) noexcept
Definition: boardgraphicsscene.cpp:532
void removeStrokeText(BI_StrokeText &text) noexcept
Definition: boardgraphicsscene.cpp:556
QHash< BI_Zone *, std::shared_ptr< BGI_Zone > > mZones
Definition: boardgraphicsscene.h:220
void addNetSegment(BI_NetSegment &netSegment) noexcept
Definition: boardgraphicsscene.cpp:392
void removeNetSegment(BI_NetSegment &netSegment) noexcept
Definition: boardgraphicsscene.cpp:408
void addNetLine(BI_NetLine &netLine) noexcept
Definition: boardgraphicsscene.cpp:484
void addStrokeText(BI_StrokeText &text) noexcept
Definition: boardgraphicsscene.cpp:548
void addVia(BI_Via &via) noexcept
Definition: boardgraphicsscene.cpp:452
BoardGraphicsScene()=delete
void removeNetSegmentElements(const QList< BI_Via * > &vias, const QList< BI_NetPoint * > &netPoints, const QList< BI_NetLine * > &netLines) noexcept
Definition: boardgraphicsscene.cpp:438
void removeAirWire(BI_AirWire &airWire) noexcept
Definition: boardgraphicsscene.cpp:588
QHash< BI_AirWire *, std::shared_ptr< BGI_AirWire > > mAirWires
Definition: boardgraphicsscene.h:224
void removeZone(BI_Zone &zone) noexcept
Definition: boardgraphicsscene.cpp:524
void removeVia(BI_Via &via) noexcept
Definition: boardgraphicsscene.cpp:460
QHash< BI_FootprintPad *, std::shared_ptr< BGI_FootprintPad > > mFootprintPads
Definition: boardgraphicsscene.h:215
const QHash< BI_Zone *, std::shared_ptr< BGI_Zone > > & getZones() noexcept
Definition: boardgraphicsscene.h:147
QHash< BI_Hole *, std::shared_ptr< BGI_Hole > > mHoles
Definition: boardgraphicsscene.h:223
QHash< BI_Polygon *, std::shared_ptr< BGI_Polygon > > mPolygons
Definition: boardgraphicsscene.h:221
void removeHole(BI_Hole &hole) noexcept
Definition: boardgraphicsscene.cpp:572
void selectAll() noexcept
Definition: boardgraphicsscene.cpp:167
void removeNetPoint(BI_NetPoint &netPoint) noexcept
Definition: boardgraphicsscene.cpp:476
void removePlane(BI_Plane &plane) noexcept
Definition: boardgraphicsscene.cpp:508
void selectItemsInRect(const Point &p1, const Point &p2) noexcept
Definition: boardgraphicsscene.cpp:200
const QHash< BI_NetPoint *, std::shared_ptr< BGI_NetPoint > > & getNetPoints() noexcept
Definition: boardgraphicsscene.h:137
void updateHighlightedNetSignals() noexcept
Definition: boardgraphicsscene.cpp:298
void addDevice(BI_Device &device) noexcept
Definition: boardgraphicsscene.cpp:335
const QHash< BI_StrokeText *, std::shared_ptr< BGI_StrokeText > > & getStrokeTexts() noexcept
Definition: boardgraphicsscene.h:155
The GraphicsScene class.
Definition: graphicsscene.h:45
The IF_GraphicsLayerProvider class defines an interface for classes which provide layers.
Definition: graphicslayer.h:111
Definition: occmodel.cpp:77