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

Paints a librepcb::Footprint to a QPainter. More...

#include <footprintpainter.h>

+ Inheritance diagram for FootprintPainter:
+ Collaboration diagram for FootprintPainter:

Classes

struct  ColorContent
 

Public Member Functions

 FootprintPainter ()=delete
 
 FootprintPainter (const Footprint &footprint) noexcept
 
 FootprintPainter (const FootprintPainter &other)=delete
 
 ~FootprintPainter () noexcept
 
void paint (QPainter &painter, const GraphicsExportSettings &settings) const noexcept override
 Draw page content on a QPainter.
 
FootprintPainteroperator= (const FootprintPainter &rhs)=delete
 

Private Member Functions

void initContentByColor () const noexcept
 

Private Attributes

QFont mMonospaceFont
 
const StrokeFontmStrokeFont
 
QList< FootprintPadmPads
 
QList< PolygonmPolygons
 
QList< CirclemCircles
 
QList< StrokeTextmStrokeTexts
 
QList< HolemHoles
 
QMutex mMutex
 
QHash< QString, ColorContentmContentByColor
 

Detailed Description

Paints a librepcb::Footprint to a QPainter.

Used for librepcb::GraphicsExport.

Constructor & Destructor Documentation

◆ FootprintPainter() [1/3]

FootprintPainter ( )
delete

◆ FootprintPainter() [2/3]

FootprintPainter ( const Footprint footprint)
explicitnoexcept

◆ FootprintPainter() [3/3]

FootprintPainter ( const FootprintPainter other)
delete

◆ ~FootprintPainter()

~FootprintPainter ( )
noexcept

Member Function Documentation

◆ paint()

void paint ( QPainter &  painter,
const GraphicsExportSettings settings 
) const
overridevirtualnoexcept

Draw page content on a QPainter.

Attention
This method must be thread-safe as it might be called from multiple threads at the same time!
Note
Most settings are already handled by librepcb::GraphicsExport and should not be taken into account when implementing this method. In particular, any page layout or coordinate transformations do not need to be respected by this implementation. And for layer colors, just use librepcb::GraphicsExportSettings::getColor() and librepcb::GraphicsExportSettings::getFillColor().
Parameters
painterWhere to paint the content to.
settingsHelper class to fetch layer colors depending on the current export settings.

Implements GraphicsPagePainter.

+ Here is the call graph for this function:

◆ operator=()

FootprintPainter & operator= ( const FootprintPainter rhs)
delete

◆ initContentByColor()

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

Member Data Documentation

◆ mMonospaceFont

QFont mMonospaceFont
private

◆ mStrokeFont

const StrokeFont& mStrokeFont
private

◆ mPads

QList<FootprintPad> mPads
private

◆ mPolygons

QList<Polygon> mPolygons
private

◆ mCircles

QList<Circle> mCircles
private

◆ mStrokeTexts

QList<StrokeText> mStrokeTexts
private

◆ mHoles

QList<Hole> mHoles
private

◆ mMutex

QMutex mMutex
mutableprivate

◆ mContentByColor

QHash<QString, ColorContent> mContentByColor
mutableprivate

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