![]() |
LibrePCB Developers Documentation
|
The BoardGraphicsScene class. More...
#include <boardgraphicsscene.h>
Inheritance diagram for BoardGraphicsScene:
Collaboration diagram for BoardGraphicsScene:Public Types | |
| enum | ItemZValue |
| Z Values of all items in a board scene (to define the stacking order) More... | |
Public Member Functions | |
| BoardGraphicsScene ()=delete | |
| BoardGraphicsScene (const BoardGraphicsScene &other)=delete | |
| BoardGraphicsScene (Board &board, const GraphicsLayerList &layers, std::shared_ptr< const QSet< const NetSignal * > > highlightedNetSignals, QObject *parent=nullptr) noexcept | |
| virtual | ~BoardGraphicsScene () noexcept |
| Board & | getBoard () noexcept |
| const QHash< BI_Device *, std::shared_ptr< BGI_Device > > & | getDevices () noexcept |
| const QHash< BI_FootprintPad *, std::shared_ptr< BGI_FootprintPad > > & | getFootprintPads () noexcept |
| const QHash< BI_Via *, std::shared_ptr< BGI_Via > > & | getVias () noexcept |
| const QHash< BI_NetPoint *, std::shared_ptr< BGI_NetPoint > > & | getNetPoints () noexcept |
| const QHash< BI_NetLine *, std::shared_ptr< BGI_NetLine > > & | getNetLines () noexcept |
| const QHash< BI_Plane *, std::shared_ptr< BGI_Plane > > & | getPlanes () noexcept |
| const QHash< BI_Zone *, std::shared_ptr< BGI_Zone > > & | getZones () noexcept |
| const QHash< BI_Polygon *, std::shared_ptr< BGI_Polygon > > & | getPolygons () noexcept |
| const QHash< BI_StrokeText *, std::shared_ptr< BGI_StrokeText > > & | getStrokeTexts () noexcept |
| const QHash< BI_Hole *, std::shared_ptr< BGI_Hole > > & | getHoles () noexcept |
| const QHash< BI_AirWire *, std::shared_ptr< BGI_AirWire > > & | getAirWires () noexcept |
| void | selectAll () noexcept |
| void | selectItemsInRect (const Point &p1, const Point &p2) noexcept |
| void | selectNetSegment (BI_NetSegment &netSegment) noexcept |
| void | clearSelection () noexcept |
| void | updateHighlightedNetSignals () noexcept |
| BoardGraphicsScene & | operator= (const BoardGraphicsScene &rhs)=delete |
Public Member Functions inherited from GraphicsScene | |
| GraphicsScene (QObject *parent=nullptr) noexcept | |
| virtual | ~GraphicsScene () noexcept |
| const PositiveLength & | getGridInterval () const noexcept |
| Theme::GridStyle | getGridStyle () const noexcept |
| void | setBackgroundColors (const QColor &fill, const QColor &grid) noexcept |
| void | setOverlayColors (const QColor &fill, const QColor &content) noexcept |
| void | setSelectionRectColors (const QColor &line, const QColor &fill) noexcept |
| void | setGridStyle (Theme::GridStyle style) noexcept |
| void | setGridInterval (const PositiveLength &interval) noexcept |
| void | setOriginCrossVisible (bool visible) noexcept |
| void | setGrayOut (bool grayOut) noexcept |
| void | setSelectionRect (const Point &p1, const Point &p2) noexcept |
| void | clearSelectionRect () noexcept |
| void | setSceneRectMarker (const QRectF &rect) noexcept |
| Setup the marker for a specific scene rect. | |
| void | setSceneCursor (const Point &pos, bool cross, bool circle) noexcept |
| void | setRulerPositions (const std::optional< std::pair< Point, Point > > &pos) noexcept |
| void | addItem (QGraphicsItem &item) noexcept |
| void | removeItem (QGraphicsItem &item) noexcept |
| QPixmap | toPixmap (int dpi, const QColor &background=Qt::transparent) noexcept |
| QPixmap | toPixmap (const QSize &size, const QColor &background=Qt::transparent) noexcept |
Static Public Member Functions | |
| static qreal | getZValueOfCopperLayer (const Layer &layer) noexcept |
Private Member Functions | |
| void | addDevice (BI_Device &device) noexcept |
| void | removeDevice (BI_Device &device) noexcept |
| void | addFootprintPad (BI_FootprintPad &pad, std::weak_ptr< BGI_Device > device) noexcept |
| void | removeFootprintPad (BI_FootprintPad &pad) noexcept |
| void | addNetSegment (BI_NetSegment &netSegment) noexcept |
| void | removeNetSegment (BI_NetSegment &netSegment) noexcept |
| void | addNetSegmentElements (const QList< BI_Via * > &vias, const QList< BI_NetPoint * > &netPoints, const QList< BI_NetLine * > &netLines) noexcept |
| void | removeNetSegmentElements (const QList< BI_Via * > &vias, const QList< BI_NetPoint * > &netPoints, const QList< BI_NetLine * > &netLines) noexcept |
| void | addVia (BI_Via &via) noexcept |
| void | removeVia (BI_Via &via) noexcept |
| void | addNetPoint (BI_NetPoint &netPoint) noexcept |
| void | removeNetPoint (BI_NetPoint &netPoint) noexcept |
| void | addNetLine (BI_NetLine &netLine) noexcept |
| void | removeNetLine (BI_NetLine &netLine) noexcept |
| void | addPlane (BI_Plane &plane) noexcept |
| void | removePlane (BI_Plane &plane) noexcept |
| void | addZone (BI_Zone &zone) noexcept |
| void | removeZone (BI_Zone &zone) noexcept |
| void | addPolygon (BI_Polygon &polygon) noexcept |
| void | removePolygon (BI_Polygon &polygon) noexcept |
| void | addStrokeText (BI_StrokeText &text) noexcept |
| void | removeStrokeText (BI_StrokeText &text) noexcept |
| void | addHole (BI_Hole &hole) noexcept |
| void | removeHole (BI_Hole &hole) noexcept |
| void | addAirWire (BI_AirWire &airWire) noexcept |
| void | removeAirWire (BI_AirWire &airWire) noexcept |
Private Attributes | |
| Board & | mBoard |
| const GraphicsLayerList & | mLayers |
| std::shared_ptr< const QSet< const NetSignal * > > | mHighlightedNetSignals |
| QHash< BI_Device *, std::shared_ptr< BGI_Device > > | mDevices |
| QHash< BI_FootprintPad *, std::shared_ptr< BGI_FootprintPad > > | mFootprintPads |
| QHash< BI_Via *, std::shared_ptr< BGI_Via > > | mVias |
| QHash< BI_NetPoint *, std::shared_ptr< BGI_NetPoint > > | mNetPoints |
| QHash< BI_NetLine *, std::shared_ptr< BGI_NetLine > > | mNetLines |
| QHash< BI_Plane *, std::shared_ptr< BGI_Plane > > | mPlanes |
| QHash< BI_Zone *, std::shared_ptr< BGI_Zone > > | mZones |
| QHash< BI_Polygon *, std::shared_ptr< BGI_Polygon > > | mPolygons |
| QHash< BI_StrokeText *, std::shared_ptr< BGI_StrokeText > > | mStrokeTexts |
| QHash< BI_Hole *, std::shared_ptr< BGI_Hole > > | mHoles |
| QHash< BI_AirWire *, std::shared_ptr< BGI_AirWire > > | mAirWires |
Additional Inherited Members | |
Protected Member Functions inherited from GraphicsScene | |
| void | drawBackground (QPainter *painter, const QRectF &rect) noexcept override |
| void | drawForeground (QPainter *painter, const QRectF &rect) noexcept override |
The BoardGraphicsScene class.
| enum ItemZValue |
Z Values of all items in a board scene (to define the stacking order)
These values are used for QGraphicsItem::setZValue() to define the stacking order of all items in a board QGraphicsScene. We use integer values, even if the z-value of QGraphicsItem is a qreal attribute...
Low number = background, high number = foreground
| Enumerator | |
|---|---|
| ZValue_Default | this is the default value (behind all other items) |
| ZValue_TextsBottom | For librepcb::BI_StrokeText items. |
| ZValue_PolygonsBottom | For librepcb::BI_Polygon items. |
| ZValue_DevicesBottom | For librepcb::BI_Device items. |
| ZValue_CopperBottom | |
| ZValue_FootprintPadsBottom | For librepcb::BI_FootprintPad items. |
| ZValue_ZonesBottom | For librepcb::BI_Zone items. |
| ZValue_PlanesBottom | For librepcb::BI_Plane items. |
| ZValue_InnerBottom | |
| ZValue_InnerTop | |
| ZValue_PlanesTop | For librepcb::BI_Plane items. |
| ZValue_ZonesTop | For librepcb::BI_Zone items. |
| ZValue_FootprintPadsTop | For librepcb::BI_FootprintPad items. |
| ZValue_CopperTop | |
| ZValue_DevicesTop | For librepcb::BI_Device items. |
| ZValue_PolygonsTop | For librepcb::BI_Polygon items. |
| ZValue_TextsTop | For librepcb::BI_StrokeText items. |
| ZValue_Holes | For librepcb::BI_Hole items. |
| ZValue_Vias | For librepcb::BI_Via items. |
| ZValue_Texts | For librepcb::BI_StrokeText items. |
| ZValue_AirWires | For librepcb::BI_AirWire items. |
|
delete |
|
delete |
|
explicitnoexcept |
Here is the call graph for this function:
|
virtualnoexcept |
Here is the call graph for this function:
|
inlinenoexcept |
Here is the caller graph for this function:
|
inlinenoexcept |
Here is the caller graph for this function:
|
inlinenoexcept |
Here is the caller graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
Here is the caller graph for this function:
|
inlinenoexcept |
Here is the caller graph for this function:
Here is the caller graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
Here is the caller graph for this function:
|
inlinenoexcept |
Here is the caller graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
|
noexcept |
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
Here is the call graph for this function:
|
noexcept |
Here is the caller graph for this function:
|
noexcept |
Here is the caller graph for this function:
|
staticnoexcept |
Here is the caller graph for this function:
|
delete |
|
privatenoexcept |
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatenoexcept |
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatenoexcept |
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatenoexcept |
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
privatenoexcept |
Here is the caller graph for this function:
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |