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

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

#include <schematicpainter.h>

+ Inheritance diagram for SchematicPainter:
+ Collaboration diagram for SchematicPainter:

Classes

struct  Label
 
struct  Line
 
struct  Pin
 
struct  Symbol
 

Public Member Functions

 SchematicPainter ()=delete
 
 SchematicPainter (const Schematic &schematic, bool thumbnail=false) noexcept
 
 SchematicPainter (const SchematicPainter &other)=delete
 
 ~SchematicPainter () noexcept
 
void paint (QPainter &painter, const GraphicsExportSettings &settings) const noexcept override
 Draw page content on a QPainter.
 
SchematicPainteroperator= (const SchematicPainter &rhs)=delete
 

Private Attributes

QFont mDefaultFont
 
QFont mNetLabelFont
 
QList< SymbolmSymbols
 
QList< PointmJunctions
 
QList< LinemNetLines
 
QList< LabelmNetLabels
 
QList< PolygonmPolygons
 
QList< TextmTexts
 

Detailed Description

Paints a librepcb::Schematic to a QPainter.

Used for librepcb::GraphicsExport.

Constructor & Destructor Documentation

◆ SchematicPainter() [1/3]

SchematicPainter ( )
delete

◆ SchematicPainter() [2/3]

SchematicPainter ( const Schematic schematic,
bool  thumbnail = false 
)
explicitnoexcept
+ Here is the call graph for this function:

◆ SchematicPainter() [3/3]

SchematicPainter ( const SchematicPainter other)
delete

◆ ~SchematicPainter()

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

SchematicPainter & operator= ( const SchematicPainter rhs)
delete

Member Data Documentation

◆ mDefaultFont

QFont mDefaultFont
private

◆ mNetLabelFont

QFont mNetLabelFont
private

◆ mSymbols

QList<Symbol> mSymbols
private

◆ mJunctions

QList<Point> mJunctions
private

◆ mNetLines

QList<Line> mNetLines
private

◆ mNetLabels

QList<Label> mNetLabels
private

◆ mPolygons

QList<Polygon> mPolygons
private

◆ mTexts

QList<Text> mTexts
private

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