Skip to content

RDxfExporter

Class in DXF Import / Export Module
Header: #include <src/io/dxf/RDxfExporter.h>
Inherits: RFileExporter

Exporter for the DXF format, based on dxflib.

RDxfExporter(RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
virtual ~RDxfExporter()
virtual void exportArcSegment(const RArc &arc, bool allowForZeroLength=false)
virtual bool exportFile(const QString &fileName, const QString &nameFilter, bool setFileName=true)
Must be implemented by file exporters to export the document into the given file.
virtual void exportLineSegment(const RLine &line, double angle=RNANDOUBLE)
Exports a line segment (a line without pattern).
virtual void exportPoint(const RPoint &point)
Exports a point with the current attributes.
virtual void exportRay(const RRay &ray)
Exports an infinite ray.
virtual void exportTriangle(const RTriangle &triangle)
Exports a triangle with the current attributes.
virtual void exportXLine(const RXLine &xLine)
Exports an infinite line.
virtual QString getCorrectedFileName(const QString &fileName, const QString &nameFilter)
Must be implemented by file exporters to correct the given file name if necessary (add extension based on chosen name filter).
QString getStyleName(const RTextBasedEntity &t)
DL_TextData getTextData(const RTextBasedData &t, const QString &styleName)
void writeArc(const RArcEntity &a)
Writes the given circle entity to the file.
void writeAttribute(const RAttributeEntity &t)
void writeBlock(const RBlock &b)
void writeBlockReference(const RBlockReferenceEntity &br)
Writes the given block reference entity to the file.
void writeCircle(const RCircleEntity &c)
Writes the given circle entity to the file.
void writeDimension(const RDimensionEntity &d)
Writes the given dimension entity to the file.
void writeEllipse(const REllipseEntity &el)
Writes the given ellipse entity to the file.
void writeEntity(const REntity &e)
Writes the given entity to the DXF file.
void writeEntity(RObject::Id id)
void writeHatch(const RHatchEntity &h)
Writes the given hatch entity to the file.
void writeImage(const RImageEntity &img)
Writes the given image entity to the file.
void writeImageDef(const RImageEntity &img)
Writes an IMAGEDEF object into an OBJECT section.
void writeLayer(const RLayer &l)
void writeLeader(const RLeaderEntity &l)
Writes the given leader entity to the file.
void writeLine(const RLineEntity &l)
Writes the given Line entity to the file.
void writeLinetype(const RLinetypePattern &lt)
void writeMText(const RTextEntity &t)
void writePoint(const RPointEntity &p)
Writes the given Point entity to the file.
void writePolyline(const RPolyline &pl, bool plineGen)
void writePolyline(const RPolylineEntity &pl)
Writes the given polyline entity to the file.
void writeRay(const RRayEntity &l)
Writes the given Ray entity to the file.
void writeSimpleText(const RTextEntity &t)
void writeSolid(const RSolidEntity &sol)
Writes the given solid entity to the file.
void writeSpline(const RSplineEntity &sp)
Writes the given spline entity to the file.
void writeText(const RTextEntity &t)
Writes the given text entity to the file.
void writeTrace(const RTraceEntity &t)
Writes the given trace entity to the file.
void writeVariables()
Writes all known variable settings to the DXF file.
void writeXLine(const RXLineEntity &l)
Writes the given XLine entity to the file.
static QByteArray escapeUnicode(const QString &str)
DL_Attributes getEntityAttributes(const REntity &entity)
DL_StyleData getStyle(const RTextBasedEntity &entity)
DL_Attributes attributes
DL_WriterA * dw
DL_Dxf dxf
QMap< int, int > imageHandles
bool minimalistic
int textStyleCounter
QMap< int, QString > textStyles

RDxfExporter::RDxfExporter(RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

virtual RDxfExporter::~RDxfExporter()

virtual inline

virtual void RDxfExporter::exportArcSegment(const RArc &arc, bool allowForZeroLength=false)

virtual inline

Reimplemented from exportArcSegment.

virtual bool RDxfExporter::exportFile(const QString &fileName, const QString &nameFilter, bool setFileName=true)

virtual

Must be implemented by file exporters to export the document into the given file.

Reimplemented from exportFile.

virtual void RDxfExporter::exportLineSegment(const RLine &line, double angle=RNANDOUBLE)

virtual inline

Exports a line segment (a line without pattern).

This is called from the standard implementation of exportLine for every dash in a dashed line.

Reimplemented from exportLineSegment.

virtual void RDxfExporter::exportPoint(const RPoint &point)

virtual inline

Exports a point with the current attributes.

Reimplemented from exportPoint.

virtual void RDxfExporter::exportRay(const RRay &ray)

virtual inline

Exports an infinite ray.

Used for rays.

Reimplemented from exportRay.

virtual void RDxfExporter::exportTriangle(const RTriangle &triangle)

virtual inline

Exports a triangle with the current attributes.

Reimplemented from exportTriangle.

virtual void RDxfExporter::exportXLine(const RXLine &xLine)

virtual inline

Exports an infinite line.

Used for xlines (construction lines).

Reimplemented from exportXLine.

virtual QString RDxfExporter::getCorrectedFileName(const QString &fileName, const QString &nameFilter)

virtual

Must be implemented by file exporters to correct the given file name if necessary (add extension based on chosen name filter).

Reimplemented from getCorrectedFileName.

QString RDxfExporter::getStyleName(const RTextBasedEntity &t)

DL_TextData RDxfExporter::getTextData(const RTextBasedData &t, const QString &styleName)

void RDxfExporter::writeArc(const RArcEntity &a)

Writes the given circle entity to the file.

void RDxfExporter::writeAttribute(const RAttributeEntity &t)

void RDxfExporter::writeBlock(const RBlock &b)

void RDxfExporter::writeBlockReference(const RBlockReferenceEntity &br)

Writes the given block reference entity to the file.

void RDxfExporter::writeCircle(const RCircleEntity &c)

Writes the given circle entity to the file.

void RDxfExporter::writeDimension(const RDimensionEntity &d)

Writes the given dimension entity to the file.

void RDxfExporter::writeEllipse(const REllipseEntity &el)

Writes the given ellipse entity to the file.

void RDxfExporter::writeEntity(const REntity &e)

Writes the given entity to the DXF file.

void RDxfExporter::writeEntity(RObject::Id id)

void RDxfExporter::writeHatch(const RHatchEntity &h)

Writes the given hatch entity to the file.

void RDxfExporter::writeImage(const RImageEntity &img)

Writes the given image entity to the file.

void RDxfExporter::writeImageDef(const RImageEntity &img)

Writes an IMAGEDEF object into an OBJECT section.

void RDxfExporter::writeLayer(const RLayer &l)

void RDxfExporter::writeLeader(const RLeaderEntity &l)

Writes the given leader entity to the file.

void RDxfExporter::writeLine(const RLineEntity &l)

Writes the given Line entity to the file.

void RDxfExporter::writeLinetype(const RLinetypePattern &lt)

void RDxfExporter::writeMText(const RTextEntity &t)

void RDxfExporter::writePoint(const RPointEntity &p)

Writes the given Point entity to the file.

void RDxfExporter::writePolyline(const RPolyline &pl, bool plineGen)

void RDxfExporter::writePolyline(const RPolylineEntity &pl)

Writes the given polyline entity to the file.

void RDxfExporter::writeRay(const RRayEntity &l)

Writes the given Ray entity to the file.

void RDxfExporter::writeSimpleText(const RTextEntity &t)

void RDxfExporter::writeSolid(const RSolidEntity &sol)

Writes the given solid entity to the file.

void RDxfExporter::writeSpline(const RSplineEntity &sp)

Writes the given spline entity to the file.

void RDxfExporter::writeText(const RTextEntity &t)

Writes the given text entity to the file.

void RDxfExporter::writeTrace(const RTraceEntity &t)

Writes the given trace entity to the file.

void RDxfExporter::writeVariables()

Writes all known variable settings to the DXF file.

void RDxfExporter::writeXLine(const RXLineEntity &l)

Writes the given XLine entity to the file.

static QByteArray RDxfExporter::escapeUnicode(const QString &str)

static

DL_Attributes RDxfExporter::getEntityAttributes(const REntity &entity)

private

Returns: the entities attributes as a DL_Attributes object.

DL_StyleData RDxfExporter::getStyle(const RTextBasedEntity &entity)

private

DL_Attributes RDxfExporter::attributes

private

DL_WriterA* RDxfExporter::dw

private

DL_Dxf RDxfExporter::dxf

private

QMap<int, int> RDxfExporter::imageHandles

private

bool RDxfExporter::minimalistic

private

int RDxfExporter::textStyleCounter

private

QMap<int, QString> RDxfExporter::textStyles

private