![]() |
QCAD
Open Source 2D CAD
|
Importer for the DXF format, based on the dxflib library. More...
#include <RDxfImporter.h>
Public Member Functions | |
virtual bool | importFile (const QString &fileName, const QString &nameFilter, const QVariantMap ¶ms=RDEFAULT_QVARIANTMAP) |
Must be implemented by file importers to import the given file into the document. | |
virtual void | processCodeValuePair (unsigned int groupCode, const std::string &groupValue) |
Called for every code / value tuple of the DXF file. | |
RDxfImporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL) | |
Copyright (c) 2011-2018 by Andrew Mustun. | |
virtual | ~RDxfImporter () |
![]() | |
RFileImporter () | |
Copyright (c) 2011-2018 by Andrew Mustun. | |
RFileImporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL) | |
virtual | ~RFileImporter () |
![]() | |
virtual void | endImport () |
Ends the import. | |
virtual RObject::Id | getCurrentBlockId () |
RDocument & | getDocument () |
virtual void | importObject (RObject *object) |
Provided for script importers as importObjectP will loose the object ID. | |
virtual void | importObjectP (QSharedPointer< RObject > object) |
Imports an entity into the document. | |
RImporter () | |
Copyright (c) 2011-2018 by Andrew Mustun. | |
RImporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL) | |
virtual void | setCurrentBlockId (RObject::Id id) |
void | setDocument (RDocument *d) |
void | setKnownVariable (RS::KnownVariable key, const QVariant &value) |
void | setKnownVariable (RS::KnownVariable key, const RVector &value) |
virtual void | startImport () |
Starts the import. | |
virtual | ~RImporter () |
![]() | |
virtual void | add3dFace (const DL_3dFaceData &) |
Called for every 3dface start. | |
virtual void | addComment (const std::string &) |
Called for every comment in the DXF file (code 999). | |
DL_CreationAdapter () | |
virtual void | endSequence () |
Called when a SEQEND occurs (when a POLYLINE or ATTRIB is done) | |
virtual | ~DL_CreationAdapter () |
![]() | |
DL_CreationInterface () | |
DL_Attributes | getAttributes () |
DL_Extrusion * | getExtrusion () |
void | setAttributes (const DL_Attributes &attrib) |
Sets the current attributes for entities. | |
void | setExtrusion (double dx, double dy, double dz, double elevation) |
Sets the current attributes for entities. | |
virtual | ~DL_CreationInterface () |
Private Member Functions | |
virtual void | addArc (const DL_ArcData &data) |
Called for every arc. | |
virtual void | addArcAlignedText (const DL_ArcAlignedTextData &data) |
Called for every arc aligned text entity. | |
virtual void | addAttribute (const DL_AttributeData &data) |
Implementation of the method which handles block attributes (ATTRIB). | |
virtual void | addBlock (const DL_BlockData &data) |
Called for every block. | |
virtual void | addCircle (const DL_CircleData &data) |
Called for every circle. | |
virtual void | addControlPoint (const DL_ControlPointData &data) |
Called for every spline control point. | |
virtual void | addDictionary (const DL_DictionaryData &data) |
Called for dictionary objects. | |
virtual void | addDictionaryEntry (const DL_DictionaryEntryData &data) |
Called for dictionary entries. | |
virtual void | addDimAlign (const DL_DimensionData &data, const DL_DimAlignedData &edata) |
Called for every aligned dimension entity. | |
virtual void | addDimAngular (const DL_DimensionData &data, const DL_DimAngular2LData &edata) |
Called for every angular dimension (2 lines version) entity. | |
virtual void | addDimAngular3P (const DL_DimensionData &data, const DL_DimAngular3PData &edata) |
Called for every angular dimension (3 points version) entity. | |
virtual void | addDimDiametric (const DL_DimensionData &data, const DL_DimDiametricData &edata) |
Called for every diametric dimension entity. | |
virtual void | addDimLinear (const DL_DimensionData &data, const DL_DimLinearData &edata) |
Called for every linear or rotated dimension entity. | |
virtual void | addDimOrdinate (const DL_DimensionData &data, const DL_DimOrdinateData &edata) |
Called for every ordinate dimension entity. | |
virtual void | addDimRadial (const DL_DimensionData &data, const DL_DimRadialData &edata) |
Called for every radial dimension entity. | |
virtual void | addEllipse (const DL_EllipseData &data) |
Called for every ellipse. | |
virtual void | addFitPoint (const DL_FitPointData &data) |
Called for every spline fit point. | |
virtual void | addHatch (const DL_HatchData &data) |
Called for every hatch entity. | |
virtual void | addHatchEdge (const DL_HatchEdgeData &data) |
Called for every hatch edge entity. | |
virtual void | addHatchLoop (const DL_HatchLoopData &data) |
Called for every hatch loop. | |
virtual void | addImage (const DL_ImageData &data) |
Called for every image entity. | |
virtual void | addInsert (const DL_InsertData &data) |
Called for every insert. | |
virtual void | addKnot (const DL_KnotData &data) |
Called for every spline knot value. | |
virtual void | addLayer (const DL_LayerData &data) |
Called for every layer. | |
virtual void | addLeader (const DL_LeaderData &data) |
Called for every leader start. | |
virtual void | addLeaderVertex (const DL_LeaderVertexData &data) |
Called for every leader vertex. | |
virtual void | addLine (const DL_LineData &data) |
Called for every line. | |
virtual void | addLinetype (const DL_LinetypeData &data) |
Called for every linetype. | |
virtual void | addLinetypeDash (double length) |
Called for every dash in linetype pattern. | |
virtual void | addMText (const DL_MTextData &data) |
Called for every multi Text entity. | |
virtual void | addMTextChunk (const std::string &text) |
Called for additional text chunks for MTEXT entities. | |
virtual void | addPoint (const DL_PointData &data) |
Called for every point. | |
virtual void | addPolyline (const DL_PolylineData &data) |
Called for every polyline start. | |
virtual void | addRay (const DL_RayData &data) |
Called for every ray. | |
virtual void | addSolid (const DL_SolidData &data) |
Called for every solid start. | |
virtual void | addSpline (const DL_SplineData &data) |
Called for every spline. | |
virtual void | addText (const DL_TextData &data) |
Implementation of the method which handles texts (TEXT). | |
virtual void | addTextStyle (const DL_StyleData &data) |
Called for every text style. | |
virtual void | addTrace (const DL_TraceData &data) |
Called for every trace start. | |
virtual void | addVertex (const DL_VertexData &data) |
Called for every polyline vertex. | |
virtual void | addXDataApp (const std::string &appId) |
Called for every beginning of an XData section of the given application. | |
virtual void | addXDataInt (int code, int value) |
Called for XData tuples. | |
virtual void | addXDataReal (int code, double value) |
Called for XData tuples. | |
virtual void | addXDataString (int code, const std::string &value) |
Called for XData tuples. | |
virtual void | addXLine (const DL_XLineData &data) |
Called for every xline. | |
virtual void | addXRecord (const std::string &handle) |
Called for every XRecord with the given handle. | |
virtual void | addXRecordBool (int code, bool value) |
Called for XRecords of type bool. | |
virtual void | addXRecordInt (int code, int value) |
Called for XRecords of type int. | |
virtual void | addXRecordReal (int code, double value) |
Called for XRecords of type double. | |
virtual void | addXRecordString (int code, const std::string &value) |
Called for XRecords of type string. | |
virtual RDimensionData | convDimensionData (const DL_DimensionData &data) |
virtual void | endBlock () |
Called to end the current block. | |
virtual void | endEntity () |
Called after an entity has been completed. | |
virtual void | endSection () |
Called when a section (entity, table entry, etc.) is finished. | |
RTextBasedData | getTextBasedData (const DL_TextData &data) |
int | getXDataInt (const QString &appId, int code, int pos=0) |
QString | getXDataString (const QString &appId, int code, int pos=0) |
void | importEntity (QSharedPointer< REntity > entity) |
virtual void | linkImage (const DL_ImageDefData &data) |
Called for every image definition. | |
virtual void | setVariableDouble (const std::string &key, double value, int code) |
Called for every double variable in the DXF file (e.g. | |
virtual void | setVariableInt (const std::string &key, int value, int code) |
Called for every int variable in the DXF file (e.g. | |
virtual void | setVariableString (const std::string &key, const std::string &value, int code) |
Called for every string variable in the DXF file (e.g. | |
virtual void | setVariableVector (const std::string &key, double v1, double v2, double v3, int code) |
Called for every vector variable in the DXF file (e.g. | |
Static Private Member Functions | |
static QString | decode (const QString &str) |
static QString | getEncoding (const QString &str) |
Tries to convert the given DXF encoding string to an encoding recognized by Qt. | |
Private Attributes | |
RDxfServices | dxfServices |
QString | fileName |
RHatchData | hatch |
QMultiMap< int, RObject::Id > | images |
bool | inDict |
RLeaderData | leader |
bool | leaderArrowHead |
QStringList | lockedLayers |
QByteArray | mtext |
QList< double > | pattern |
RPolyline | polyline |
bool | polylinePlineGen |
QMap< QString, QString > | qcadDict |
QString | qcadDictHandle |
RSpline | spline |
QMap< QString, RDxfTextStyle > | textStyles |
QString | variableKey |
QMap< QString, QList< QPair< int, QVariant > > > | xData |
QString | xDataAppId |
Additional Inherited Members | |
![]() | |
RObject::Id | blockId |
RDocument * | document |
RMessageHandler * | messageHandler |
RProgressHandler * | progressHandler |
RTransaction | transaction |
![]() | |
DL_Attributes | attributes |
DL_Extrusion * | extrusion |
Importer for the DXF format, based on the dxflib library.
RDxfImporter::RDxfImporter | ( | RDocument & | document, |
RMessageHandler * | messageHandler = NULL, | ||
RProgressHandler * | progressHandler = NULL ) |
Copyright (c) 2011-2018 by Andrew Mustun.
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 |
|
privatevirtual |
Called for every arc.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every arc aligned text entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Implementation of the method which handles block attributes (ATTRIB).
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every block.
Note: all entities added after this command go into this block until endBlock() is called.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every circle.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every spline control point.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for dictionary objects.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for dictionary entries.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every aligned dimension entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every angular dimension (2 lines version) entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every angular dimension (3 points version) entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every diametric dimension entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every linear or rotated dimension entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every ordinate dimension entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every radial dimension entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every ellipse.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every spline fit point.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every hatch entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every hatch edge entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every hatch loop.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every image entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every insert.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every spline knot value.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every layer.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every leader start.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every leader vertex.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every line.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every linetype.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every dash in linetype pattern.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every multi Text entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for additional text chunks for MTEXT entities.
The chunks come at 250 character in size each. Note that those chunks come before the actual MTEXT entity.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every point.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every polyline start.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every ray.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every solid start.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every spline.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Implementation of the method which handles texts (TEXT).
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every text style.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every trace start.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every polyline vertex.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every beginning of an XData section of the given application.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for XData tuples.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for XData tuples.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for XData tuples.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every xline.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every XRecord with the given handle.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for XRecords of type bool.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for XRecords of type int.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for XRecords of type double.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for XRecords of type string.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
|
staticprivate |
|
privatevirtual |
Called to end the current block.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
|
privatevirtual |
Called when a section (entity, table entry, etc.) is finished.
Reimplemented from DL_CreationAdapter.
|
staticprivate |
Tries to convert the given DXF encoding string to an encoding recognized by Qt.
|
private |
|
private |
|
private |
|
private |
|
virtual |
Must be implemented by file importers to import the given file into the document.
Implements RFileImporter.
|
privatevirtual |
Called for every image definition.
Reimplemented from DL_CreationAdapter.
|
virtual |
Called for every code / value tuple of the DXF file.
The complete DXF file contents can be handled by the implemetation of this function.
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every double variable in the DXF file (e.g.
"$DIMEXO").
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every int variable in the DXF file (e.g.
"$ACADMAINTVER").
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every string variable in the DXF file (e.g.
"$ACADVER").
Reimplemented from DL_CreationAdapter.
|
privatevirtual |
Called for every vector variable in the DXF file (e.g.
"$EXTMIN").
Reimplemented from DL_CreationAdapter.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |