LibrePCB Developers Documentation
SymbolGraphicsItem Class Referencefinal

The SymbolGraphicsItem class. More...

#include <symbolgraphicsitem.h>

Inherits QGraphicsItem.

+ Collaboration diagram for SymbolGraphicsItem:

Public Member Functions

 SymbolGraphicsItem ()=delete
 
 SymbolGraphicsItem (const SymbolGraphicsItem &other)=delete
 
 SymbolGraphicsItem (Symbol &symbol, const IF_GraphicsLayerProvider &lp) noexcept
 
 ~SymbolGraphicsItem () noexcept
 
SymbolPinGraphicsItemgetPinGraphicsItem (const Uuid &pin) noexcept
 
CircleGraphicsItemgetCircleGraphicsItem (const Circle &circle) noexcept
 
PolygonGraphicsItemgetPolygonGraphicsItem (const Polygon &polygon) noexcept
 
TextGraphicsItemgetTextGraphicsItem (const Text &text) noexcept
 
int getItemsAtPosition (const Point &pos, QList< QSharedPointer< SymbolPinGraphicsItem >> *pins, QList< QSharedPointer< CircleGraphicsItem >> *circles, QList< QSharedPointer< PolygonGraphicsItem >> *polygons, QList< QSharedPointer< TextGraphicsItem >> *texts) noexcept
 
QList< QSharedPointer< SymbolPinGraphicsItem > > getSelectedPins () noexcept
 
QList< QSharedPointer< CircleGraphicsItem > > getSelectedCircles () noexcept
 
QList< QSharedPointer< PolygonGraphicsItem > > getSelectedPolygons () noexcept
 
QList< QSharedPointer< TextGraphicsItem > > getSelectedTexts () noexcept
 
void setPosition (const Point &pos) noexcept
 
void setRotation (const Angle &rot) noexcept
 
void addPin (SymbolPin &pin) noexcept
 
void removePin (SymbolPin &pin) noexcept
 
void addCircle (Circle &circle) noexcept
 
void removeCircle (Circle &circle) noexcept
 
void addPolygon (Polygon &polygon) noexcept
 
void removePolygon (Polygon &polygon) noexcept
 
void addText (Text &text) noexcept
 
void removeText (Text &text) noexcept
 
void setSelectionRect (const QRectF rect) noexcept
 
QRectF boundingRect () const noexcept override
 
QPainterPath shape () const noexcept override
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexcept override
 
SymbolGraphicsItemoperator= (const SymbolGraphicsItem &rhs)=delete
 

Private Attributes

SymbolmSymbol
 
const IF_GraphicsLayerProvidermLayerProvider
 
QHash< Uuid, QSharedPointer< SymbolPinGraphicsItem > > mPinGraphicsItems
 
QHash< const Circle *, QSharedPointer< CircleGraphicsItem > > mCircleGraphicsItems
 
QHash< const Polygon *, QSharedPointer< PolygonGraphicsItem > > mPolygonGraphicsItems
 
QHash< const Text *, QSharedPointer< TextGraphicsItem > > mTextGraphicsItems
 

Detailed Description

The SymbolGraphicsItem class.

Constructor & Destructor Documentation

◆ SymbolGraphicsItem() [1/3]

SymbolGraphicsItem ( )
delete

◆ SymbolGraphicsItem() [2/3]

SymbolGraphicsItem ( const SymbolGraphicsItem other)
delete

◆ SymbolGraphicsItem() [3/3]

SymbolGraphicsItem ( Symbol symbol,
const IF_GraphicsLayerProvider lp 
)
noexcept

◆ ~SymbolGraphicsItem()

~SymbolGraphicsItem ( )
noexcept
+ Here is the call graph for this function:

Member Function Documentation

◆ getPinGraphicsItem()

SymbolPinGraphicsItem * getPinGraphicsItem ( const Uuid pin)
noexcept
+ Here is the caller graph for this function:

◆ getCircleGraphicsItem()

CircleGraphicsItem * getCircleGraphicsItem ( const Circle circle)
noexcept
+ Here is the caller graph for this function:

◆ getPolygonGraphicsItem()

PolygonGraphicsItem * getPolygonGraphicsItem ( const Polygon polygon)
noexcept
+ Here is the caller graph for this function:

◆ getTextGraphicsItem()

TextGraphicsItem * getTextGraphicsItem ( const Text text)
noexcept
+ Here is the caller graph for this function:

◆ getItemsAtPosition()

int getItemsAtPosition ( const Point pos,
QList< QSharedPointer< SymbolPinGraphicsItem >> *  pins,
QList< QSharedPointer< CircleGraphicsItem >> *  circles,
QList< QSharedPointer< PolygonGraphicsItem >> *  polygons,
QList< QSharedPointer< TextGraphicsItem >> *  texts 
)
noexcept
+ Here is the caller graph for this function:

◆ getSelectedPins()

QList< QSharedPointer< SymbolPinGraphicsItem > > getSelectedPins ( )
noexcept
+ Here is the caller graph for this function:

◆ getSelectedCircles()

QList< QSharedPointer< CircleGraphicsItem > > getSelectedCircles ( )
noexcept
+ Here is the caller graph for this function:

◆ getSelectedPolygons()

QList< QSharedPointer< PolygonGraphicsItem > > getSelectedPolygons ( )
noexcept
+ Here is the caller graph for this function:

◆ getSelectedTexts()

QList< QSharedPointer< TextGraphicsItem > > getSelectedTexts ( )
noexcept
+ Here is the caller graph for this function:

◆ setPosition()

void setPosition ( const Point pos)
noexcept

◆ setRotation()

void setRotation ( const Angle rot)
noexcept

◆ addPin()

void addPin ( SymbolPin pin)
noexcept
+ Here is the caller graph for this function:

◆ removePin()

void removePin ( SymbolPin pin)
noexcept
+ Here is the caller graph for this function:

◆ addCircle()

void addCircle ( Circle circle)
noexcept
+ Here is the caller graph for this function:

◆ removeCircle()

void removeCircle ( Circle circle)
noexcept
+ Here is the caller graph for this function:

◆ addPolygon()

void addPolygon ( Polygon polygon)
noexcept
+ Here is the caller graph for this function:

◆ removePolygon()

void removePolygon ( Polygon polygon)
noexcept
+ Here is the caller graph for this function:

◆ addText()

void addText ( Text text)
noexcept
+ Here is the caller graph for this function:

◆ removeText()

void removeText ( Text text)
noexcept
+ Here is the caller graph for this function:

◆ setSelectionRect()

void setSelectionRect ( const QRectF  rect)
noexcept
+ Here is the caller graph for this function:

◆ boundingRect()

QRectF boundingRect ( ) const
inlineoverridenoexcept
+ Here is the caller graph for this function:

◆ shape()

QPainterPath shape ( ) const
inlineoverridenoexcept
+ Here is the call graph for this function:

◆ paint()

void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
overridenoexcept
+ Here is the caller graph for this function:

◆ operator=()

SymbolGraphicsItem& operator= ( const SymbolGraphicsItem rhs)
delete
+ Here is the caller graph for this function:

Member Data Documentation

◆ mSymbol

Symbol& mSymbol
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mPinGraphicsItems

QHash<Uuid, QSharedPointer<SymbolPinGraphicsItem> > mPinGraphicsItems
private

◆ mCircleGraphicsItems

QHash<const Circle*, QSharedPointer<CircleGraphicsItem> > mCircleGraphicsItems
private

◆ mPolygonGraphicsItems

QHash<const Polygon*, QSharedPointer<PolygonGraphicsItem> > mPolygonGraphicsItems
private

◆ mTextGraphicsItems

QHash<const Text*, QSharedPointer<TextGraphicsItem> > mTextGraphicsItems
private

The documentation for this class was generated from the following files: