RDxfExporter
Class in DXF Import / Export Module
Header: #include <src/io/dxf/RDxfExporter.h>
Inherits: RFileExporter
Description
Section titled “Description”Exporter for the DXF format, based on dxflib.
Public Functions
Section titled “Public Functions”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 <) |
| 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 Public Functions
Section titled “Static Public Functions”| static QByteArray | escapeUnicode(const QString &str) |
Private Functions
Section titled “Private Functions”| DL_Attributes | getEntityAttributes(const REntity &entity) |
| DL_StyleData | getStyle(const RTextBasedEntity &entity) |
Private Attributes
Section titled “Private Attributes”| DL_Attributes | attributes |
| DL_WriterA * | dw |
| DL_Dxf | dxf |
| QMap< int, int > | imageHandles |
| bool | minimalistic |
| int | textStyleCounter |
| QMap< int, QString > | textStyles |
Member Documentation
Section titled “Member Documentation”RDxfExporter
Section titled “RDxfExporter”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.
~RDxfExporter
Section titled “~RDxfExporter”virtual RDxfExporter::~RDxfExporter()virtual inline
exportArcSegment
Section titled “exportArcSegment”virtual void RDxfExporter::exportArcSegment(const RArc &arc, bool allowForZeroLength=false)virtual inline
Reimplemented from exportArcSegment.
exportFile
Section titled “exportFile”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.
exportLineSegment
Section titled “exportLineSegment”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.
exportPoint
Section titled “exportPoint”virtual void RDxfExporter::exportPoint(const RPoint &point)virtual inline
Exports a point with the current attributes.
Reimplemented from exportPoint.
exportRay
Section titled “exportRay”virtual void RDxfExporter::exportRay(const RRay &ray)virtual inline
Exports an infinite ray.
Used for rays.
Reimplemented from exportRay.
exportTriangle
Section titled “exportTriangle”virtual void RDxfExporter::exportTriangle(const RTriangle &triangle)virtual inline
Exports a triangle with the current attributes.
Reimplemented from exportTriangle.
exportXLine
Section titled “exportXLine”virtual void RDxfExporter::exportXLine(const RXLine &xLine)virtual inline
Exports an infinite line.
Used for xlines (construction lines).
Reimplemented from exportXLine.
getCorrectedFileName
Section titled “getCorrectedFileName”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.
getStyleName
Section titled “getStyleName”QString RDxfExporter::getStyleName(const RTextBasedEntity &t)getTextData
Section titled “getTextData”DL_TextData RDxfExporter::getTextData(const RTextBasedData &t, const QString &styleName)writeArc
Section titled “writeArc”void RDxfExporter::writeArc(const RArcEntity &a)Writes the given circle entity to the file.
writeAttribute
Section titled “writeAttribute”void RDxfExporter::writeAttribute(const RAttributeEntity &t)writeBlock
Section titled “writeBlock”void RDxfExporter::writeBlock(const RBlock &b)writeBlockReference
Section titled “writeBlockReference”void RDxfExporter::writeBlockReference(const RBlockReferenceEntity &br)Writes the given block reference entity to the file.
writeCircle
Section titled “writeCircle”void RDxfExporter::writeCircle(const RCircleEntity &c)Writes the given circle entity to the file.
writeDimension
Section titled “writeDimension”void RDxfExporter::writeDimension(const RDimensionEntity &d)Writes the given dimension entity to the file.
writeEllipse
Section titled “writeEllipse”void RDxfExporter::writeEllipse(const REllipseEntity &el)Writes the given ellipse entity to the file.
writeEntity
Section titled “writeEntity”void RDxfExporter::writeEntity(const REntity &e)Writes the given entity to the DXF file.
writeEntity
Section titled “writeEntity”void RDxfExporter::writeEntity(RObject::Id id)writeHatch
Section titled “writeHatch”void RDxfExporter::writeHatch(const RHatchEntity &h)Writes the given hatch entity to the file.
writeImage
Section titled “writeImage”void RDxfExporter::writeImage(const RImageEntity &img)Writes the given image entity to the file.
writeImageDef
Section titled “writeImageDef”void RDxfExporter::writeImageDef(const RImageEntity &img)Writes an IMAGEDEF object into an OBJECT section.
writeLayer
Section titled “writeLayer”void RDxfExporter::writeLayer(const RLayer &l)writeLeader
Section titled “writeLeader”void RDxfExporter::writeLeader(const RLeaderEntity &l)Writes the given leader entity to the file.
writeLine
Section titled “writeLine”void RDxfExporter::writeLine(const RLineEntity &l)Writes the given Line entity to the file.
writeLinetype
Section titled “writeLinetype”void RDxfExporter::writeLinetype(const RLinetypePattern <)writeMText
Section titled “writeMText”void RDxfExporter::writeMText(const RTextEntity &t)writePoint
Section titled “writePoint”void RDxfExporter::writePoint(const RPointEntity &p)Writes the given Point entity to the file.
writePolyline
Section titled “writePolyline”void RDxfExporter::writePolyline(const RPolyline &pl, bool plineGen)writePolyline
Section titled “writePolyline”void RDxfExporter::writePolyline(const RPolylineEntity &pl)Writes the given polyline entity to the file.
writeRay
Section titled “writeRay”void RDxfExporter::writeRay(const RRayEntity &l)Writes the given Ray entity to the file.
writeSimpleText
Section titled “writeSimpleText”void RDxfExporter::writeSimpleText(const RTextEntity &t)writeSolid
Section titled “writeSolid”void RDxfExporter::writeSolid(const RSolidEntity &sol)Writes the given solid entity to the file.
writeSpline
Section titled “writeSpline”void RDxfExporter::writeSpline(const RSplineEntity &sp)Writes the given spline entity to the file.
writeText
Section titled “writeText”void RDxfExporter::writeText(const RTextEntity &t)Writes the given text entity to the file.
writeTrace
Section titled “writeTrace”void RDxfExporter::writeTrace(const RTraceEntity &t)Writes the given trace entity to the file.
writeVariables
Section titled “writeVariables”void RDxfExporter::writeVariables()Writes all known variable settings to the DXF file.
writeXLine
Section titled “writeXLine”void RDxfExporter::writeXLine(const RXLineEntity &l)Writes the given XLine entity to the file.
escapeUnicode
Section titled “escapeUnicode”static QByteArray RDxfExporter::escapeUnicode(const QString &str)static
getEntityAttributes
Section titled “getEntityAttributes”DL_Attributes RDxfExporter::getEntityAttributes(const REntity &entity)private
Returns: the entities attributes as a DL_Attributes object.
getStyle
Section titled “getStyle”DL_StyleData RDxfExporter::getStyle(const RTextBasedEntity &entity)private
attributes
Section titled “attributes”DL_Attributes RDxfExporter::attributesprivate
DL_WriterA* RDxfExporter::dwprivate
DL_Dxf RDxfExporter::dxfprivate
imageHandles
Section titled “imageHandles”QMap<int, int> RDxfExporter::imageHandlesprivate
minimalistic
Section titled “minimalistic”bool RDxfExporter::minimalisticprivate
textStyleCounter
Section titled “textStyleCounter”int RDxfExporter::textStyleCounterprivate
textStyles
Section titled “textStyles”QMap<int, QString> RDxfExporter::textStylesprivate