Seamly2D
Code documentation
VDxfEngine Class Reference

#include <vdxfengine.h>

Inheritance diagram for VDxfEngine:
Collaboration diagram for VDxfEngine:

Public Member Functions

 VDxfEngine ()
 
virtual ~VDxfEngine ()
 
virtual bool begin (QPaintDevice *pdev) Q_DECL_OVERRIDE
 
virtual bool end () Q_DECL_OVERRIDE
 
virtual void updateState (const QPaintEngineState &state) Q_DECL_OVERRIDE
 
virtual void drawPath (const QPainterPath &path) Q_DECL_OVERRIDE
 
virtual void drawLines (const QLineF *lines, int lineCount) Q_DECL_OVERRIDE
 
virtual void drawLines (const QLine *lines, int lineCount) Q_DECL_OVERRIDE
 
virtual void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE
 
virtual void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE
 
virtual void drawEllipse (const QRectF &rect) Q_DECL_OVERRIDE
 
virtual void drawEllipse (const QRect &rect) Q_DECL_OVERRIDE
 
virtual void drawTextItem (const QPointF &p, const QTextItem &textItem) Q_DECL_OVERRIDE
 
virtual Type type () const Q_DECL_OVERRIDE
 
virtual void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) Q_DECL_OVERRIDE
 
QSize getSize () const
 
void setSize (const QSize &value)
 
double getResolution () const
 
void setResolution (double value)
 
QString getFileName () const
 
void setFileName (const QString &value)
 
DRW::Version GetVersion () const
 
void SetVersion (DRW::Version version)
 
void SetBinaryFormat (bool binary)
 
bool IsBinaryFormat () const
 
std::string getPenStyle ()
 
int getPenColor ()
 
void setMeasurement (const VarMeasurement &var)
 
void setInsunits (const VarInsunits &var)
 
template<class P , class V >
P * CreateAAMAPolygon (const QVector< QPointF > &polygon, const QString &layer, bool forceClosed)
 

Private Member Functions

Q_REQUIRED_RESULT double FromPixel (double pix, const VarInsunits &unit) const
 
Q_REQUIRED_RESULT double ToPixel (double val, const VarInsunits &unit) const
 
bool ExportToAAMA (const QVector< VLayoutPiece > &details)
 
void ExportAAMAOutline (dx_ifaceBlock *detailBlock, const VLayoutPiece &detail)
 
void ExportAAMADraw (dx_ifaceBlock *detailBlock, const VLayoutPiece &detail)
 
void ExportAAMAIntcut (dx_ifaceBlock *detailBlock, const VLayoutPiece &detail)
 
void ExportAAMANotch (dx_ifaceBlock *detailBlock, const VLayoutPiece &detail)
 
void ExportAAMAGrainline (dx_ifaceBlock *detailBlock, const VLayoutPiece &detail)
 
void ExportAAMAText (dx_ifaceBlock *detailBlock, const VLayoutPiece &detail)
 
void ExportAAMAGlobalText (const QSharedPointer< dx_iface > &input, const QVector< VLayoutPiece > &details)
 
Q_REQUIRED_RESULT DRW_Entity * AAMAPolygon (const QVector< QPointF > &polygon, const QString &layer, bool forceClosed)
 
Q_REQUIRED_RESULT DRW_Entity * AAMALine (const QLineF &line, const QString &layer)
 
Q_REQUIRED_RESULT DRW_Entity * AAMAText (const QPointF &pos, const QString &text, const QString &layer)
 
template<class P , class V >
Q_REQUIRED_RESULT P * CreateAAMAPolygon (const QVector< QPointF > &polygon, const QString &layer, bool forceClosed)
 

Private Attributes

QSize size
 
double resolution
 
QString fileName
 
DRW::Version m_version
 
bool m_binary
 
QTransform transform
 
QSharedPointer< dx_ifaceinput
 
VarMeasurement varMeasurement
 
VarInsunits varInsunits
 
DRW_Text * textBuffer
 

Friends

class VDxfPaintDevice
 

Detailed Description

Definition at line 53 of file vdxfengine.h.

Constructor & Destructor Documentation

◆ VDxfEngine()

VDxfEngine::VDxfEngine ( )

Definition at line 74 of file vdxfengine.cpp.

References Metric, and Millimeters.

◆ ~VDxfEngine()

VDxfEngine::~VDxfEngine ( )
virtual

Definition at line 90 of file vdxfengine.cpp.

References textBuffer.

Member Function Documentation

◆ AAMALine()

DRW_Entity * VDxfEngine::AAMALine ( const QLineF &  line,
const QString &  layer 
)
private

Definition at line 798 of file vdxfengine.cpp.

References FromPixel(), getSize(), and varInsunits.

Referenced by ExportAAMAGrainline(), and ExportAAMANotch().

◆ AAMAPolygon()

DRW_Entity * VDxfEngine::AAMAPolygon ( const QVector< QPointF > &  polygon,
const QString &  layer,
bool  forceClosed 
)
private

Definition at line 780 of file vdxfengine.cpp.

References m_version.

Referenced by ExportAAMADraw(), ExportAAMAIntcut(), and ExportAAMAOutline().

◆ AAMAText()

DRW_Entity * VDxfEngine::AAMAText ( const QPointF &  pos,
const QString &  text,
const QString &  layer 
)
private

Definition at line 811 of file vdxfengine.cpp.

References AAMATextHeight, FromPixel(), getSize(), and varInsunits.

Referenced by ExportAAMAGlobalText(), and ExportAAMAText().

◆ begin()

bool VDxfEngine::begin ( QPaintDevice *  pdev)
virtual

Definition at line 96 of file vdxfengine.cpp.

References fileName, input, m_version, size, varInsunits, and varMeasurement.

◆ CreateAAMAPolygon() [1/2]

template<class P , class V >
P* VDxfEngine::CreateAAMAPolygon ( const QVector< QPointF > &  polygon,
const QString &  layer,
bool  forceClosed 
)

Definition at line 828 of file vdxfengine.cpp.

References FromPixel(), getSize(), and varInsunits.

◆ CreateAAMAPolygon() [2/2]

template<class P , class V >
Q_REQUIRED_RESULT P* VDxfEngine::CreateAAMAPolygon ( const QVector< QPointF > &  polygon,
const QString &  layer,
bool  forceClosed 
)
private

◆ drawEllipse() [1/2]

void VDxfEngine::drawEllipse ( const QRect &  rect)
virtual

Definition at line 338 of file vdxfengine.cpp.

◆ drawEllipse() [2/2]

void VDxfEngine::drawEllipse ( const QRectF &  rect)
virtual

Definition at line 297 of file vdxfengine.cpp.

References FromPixel(), getPenColor(), getPenStyle(), getSize(), input, transform, and varInsunits.

◆ drawLines() [1/2]

void VDxfEngine::drawLines ( const QLine *  lines,
int  lineCount 
)
virtual

Definition at line 225 of file vdxfengine.cpp.

◆ drawLines() [2/2]

void VDxfEngine::drawLines ( const QLineF *  lines,
int  lineCount 
)
virtual

Definition at line 203 of file vdxfengine.cpp.

References FromPixel(), getPenColor(), getPenStyle(), getSize(), input, transform, and varInsunits.

◆ drawPath()

void VDxfEngine::drawPath ( const QPainterPath &  path)
virtual

◆ drawPixmap()

void VDxfEngine::drawPixmap ( const QRectF &  r,
const QPixmap &  pm,
const QRectF &  sr 
)
virtual

Definition at line 396 of file vdxfengine.cpp.

◆ drawPolygon() [1/2]

virtual void VDxfEngine::drawPolygon ( const QPoint *  points,
int  pointCount,
PolygonDrawMode  mode 
)
virtual

◆ drawPolygon() [2/2]

void VDxfEngine::drawPolygon ( const QPointF *  points,
int  pointCount,
PolygonDrawMode  mode 
)
virtual

◆ drawTextItem()

void VDxfEngine::drawTextItem ( const QPointF &  p,
const QTextItem &  textItem 
)
virtual

◆ end()

bool VDxfEngine::end ( )
virtual

Definition at line 119 of file vdxfengine.cpp.

References input, and m_binary.

◆ ExportAAMADraw()

void VDxfEngine::ExportAAMADraw ( dx_ifaceBlock detailBlock,
const VLayoutPiece detail 
)
private

◆ ExportAAMAGlobalText()

void VDxfEngine::ExportAAMAGlobalText ( const QSharedPointer< dx_iface > &  input,
const QVector< VLayoutPiece > &  details 
)
private

Definition at line 762 of file vdxfengine.cpp.

References AAMAText(), AAMATextHeight, getSize(), input, ToPixel(), and varInsunits.

Referenced by ExportToAAMA().

◆ ExportAAMAGrainline()

void VDxfEngine::ExportAAMAGrainline ( dx_ifaceBlock detailBlock,
const VLayoutPiece detail 
)
private

Definition at line 735 of file vdxfengine.cpp.

References AAMALine(), dx_ifaceBlock::ent, and VLayoutPiece::getGrainline().

Referenced by ExportToAAMA().

◆ ExportAAMAIntcut()

void VDxfEngine::ExportAAMAIntcut ( dx_ifaceBlock detailBlock,
const VLayoutPiece detail 
)
private

Definition at line 694 of file vdxfengine.cpp.

References AAMAPolygon(), dx_ifaceBlock::ent, and VLayoutPiece::InternalPathsForCut().

Referenced by ExportToAAMA().

◆ ExportAAMANotch()

void VDxfEngine::ExportAAMANotch ( dx_ifaceBlock detailBlock,
const VLayoutPiece detail 
)
private

◆ ExportAAMAOutline()

void VDxfEngine::ExportAAMAOutline ( dx_ifaceBlock detailBlock,
const VLayoutPiece detail 
)
private

◆ ExportAAMAText()

void VDxfEngine::ExportAAMAText ( dx_ifaceBlock detailBlock,
const VLayoutPiece detail 
)
private

◆ ExportToAAMA()

◆ FromPixel()

QT_WARNING_PUSH double VDxfEngine::FromPixel ( double  pix,
const VarInsunits unit 
) const
private

◆ getFileName()

QString VDxfEngine::getFileName ( ) const

Definition at line 430 of file vdxfengine.cpp.

References fileName.

◆ getPenColor()

int VDxfEngine::getPenColor ( )

Definition at line 487 of file vdxfengine.cpp.

Referenced by drawEllipse(), drawLines(), drawPath(), drawPolygon(), and drawTextItem().

◆ getPenStyle()

std::string VDxfEngine::getPenStyle ( )

Definition at line 468 of file vdxfengine.cpp.

Referenced by drawEllipse(), drawLines(), drawPath(), drawPolygon(), and drawTextItem().

◆ getResolution()

double VDxfEngine::getResolution ( ) const

Definition at line 417 of file vdxfengine.cpp.

References resolution.

Referenced by VDxfPaintDevice::getResolution(), and VDxfPaintDevice::metric().

◆ getSize()

◆ GetVersion()

DRW::Version VDxfEngine::GetVersion ( ) const

Definition at line 443 of file vdxfengine.cpp.

References m_version.

Referenced by VDxfPaintDevice::GetVersion().

◆ IsBinaryFormat()

bool VDxfEngine::IsBinaryFormat ( ) const

Definition at line 462 of file vdxfengine.cpp.

References m_binary.

Referenced by VDxfPaintDevice::IsBinaryFormat().

◆ SetBinaryFormat()

void VDxfEngine::SetBinaryFormat ( bool  binary)

Definition at line 456 of file vdxfengine.cpp.

References m_binary.

Referenced by VDxfPaintDevice::SetBinaryFormat().

◆ setFileName()

void VDxfEngine::setFileName ( const QString &  value)

Definition at line 436 of file vdxfengine.cpp.

References fileName.

Referenced by VDxfPaintDevice::setFileName().

◆ setInsunits()

void VDxfEngine::setInsunits ( const VarInsunits var)

Definition at line 565 of file vdxfengine.cpp.

References varInsunits.

Referenced by VDxfPaintDevice::setInsunits().

◆ setMeasurement()

void VDxfEngine::setMeasurement ( const VarMeasurement var)

Definition at line 558 of file vdxfengine.cpp.

References varMeasurement.

Referenced by VDxfPaintDevice::setMeasurement().

◆ setResolution()

void VDxfEngine::setResolution ( double  value)

Definition at line 423 of file vdxfengine.cpp.

References resolution.

Referenced by VDxfPaintDevice::setResolution().

◆ setSize()

void VDxfEngine::setSize ( const QSize &  value)

Definition at line 410 of file vdxfengine.cpp.

References size.

Referenced by VDxfPaintDevice::setSize().

◆ SetVersion()

void VDxfEngine::SetVersion ( DRW::Version  version)

Definition at line 449 of file vdxfengine.cpp.

References m_version.

Referenced by VDxfPaintDevice::SetVersion().

◆ ToPixel()

double VDxfEngine::ToPixel ( double  val,
const VarInsunits unit 
) const
private

Definition at line 590 of file vdxfengine.cpp.

References Centimeters, Inches, Millimeters, and resolution.

Referenced by ExportAAMAGlobalText(), and ExportAAMAText().

◆ type()

QPaintEngine::Type VDxfEngine::type ( ) const
virtual

Definition at line 389 of file vdxfengine.cpp.

◆ updateState()

void VDxfEngine::updateState ( const QPaintEngineState &  state)
virtual

Definition at line 127 of file vdxfengine.cpp.

References transform.

Friends And Related Function Documentation

◆ VDxfPaintDevice

friend class VDxfPaintDevice
friend

Definition at line 55 of file vdxfengine.h.

Member Data Documentation

◆ fileName

QString VDxfEngine::fileName
private

Definition at line 99 of file vdxfengine.h.

Referenced by begin(), ExportToAAMA(), getFileName(), and setFileName().

◆ input

◆ m_binary

bool VDxfEngine::m_binary
private

Definition at line 101 of file vdxfengine.h.

Referenced by end(), ExportToAAMA(), IsBinaryFormat(), and SetBinaryFormat().

◆ m_version

DRW::Version VDxfEngine::m_version
private

◆ resolution

double VDxfEngine::resolution
private

Definition at line 98 of file vdxfengine.h.

Referenced by getResolution(), setResolution(), and ToPixel().

◆ size

QSize VDxfEngine::size
private

Definition at line 97 of file vdxfengine.h.

Referenced by begin(), ExportToAAMA(), getSize(), and setSize().

◆ textBuffer

DRW_Text* VDxfEngine::textBuffer
private

Definition at line 106 of file vdxfengine.h.

Referenced by drawTextItem(), and ~VDxfEngine().

◆ transform

QTransform VDxfEngine::transform
private

Definition at line 102 of file vdxfengine.h.

Referenced by drawEllipse(), drawLines(), drawPath(), drawPolygon(), drawTextItem(), and updateState().

◆ varInsunits

◆ varMeasurement

VarMeasurement VDxfEngine::varMeasurement
private

Definition at line 104 of file vdxfengine.h.

Referenced by begin(), ExportToAAMA(), and setMeasurement().


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