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

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

#include <symbolpainter.h>

+ Inheritance diagram for SymbolPainter:
+ Collaboration diagram for SymbolPainter:

Public Member Functions

 SymbolPainter ()=delete
 
 SymbolPainter (const Symbol &symbol) noexcept
 
 SymbolPainter (const SymbolPainter &other)=delete
 
 ~SymbolPainter () noexcept
 
void paint (QPainter &painter, const GraphicsExportSettings &settings) const noexcept override
 Draw page content on a QPainter.
 
SymbolPainteroperator= (const SymbolPainter &rhs)=delete
 

Private Attributes

QFont mDefaultFont
 
QList< SymbolPinmPins
 
QList< PolygonmPolygons
 
QList< CirclemCircles
 
QList< TextmTexts
 

Detailed Description

Paints a librepcb::Symbol to a QPainter.

Used for librepcb::GraphicsExport.

Constructor & Destructor Documentation

◆ SymbolPainter() [1/3]

SymbolPainter ( )
delete

◆ SymbolPainter() [2/3]

SymbolPainter ( const Symbol symbol)
explicitnoexcept

◆ SymbolPainter() [3/3]

SymbolPainter ( const SymbolPainter other)
delete

◆ ~SymbolPainter()

~SymbolPainter ( )
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=()

SymbolPainter & operator= ( const SymbolPainter rhs)
delete

Member Data Documentation

◆ mDefaultFont

QFont mDefaultFont
private

◆ mPins

QList<SymbolPin> mPins
private

◆ mPolygons

QList<Polygon> mPolygons
private

◆ mCircles

QList<Circle> mCircles
private

◆ mTexts

QList<Text> mTexts
private

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