25#if QT_VERSION >= 0x060000
26#include <QStringDecoder>
62 static QString getSafeBlockName(QString& blockName);
64 void fixBlockName(QString& blockName);
65 void fixLayerName(QString& layerName);
66 QString fixFontName(
const QString& fontName)
const;
68 void fixVersion2String(QString& str)
const;
69 void fixDimensionLabel(QString& text, QString& uTol, QString& lTol)
const;
70 void detectVersion2Format(
const QString& fileName);
73 return version2GotDIMZIN;
76 return version2GotDIMAZIN;
79 return version2GotInvalidEllipse;
82 return dxflibMajorVersion==2;
85 return (dxflibMajorVersion==3 && dxflibMinorVersion==0) ||
86 (dxflibMajorVersion==3 && dxflibMinorVersion==1 && dxflibPatchVersion==0);
89 return dxflibMajorVersion;
92 return dxflibMinorVersion;
95 return dxflibPatchVersion;
98 QString getVersion2LayerName(
const QString& layerName)
const;
99 QString getVersionBlockName(
const QString& blockName)
const;
100 QString getVersion2Font(
const QString& handle)
const;
101 QString getVersion2DimensionLabel(
const QString& handle)
const;
103 QString collectVersion2Info(
const QString& fileName);
105 double getVersion2PatternAngle(
double angle,
const QString& patternName)
const;
106 double getVersion2PatternScale(
double scale,
const QString& patternName)
const;
107 QString getVersion2PatternName(
const QString& patternName)
const;
109 void fixVersion2HatchData(QString& patternName,
double& angle,
double&
scale,
bool solid)
const;
111#if QT_VERSION >= 0x060000
115 QStringDecoder* getCodec()
const {
122 void setCodec(QStringDecoder* codec) {
138 static RColor attributesToColor(
int color,
int color24,
const double dxfColors[][3],
bool forLayer=
false);
142 static RColor numberToColor(
int num,
const double dxfColors[][3],
bool comp=
false,
bool forLayer=
false);
143 static RColor numberToColor24(
int num);
147 static int colorToNumber24(
const RColor& col);
151 static int colorToNumber(
const RColor& col,
const double dxfColors[][3]);
159 static QString escapeUnicode(
const QString& str);
160 static QString parseUnicode(
const QString& str);
164 static int getFileQCADVersion(
const RDocument& doc);
166 static void initAci();
167 static int getAci(
const RColor& col);
168 static RColor getColor(
unsigned int index);
186#if QT_VERSION >= 0x060000
187 QStringDecoder* codec;
Q_DECLARE_METATYPE(RMath *)
Color.
Definition RColor.h:43
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
DXF support tools, mainly for QCAD 2 DXF imports.
Definition RDxfServices.h:46
bool getVersion2Compatibility() const
Definition RDxfServices.h:81
QMap< QString, QString > version2LayerMapping
Definition RDxfServices.h:179
int dxflibPatchVersion
Definition RDxfServices.h:176
QTextCodec * codec
Definition RDxfServices.h:189
QMap< QString, QString > version2DimensionLabels
Definition RDxfServices.h:181
void setCodec(QTextCodec *codec)
Definition RDxfServices.h:130
QMap< QString, QString > version2TextFonts
Definition RDxfServices.h:180
int getMajorVersion() const
Definition RDxfServices.h:88
bool hasInvalidEllipse() const
Definition RDxfServices.h:78
static QMap< unsigned int, QRgb > aci
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RDxfServices.h:183
static QMap< QRgb, unsigned int > revAci
Definition RDxfServices.h:184
bool version2GotDIMZIN
Definition RDxfServices.h:171
int dxflibMajorVersion
Definition RDxfServices.h:174
int getMinorVersion() const
Definition RDxfServices.h:91
QTextCodec * getCodec() const
Definition RDxfServices.h:126
Type
Definition RDxfServices.h:48
@ Int
Definition RDxfServices.h:51
@ String
Definition RDxfServices.h:50
@ Float
Definition RDxfServices.h:52
@ Unknown
Definition RDxfServices.h:49
bool hasDIMZIN() const
Definition RDxfServices.h:72
int dxflibMinorVersion
Definition RDxfServices.h:175
bool getVersion3_1Compatibility() const
Definition RDxfServices.h:84
bool hasDIMAZIN() const
Definition RDxfServices.h:75
bool version2GotInvalidEllipse
Definition RDxfServices.h:173
QMap< QString, QString > version2BlockMapping
Definition RDxfServices.h:178
bool version2GotDIMAZIN
Definition RDxfServices.h:172
int getPatchVersion() const
Definition RDxfServices.h:94
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLinetypePattern.h:42
Lineweight
Definition RLineweight.h:44
KnownVariable
Well established document variables.
Definition RS.h:501
#define QCADCORE_EXPORT
Definition core_global.h:10
const double dxfColors[][3]
Definition dl_codes.h:109
void scale(void e, void factor, void focusPoint)
Scales the given entity or shape by the given factor with the given focus point.
Definition simple_modify.js:15
char s
Definition opennurbs_string.cpp:32