LibrePCB Developers Documentation
FootprintGraphicsItem Class Referencefinal

The FootprintGraphicsItem class. More...

#include <footprintgraphicsitem.h>

Inherits QGraphicsItemGroup.

+ Collaboration diagram for FootprintGraphicsItem:

Public Types

enum class  FindFlag
 

Public Member Functions

 FootprintGraphicsItem ()=delete
 
 FootprintGraphicsItem (const FootprintGraphicsItem &other)=delete
 
 FootprintGraphicsItem (std::shared_ptr< Footprint > footprint, const IF_GraphicsLayerProvider &lp, const StrokeFont &font, const PackagePadList *packagePadList=nullptr, const Component *component=nullptr, const QStringList &localeOrder={}) noexcept
 
 ~FootprintGraphicsItem () noexcept
 
std::shared_ptr< FootprintPadGraphicsItemgetGraphicsItem (std::shared_ptr< FootprintPad > pad) noexcept
 
std::shared_ptr< CircleGraphicsItemgetGraphicsItem (std::shared_ptr< Circle > circle) noexcept
 
std::shared_ptr< PolygonGraphicsItemgetGraphicsItem (std::shared_ptr< Polygon > polygon) noexcept
 
std::shared_ptr< StrokeTextGraphicsItemgetGraphicsItem (std::shared_ptr< StrokeText > text) noexcept
 
std::shared_ptr< ZoneGraphicsItemgetGraphicsItem (std::shared_ptr< Zone > zone) noexcept
 
std::shared_ptr< HoleGraphicsItemgetGraphicsItem (std::shared_ptr< Hole > hole) noexcept
 
QList< std::shared_ptr< FootprintPadGraphicsItem > > getSelectedPads () noexcept
 
QList< std::shared_ptr< CircleGraphicsItem > > getSelectedCircles () noexcept
 
QList< std::shared_ptr< PolygonGraphicsItem > > getSelectedPolygons () noexcept
 
QList< std::shared_ptr< StrokeTextGraphicsItem > > getSelectedStrokeTexts () noexcept
 
QList< std::shared_ptr< ZoneGraphicsItem > > getSelectedZones () noexcept
 
QList< std::shared_ptr< HoleGraphicsItem > > getSelectedHoles () 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
 
FootprintGraphicsItemoperator= (const FootprintGraphicsItem &rhs)=delete
 

Private Member Functions

void syncPads () noexcept
 
void syncCircles () noexcept
 
void syncPolygons () noexcept
 
void syncStrokeTexts () noexcept
 
void syncZones () noexcept
 
void syncHoles () noexcept
 
void footprintEdited (const Footprint &footprint, Footprint::Event event) noexcept
 
void substituteText (StrokeTextGraphicsItem &text) noexcept
 

Private Attributes

std::shared_ptr< FootprintmFootprint
 
const IF_GraphicsLayerProvidermLayerProvider
 
const StrokeFontmFont
 
const PackagePadListmPackagePadList
 
QPointer< const ComponentmComponent
 
QStringList mLocaleOrder
 
QMap< std::shared_ptr< FootprintPad >, std::shared_ptr< FootprintPadGraphicsItem > > mPadGraphicsItems
 
QMap< std::shared_ptr< Circle >, std::shared_ptr< CircleGraphicsItem > > mCircleGraphicsItems
 
QMap< std::shared_ptr< Polygon >, std::shared_ptr< PolygonGraphicsItem > > mPolygonGraphicsItems
 
QMap< std::shared_ptr< StrokeText >, std::shared_ptr< StrokeTextGraphicsItem > > mStrokeTextGraphicsItems
 
QMap< std::shared_ptr< Zone >, std::shared_ptr< ZoneGraphicsItem > > mZoneGraphicsItems
 
QMap< std::shared_ptr< Hole >, std::shared_ptr< HoleGraphicsItem > > mHoleGraphicsItems
 
Footprint::OnEditedSlot mOnEditedSlot
 

Detailed Description

Member Enumeration Documentation

◆ FindFlag

enum class FindFlag
strong
Enumerator
Pads 
Circles 
Polygons 
StrokeTexts 
Zones 
Holes 
All 
AcceptNearMatch 

Constructor & Destructor Documentation

◆ FootprintGraphicsItem() [1/3]

◆ FootprintGraphicsItem() [2/3]

FootprintGraphicsItem ( const FootprintGraphicsItem other)
delete

◆ FootprintGraphicsItem() [3/3]

FootprintGraphicsItem ( std::shared_ptr< Footprint footprint,
const IF_GraphicsLayerProvider lp,
const StrokeFont font,
const PackagePadList packagePadList = nullptr,
const Component component = nullptr,
const QStringList &  localeOrder = {} 
)
noexcept

◆ ~FootprintGraphicsItem()

~FootprintGraphicsItem ( )
noexcept

Member Function Documentation

◆ getGraphicsItem() [1/6]

std::shared_ptr< FootprintPadGraphicsItem > getGraphicsItem ( std::shared_ptr< FootprintPad pad)
inlinenoexcept
+ Here is the caller graph for this function:

◆ getGraphicsItem() [2/6]

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

◆ getGraphicsItem() [3/6]

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

◆ getGraphicsItem() [4/6]

std::shared_ptr< StrokeTextGraphicsItem > getGraphicsItem ( std::shared_ptr< StrokeText text)
inlinenoexcept

◆ getGraphicsItem() [5/6]

std::shared_ptr< ZoneGraphicsItem > getGraphicsItem ( std::shared_ptr< Zone zone)
inlinenoexcept

◆ getGraphicsItem() [6/6]

std::shared_ptr< HoleGraphicsItem > getGraphicsItem ( std::shared_ptr< Hole hole)
inlinenoexcept

◆ getSelectedPads()

QList< std::shared_ptr< FootprintPadGraphicsItem > > getSelectedPads ( )
noexcept

◆ getSelectedCircles()

QList< std::shared_ptr< CircleGraphicsItem > > getSelectedCircles ( )
noexcept

◆ getSelectedPolygons()

QList< std::shared_ptr< PolygonGraphicsItem > > getSelectedPolygons ( )
noexcept

◆ getSelectedStrokeTexts()

QList< std::shared_ptr< StrokeTextGraphicsItem > > getSelectedStrokeTexts ( )
noexcept

◆ getSelectedZones()

QList< std::shared_ptr< ZoneGraphicsItem > > getSelectedZones ( )
noexcept

◆ getSelectedHoles()

QList< std::shared_ptr< HoleGraphicsItem > > getSelectedHoles ( )
noexcept

◆ 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

◆ operator=()

FootprintGraphicsItem & operator= ( const FootprintGraphicsItem rhs)
delete

◆ syncPads()

void syncPads ( )
privatenoexcept

◆ syncCircles()

void syncCircles ( )
privatenoexcept

◆ syncPolygons()

void syncPolygons ( )
privatenoexcept

◆ syncStrokeTexts()

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

◆ syncZones()

void syncZones ( )
privatenoexcept

◆ syncHoles()

void syncHoles ( )
privatenoexcept

◆ footprintEdited()

void footprintEdited ( const Footprint footprint,
Footprint::Event  event 
)
privatenoexcept

◆ substituteText()

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

Member Data Documentation

◆ mFootprint

std::shared_ptr<Footprint> mFootprint
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mFont

const StrokeFont& mFont
private

◆ mPackagePadList

const PackagePadList* mPackagePadList
private

◆ mComponent

QPointer<const Component> mComponent
private

◆ mLocaleOrder

QStringList mLocaleOrder
private

◆ mPadGraphicsItems

QMap<std::shared_ptr<FootprintPad>, std::shared_ptr<FootprintPadGraphicsItem> > mPadGraphicsItems
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

◆ mStrokeTextGraphicsItems

QMap<std::shared_ptr<StrokeText>, std::shared_ptr<StrokeTextGraphicsItem> > mStrokeTextGraphicsItems
private

◆ mZoneGraphicsItems

QMap<std::shared_ptr<Zone>, std::shared_ptr<ZoneGraphicsItem> > mZoneGraphicsItems
private

◆ mHoleGraphicsItems

QMap<std::shared_ptr<Hole>, std::shared_ptr<HoleGraphicsItem> > mHoleGraphicsItems
private

◆ mOnEditedSlot

Footprint::OnEditedSlot mOnEditedSlot
private

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