LibrePCB Developers Documentation
Loading...
Searching...
No Matches
SymbolGraphicsItem Class Referencefinal

The SymbolGraphicsItem class. More...

#include <symbolgraphicsitem.h>

Inherits QGraphicsItemGroup.

+ Collaboration diagram for SymbolGraphicsItem:

Public Types

enum class  FindFlag
 

Public Member Functions

 SymbolGraphicsItem ()=delete
 
 SymbolGraphicsItem (const SymbolGraphicsItem &other)=delete
 
 SymbolGraphicsItem (Symbol &symbol, const IF_GraphicsLayerProvider &lp, std::shared_ptr< const Component > cmp=nullptr, std::shared_ptr< const ComponentSymbolVariantItem > cmpItem=nullptr, const QStringList &localeOrder={}) noexcept
 
 ~SymbolGraphicsItem () noexcept
 
std::shared_ptr< SymbolPinGraphicsItemgetGraphicsItem (std::shared_ptr< SymbolPin > pin) noexcept
 
std::shared_ptr< CircleGraphicsItemgetGraphicsItem (std::shared_ptr< Circle > circle) noexcept
 
std::shared_ptr< PolygonGraphicsItemgetGraphicsItem (std::shared_ptr< Polygon > polygon) noexcept
 
std::shared_ptr< TextGraphicsItemgetGraphicsItem (std::shared_ptr< Text > text) noexcept
 
QList< std::shared_ptr< SymbolPinGraphicsItem > > getSelectedPins () noexcept
 
QList< std::shared_ptr< CircleGraphicsItem > > getSelectedCircles () noexcept
 
QList< std::shared_ptr< PolygonGraphicsItem > > getSelectedPolygons () noexcept
 
QList< std::shared_ptr< TextGraphicsItem > > getSelectedTexts () noexcept
 
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPos (const QPainterPath &posAreaSmall, const QPainterPath &posAreaLarge, FindFlags flags) noexcept
 
void setPosition (const Point &pos) noexcept
 
void setRotation (const Angle &rot) noexcept
 
void updateAllTexts () noexcept
 
void setSelectionRect (const QRectF rect) noexcept
 
SymbolGraphicsItemoperator= (const SymbolGraphicsItem &rhs)=delete
 

Private Member Functions

void syncPins () noexcept
 
void syncCircles () noexcept
 
void syncPolygons () noexcept
 
void syncTexts () noexcept
 
void symbolEdited (const Symbol &symbol, Symbol::Event event) noexcept
 
void substituteText (TextGraphicsItem &text) noexcept
 

Private Attributes

SymbolmSymbol
 
const IF_GraphicsLayerProvidermLayerProvider
 
std::shared_ptr< const ComponentmComponent
 
std::shared_ptr< const ComponentSymbolVariantItemmItem
 
QStringList mLocaleOrder
 
QMap< std::shared_ptr< SymbolPin >, std::shared_ptr< SymbolPinGraphicsItem > > mPinGraphicsItems
 
QMap< std::shared_ptr< Circle >, std::shared_ptr< CircleGraphicsItem > > mCircleGraphicsItems
 
QMap< std::shared_ptr< Polygon >, std::shared_ptr< PolygonGraphicsItem > > mPolygonGraphicsItems
 
QMap< std::shared_ptr< Text >, std::shared_ptr< TextGraphicsItem > > mTextGraphicsItems
 
Symbol::OnEditedSlot mOnEditedSlot
 

Detailed Description

The SymbolGraphicsItem class.

Member Enumeration Documentation

◆ FindFlag

enum class FindFlag
strong
Enumerator
Pins 
Circles 
Polygons 
Texts 
All 
AcceptNearMatch 

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,
std::shared_ptr< const Component cmp = nullptr,
std::shared_ptr< const ComponentSymbolVariantItem cmpItem = nullptr,
const QStringList &  localeOrder = {} 
)
noexcept

◆ ~SymbolGraphicsItem()

~SymbolGraphicsItem ( )
noexcept

Member Function Documentation

◆ getGraphicsItem() [1/4]

std::shared_ptr< SymbolPinGraphicsItem > getGraphicsItem ( std::shared_ptr< SymbolPin pin)
inlinenoexcept
+ Here is the caller graph for this function:

◆ getGraphicsItem() [2/4]

std::shared_ptr< CircleGraphicsItem > getGraphicsItem ( std::shared_ptr< Circle circle)
inlinenoexcept

◆ getGraphicsItem() [3/4]

std::shared_ptr< PolygonGraphicsItem > getGraphicsItem ( std::shared_ptr< Polygon polygon)
inlinenoexcept

◆ getGraphicsItem() [4/4]

std::shared_ptr< TextGraphicsItem > getGraphicsItem ( std::shared_ptr< Text text)
inlinenoexcept

◆ getSelectedPins()

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

◆ getSelectedCircles()

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

◆ getSelectedPolygons()

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

◆ getSelectedTexts()

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

◆ findItemsAtPos()

QList< std::shared_ptr< QGraphicsItem > > findItemsAtPos ( const QPainterPath &  posAreaSmall,
const QPainterPath &  posAreaLarge,
FindFlags  flags 
)
noexcept

◆ setPosition()

void setPosition ( const Point pos)
noexcept

◆ setRotation()

void setRotation ( const Angle rot)
noexcept

◆ updateAllTexts()

void updateAllTexts ( )
noexcept
+ Here is the call graph for this function:

◆ setSelectionRect()

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

◆ operator=()

SymbolGraphicsItem & operator= ( const SymbolGraphicsItem rhs)
delete

◆ syncPins()

void syncPins ( )
privatenoexcept
+ Here is the call graph for this function:

◆ syncCircles()

void syncCircles ( )
privatenoexcept
+ Here is the call graph for this function:

◆ syncPolygons()

void syncPolygons ( )
privatenoexcept
+ Here is the call graph for this function:

◆ syncTexts()

void syncTexts ( )
privatenoexcept
+ Here is the call graph for this function:

◆ symbolEdited()

void symbolEdited ( const Symbol symbol,
Symbol::Event  event 
)
privatenoexcept

◆ substituteText()

void substituteText ( TextGraphicsItem text)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mSymbol

Symbol& mSymbol
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mComponent

std::shared_ptr<const Component> mComponent
private

◆ mItem

std::shared_ptr<const ComponentSymbolVariantItem> mItem
private

◆ mLocaleOrder

QStringList mLocaleOrder
private

◆ mPinGraphicsItems

QMap<std::shared_ptr<SymbolPin>, std::shared_ptr<SymbolPinGraphicsItem> > mPinGraphicsItems
private

◆ mCircleGraphicsItems

QMap<std::shared_ptr<Circle>, std::shared_ptr<CircleGraphicsItem> > mCircleGraphicsItems
private

◆ mPolygonGraphicsItems

QMap<std::shared_ptr<Polygon>, std::shared_ptr<PolygonGraphicsItem> > mPolygonGraphicsItems
private

◆ mTextGraphicsItems

QMap<std::shared_ptr<Text>, std::shared_ptr<TextGraphicsItem> > mTextGraphicsItems
private

◆ mOnEditedSlot

Symbol::OnEditedSlot mOnEditedSlot
private

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