![]() |
LibrePCB Developers Documentation
|
The SchematicGraphicsScene class. More...
#include <schematicgraphicsscene.h>
Public Types | |
enum | ZValue : int |
Z-values of all items in a schematic (to define the stacking order) More... | |
Public Member Functions | |
SchematicGraphicsScene ()=delete | |
SchematicGraphicsScene (const SchematicGraphicsScene &other)=delete | |
SchematicGraphicsScene (Schematic &schematic, const GraphicsLayerList &layers, std::shared_ptr< const QSet< const NetSignal * > > highlightedNetSignals, QObject *parent=nullptr) noexcept | |
virtual | ~SchematicGraphicsScene () noexcept |
Schematic & | getSchematic () noexcept |
const QHash< SI_Symbol *, std::shared_ptr< SGI_Symbol > > & | getSymbols () noexcept |
const QHash< SI_SymbolPin *, std::shared_ptr< SGI_SymbolPin > > & | getSymbolPins () noexcept |
const QHash< SI_NetPoint *, std::shared_ptr< SGI_NetPoint > > & | getNetPoints () noexcept |
const QHash< SI_NetLine *, std::shared_ptr< SGI_NetLine > > & | getNetLines () noexcept |
const QHash< SI_NetLabel *, std::shared_ptr< SGI_NetLabel > > & | getNetLabels () noexcept |
const QHash< SI_Polygon *, std::shared_ptr< PolygonGraphicsItem > > & | getPolygons () noexcept |
const QHash< SI_Text *, std::shared_ptr< SGI_Text > > & | getTexts () noexcept |
void | selectAll () noexcept |
void | selectItemsInRect (const Point &p1, const Point &p2) noexcept |
void | clearSelection () noexcept |
void | updateHighlightedNetSignals () noexcept |
SchematicGraphicsScene & | operator= (const SchematicGraphicsScene &rhs)=delete |
![]() | |
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 |
Private Member Functions | |
void | addSymbol (SI_Symbol &symbol) noexcept |
void | removeSymbol (SI_Symbol &symbol) noexcept |
void | addSymbolPin (SI_SymbolPin &pin, std::weak_ptr< SGI_Symbol > symbol) noexcept |
void | removeSymbolPin (SI_SymbolPin &pin) noexcept |
void | addNetSegment (SI_NetSegment &netSegment) noexcept |
void | removeNetSegment (SI_NetSegment &netSegment) noexcept |
void | addNetPointsAndNetLines (const QList< SI_NetPoint * > &netPoints, const QList< SI_NetLine * > &netLines) noexcept |
void | removeNetPointsAndNetLines (const QList< SI_NetPoint * > &netPoints, const QList< SI_NetLine * > &netLines) noexcept |
void | addNetPoint (SI_NetPoint &netPoint) noexcept |
void | removeNetPoint (SI_NetPoint &netPoint) noexcept |
void | addNetLine (SI_NetLine &netLine) noexcept |
void | removeNetLine (SI_NetLine &netLine) noexcept |
void | addNetLabel (SI_NetLabel &netLabel) noexcept |
void | removeNetLabel (SI_NetLabel &netLabel) noexcept |
void | addPolygon (SI_Polygon &polygon) noexcept |
void | removePolygon (SI_Polygon &polygon) noexcept |
void | addText (SI_Text &text) noexcept |
void | removeText (SI_Text &text) noexcept |
Private Attributes | |
Schematic & | mSchematic |
const GraphicsLayerList & | mLayers |
std::shared_ptr< const QSet< const NetSignal * > > | mHighlightedNetSignals |
QHash< SI_Symbol *, std::shared_ptr< SGI_Symbol > > | mSymbols |
QHash< SI_SymbolPin *, std::shared_ptr< SGI_SymbolPin > > | mSymbolPins |
QHash< SI_NetPoint *, std::shared_ptr< SGI_NetPoint > > | mNetPoints |
QHash< SI_NetLine *, std::shared_ptr< SGI_NetLine > > | mNetLines |
QHash< SI_NetLabel *, std::shared_ptr< SGI_NetLabel > > | mNetLabels |
QHash< SI_Polygon *, std::shared_ptr< PolygonGraphicsItem > > | mPolygons |
QHash< SI_Text *, std::shared_ptr< SGI_Text > > | mTexts |
Additional Inherited Members | |
![]() | |
void | drawBackground (QPainter *painter, const QRectF &rect) noexcept override |
void | drawForeground (QPainter *painter, const QRectF &rect) noexcept override |
The SchematicGraphicsScene class.
enum ZValue : int |
Z-values of all items in a schematic (to define the stacking order)
These values are used for QGraphicsItem::setZValue() to define the stacking order of all items in a schematic 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_TextAnchors | For librepcb::SI_Text anchor lines. |
ZValue_Symbols | For librepcb::SI_Symbol items. |
ZValue_SymbolPins | For librepcb::SI_SymbolPin items. |
ZValue_Polygons | For librepcb::SI_Polygon items. |
ZValue_Texts | For librepcb::SI_Text items. |
ZValue_NetLabels | For librepcb::SI_NetLabel items. |
ZValue_NetLines | For librepcb::SI_NetLine items. |
ZValue_HiddenNetPoints | Foror hidden librepcb::SI_NetPoint items. |
ZValue_VisibleNetPoints | For visible librepcb::SI_NetPoint items. |
|
delete |
|
delete |
|
explicitnoexcept |
|
virtualnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
delete |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |