[qet] [3323] First import |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3323
Author: scorpio810
Date: 2014-09-21 17:06:35 +0200 (Sun, 21 Sep 2014)
Log Message:
-----------
First import
Added Paths:
-----------
branches/dxftoelmt/ImportDXF.pro
branches/dxftoelmt/src/
branches/dxftoelmt/src/main.cpp
branches/dxftoelmt/src/ui/
branches/dxftoelmt/src/ui/dxf_arc.cpp
branches/dxftoelmt/src/ui/dxf_arc.h
branches/dxftoelmt/src/ui/dxf_attdef.cpp
branches/dxftoelmt/src/ui/dxf_attdef.h
branches/dxftoelmt/src/ui/dxf_attrib.cpp
branches/dxftoelmt/src/ui/dxf_attrib.h
branches/dxftoelmt/src/ui/dxf_circle.cpp
branches/dxftoelmt/src/ui/dxf_circle.h
branches/dxftoelmt/src/ui/dxf_classes.cpp
branches/dxftoelmt/src/ui/dxf_classes.h
branches/dxftoelmt/src/ui/dxf_data.cpp
branches/dxftoelmt/src/ui/dxf_data.h
branches/dxftoelmt/src/ui/dxf_ellipse.cpp
branches/dxftoelmt/src/ui/dxf_ellipse.h
branches/dxftoelmt/src/ui/dxf_elmt_output.cpp
branches/dxftoelmt/src/ui/dxf_elmt_output.h
branches/dxftoelmt/src/ui/dxf_header.cpp
branches/dxftoelmt/src/ui/dxf_header.h
branches/dxftoelmt/src/ui/dxf_insert.cpp
branches/dxftoelmt/src/ui/dxf_insert.h
branches/dxftoelmt/src/ui/dxf_layer.cpp
branches/dxftoelmt/src/ui/dxf_layer.h
branches/dxftoelmt/src/ui/dxf_line.cpp
branches/dxftoelmt/src/ui/dxf_line.h
branches/dxftoelmt/src/ui/dxf_ltype.cpp
branches/dxftoelmt/src/ui/dxf_ltype.h
branches/dxftoelmt/src/ui/dxf_lwpolyline.cpp
branches/dxftoelmt/src/ui/dxf_lwpolyline.h
branches/dxftoelmt/src/ui/dxf_mline.cpp
branches/dxftoelmt/src/ui/dxf_mline.h
branches/dxftoelmt/src/ui/dxf_mtext.cpp
branches/dxftoelmt/src/ui/dxf_mtext.h
branches/dxftoelmt/src/ui/dxf_point.cpp
branches/dxftoelmt/src/ui/dxf_point.h
branches/dxftoelmt/src/ui/dxf_polyline.cpp
branches/dxftoelmt/src/ui/dxf_polyline.h
branches/dxftoelmt/src/ui/dxf_spline.cpp
branches/dxftoelmt/src/ui/dxf_spline.h
branches/dxftoelmt/src/ui/dxf_text.cpp
branches/dxftoelmt/src/ui/dxf_text.h
branches/dxftoelmt/src/ui/dxf_vertex.cpp
branches/dxftoelmt/src/ui/dxf_vertex.h
branches/dxftoelmt/src/ui/dxf_xline.cpp
branches/dxftoelmt/src/ui/dxf_xline.h
branches/dxftoelmt/src/ui/dxftoelmt.cpp
branches/dxftoelmt/src/ui/dxftoelmt.h
branches/dxftoelmt/src/ui/mainwindow.cpp
branches/dxftoelmt/src/ui/mainwindow.h
branches/dxftoelmt/src/ui/mainwindow.ui
branches/dxftoelmt/src/ui/old_data.cpp
branches/dxftoelmt/src/ui/tables.cpp
branches/dxftoelmt/src/ui_mainwindow.h
branches/dxftoelmt/ui_mainwindow.h
Added: branches/dxftoelmt/ImportDXF.pro
===================================================================
--- branches/dxftoelmt/ImportDXF.pro (rev 0)
+++ branches/dxftoelmt/ImportDXF.pro 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,72 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2014-07-10T08:52:32
+#
+#-------------------------------------------------
+
+QT += core gui
+
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+TARGET = ImportDXF
+TEMPLATE = app
+
+INCLUDEPATH += src \
+ src/ui
+
+SOURCES += src/main.cpp \
+ src/ui/mainwindow.cpp \
+ src/ui/dxf_ltype.cpp \
+ src/ui/dxf_line.cpp \
+ src/ui/dxf_data.cpp \
+ src/ui/dxftoelmt.cpp \
+ src/ui/dxf_header.cpp \
+ src/ui/dxf_classes.cpp \
+ src/ui/dxf_layer.cpp \
+ src/ui/dxf_arc.cpp \
+ src/ui/dxf_attdef.cpp \
+ src/ui/dxf_attrib.cpp \
+ src/ui/dxf_circle.cpp \
+ src/ui/dxf_ellipse.cpp \
+ src/ui/dxf_insert.cpp \
+ src/ui/dxf_lwpolyline.cpp \
+ src/ui/dxf_mline.cpp \
+ src/ui/dxf_mtext.cpp \
+ src/ui/dxf_point.cpp \
+ src/ui/dxf_polyline.cpp \
+ src/ui/dxf_spline.cpp \
+ src/ui/dxf_text.cpp \
+ src/ui/dxf_vertex.cpp \
+ src/ui/dxf_xline.cpp \
+ src/ui/dxf_elmt_output.cpp
+
+HEADERS += src/ui_mainwindow.h \
+ src/ui/mainwindow.h \
+ src/ui/dxf_ltype.h \
+ src/ui/dxf_line.h \
+ src/ui/dxf_data.h \
+ src/ui/dxftoelmt.h \
+ src/ui/dxf_header.h \
+ src/ui/dxf_classes.h \
+ src/ui/dxf_layer.h \
+ src/ui/dxf_arc.h \
+ src/ui/dxf_attdef.h \
+ src/ui/dxf_attrib.h \
+ src/ui/dxf_circle.h \
+ src/ui/dxf_ellipse.h \
+ src/ui/dxf_insert.h \
+ src/ui/dxf_lwpolyline.h \
+ src/ui/dxf_mline.h \
+ src/ui/dxf_mtext.h \
+ src/ui/dxf_point.h \
+ src/ui/dxf_polyline.h \
+ src/ui/dxf_spline.h \
+ src/ui/dxf_text.h \
+ src/ui/dxf_vertex.h \
+ src/ui/dxf_xline.h \
+ src/ui/dxf_elmt_output.h
+
+FORMS += src/ui/mainwindow.ui
+
+OTHER_FILES += \
+ src/ui/2
Added: branches/dxftoelmt/src/main.cpp
===================================================================
--- branches/dxftoelmt/src/main.cpp (rev 0)
+++ branches/dxftoelmt/src/main.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,18 @@
+#include <QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+
+
+ QApplication a(argc, argv);
+ a.setOrganizationName("Qet");
+ a.setApplicationName("dxfTOelmt");
+ // a.setApplicationDisplayName("DXF to ELMT");
+
+
+ MainWindow w;
+ w.show();
+
+ return a.exec();
+}
Added: branches/dxftoelmt/src/ui/dxf_arc.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_arc.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_arc.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,315 @@
+#include "dxf_arc.h"
+
+DXF_Arc::DXF_Arc()
+{
+}
+
+void DXF_Arc::ConvertArc(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+ int x;
+ int y;
+
+ double center_x;
+ double center_y;
+ double radius;
+ double start_angle;
+ double end_angle;
+ double hoek2;
+ double begin;
+ double einde;
+ double begin1;
+ double einde1;
+ double hoek_einde;
+ double N;
+ double O;
+ double J;
+ double K;
+ double L;
+ double M;
+ double R;
+ double S;
+ double T;
+ double U;
+ double V;
+ double W;
+
+
+ QString Lineout;
+ QString x_center;
+ QString y_center;
+ QString breedte;
+ QString hoogte;
+ QString hoek;
+ QString start_hoek;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+ QString LineStyle;
+
+
+
+ for (x=0;x<Counter;x++)
+ {
+ if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+ {
+ center_x=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ center_y=-(LineTable4[x].Line2.toDouble());
+ }
+
+ if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ radius=LineTable4[x].Line2.toDouble();
+ }
+
+
+ if (LineTable4[x].Line1.contains(" 50", Qt::CaseSensitive))
+ {
+ start_angle=LineTable4[x].Line2.toDouble();
+ }
+
+
+ if (LineTable4[x].Line1.contains(" 51", Qt::CaseSensitive))
+ {
+ end_angle=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable4[x].Line2;
+ }
+
+ if (LineTable4[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable4[x].Line2;
+ }
+
+
+ }
+
+
+ /* find out line type */
+
+ /*if (LineTypeOFLine == "")
+ {
+
+ for (y=0;y<LayerCount1+1;y++)
+ {
+
+ if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+ {
+ LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+ }
+ }
+
+ }
+ else
+ {
+ LineStyle=GetLineType(LineTypeOFLine);
+
+ }*/
+
+
+ Lineout=" ";
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<arc x=");
+
+ x_center=QString::number ((center_x - radius),'f',2);
+ y_center=QString::number ((center_y - radius),'f',2);
+
+ Lineout.append(QChar(34));
+ Lineout.append(x_center);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(y_center);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+
+ breedte=QString::number (( radius * 2),'f',2);
+ hoogte=QString::number (( radius * 2),'f',2);
+
+ Lineout.append(" width=");
+ Lineout.append(QChar(34));
+ Lineout.append(breedte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append(hoogte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+
+
+ /*
+ h = (450° - acad°)/30
+ qet° = 30* (450° - acad°)/30 = 450° - acad°
+ dus als acad_start° = 60° Þ qet_start° = 450° - 60° = 390° en opnieuw qet_start° > 360° dus qet_start° = 390° - 360° = 30°
+ acad_end° = 110° Þ qet_end° = 450° - 110° = 340° < 360° dus die hoek blijft 340°
+ qet_hoek° = qet_end° - qet_start° = 340° - 30° = 310°
+
+ */
+
+ /* hoek ACAD omrekenen naar QET */
+
+
+ begin1=450-start_angle;
+ einde1=450-end_angle;
+
+
+ if (begin1>360)
+ {
+ begin=begin1-360;
+ }
+ else
+ {
+ if(begin1<0)
+ {
+ begin=360-begin1;
+ }
+ else
+ {
+ begin=begin1;
+ }
+ }
+
+ if (einde1>360)
+ {
+ einde=einde1-360;
+ }
+ else
+ {
+ if (einde1<0)
+ {
+ einde=einde1-360;
+ }
+ else
+ {
+ einde=einde1;
+ }
+ }
+
+
+
+ /* calculate hoek */
+
+ if (begin>einde)
+ {
+ N=einde-begin;
+ }
+ else
+ {
+ N=einde-begin-360;
+ }
+
+ if (N<0)
+ {
+ O=-N;
+ }
+ else
+ {
+ O=N;
+ }
+
+ J=end_angle-start_angle+N;
+ K=360-end_angle;
+ L=360-start_angle;
+ M=K-L;
+ R=-O;
+ S=J-O;
+
+ if (S < -360)
+ {
+ T=S+360;
+ }
+ else
+ {
+ T=S;
+ }
+
+ if (begin<einde)
+ {
+ U=M;
+ }
+ else
+ {
+ U=T;
+ }
+
+ if (U<0)
+ {
+ V=-U;
+ }
+ else
+ {
+ V=U;
+ }
+
+ W=U+V;
+
+ if (W==0)
+ {
+ hoek2=-V;
+ }
+ else
+ {
+ hoek2=T;
+ }
+
+
+
+
+
+
+
+ /* einde omrekening */
+
+ hoek=QString::number (-hoek2,'f',0);
+ start_hoek=QString::number ((-(begin-90)),'f',0);
+
+
+ Lineout.append(" start=");
+ Lineout.append(QChar(34));
+ Lineout.append(start_hoek);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" angle=");
+ Lineout.append(QChar(34));
+ Lineout.append(hoek);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+
+ return ;
+
+
+}
Added: branches/dxftoelmt/src/ui/dxf_arc.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_arc.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_arc.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,15 @@
+#ifndef DXF_ARC_H
+#define DXF_ARC_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Arc: public DXF_Data
+{
+ public:
+ DXF_Arc();
+
+ void ConvertArc (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_ARC_H
Added: branches/dxftoelmt/src/ui/dxf_attdef.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_attdef.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_attdef.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_attdef.h"
+
+DXF_Attdef::DXF_Attdef()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_attdef.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_attdef.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_attdef.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_ATTDEF_H
+#define DXF_ATTDEF_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Attdef: public DXF_Data
+{
+ public:
+ DXF_Attdef();
+};
+
+#endif // DXF_ATTDEF_H
Added: branches/dxftoelmt/src/ui/dxf_attrib.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_attrib.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_attrib.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_attrib.h"
+
+DXF_Attrib::DXF_Attrib()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_attrib.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_attrib.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_attrib.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_ATTRIB_H
+#define DXF_ATTRIB_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Attrib: public DXF_Data
+{
+ public:
+ DXF_Attrib();
+};
+
+#endif // DXF_ATTRIB_H
Added: branches/dxftoelmt/src/ui/dxf_circle.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_circle.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_circle.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,136 @@
+#include "dxf_circle.h"
+
+DXF_Circle::DXF_Circle()
+{
+
+}
+
+void DXF_Circle::ConvertCircle(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+ int x;
+ int y;
+
+ QString Lineout;
+ QString x_center;
+ QString y_center;
+ QString breedte;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+ QString LineStyle;
+
+
+ double center_x;
+ double center_y;
+ double radius;
+
+
+ for (x=0;x<Counter;x++)
+ {
+ if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+ {
+ center_x=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ center_y=-(LineTable4[x].Line2.toDouble());
+ }
+
+ if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ radius=LineTable4[x].Line2.toDouble();
+ }
+ if (LineTable4[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable4[x].Line2;
+ }
+
+ if (LineTable4[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable4[x].Line2;
+ }
+
+
+ }
+
+ /* find out line type */
+
+ /*if (LineTypeOFLine == "")
+ {
+
+ for (y=0;y<LayerCount1+1;y++)
+ {
+
+ if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+ {
+ LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+ }
+ }
+
+ }
+ else
+ {
+ LineStyle=GetLineType(LineTypeOFLine);
+
+ }*/
+
+ Lineout=" ";
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<ellipse x=");
+
+ x_center=QString::number ((center_x - radius),'f',2);
+ y_center=QString::number ((center_y - radius),'f',2);
+
+ Lineout.append(QChar(34));
+ Lineout.append(x_center);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(y_center);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("true");
+ Lineout.append(QChar(34));
+
+ breedte=QString::number (( radius * 2),'f',2);
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append(breedte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" width=");
+ Lineout.append(QChar(34));
+ Lineout.append(breedte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+
+ return ;
+}
Added: branches/dxftoelmt/src/ui/dxf_circle.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_circle.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_circle.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,15 @@
+#ifndef DXF_CIRCLE_H
+#define DXF_CIRCLE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Circle: public DXF_Data
+{
+ public:
+ DXF_Circle();
+
+ void ConvertCircle(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_CIRCLE_H
Added: branches/dxftoelmt/src/ui/dxf_classes.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_classes.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_classes.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_classes.h"
+
+DXF_Classes::DXF_Classes()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_classes.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_classes.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_classes.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,10 @@
+#ifndef DXF_CLASSES_H
+#define DXF_CLASSES_H
+
+class DXF_Classes
+{
+ public:
+ DXF_Classes();
+};
+
+#endif // DXF_CLASSES_H
Added: branches/dxftoelmt/src/ui/dxf_data.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_data.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_data.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_data.h"
+
+DXF_Data::DXF_Data()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_data.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_data.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_data.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,102 @@
+#ifndef DXF_DATA_H
+#define DXF_DATA_H
+
+#include <QtCore>
+
+
+class DXF_Data
+{
+ public:
+
+
+ struct _ReadLineDXF
+ {
+ QString Line1;
+ QString Line2;
+ };
+
+ struct _LType_ACAD
+ {
+ QString LTypeHandle;
+ QString LTypeNaam;
+ };
+
+ struct _Layer_ACAD
+ {
+ QString LayerName;
+ QString LayerHandle;
+ QString LayerLineType;
+ };
+
+ struct _PolyTable
+ {
+ QString Line1;
+ QString Line2;
+ };
+
+ struct _SizeSymbol
+ {
+ double DXF_Width;
+ double DXF_Height;
+ };
+
+
+ struct _Block_ACAD
+ {
+ QString BlockName;
+ QString BlockDef;
+ QString BlockHandle;
+
+
+ };
+
+ struct _LType_ACAD LTypeDXF[200];
+ struct _Layer_ACAD LayerDXF[200];
+
+ struct _ReadLineDXF LineTable1[2000];
+ struct _ReadLineDXF LineTable2[2000];
+ struct _ReadLineDXF LineTable3[2000];
+ struct _ReadLineDXF LineTable4[2000];
+
+ struct _PolyTable PTable[2000];
+
+ struct _Block_ACAD BlockList[2000];
+
+ struct _SizeSymbol SizeSymbol1;
+
+ int LineCount1;
+ int LineCount2;
+ int LineCount3;
+ int LineCount4;
+
+ int switch1;
+ int switch2;
+ int switch3;
+ int switch4;
+ int switch5;
+ int switch6;
+ int switch7;
+ int switch8;
+ int switch9;
+ int switch10;
+
+
+
+ int BlockCount;
+
+ double Control2;
+ double Control10;
+
+ QString LineStyle1;
+
+ QString FileOutputElmt;
+
+ QString Lineout;
+
+
+
+
+ DXF_Data();
+};
+
+#endif // DXF_DATA_H
Added: branches/dxftoelmt/src/ui/dxf_ellipse.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_ellipse.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_ellipse.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_ellipse.h"
+
+DXF_Ellipse::DXF_Ellipse()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_ellipse.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_ellipse.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_ellipse.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_ELLIPSE_H
+#define DXF_ELLIPSE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Ellipse: public DXF_Data
+{
+ public:
+ DXF_Ellipse();
+};
+
+#endif // DXF_ELLIPSE_H
Added: branches/dxftoelmt/src/ui/dxf_elmt_output.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_elmt_output.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_elmt_output.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,362 @@
+#include "dxf_elmt_output.h"
+
+dxf_elmt_output::dxf_elmt_output()
+{
+}
+
+QString dxf_elmt_output::elmt(int BlockCount, int Flag, struct _Block_ACAD BlockList[], QString Filename1)
+{
+ Filename=Filename1;
+
+ ResultElmt = elmt_Begin();
+
+ ResultElmt.append(elmt_Taal());
+
+ ResultElmt.append(elmt_Info());
+
+
+ ResultElmt.append(BlockList[0].BlockDef);
+
+
+
+
+ ResultElmt.append(elmt_Einde());
+
+ return ResultElmt;
+}
+
+QString dxf_elmt_output::elmt_Begin()
+{
+
+
+ xwidth1=x2-x1;
+ xheight1=y2-y1;
+ width1=QString::number (xwidth1,'f',2);
+ height1=QString::number (xheight1,'f',2);
+
+ /* definition */
+ Lineout="<definition";
+
+ Lineout.append(" width=");
+ Lineout.append(QChar(34));
+ Lineout.append(width1);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append(height1);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" version=");
+ Lineout.append(QChar(34));
+ Lineout.append("0.4");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" hotspot_x=");
+ Lineout.append(QChar(34));
+ Lineout.append("5");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" hotspot_y=");
+ Lineout.append(QChar(34));
+ Lineout.append("5");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" type=");
+ Lineout.append(QChar(34));
+ Lineout.append("element");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" orientation=");
+ Lineout.append(QChar(34));
+ Lineout.append("dyyy");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" ic=");
+ Lineout.append(QChar(34));
+ Lineout.append("true");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" lin_type=");
+ Lineout.append(QChar(34));
+ Lineout.append("simple");
+ Lineout.append(QChar(34));
+
+ Lineout.append(">");
+ Lineout.append('\n');
+
+
+ return Lineout;
+}
+
+QString dxf_elmt_output::elmt_Einde()
+{
+ Lineout=" ";
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<terminal x=");
+
+ Lineout.append(QChar(34));
+ Lineout.append("0");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+
+ Lineout.append(QChar(34));
+ Lineout.append("0");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" orientation=");
+
+ Lineout.append(QChar(34));
+ Lineout.append("n");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append("</description>");
+ Lineout.append('\n');
+
+ Lineout.append("</definition>");
+
+ Lineout.append('\n');
+
+ return Lineout;
+}
+
+QString dxf_elmt_output::elmt_Info()
+{
+
+ Lineout=" ";
+ Lineout.append("<informations>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("Author convertor: Ronny Desmedt");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("ELMT created by dxfTOelmt converter V1.0");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append("</informations>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append("<description>");
+ Lineout.append('\n');
+
+
+ return Lineout;
+}
+
+
+QString dxf_elmt_output::elmt_Taal()
+{
+
+ Lineout=" ";
+ Lineout.append("<names>");
+ Lineout.append('\n');
+
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("fr");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("en");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("be");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("nl");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("hr");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("pl");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("it");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("sl");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("ca");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("pt");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("el");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("de");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("es");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("cs");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("ro");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("ru");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("ar");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(Filename);
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+
+ Lineout.append(" ");
+ Lineout.append("</names>");
+ Lineout.append('\n');
+
+
+ return Lineout;
+}
Added: branches/dxftoelmt/src/ui/dxf_elmt_output.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_elmt_output.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_elmt_output.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,37 @@
+#ifndef DXF_ELMT_OUTPUT_H
+#define DXF_ELMT_OUTPUT_H
+
+#include <QtCore>
+#include "dxf_data.h"
+#include "ui_mainwindow.h"
+
+class dxf_elmt_output: public DXF_Data
+{
+ public:
+
+ double x1;
+ double x2;
+ double y1;
+ double y2;
+ double xwidth1;
+ double xheight1;
+
+ QString width1;
+ QString height1;
+
+ QString ResultElmt;
+ QString Filename;
+
+
+
+
+ dxf_elmt_output();
+
+ QString elmt(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
+ QString elmt_Begin();
+ QString elmt_Einde();
+ QString elmt_Taal();
+ QString elmt_Info();
+};
+
+#endif // DXF_ELMT_OUTPUT_H
Added: branches/dxftoelmt/src/ui/dxf_header.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_header.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_header.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,70 @@
+#include "dxf_header.h"
+
+DXF_Header::DXF_Header()
+{
+
+
+}
+
+void DXF_Header::GetDXFvar(int Counter, _ReadLineDXF LineTable1[], _SizeSymbol *SizeSymbol1)
+{
+ int x;
+
+ double x1;
+ double x2;
+ double y1;
+ double y2;
+
+ int switch1;
+
+ for (x=1;x<Counter-1;x++)
+ {
+
+ if ((LineTable1[x].Line1.contains(" 9", Qt::CaseSensitive)) and (LineTable1[x].Line2.contains("$LIMMIN", Qt::CaseSensitive)) )
+ {
+ switch1=false;
+ while (switch1==false)
+ {
+ x=x+1;
+ if ((LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive)) )
+ {
+ x1= LineTable1[x].Line2.toDouble();
+
+ }
+ if ((LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive)) )
+ {
+ y1= LineTable1[x].Line2.toDouble();
+ switch1=true;
+ }
+ }
+
+
+
+ }
+ if ((LineTable1[x].Line1.contains(" 9", Qt::CaseSensitive)) and (LineTable1[x].Line2.contains("$LIMMAX", Qt::CaseSensitive)) )
+ {
+ switch1=false;
+ while (switch1==false)
+ {
+ x=x+1;
+ if ((LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive)) )
+ {
+ x2= LineTable1[x].Line2.toDouble();
+
+ }
+ if ((LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive)) )
+ {
+ y2= LineTable1[x].Line2.toDouble();
+ switch1=true;
+ }
+ }
+
+ }
+
+ }
+
+ SizeSymbol1->DXF_Height=(y2-y1);
+ SizeSymbol1->DXF_Width=(x2-x1);
+
+ return;
+}
Added: branches/dxftoelmt/src/ui/dxf_header.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_header.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_header.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,18 @@
+#ifndef DXF_HEADER_H
+#define DXF_HEADER_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Header : public DXF_Data
+{
+ public:
+
+
+
+ DXF_Header();
+
+ void GetDXFvar (int Counter, struct _ReadLineDXF LineTable1[2000], struct _SizeSymbol *SizeSymbol1);
+};
+
+#endif // DXF_HEADER_H
Added: branches/dxftoelmt/src/ui/dxf_insert.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_insert.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_insert.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_insert.h"
+
+DXF_Insert::DXF_Insert()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_insert.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_insert.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_insert.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_INSERT_H
+#define DXF_INSERT_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Insert: public DXF_Data
+{
+ public:
+ DXF_Insert();
+};
+
+#endif // DXF_INSERT_H
Added: branches/dxftoelmt/src/ui/dxf_layer.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_layer.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_layer.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,93 @@
+#include "dxf_layer.h"
+
+DXF_Layer::DXF_Layer()
+{
+}
+
+void DXF_Layer::LoadLayerTable (int Counter, _ReadLineDXF LineTable3[],struct _Layer_ACAD LayerDXF[])
+{
+ int x;
+ int x2;
+
+
+ x2=1;
+ switch5=0;
+
+ for (x=1;x<Counter-1;x++)
+ {
+ if (x==Counter-1)
+ {
+ break;
+ }
+
+ switch5 = ((LineTable3[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable3[x].Line2.contains("LAYER", Qt::CaseSensitive)));
+
+
+ if ((switch5==true) and (x<=Counter-1))
+ {
+ switch5=false;
+ switch6=false;
+ x=x+1;
+
+ while((switch5==false)and (x<=Counter-1))
+ {
+
+
+ if ((LineTable3[x].Line1.contains(" 5", Qt::CaseSensitive)) )
+ {
+ LayerDXF[x2].LayerHandle=LineTable3[x].Line2;
+ switch6=true;
+
+ }
+ if ((LineTable3[x].Line1.contains(" 2", Qt::CaseSensitive)) )
+ {
+ LayerDXF[x2].LayerName = LineTable3[x].Line2;
+ switch6=true;
+
+ }
+ if ((LineTable3[x].Line1.contains(" 6", Qt::CaseSensitive)) )
+ {
+ LayerDXF[x2].LayerName= LineTable3[x].Line2;
+ switch6=true;
+
+ }
+
+ x=x+1;
+ //switch5 = ((LineTable3[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable3[x].Line2.contains("LAYER", Qt::CaseSensitive)));
+
+ if (x==Counter-1)
+ {
+ switch5=true;
+
+ break;
+ }
+ else
+ {
+ switch5 = ((LineTable3[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable3[x].Line2.contains("LAYER", Qt::CaseSensitive)));
+
+ }
+
+ }
+
+ if (switch6==true)
+ {
+ x2=x2+1;
+ switch6=false;
+ if (x==Counter-1)
+ {
+ switch5=true;
+
+ break;
+ }
+ }
+ }
+ if (x==Counter-1)
+ {
+ switch5=true;
+
+ break;
+ }
+
+ }
+ return;
+}
Added: branches/dxftoelmt/src/ui/dxf_layer.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_layer.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_layer.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,15 @@
+#ifndef DXF_LAYER_H
+#define DXF_LAYER_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Layer : public DXF_Data
+{
+ public:
+ DXF_Layer();
+
+ void LoadLayerTable (int Counter, struct _ReadLineDXF LineTable3[2000], struct _Layer_ACAD LayerDXF[200]);
+};
+
+#endif // DXF_LAYER_H
Added: branches/dxftoelmt/src/ui/dxf_line.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_line.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_line.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,159 @@
+#include "dxf_line.h"
+#include "dxf_ltype.h"
+
+
+DXF_Line::DXF_Line ()
+{
+
+}
+
+void DXF_Line::ConvertLine (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+ DXF_LType LType1;
+
+ int x;
+ int y;
+
+
+ LineStyle1="normal";
+
+ /* get line parameters */
+
+ for (x=0;x<Counter;x++)
+ {
+
+ if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive))
+ {
+ lijn_x1=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ lijn_y1=-(LineTable4[x].Line2.toDouble());
+ }
+
+ if (LineTable4[x].Line1.contains(" 11", Qt::CaseSensitive))
+ {
+ lijn_x2=LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 21", Qt::CaseSensitive))
+ {
+ lijn_y2=-LineTable4[x].Line2.toDouble();
+ }
+
+ if (LineTable4[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable4[x].Line2;
+ }
+
+ if (LineTable4[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable4[x].Line2;
+ }
+
+ }
+
+ /* find out line type */
+
+ /*if (LineTypeOFLine == "")
+ {
+
+ for (y=0;y<LayerCount1+1;y++)
+ {
+
+
+ if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+ {
+ LineStyle1=LType1.GetLineType(LayerDXF[y].LayerLineType);
+ y=LayerCount1+2;
+ }
+ else
+ {
+ LineStyle1="normal";
+ }
+ }
+
+ }
+ else
+ {
+ LineStyle1=LType1.GetLineType(LineTypeOFLine);
+
+ }*/
+
+ /* create qet elmt code */
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<line lenght1=");
+ Lineout.append(QChar(34));
+ Lineout.append("1.5");
+ Lineout.append(QChar(34));
+ Lineout.append(" lenght2=");
+ Lineout.append(QChar(34));
+ Lineout.append("1.5");
+ Lineout.append(QChar(34));
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+ Lineout.append(" end1=");
+ Lineout.append(QChar(34));
+ Lineout.append("none");
+ Lineout.append(QChar(34));
+ Lineout.append(" end2=");
+ Lineout.append(QChar(34));
+ Lineout.append("none");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle1);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+
+ line_x1=QString::number (lijn_x1,'f',2);
+ line_y1=QString::number (lijn_y1,'f',2);
+ line_x2=QString::number (lijn_x2,'f',2);
+ line_y2=QString::number (lijn_y2,'f',2);
+
+ Lineout.append(" x1=");
+ Lineout.append(QChar(34));
+ Lineout.append(line_x1);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y1=");
+ Lineout.append(QChar(34));
+ Lineout.append(line_y1);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" x2=");
+ Lineout.append(QChar(34));
+ Lineout.append(line_x2);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y2=");
+ Lineout.append(QChar(34));
+ Lineout.append(line_y2);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+
+ if (Entitieswitch==1)
+ {
+ BlockList[0].BlockDef.append(Lineout);
+
+ }
+
+ return ;
+
+}
Added: branches/dxftoelmt/src/ui/dxf_line.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_line.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_line.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,43 @@
+#ifndef DXF_LINE_H
+#define DXF_LINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+
+
+
+class DXF_Line : public DXF_Data
+{
+ public:
+
+ int LineCount;
+ int LTypeCount1;
+ int LayerCount1;
+ int Entities1;
+
+ double lijn_x1;
+ double lijn_x2;
+ double lijn_y1;
+ double lijn_y2;
+
+
+ QString line_x1;
+ QString line_y1;
+ QString line_x2;
+ QString line_y2;
+
+ QString Lineout;
+
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+
+
+
+ DXF_Line();
+
+ void ConvertLine (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+
+};
+
+#endif // DXF_LINE_H
Added: branches/dxftoelmt/src/ui/dxf_ltype.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_ltype.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_ltype.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,181 @@
+#include "dxf_ltype.h"
+
+DXF_LType::DXF_LType()
+{
+
+
+}
+
+void DXF_LType::LoadLTypeTable(int Counter, struct _ReadLineDXF LineTable2[], _LType_ACAD LTypeDXF[])
+{
+ int x;
+ int x2;
+
+ x=0;
+ x2=1;
+ switch7=0;
+
+
+ for (x=1;x<(Counter-1);x++)
+ {
+ if (x==Counter-1)
+ {
+ break;
+ }
+ switch7 = ((LineTable2[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable2[x].Line2.contains("LTYPE", Qt::CaseSensitive)));
+ //x=x+1;
+
+ if ((switch7==true) and (x<=(Counter-1)))
+ {
+
+ switch7=false;
+ switch8=false;
+ x=x+1;
+
+ while ((switch7==false)and (x<=Counter-1))
+ {
+
+ if (LineTable2[x].Line1.contains(" 5", Qt::CaseSensitive))
+ {
+ LTypeDXF[x2].LTypeHandle=LineTable2[x].Line2;
+ switch8=true;
+
+ }
+ if (LineTable2[x].Line1.contains(" 2", Qt::CaseSensitive))
+ {
+ LTypeDXF[x2].LTypeNaam = LineTable2[x].Line2;
+ switch8=true;
+
+ }
+
+ x=x+1;
+ //switch7 = ((LineTable2[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable2[x].Line2.contains("LTYPE", Qt::CaseSensitive)));
+
+ if (x==Counter-1)
+ {
+ switch7=true;
+ //x=x+5;
+ break;
+ }
+ else
+ {
+ switch7 = ((LineTable2[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable2[x].Line2.contains("LTYPE", Qt::CaseSensitive)));
+
+ }
+ }
+ if (switch8==true)
+ {
+ x2=x2+1;
+ switch8=false;
+ if (x==Counter-1)
+ {
+ switch7=true;
+
+ break;
+ }
+ }
+
+ }
+
+ if (x==Counter-1)
+ {
+ switch7=true;
+
+ break;
+ }
+ }
+ return;
+}
+
+QString DXF_LType::GetLineType (QString FindLT)
+{
+
+
+ if (FindLT == "Continuous" )
+ {
+ LTfound="normal";
+ }
+
+ if (FindLT == "CONTINUOUS" )
+ {
+ LTfound="normal";
+ }
+
+ if (FindLT == "Center" )
+ {
+ LTfound="dashdotted";
+ }
+
+ if (FindLT == "CENTER" )
+ {
+ LTfound="dashdotted";
+ }
+
+ if (FindLT == "CENTER2" )
+ {
+ LTfound="dashdotted";
+ }
+
+ if (FindLT == "CENTERX2" )
+ {
+ LTfound="dashdotted";
+ }
+
+ if (FindLT == "DASHED" )
+ {
+ LTfound="dashed";
+ }
+
+ if (FindLT == "DASHED2" )
+ {
+ LTfound="dashed";
+ }
+
+ if (FindLT == "DASHEDX2" )
+ {
+ LTfound="dashed";
+ }
+
+
+ if (FindLT == "HIDDEN" )
+ {
+ LTfound="dashed";
+ }
+
+ if (FindLT == "HIDDEN2" )
+ {
+ LTfound="dashed";
+ }
+
+ if (FindLT == "HIDDENX2" )
+ {
+ LTfound="dashed";
+ }
+
+ if (FindLT == "EPL_DASH" )
+ {
+ LTfound="dashed";
+ }
+
+ if (FindLT == "EPL_DASHDOT" )
+ {
+ LTfound="dashdotted";
+ }
+
+ if (FindLT == "DASHDOT" )
+ {
+ LTfound="dashdotted";
+ }
+
+ if (FindLT == "DASHDOT2" )
+ {
+ LTfound="dashdotted";
+ }
+
+ if (FindLT == "DASHDOTX2" )
+ {
+ LTfound="dashdotted";
+ }
+
+ return LTfound;
+}
Added: branches/dxftoelmt/src/ui/dxf_ltype.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_ltype.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_ltype.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,24 @@
+#ifndef DXF_LTYPE_H
+#define DXF_LTYPE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_LType : public DXF_Data
+{
+ public:
+
+ //friend class dxf_data;
+
+ QString FindLT;
+ QString LTfound;
+
+ DXF_LType();
+
+ QString GetLineType (QString FindLT);
+
+ void LoadLTypeTable (int Counter, struct _ReadLineDXF LineTable2[2000],struct _LType_ACAD LTypeDXF[200]);
+
+};
+
+#endif // DXF_LTYPE_H
Added: branches/dxftoelmt/src/ui/dxf_lwpolyline.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_lwpolyline.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_lwpolyline.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_lwpolyline.h"
+
+DXF_Lwpolyline::DXF_Lwpolyline()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_lwpolyline.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_lwpolyline.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_lwpolyline.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_LWPOLYLINE_H
+#define DXF_LWPOLYLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Lwpolyline: public DXF_Data
+{
+ public:
+ DXF_Lwpolyline();
+};
+
+#endif // DXF_LWPOLYLINE_H
Added: branches/dxftoelmt/src/ui/dxf_mline.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_mline.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_mline.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_mline.h"
+
+DXF_Mline::DXF_Mline()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_mline.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_mline.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_mline.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_MLINE_H
+#define DXF_MLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Mline: public DXF_Data
+{
+ public:
+ DXF_Mline();
+};
+
+#endif // DXF_MLINE_H
Added: branches/dxftoelmt/src/ui/dxf_mtext.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_mtext.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_mtext.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_mtext.h"
+
+DXF_Mtext::DXF_Mtext()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_mtext.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_mtext.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_mtext.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_MTEXT_H
+#define DXF_MTEXT_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Mtext: public DXF_Data
+{
+ public:
+ DXF_Mtext();
+};
+
+#endif // DXF_MTEXT_H
Added: branches/dxftoelmt/src/ui/dxf_point.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_point.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_point.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_point.h"
+
+DXF_Point::DXF_Point()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_point.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_point.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_point.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_POINT_H
+#define DXF_POINT_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Point: public DXF_Data
+{
+ public:
+ DXF_Point();
+};
+
+#endif // DXF_POINT_H
Added: branches/dxftoelmt/src/ui/dxf_polyline.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_polyline.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_polyline.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_polyline.h"
+
+DXF_Polyline::DXF_Polyline()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_polyline.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_polyline.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_polyline.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_POLYLINE_H
+#define DXF_POLYLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Polyline: public DXF_Data
+{
+ public:
+ DXF_Polyline();
+};
+
+#endif // DXF_POLYLINE_H
Added: branches/dxftoelmt/src/ui/dxf_spline.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_spline.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_spline.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_spline.h"
+
+DXF_Spline::DXF_Spline()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_spline.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_spline.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_spline.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_SPLINE_H
+#define DXF_SPLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Spline: public DXF_Data
+{
+ public:
+ DXF_Spline();
+};
+
+#endif // DXF_SPLINE_H
Added: branches/dxftoelmt/src/ui/dxf_text.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_text.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_text.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_text.h"
+
+DXF_Text::DXF_Text()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_text.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_text.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_text.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_TEXT_H
+#define DXF_TEXT_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Text: public DXF_Data
+{
+ public:
+ DXF_Text();
+};
+
+#endif // DXF_TEXT_H
Added: branches/dxftoelmt/src/ui/dxf_vertex.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_vertex.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_vertex.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_vertex.h"
+
+DXF_Vertex::DXF_Vertex()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_vertex.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_vertex.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_vertex.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_VERTEX_H
+#define DXF_VERTEX_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Vertex: public DXF_Data
+{
+ public:
+ DXF_Vertex();
+};
+
+#endif // DXF_VERTEX_H
Added: branches/dxftoelmt/src/ui/dxf_xline.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_xline.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_xline.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,5 @@
+#include "dxf_xline.h"
+
+DXF_Xline::DXF_Xline()
+{
+}
Added: branches/dxftoelmt/src/ui/dxf_xline.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_xline.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxf_xline.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,13 @@
+#ifndef DXF_XLINE_H
+#define DXF_XLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Xline: public DXF_Data
+{
+ public:
+ DXF_Xline();
+};
+
+#endif // DXF_XLINE_H
Added: branches/dxftoelmt/src/ui/dxftoelmt.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxftoelmt.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/dxftoelmt.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,2023 @@
+#include "dxftoelmt.h"
+
+dxfTOelmt::dxfTOelmt()
+{
+}
+
+QString dxfTOelmt::CreateElmt()
+{
+
+ int Aantal_Tekens;
+ int dxfLineCounter;
+ int ActiveSection;
+ int Entitieswitch;
+
+
+ QString StatusBarMessage;
+
+ //DXF_Data Data1;
+
+
+/* open file */
+
+ QFile file(m_file_path);
+ if (!file.open(QFile::ReadOnly | QFile::Text))
+ {
+ //QMessageBox::warning(this, file.tr("Application"));
+ /*,file.tr("Cannot read file %1:\n%2.")
+ .arg(file.fileName)
+ .arg(file.errorString()));*/
+
+ }
+
+ QTextStream in(&file);
+
+/* read fist 2 lines of input file */
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=2;
+ ActiveSection=0;
+ BlockCount=1;
+
+ while (!ReadLine.isNull())
+ {
+ Aantal_Tekens = Line2.length();
+
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("SECTION", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+/* HEADER SECTION of DXF file */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("HEADER", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ActiveSection=1;
+ LineCount1=1;
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while(switch1==false)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ LineTable1[LineCount1].Line1=Line1;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ LineTable1[LineCount1].Line2=Line2;
+ LineCount1=LineCount1+1;
+ dxfLineCounter=dxfLineCounter+2;
+
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ if (LineCount1>=2000)
+ {
+ switch1=1;
+
+ }
+ }
+
+
+ DXF_Header DXFvar;
+ DXFvar.GetDXFvar(LineCount1, LineTable1, &SizeSymbol1);
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ }
+
+/* CLASSES SECTION of DXF file */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("CLASSES", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ ActiveSection=2;
+
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while(switch2==false)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+ }
+
+/* TABLES SECTION of DXF file */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("TABLES", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ActiveSection=3;
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ LineCount2=1;
+ LineCount3=1;
+
+ switch3=false;
+ switch4=false;
+
+
+
+ while(switch2==false)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LTYPE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ LineTable2[LineCount2].Line1=Line1;
+
+ LineTable2[LineCount2].Line2=Line2;
+ LineCount2=LineCount2+1;
+
+ Aantal_Tekens = Line2.length();
+ switch3=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDTAB", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while(switch3==false)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ LineTable2[LineCount2].Line1=Line1;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ LineTable2[LineCount2].Line2=Line2;
+ LineCount2=LineCount2+1;
+ dxfLineCounter=dxfLineCounter+2;
+
+
+ Aantal_Tekens = Line2.length();
+ switch3=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDTAB", Qt::CaseSensitive)and Aantal_Tekens==6);
+ if (LineCount2>=2000)
+ {
+ switch3=1;
+
+ }
+ }
+
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LAYER", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ LineTable3[LineCount3].Line1=Line1;
+
+ LineTable3[LineCount3].Line2=Line2;
+ LineCount3=LineCount3+1;
+
+ Aantal_Tekens = Line2.length();
+ switch4=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDTAB", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while(switch4==false)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ LineTable3[LineCount3].Line1=Line1;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ LineTable3[LineCount3].Line2=Line2;
+ LineCount3=LineCount3+1;
+ dxfLineCounter=dxfLineCounter+2;
+
+
+ Aantal_Tekens = Line2.length();
+ switch4=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDTAB", Qt::CaseSensitive)and Aantal_Tekens==6);
+ if (LineCount3>=2000)
+ {
+ switch4=1;
+
+ }
+ }
+
+
+
+ }
+
+
+
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ }
+ if (switch3==1)
+ {
+
+ DXF_LType Load_LType;
+ Load_LType.LoadLTypeTable(LineCount2, LineTable2,LTypeDXF );
+
+
+
+
+ }
+ if (switch4==1)
+ {
+ DXF_Layer Load_Layer;
+ Load_Layer.LoadLayerTable(LineCount3, LineTable3, LayerDXF);
+
+ }
+
+/* BLOCK SECTION of DXF file */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("BLOCKS", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ActiveSection=4;
+ Entitieswitch=0;
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while(switch2==false)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ /*Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("BLOCK", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+
+ switch9=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDBLK", Qt::CaseSensitive)and Aantal_Tekens==6);
+ while (switch9==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ switch9=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDBLK", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ }
+
+ }*/
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ }
+
+/* ENTITIES SECTION of DXF file */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("ENTITIES", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ ActiveSection=5;
+ Entitieswitch=1;
+ BlockCount=0;
+
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ LineCount4=1;
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ while(switch2==false)
+ {
+
+ switch10=0;
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ARC", Qt::CaseSensitive)and Aantal_Tekens==3)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+ switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ DXF_Arc Load_Arc;
+
+ Load_Arc.ConvertArc(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ATTDEF", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ATTRIB", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("CIRCLE", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+ switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ DXF_Circle Load_Circle;
+
+ Load_Circle.ConvertCircle(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ELLIPSE", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("INSERT", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LINE", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ LineTable4[LineCount4].Line1=Line1;
+ LineTable4[LineCount4].Line2=Line2;
+ LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ if (LineCount4>=2000)
+ {
+ switch10=1;
+
+ }
+ }
+
+ DXF_Line Load_Line;
+
+ Load_Line.ConvertLine(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+ LineCount4=1;
+
+ }
+
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LWPOLYLINE", Qt::CaseSensitive)and Aantal_Tekens==10)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("MLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("MTEXT", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("POINT", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("POLYLINE", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SPLINE", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TEXT", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("XLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("3DFACE", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("3DSOLID", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ACAD_PROXY_ENTITY", Qt::CaseSensitive)and Aantal_Tekens==17)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("BODY", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("DIMENSION", Qt::CaseSensitive)and Aantal_Tekens==9)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("HATCH", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("IMAGE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LEADER", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("OLEFRAME", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("OLE2FRAME", Qt::CaseSensitive)and Aantal_Tekens==9)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("RAY", Qt::CaseSensitive)and Aantal_Tekens==3)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("REGION", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SHAPE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SOLID", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TOLERANCE", Qt::CaseSensitive)and Aantal_Tekens==9)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TRACE", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch10=0;
+ if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VIEWPORT", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+
+
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+
+ while (switch10==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ //LineTable4[LineCount4].Line1=Line1;
+ //LineTable4[LineCount4].Line2=Line2;
+ //LineCount4=LineCount4+1;
+ //switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+ Control10=Line1.toDouble();
+ if (Control10==0)
+ {
+ switch10=true;
+ }
+
+ }
+
+ }
+ Aantal_Tekens = Line2.length();
+ //switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ Control2=Line1.toDouble();
+ if ((Control2==0) and ( Line2.contains("ENDSEC", Qt::CaseSensitive))and Aantal_Tekens==6)
+ {
+ switch2=true;
+ }
+
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+ switch10=0;
+
+ }
+
+/* OBJECTS SECTION of DXF file */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("OBJECTS", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ ActiveSection=6;
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while(switch2==false)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ }
+
+/* ENDSEC of DXF file */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+
+ }
+
+/* EOF of DXF file */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("EOF", Qt::CaseSensitive)and Aantal_Tekens==3)
+ {
+ StatusBarMessage="end of file";
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+ }
+
+
+ }
+
+ }
+
+ dxf_elmt_output CreateOutputElmt;
+ CreateOutputElmt.Filename=Filename1;
+
+ ElmtResult = CreateOutputElmt.elmt(BlockCount, Flag, BlockList, Filename1);
+
+
+
+ //StatusBarMessage="end of conversion";
+
+ return ElmtResult;
+}
Added: branches/dxftoelmt/src/ui/dxftoelmt.h
===================================================================
--- branches/dxftoelmt/src/ui/dxftoelmt.h (rev 0)
+++ branches/dxftoelmt/src/ui/dxftoelmt.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,56 @@
+#ifndef DXFTOELMT_H
+#define DXFTOELMT_H
+
+#include <QtCore>
+#include <QFileDialog>
+//#include "ui_mainwindow.h"
+
+#include "QTextStream"
+
+#include <QMessageBox>
+
+#include "dxf_data.h"
+#include "dxf_header.h"
+#include "dxf_ltype.h"
+#include "dxf_layer.h"
+#include "dxf_line.h"
+#include "dxf_circle.h"
+#include "dxf_arc.h"
+#include "dxf_elmt_output.h"
+
+class dxfTOelmt : public DXF_Data
+{
+ public:
+
+ struct _LType_ACAD LTypeDXF[200];
+ struct _Layer_ACAD LayerDXF[200];
+
+ struct _ReadLineDXF LineTable1[2000];
+ struct _ReadLineDXF LineTable2[2000];
+ struct _ReadLineDXF LineTable3[2000];
+ struct _ReadLineDXF LineTable4[2000];
+
+ struct _PolyTable PTable[2000];
+
+ struct _SizeSymbol SizeSymbol1;
+
+ int Flag;
+
+
+ QString m_file_path;
+ QString m_path_dir;
+ QString Filename1;
+ QString ReadLine;
+ QString Line1;
+ QString Line2;
+
+ QString ElmtResult;
+ //QString StatusBarMessage;
+
+
+ dxfTOelmt();
+
+ QString CreateElmt();
+};
+
+#endif // DXFTOELMT_H
Added: branches/dxftoelmt/src/ui/mainwindow.cpp
===================================================================
--- branches/dxftoelmt/src/ui/mainwindow.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/mainwindow.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,125 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+#include "QTextStream"
+#include <QFileDialog>
+
+
+
+#if QT_VERSION >= 0x050000
+ #include <QtWidgets>
+#else
+ #include <QMessageBox>
+#endif
+
+
+MainWindow::MainWindow(QWidget *parent) :
+ QMainWindow(parent),
+ ui(new Ui::MainWindow)
+{
+
+ ui->setupUi(this);
+
+}
+
+MainWindow::~MainWindow()
+{
+ delete ui;
+}
+
+
+void MainWindow::loadFile()
+{
+
+ QFileDialog dialog(this);
+ dialog.setNameFilter(tr("DXF files (*.dxf *.DXF)"));
+ dialog.setFileMode(QFileDialog::ExistingFile);
+ dialog.setViewMode(QFileDialog::Detail);
+
+ if (dialog.exec() == QDialog::Accepted) {
+ m_file_path = dialog.selectedFiles().first();
+ m_path_dir = dialog.directory().absolutePath();
+
+ QFile file(m_file_path);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Application"),
+ tr("Cannot read file %1:\n%2.").arg(m_file_path).arg(file.errorString()));
+ return;
+ }
+
+ ui -> m_import_file_path_le -> setPlaceholderText(m_file_path);
+ ui->ExportFile->setPlaceholderText(m_path_dir);
+
+
+
+ QTextStream in(&file);
+ QString textAll = in.readAll();
+
+ ui->ImportDXF->setPlainText(textAll);
+ ui->ImportDXF->show();
+ ui->ImportDXF->repaint();
+
+ Filename = fillElmtName();
+
+ ui->statusBar->clearMessage();
+
+ //Filename=ui->m_elmt_name_le->placeholderText();
+
+ dxfTOelmt ConvertDXF;
+
+
+ ConvertDXF.m_file_path=m_file_path;
+ ConvertDXF.m_path_dir=m_path_dir;
+ ConvertDXF.Filename1=Filename;
+
+ StatusConvertion=ConvertDXF.CreateElmt();
+
+ ui->ExportToELMT->setPlainText(StatusConvertion);
+ ui->ExportToELMT->repaint();
+
+ StatusBarMessage="End of DXF convertion";
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusBarMessage );
+ ui->statusBar->repaint();
+
+ return;
+
+ }
+}
+
+
+QString MainWindow::fillElmtName()
+{
+ QString name = m_file_path.split("/").last();
+ name.remove(".dxf");
+ ui->m_elmt_name_le->setText(name);
+ return name;
+}
+
+void MainWindow::on_m_save_elmt_pb_clicked() {
+
+ QFile file(m_path_dir + "/" + ui->m_elmt_name_le->text() + ".elmt");
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Application"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(m_path_dir)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QTextStream out(&file);
+ out << ui->ExportToELMT->toPlainText();
+
+ file.close();
+ QMessageBox::information(this, tr("Export"), tr("L'\351l\351ment %1 \340 bien \351t\351 enregistr\351").arg(ui->m_elmt_name_le->text()));
+}
+
+void MainWindow::on_m_load_dxf_pb_clicked()
+{
+ loadFile();
+}
+
+void MainWindow::on_LineCountDXF_textEdited(const QString &arg1)
+{
+
+}
Added: branches/dxftoelmt/src/ui/mainwindow.h
===================================================================
--- branches/dxftoelmt/src/ui/mainwindow.h (rev 0)
+++ branches/dxftoelmt/src/ui/mainwindow.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,61 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include "dxftoelmt.h"
+
+QT_BEGIN_NAMESPACE
+ class QPlainTextEdit;
+QT_END_NAMESPACE
+
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ explicit MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+
+ int VectorCount;
+
+ QString StatusConvertion;
+ QString StatusBarMessage;
+ QString Filename;
+
+
+
+
+private slots:
+
+ void on_m_save_elmt_pb_clicked();
+ void on_m_load_dxf_pb_clicked();
+
+
+
+ void on_LineCountDXF_textEdited(const QString &arg1);
+
+ private:
+
+ Ui::MainWindow *ui;
+
+
+
+ void loadFile();
+ //void createElmt();
+ QString fillElmtName();
+
+ QString m_file_path, m_path_dir;
+
+
+
+
+
+};
+
+#endif // MAINWINDOW_H
Added: branches/dxftoelmt/src/ui/mainwindow.ui
===================================================================
--- branches/dxftoelmt/src/ui/mainwindow.ui (rev 0)
+++ branches/dxftoelmt/src/ui/mainwindow.ui 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>758</width>
+ <height>488</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="SectionCount1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Import file path :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Export directory path :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="m_import_file_path_le">
+ <property name="maximumSize">
+ <size>
+ <width>16777165</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTipDuration">
+ <number>-1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="labelSectionCount">
+ <property name="text">
+ <string>Section count</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QLineEdit" name="ExportFile"/>
+ </item>
+ <item row="3" column="2">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>element name :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QLineEdit" name="m_elmt_name_le"/>
+ </item>
+ <item row="1" column="2" colspan="2">
+ <widget class="QPushButton" name="m_save_elmt_pb">
+ <property name="text">
+ <string>save to elmt file</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" colspan="2">
+ <widget class="QTextEdit" name="ImportDXF">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2" colspan="2">
+ <widget class="QTextEdit" name="ExportToELMT">
+ <property name="sizeAdjustPolicy">
+ <enum>QAbstractScrollArea::AdjustToContents</enum>
+ </property>
+ <property name="lineWrapMode">
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QPushButton" name="m_load_dxf_pb">
+ <property name="text">
+ <string>Load DXF file</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="LineCountDXF"/>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menuBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>758</width>
+ <height>23</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QToolBar" name="mainToolBar">
+ <attribute name="toolBarArea">
+ <enum>TopToolBarArea</enum>
+ </attribute>
+ <attribute name="toolBarBreak">
+ <bool>false</bool>
+ </attribute>
+ </widget>
+ <widget class="QStatusBar" name="statusBar">
+ <property name="autoFillBackground">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
Added: branches/dxftoelmt/src/ui/old_data.cpp
===================================================================
--- branches/dxftoelmt/src/ui/old_data.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/old_data.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,4307 @@
+void MainWindow::createElmt()
+{
+
+ /* declare DXF compounts */
+ //DXF_Line ConvertLine1;
+
+
+
+
+
+ /* declaire variables */
+
+ QString fileName;
+ QString textAll;
+ QString Line1;
+ QString Line2;
+ QString Line3;
+ QString ReadLine;
+
+ double x1;
+ double x2;
+ double y1;
+ double y2;
+
+
+ /* mtext */
+ double mx;
+ double my;
+ double mheight;
+ double mrotation;
+
+ QString mtext1;
+ QString mtext2;
+ QString mtext3 [100];
+ QString mtext4;
+ QString mtextresult;
+ int countmtext;
+ int forlus3;
+
+ /* text */
+
+ QString ttext;
+ QString xtext; // x-coord
+ QString ytext; // y-coord
+ QString htext; // height
+ QString rtext; // rotation
+
+ /* attribute */
+ double attx;
+ double atty;
+ double attheight;
+ double attrotation;
+
+ QString atttext;
+ QString atttag;
+ QString xattext; // x-coord
+ QString yattext; // y-coord
+ QString hattext; // height
+ QString rattext; // rotation
+
+
+ double xwidth1;
+ double xheight1;
+
+
+
+
+
+
+
+ QString line_x1;
+ QString line_y1;
+ QString line_x2;
+ QString line_y2;
+
+ QString x_center;
+ QString y_center;
+ QString straal;
+ QString start_hoek;
+ QString end_hoek;
+ QString breedte;
+ QString hoogte;
+ QString hoek;
+
+
+ /* POLYLINE */
+
+ QString PolyTable1;
+ QString Pclose;
+
+
+
+
+
+
+ QString Lineout;
+ QString width1;
+ QString height1;
+ bool switch1;
+ bool switch2;
+ bool switch3;
+ bool switch4;
+ bool switch5;
+
+
+
+ int countEndSec;
+
+
+ /* LTYPE var */
+ int LTypeCount;
+
+
+
+ /* Layer var */
+ int LayerCount;
+
+
+
+ /* function variable */
+
+
+ int LineCount;
+ int count1;
+ int dxfLineCounter;
+ int Aantal_Tekens;
+
+ QString LineBack;
+ QString LineBack1;
+ QString LineBack2;
+ QString StatusbarMessage;
+ QString ActiveFunction;
+
+
+ /* setup basic values */
+ x1 = 0;
+ x2 = 400;
+ y1 = 0;
+ y2 = 400;
+ dxfLineCounter=0;
+ //ui->
+
+
+ /* open file */
+
+ QFile file(m_file_path);
+ if (!file.open(QFile::ReadOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Application"),
+ tr("Cannot read file %1:\n%2.")
+ .arg(fileName)
+ .arg(file.errorString()));
+ return;
+ }
+
+
+ QTextStream in(&file);
+
+ /* read fist 2 lines of input file */
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+ countEndSec=0;
+ Aantal_Tekens = Line2.length();
+
+ ActiveFunction="Read first 2 lines";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ /* go to evaluation of the input lines */
+
+ while (!ReadLine.isNull())
+ {
+ Aantal_Tekens = Line2.length();
+
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("SECTION", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+ Aantal_Tekens = Line2.length();
+ ActiveFunction="Section";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("HEADER", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+
+
+ ActiveFunction="HEADER";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive) and Aantal_Tekens==6);
+
+
+ while (switch1==false)
+ {
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 9", Qt::CaseSensitive) and Line2.contains("$LIMMIN", Qt::CaseSensitive) and Aantal_Tekens==7)
+ {
+
+ switch2=false;
+
+ while (switch2 == false and switch1 == false)
+ {
+
+
+ if (Line1.contains(" 10"))
+ {
+ x1=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 20"))
+ {
+ y1=Line2.toDouble();
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+ ActiveFunction="HEADER MIN size of drawing";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=Line1.contains(" 9", Qt::CaseSensitive);
+ }
+
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 9", Qt::CaseSensitive) and Line2.contains("$LIMMAX", Qt::CaseSensitive) and Aantal_Tekens==7)
+ {
+ switch2=false;
+
+ while (switch2 == false and switch1 == false)
+ {
+
+
+ if (Line1.contains(" 10", Qt::CaseSensitive))
+ {
+ x2=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ y2=Line2.toDouble();
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="HEADER MAX size of drawing";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive) and Aantal_Tekens==6);
+ switch2=Line1.contains(" 9", Qt::CaseSensitive);
+ }
+ }
+
+ /* find out max size of dxf drawing */
+
+ if( Line2.contains("$LIMMIN", Qt::CaseSensitive))
+ {
+ switch3 = false;
+ }
+ else
+ {
+ if( Line2.contains("$LIMMAX", Qt::CaseSensitive))
+ {
+ switch3 = false;
+
+ }
+ else
+ {
+ switch3 = true;
+
+ }
+ }
+
+ if (Line1.contains(" 9", Qt::CaseSensitive) and switch3)
+ {
+ switch2=false;
+
+ while (switch2 == false and switch1 == false)
+ {
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=Line1.contains(" 9", Qt::CaseSensitive);
+ }
+
+
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive) and Aantal_Tekens==6);
+
+ }
+ }
+
+
+
+/* CLASSES */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("CLASSES", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="CLASSES";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive) and Aantal_Tekens==6);
+
+ while (switch1==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+ ActiveFunction="CLASSES";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ }
+ }
+
+/* TABLES */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("TABLES", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="TABLES";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ LTypeCount = 0;
+ LayerCount = 0;
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while (switch1==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+ Aantal_Tekens = Line2.length();
+
+ ActiveFunction="read TABLES";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+
+ /* LTYPE */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LTYPE", Qt::CaseSensitive) and Aantal_Tekens==5)
+ {
+
+ switch5=false;
+
+
+
+ if (LTypeCount >= 200)
+ {
+ switch5=true;
+ }
+
+ while (switch5==false)
+ {
+
+
+ if (Line1.contains(" 5",Qt::CaseSensitive))
+ {
+ DXF_Data::LTypeDXF[LTypeCount].LTypeHandle.clear();
+ DXF_Data::LTypeDXF[LTypeCount].LTypeHandle.append( Line2);
+ //LTypeDXF[LTypeCount].LTypeHandle=Line2;
+ }
+
+ if (Line1.contains(" 2",Qt::CaseSensitive))
+ {
+
+ LTypeDXF[LTypeCount].LTypeNaam=Line2;
+ }
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="TABLES get Line type";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+
+
+ switch5=(Line1.contains(" 0", Qt::CaseSensitive) );
+ }
+
+ LTypeCount=LTypeCount+1;
+
+
+
+
+ }
+
+ /* LAYER*/
+ Aantal_Tekens = Line2.length();
+
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LAYER", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+
+ switch5=false;
+
+
+ if (LayerCount >= 200)
+ {
+ switch5=true;
+ }
+
+ while (switch5==false)
+ {
+
+
+ if (Line1.contains(" 5",Qt::CaseSensitive))
+ {
+
+ LayerDXF[LayerCount].LayerHandle=Line2;
+ }
+
+ if (Line1.contains(" 2",Qt::CaseSensitive))
+ {
+
+ LayerDXF[LayerCount].LayerName=Line2;
+
+ }
+
+ if (Line1.contains(" 6",Qt::CaseSensitive))
+ {
+
+ LayerDXF[LayerCount].LayerLineType=Line2;
+ }
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="TABLES get Layers";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+
+ switch5=(Line1.contains(" 0", Qt::CaseSensitive) );
+ }
+
+ LayerCount=LayerCount+1;
+
+ }
+
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ }
+ }
+
+/* Blocks */
+ Aantal_Tekens = Line2.length();
+
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("BLOCKS", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="BLocks";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while (switch1==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Blocks description";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ }
+ }
+
+/* Entities */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("ENTITIES", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Entities";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ while (switch1==false)
+ {
+
+/* Polyline */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("POLYLINE", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+
+ switch2=false;
+ LineCount=0;
+ count1=0;
+ VectorCount=0;
+
+ ActiveFunction="Polyline";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+
+ while (switch2 == false and switch1 == false)
+ {
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0") and Line2.contains("VERTEX")and Aantal_Tekens==6)
+ {
+ switch4=false;
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Polyline Vertex";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+
+
+ while (switch4==false)
+ {
+
+ LineTable2[count1].Line1=Line1;
+ LineTable2[count1].Line2=Line2;
+
+ count1=count1+1;
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Polyline Vertex";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ switch4=Line1.contains(" 0", Qt::CaseSensitive);
+
+ if (count1 >= 2000)
+ {
+
+ switch4 = true;
+
+
+
+ }
+
+ }
+
+ ConvertVertex(count1);
+ count1=0;
+
+
+
+ }
+ else
+ {
+ LineTable1[LineCount].Line1=Line1;
+ LineTable1[LineCount].Line2=Line2;
+ LineCount=LineCount+1;
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+
+ dxfLineCounter=dxfLineCounter+2;
+ ActiveFunction="Polyline";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ if (LineCount >= 2000)
+ {
+
+ switch1 = true;
+ switch2 = true;
+
+
+ }
+
+
+ }
+
+
+ LineBack = ConvertPolyline(LineCount);
+
+ Lineout.append(LineBack);
+
+
+
+ LineBack2 = ConvertPolylineVector(count1);
+
+ Lineout.append(LineBack2);
+
+
+
+ LineBack1=ConvertPolylineEnd(LineCount);
+
+ Lineout.append(LineBack1);
+
+
+
+
+
+
+ }
+
+/* Text */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("TEXT", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+ switch2=false;
+ LineCount=0;
+
+ ActiveFunction="Text";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+
+ LineTable1[LineCount].Line1=Line1;
+ LineTable1[LineCount].Line2=Line2;
+ LineCount=LineCount+1;
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=Line1.contains(" 0", Qt::CaseSensitive);
+
+ if (LineCount >= 2000)
+ {
+
+ switch1 = true;
+ switch2 = true;
+
+ }
+ }
+
+ LineBack = ConvertText(LineCount);
+ Lineout.append(LineBack);
+
+
+
+
+
+
+ }
+
+/* Mtext */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("MTEXT", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+
+ ui->SectionCount1->setPlaceholderText("Mtext function");
+ ui->SectionCount1->repaint();
+
+ switch2=false;
+ countmtext=0;
+
+ ActiveFunction="Mtext";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+
+
+ if (Line1.contains(" 10", Qt::CaseSensitive))
+ {
+ mx=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ my=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ mheight=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 50", Qt::CaseSensitive))
+ {
+ mrotation=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 1", Qt::CaseSensitive))
+ {
+ mtext4=Line2;
+ mtext3[countmtext]=mtext4.section(';',-1);;
+ countmtext=countmtext+1;
+ }
+
+ if (Line1.contains(" 3", Qt::CaseSensitive))
+ {
+
+ mtext4=Line2;
+ mtext3[countmtext]=mtext4.section(';',-1);;
+ countmtext=countmtext+1;
+
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="MText codes";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=Line1.contains(" 0", Qt::CaseSensitive);
+ }
+
+
+
+ }
+
+/* Attrib */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ATTRIB", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ switch2=false;
+
+ ui->SectionCount1->setPlaceholderText("Attrib function");
+ ui->SectionCount1->repaint();
+
+
+ ActiveFunction="Attrib";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+
+ if (Line1.contains(" 10", Qt::CaseSensitive))
+ {
+ attx=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ atty=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ attheight=Line2.toDouble();
+ }
+
+ if (Line1.contains(" 1", Qt::CaseSensitive))
+ {
+ atttext=Line2;
+ }
+
+ if (Line1.contains(" 2", Qt::CaseSensitive))
+ {
+ atttag=Line2;
+ }
+
+ if (Line1.contains(" 50", Qt::CaseSensitive))
+ {
+ attrotation=Line2.toDouble();
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Attrib code";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=Line1.contains(" 0", Qt::CaseSensitive);
+ }
+
+ /* <input x="-23" y="15.5" size="9" rotation="90" rotate="true" text="_" tagg="label"/> */
+
+ xattext=QString::number(attx+0.5,'f',0);
+ yattext=QString::number(atty+0.5,'f',0);
+ hattext=QString::number(attheight+0.5,'f',0);
+
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<input x=");
+ Lineout.append(QChar(34));
+ Lineout.append(xattext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(yattext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" size=");
+ Lineout.append(QChar(34));
+ Lineout.append(hattext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" rotation=");
+ Lineout.append(QChar(34));
+ Lineout.append(rattext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" rotate=");
+ Lineout.append(QChar(34));
+ Lineout.append("true");
+ Lineout.append(QChar(34));
+
+ if(atttext.contains("<"))
+ {
+ atttext.replace("<","<");
+ }
+ if(atttext.contains(">"))
+ {
+ atttext.replace(">",">");
+ }
+ if(atttext.contains("&"))
+ {
+ atttext.replace("&","&");
+ }
+ if(atttext.contains(QChar(39)))
+ {
+ atttext.replace(QChar(39),"'");
+ }
+ if(atttext.contains(QChar(34)))
+ {
+ atttext.replace(QChar(34),""");
+ }
+
+ if(ttext.contains("/"))
+ {
+ atttext.replace("/","-");
+ }
+
+ if(ttext.contains(QChar(92)))
+ {
+ atttext.replace(QChar(92),"-");
+ }
+
+ if(ttext.contains("*"))
+ {
+ atttext.replace("*","x");
+ }
+
+ if(atttext.contains("?"))
+ {
+ atttext.replace("?","...");
+ }
+
+ if(atttext.contains("|"))
+ {
+ atttext.replace("|","-");
+ }
+
+ Lineout.append(" text=");
+ Lineout.append(QChar(34));
+ Lineout.append(atttext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" tagg=");
+ Lineout.append(QChar(34));
+ Lineout.append(atttag);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+
+
+ }
+
+
+/* Line */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LINE", Qt::CaseSensitive) and Aantal_Tekens==4)
+ {
+ switch2=false;
+ LineCount=0;
+
+ ActiveFunction="Line";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+ //ConvertLine1.LineTable1[LineCount].Line1=Line1;
+ //ConvertLine1.LineTable1[LineCount].Line2=Line2;
+ LineCount=LineCount+1;
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Line code";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage);
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=Line1.contains(" 0", Qt::CaseSensitive);
+
+ if (LineCount >= 2000)
+ {
+
+ switch1 = true;
+ switch2 = true;
+
+ }
+ }
+
+ //ConvertLine1.LayerCount1=LayerCount;
+ //ConvertLine1.LineCount=LineCount;
+ //ConvertLine1.LayerDXF=LayerDXF;
+
+
+ //LineBack = ConvertLine1.ConvertLine();
+
+ Lineout.append(LineBack);
+
+ }
+
+/* Arc */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ARC", Qt::CaseSensitive) and Aantal_Tekens==3)
+ {
+ switch2=false;
+ LineCount=0;
+
+ ActiveFunction="Arc";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+
+ LineTable1[LineCount].Line1=Line1;
+ LineTable1[LineCount].Line2=Line2;
+ LineCount=LineCount+1;
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Arc code";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=Line1.contains(" 0", Qt::CaseSensitive);
+
+ if (LineCount >= 2000)
+ {
+
+ switch1 = true;
+ switch2 = true;
+
+ }
+ }
+
+ LineBack = ConvertArc(LineCount, LTypeCount, LayerCount);
+ Lineout.append(LineBack);
+
+
+
+
+ }
+
+/* Circle */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("CIRCLE", Qt::CaseSensitive) and Aantal_Tekens==6)
+ {
+ switch2=false;
+ LineCount=0;
+
+ ActiveFunction="Circle";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+
+ LineTable1[LineCount].Line1=Line1;
+ LineTable1[LineCount].Line2=Line2;
+ LineCount=LineCount+1;
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+ ActiveFunction="Circle code";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive));
+
+
+ if (LineCount >= 2000)
+ {
+
+ switch1 = true;
+ switch2 = true;
+
+ }
+ }
+
+ LineBack = ConvertCircle(LineCount, LTypeCount, LayerCount);
+ Lineout.append(LineBack);
+
+
+
+
+ }
+
+/* Lwpolyline*/
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LWPOLYLINE", Qt::CaseSensitive) and Aantal_Tekens==10)
+ {
+ switch2=false;
+ LineCount=0;
+
+ ActiveFunction="LWPOLYLINE";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+
+ LineTable1[LineCount].Line1=Line1;
+ LineTable1[LineCount].Line2=Line2;
+ LineCount=LineCount+1;
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+ ActiveFunction="Circle code";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive));
+
+
+ if (LineCount >= 2000)
+ {
+
+ switch1 = true;
+ switch2 = true;
+
+ }
+ }
+
+ LineBack = ConvertLwpolyline(LineCount, LTypeCount, LayerCount);
+ Lineout.append(LineBack);
+
+
+
+
+ }
+
+
+/* Ellipse */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ELLIPSE", Qt::CaseSensitive) and Aantal_Tekens==7)
+ {
+ switch2=false;
+ LineCount=0;
+
+ ActiveFunction="ELLIPSE";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+
+ LineTable1[LineCount].Line1=Line1;
+ LineTable1[LineCount].Line2=Line2;
+ LineCount=LineCount+1;
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+ ActiveFunction="Ellipse code";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive));
+
+
+ if (LineCount >= 2000)
+ {
+
+ switch1 = true;
+ switch2 = true;
+
+ }
+ }
+
+ //LineBack = ConvertEllipse(LineCount, LTypeCount, LayerCount);
+ //Lineout.append(LineBack);/* Ellipse */
+ }
+
+
+ /*Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ELLIPSE", Qt::CaseSensitive) and Aantal_Tekens==7)
+ {
+ switch2=false;
+ LineCount=0;
+
+ ActiveFunction="Ellipse";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ while (switch2 == false and switch1 == false)
+ {
+
+ LineTable1[LineCount].Line1=Line1;
+ LineTable1[LineCount].Line2=Line2;
+ LineCount=LineCount+1;
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+ ActiveFunction="Circle code";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ Aantal_Tekens = Line2.length();
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive));
+
+
+ if (LineCount >= 2000)
+ {
+
+ switch1 = true;
+ switch2 = true;
+
+ }
+ }
+
+ LineBack = ConvertCircle(LineCount, LTypeCount, LayerCount);
+ Lineout.append(LineBack);
+
+
+
+
+ }*/
+
+
+
+
+
+
+
+/* control */
+ Aantal_Tekens = Line2.length();
+
+ ActiveFunction="End of loop control";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ ui->ExportToELMT->setPlainText(Lineout);
+ ui->ExportToELMT->repaint();
+
+ if( Line2.contains("POLYLINE", Qt::CaseSensitive)and Aantal_Tekens==8)
+ {
+ switch3 = false;
+ }
+ else
+
+ if( Line2.contains("TEXT", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+ switch3 = false;
+
+ }
+ else
+ if( Line2.contains("LINE", Qt::CaseSensitive)and Aantal_Tekens==4)
+ {
+ switch3 = false;
+ }
+ else
+ if( Line2.contains("ARC", Qt::CaseSensitive)and Aantal_Tekens==3)
+ {
+ switch3 = false;
+ }
+ else
+ if ( Line2.contains("CIRCLE", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ switch3 = false;
+ }
+ else
+ if ( Line2.contains("MTEXT", Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+ switch3 = false;
+ }
+ else
+ if ( Line2.contains("ATTRIB", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+ switch3 = false;
+ }
+ else
+
+ if ( Line2.contains("ELLIPSE", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ switch3 = false;
+ }
+ else
+
+ if ( Line2.contains("LWPOLYLINE", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+ switch3 = false;
+ }
+ else
+ {
+ switch3 = true;
+ }
+
+
+
+
+
+ if (Line1.contains(" 0", Qt::CaseSensitive) and switch3)
+ {
+ switch2=false;
+
+ while (switch2 == false and switch1 == false)
+ {
+
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Reading code that needs to converted";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+ switch2=Line1.contains(" 0", Qt::CaseSensitive);
+ }
+
+
+
+ }
+
+
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+
+ ui->ExportToELMT->setPlainText(Lineout);
+ ui->ExportToELMT->repaint();
+
+ }
+
+
+
+ /*-------*/
+ while (switch1==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Read next pair of lines";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+ }
+ }
+
+/* Objects */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("OBJECTS", Qt::CaseSensitive)and Aantal_Tekens==7)
+ {
+
+ ActiveFunction="Objects";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+
+ while (switch1==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Object codes";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+ }
+ }
+
+/* Thumbnailimage */
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("THUMBNAILIMAGE", Qt::CaseSensitive) and Aantal_Tekens==14)
+ {
+ ActiveFunction="Thumbnailimage";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Thumbnailimage";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+
+ while (switch1==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Thumbnailimage codes";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+ }
+ }
+
+ }
+
+/* Endsection */
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6)
+ {
+
+ ActiveFunction="Endsection";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ countEndSec+=1;
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ ActiveFunction="Endsection code";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ if (countEndSec==1)
+ {
+ QString bestand;
+
+ bestand = ui->m_elmt_name_le->placeholderText();
+
+
+ xwidth1=x2-x1;
+ xheight1=y2-y1;
+ width1=QString::number (xwidth1,'f',2);
+ height1=QString::number (xheight1,'f',2);
+ /* definition */
+ Lineout.append("<definition");
+
+ Lineout.append(" width=");
+ Lineout.append(QChar(34));
+ Lineout.append(width1);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append(height1);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" version=");
+ Lineout.append(QChar(34));
+ Lineout.append("0.4");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" hotspot_x=");
+ Lineout.append(QChar(34));
+ Lineout.append("5");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" hotspot_y=");
+ Lineout.append(QChar(34));
+ Lineout.append("5");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" type=");
+ Lineout.append(QChar(34));
+ Lineout.append("element");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" orientation=");
+ Lineout.append(QChar(34));
+ Lineout.append("dyyy");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" ic=");
+ Lineout.append(QChar(34));
+ Lineout.append("true");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" lin_type=");
+ Lineout.append(QChar(34));
+ Lineout.append("simple");
+ Lineout.append(QChar(34));
+
+ Lineout.append(">");
+ Lineout.append('\n');
+
+ ui->ExportToELMT->setPlainText(Lineout);
+ ui->ExportToELMT->repaint();
+
+ /* names */
+ Lineout.append(" ");
+ Lineout.append("<names>");
+ Lineout.append('\n');
+
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("fr");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("en");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("be");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("nl");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("hr");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("pl");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("it");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("sl");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("ca");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("pt");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("el");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("de");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("es");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("cs");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("ro");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("ru");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<name lang=");
+ Lineout.append(QChar(34));
+ Lineout.append("ar");
+ Lineout.append(QChar(34));
+ Lineout.append(">");
+ Lineout.append(ui->m_elmt_name_le->text());
+ Lineout.append("</name>");
+ Lineout.append('\n');
+
+
+ Lineout.append(" ");
+ Lineout.append("</names>");
+ Lineout.append('\n');
+
+
+
+ /* informations */
+ Lineout.append(" ");
+ Lineout.append("<informations>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("Author : Ronny Desmedt");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("ELMT created by dxfTOelmt converter");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append("</informations>");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append("<description>");
+ Lineout.append('\n');
+
+
+
+
+
+
+
+ }
+ }
+
+/* EOF */
+ if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("EOF", Qt::CaseSensitive))
+ {
+
+ ActiveFunction="EOF";
+
+ StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ //<terminal x="0" y="7" orientation="n"/>
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<terminal x=");
+
+ Lineout.append(QChar(34));
+ Lineout.append("0");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+
+ Lineout.append(QChar(34));
+ Lineout.append("0");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" orientation=");
+
+ Lineout.append(QChar(34));
+ Lineout.append("n");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ Lineout.append(" ");
+ Lineout.append("</description>");
+ Lineout.append('\n');
+
+ Lineout.append("</definition>");
+
+ Lineout.append('\n');
+
+
+ ReadLine=in.readLine();
+ }
+
+
+ }/*end reading file*/
+
+ ui->ExportToELMT->setPlainText(Lineout);
+ ui->ExportToELMT->repaint();
+
+}
+
+/*************/
+/* functions */
+/*************/
+
+/* LINE */
+
+QString MainWindow::ConvertLine( int LineCount, int LTypeCount1, int LayerCount1)
+{
+
+ //DXF_LType LType1;
+
+ int x;
+ int y;
+
+ QString Lineout;
+ QString line_x1;
+ QString line_y1;
+ QString line_x2;
+ QString line_y2;
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+ QString LineStyle;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+
+ double lijn_x1;
+ double lijn_x2;
+ double lijn_y1;
+ double lijn_y2;
+
+ ui->SectionCount1->setPlaceholderText("Line function");
+ ui->SectionCount1->repaint();
+
+
+ ActiveFunction="Line function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ LineStyle="normal";
+
+ /* get line parameters */
+
+ for (x=0;x<LineCount;x++)
+ {
+
+ if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive))
+ {
+ lijn_x1=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ lijn_y1=-(LineTable1[x].Line2.toDouble());
+ }
+
+ if (LineTable1[x].Line1.contains(" 11", Qt::CaseSensitive))
+ {
+ lijn_x2=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 21", Qt::CaseSensitive))
+ {
+ lijn_y2=-LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable1[x].Line2;
+ }
+
+ if (LineTable1[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable1[x].Line2;
+ }
+
+ }
+
+ /* find out line type */
+
+ if (LineTypeOFLine == "")
+ {
+
+ for (y=0;y<LayerCount1+1;y++)
+ {
+
+ if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+ {
+ //LineStyle=LType1.GetLineType(LayerDXF[y].LayerLineType);
+ }
+ }
+
+ }
+ else
+ {
+ LineStyle=GetLineType(LineTypeOFLine);
+
+ }
+
+ /* create qet elmt code */
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<line lenght1=");
+ Lineout.append(QChar(34));
+ Lineout.append("1.5");
+ Lineout.append(QChar(34));
+ Lineout.append(" lenght2=");
+ Lineout.append(QChar(34));
+ Lineout.append("1.5");
+ Lineout.append(QChar(34));
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+ Lineout.append(" end1=");
+ Lineout.append(QChar(34));
+ Lineout.append("none");
+ Lineout.append(QChar(34));
+ Lineout.append(" end2=");
+ Lineout.append(QChar(34));
+ Lineout.append("none");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+
+ line_x1=QString::number (lijn_x1,'f',2);
+ line_y1=QString::number (lijn_y1,'f',2);
+ line_x2=QString::number (lijn_x2,'f',2);
+ line_y2=QString::number (lijn_y2,'f',2);
+
+ Lineout.append(" x1=");
+ Lineout.append(QChar(34));
+ Lineout.append(line_x1);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y1=");
+ Lineout.append(QChar(34));
+ Lineout.append(line_y1);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" x2=");
+ Lineout.append(QChar(34));
+ Lineout.append(line_x2);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y2=");
+ Lineout.append(QChar(34));
+ Lineout.append(line_y2);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ return Lineout;
+}
+
+/* Circle */
+
+/*QString MainWindow::ConvertCircle( int LineCount,int LTypeCount1, int LayerCount1)
+{
+
+
+ int x;
+ int y;
+
+ QString Lineout;
+ QString x_center;
+ QString y_center;
+ QString breedte;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+ QString LineStyle;
+
+
+ double center_x;
+ double center_y;
+ double radius;
+
+ ui->SectionCount1->setPlaceholderText("Circle function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Circle function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+ if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive) )
+ {
+ center_x=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ center_y=-(LineTable1[x].Line2.toDouble());
+ }
+
+ if (LineTable1[x].Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ radius=LineTable1[x].Line2.toDouble();
+ }
+ if (LineTable1[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable1[x].Line2;
+ }
+
+ if (LineTable1[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable1[x].Line2;
+ }
+
+
+ }*/
+
+ /* find out line type */
+
+ /*if (LineTypeOFLine == "")
+ {
+
+ for (y=0;y<LayerCount1+1;y++)
+ {
+
+ if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+ {
+ LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+ }
+ }
+
+ }
+ else
+ {
+ LineStyle=GetLineType(LineTypeOFLine);
+
+ }
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<ellipse x=");
+
+ x_center=QString::number ((center_x - radius),'f',2);
+ y_center=QString::number ((center_y - radius),'f',2);
+
+ Lineout.append(QChar(34));
+ Lineout.append(x_center);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(y_center);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("true");
+ Lineout.append(QChar(34));
+
+ breedte=QString::number (( radius * 2),'f',2);
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append(breedte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" width=");
+ Lineout.append(QChar(34));
+ Lineout.append(breedte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ return Lineout;*/
+}
+
+
+
+QString MainWindow::ControlText (QString Ctext1)
+{
+ QString ActiveFunction;
+ QString StatusbarMessage;
+
+ ui->SectionCount1->setPlaceholderText("Control chars in text");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Cotrol text on special characters";
+
+ StatusbarMessage = SetStatusBarMessage(0, " ", " ", ActiveFunction);
+
+ if(Ctext1.contains("<"))
+ {
+ Ctext1.replace("<","<");
+ }
+ if(Ctext1.contains(">"))
+ {
+ Ctext1.replace(">",">");
+ }
+ if(Ctext1.contains("&"))
+ {
+ Ctext1.replace("&","&");
+ }
+ if(Ctext1.contains(QChar(39)))
+ {
+ Ctext1.replace(QChar(39),"'");
+ }
+ if(Ctext1.contains(QChar(34)))
+ {
+ Ctext1.replace(QChar(34),""");
+ }
+
+ if(Ctext1.contains("/"))
+ {
+ Ctext1.replace("/","-");
+ }
+
+ if(Ctext1.contains(QChar(92)))
+ {
+ Ctext1.replace(QChar(92),"-");
+ }
+
+ if(Ctext1.contains("*"))
+ {
+ Ctext1.replace("*","x");
+ }
+
+ if(Ctext1.contains("?"))
+ {
+ Ctext1.replace("?","...");
+ }
+
+ if(Ctext1.contains("|"))
+ {
+ Ctext1.replace("|","-");
+ }
+
+ return Ctext1;
+
+}
+
+
+QString MainWindow::ConvertText( int LineCount)
+{
+
+
+ int x;
+
+ QString Lineout;
+ QString ttext;
+ QString xtext;
+ QString ytext;
+ QString htext;
+ QString rtext;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString TextHeight;
+ QString TextScale;
+
+
+ double tx;
+ double ty;
+ double theight;
+ double trotation;
+ double tscale;
+
+ ui->SectionCount1->setPlaceholderText("Text function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Text function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+ if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive))
+ {
+ tx=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ ty=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ theight=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 1", Qt::CaseSensitive))
+ {
+ ttext=LineTable1[x].Line2;
+ }
+
+ if (LineTable1[x].Line1.contains(" 50", Qt::CaseSensitive))
+ {
+ trotation=LineTable1[x].Line2.toDouble();
+ }
+ if (LineTable1[x].Line1.contains(" 41", Qt::CaseSensitive))
+ {
+ tscale=LineTable1[x].Line2.toDouble();
+ }
+ }
+
+ /* <text x="-29" y="-8" size="9" rotation="270" text="Test"/> */
+
+
+ xtext=QString::number(tx+0.5,'f',0);
+ ytext=QString::number(ty+0.5,'f',0);
+ htext=QString::number(theight+0.5,'f',0);
+ rtext=QString::number(trotation-90,'f',0);
+
+ /* create qet elmt code */
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<text x=");
+ Lineout.append(QChar(34));
+ Lineout.append(xtext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(ytext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" size=");
+ Lineout.append(QChar(34));
+ Lineout.append(htext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" rotation=");
+ Lineout.append(QChar(34));
+ Lineout.append(rtext);
+ Lineout.append(QChar(34));
+
+ ttext = ControlText (ttext);
+
+ Lineout.append(" text=");
+ Lineout.append(QChar(34));
+ Lineout.append(ttext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+
+
+ return Lineout;
+
+
+}
+
+QString MainWindow::ConvertMText( int LineCount)
+{
+ /* <text x="-29" y="-8" size="9" rotation="270" text="Test"/> */
+
+
+ /*ytext=QString::number(my,'f',2);
+ htext=QString::number(mheight,'f',2);
+
+
+ for (forlus3=0;forlus3==countmtext;forlus3++)
+ {
+
+
+
+ if(mtext3[forlus3].contains("<"))
+ {
+ mtext3[forlus3].replace("<","<");
+ }
+ if(mtext3[forlus3].contains(">"))
+ {
+ mtext3[forlus3].replace(">",">");
+ }
+ if(mtext3[forlus3].contains("&"))
+ {
+ mtext3[forlus3].replace("&","&");
+ }
+ if(mtext3[forlus3].contains(QChar(39)))
+ {
+ mtext3[forlus3].replace(QChar(39),"'");
+ }
+ if(mtext3[forlus3].contains(QChar(34)))
+ {
+ mtext3[forlus3].replace(QChar(34),""");
+ }
+
+ if(mtext3[forlus3].contains("/"))
+ {
+ mtext3[forlus3].replace("/","-");
+ }
+
+ if(mtext3[forlus3].contains(QChar(92)))
+ {
+ mtext3[forlus3].replace(QChar(92),"-");
+ }
+
+ if(mtext3[forlus3].contains("*"))
+ {
+ mtext3[forlus3].replace("*","x");
+ }
+
+ if(mtext3[forlus3].contains("?"))
+ {
+ mtext3[forlus3].replace("?","...");
+ }
+
+ if(mtext3[forlus3].contains("|"))
+ {
+ mtext3[forlus3].replace("|","-");
+ }
+ if (forlus3==0)
+ {
+ mtextresult= mtext3[forlus3];
+ }
+ else
+ {
+ mtextresult.append( mtext3[forlus3]);
+ }
+ }
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<text x=");
+ Lineout.append(QChar(34));
+ Lineout.append(xtext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(ytext);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" size=");
+ Lineout.append(QChar(34));
+ Lineout.append(htext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" rotation=");
+ Lineout.append(QChar(34));
+ Lineout.append(rtext);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" text=");
+ Lineout.append(QChar(34));
+ Lineout.append(mtextresult);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');*/
+
+ //ui->ExportToELMT->setPlainText(Lineout);
+ //ui->ExportToELMT->repaint();
+}
+
+QString MainWindow::ConvertArc(int LineCount,int LTypeCount1, int LayerCount1)
+{
+
+
+
+ int x;
+ int y;
+
+ double center_x;
+ double center_y;
+ double radius;
+ double start_angle;
+ double end_angle;
+ double hoek2;
+ double begin;
+ double einde;
+ double begin1;
+ double einde1;
+ double hoek_einde;
+ double N;
+ double O;
+ double J;
+ double K;
+ double L;
+ double M;
+ double R;
+ double S;
+ double T;
+ double U;
+ double V;
+ double W;
+
+
+ QString Lineout;
+ QString x_center;
+ QString y_center;
+ QString breedte;
+ QString hoogte;
+ QString hoek;
+ QString start_hoek;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+ QString LineStyle;
+
+ ui->SectionCount1->setPlaceholderText("Arc function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Arc function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+ if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive) )
+ {
+ center_x=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ center_y=-(LineTable1[x].Line2.toDouble());
+ }
+
+ if (LineTable1[x].Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ radius=LineTable1[x].Line2.toDouble();
+ }
+
+
+ if (LineTable1[x].Line1.contains(" 50", Qt::CaseSensitive))
+ {
+ start_angle=LineTable1[x].Line2.toDouble();
+ }
+
+
+ if (LineTable1[x].Line1.contains(" 51", Qt::CaseSensitive))
+ {
+ end_angle=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable1[x].Line2;
+ }
+
+ if (LineTable1[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable1[x].Line2;
+ }
+
+
+ }
+
+
+ /* find out line type */
+
+ if (LineTypeOFLine == "")
+ {
+
+ for (y=0;y<LayerCount1+1;y++)
+ {
+
+ if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+ {
+ LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+ }
+ }
+
+ }
+ else
+ {
+ LineStyle=GetLineType(LineTypeOFLine);
+
+ }
+
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<arc x=");
+
+ x_center=QString::number ((center_x - radius),'f',2);
+ y_center=QString::number ((center_y - radius),'f',2);
+
+ Lineout.append(QChar(34));
+ Lineout.append(x_center);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(y_center);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+
+ breedte=QString::number (( radius * 2),'f',2);
+ hoogte=QString::number (( radius * 2),'f',2);
+
+ Lineout.append(" width=");
+ Lineout.append(QChar(34));
+ Lineout.append(breedte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append(hoogte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+
+
+ /*
+ h = (450° - acad°)/30
+ qet° = 30* (450° - acad°)/30 = 450° - acad°
+ dus als acad_start° = 60° Þ qet_start° = 450° - 60° = 390° en opnieuw qet_start° > 360° dus qet_start° = 390° - 360° = 30°
+ acad_end° = 110° Þ qet_end° = 450° - 110° = 340° < 360° dus die hoek blijft 340°
+ qet_hoek° = qet_end° - qet_start° = 340° - 30° = 310°
+
+ */
+
+ /* hoek ACAD omrekenen naar QET */
+
+
+ begin1=450-start_angle;
+ einde1=450-end_angle;
+
+
+ if (begin1>360)
+ {
+ begin=begin1-360;
+ }
+ else
+ {
+ if(begin1<0)
+ {
+ begin=360-begin1;
+ }
+ else
+ {
+ begin=begin1;
+ }
+ }
+
+ if (einde1>360)
+ {
+ einde=einde1-360;
+ }
+ else
+ {
+ if (einde1<0)
+ {
+ einde=einde1-360;
+ }
+ else
+ {
+ einde=einde1;
+ }
+ }
+
+
+
+ /* calculate hoek */
+
+ if (begin>einde)
+ {
+ N=einde-begin;
+ }
+ else
+ {
+ N=einde-begin-360;
+ }
+
+ if (N<0)
+ {
+ O=-N;
+ }
+ else
+ {
+ O=N;
+ }
+
+ J=end_angle-start_angle+N;
+ K=360-end_angle;
+ L=360-start_angle;
+ M=K-L;
+ R=-O;
+ S=J-O;
+
+ if (S < -360)
+ {
+ T=S+360;
+ }
+ else
+ {
+ T=S;
+ }
+
+ if (begin<einde)
+ {
+ U=M;
+ }
+ else
+ {
+ U=T;
+ }
+
+ if (U<0)
+ {
+ V=-U;
+ }
+ else
+ {
+ V=U;
+ }
+
+ W=U+V;
+
+ if (W==0)
+ {
+ hoek2=-V;
+ }
+ else
+ {
+ hoek2=T;
+ }
+
+
+
+
+
+
+
+ /* einde omrekening */
+
+ hoek=QString::number (-hoek2,'f',0);
+ start_hoek=QString::number ((-(begin-90)),'f',0);
+
+
+ Lineout.append(" start=");
+ Lineout.append(QChar(34));
+ Lineout.append(start_hoek);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" angle=");
+ Lineout.append(QChar(34));
+ Lineout.append(hoek);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ return Lineout;
+
+}
+
+
+QString MainWindow::ConvertAttrib( int LineCount, int LTypeCount1, int LayerCount1)
+{
+
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Attribute function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Attribute function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+
+/* polyline */
+QString MainWindow::ConvertPolyline(int LineCount)
+{
+
+
+ int x;
+
+ QString Lineout;
+ QString Pclose;
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+
+ double Polyclose;
+ double polyx;
+ double polyy;
+
+ ui->SectionCount1->setPlaceholderText("Polyline function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Polyline function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+ if (LineTable1[x].Line1.contains(" 70"))
+ {
+ Polyclose=LineTable1[x].Line2.toDouble();
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ polyx=LineTable1[x].Line2.toDouble();
+ startx=QString::number(polyx,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ polyy=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(polyy,'f',2);
+ }
+
+
+
+
+ }
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<polygon");
+
+ if (Polyclose==1)
+ {
+ Pclose="true";
+ }
+ else
+ {
+ Pclose="false";
+ }
+
+ Lineout.append(" closed=");
+ Lineout.append(QChar(34));
+ Lineout.append(Pclose);
+ Lineout.append(QChar(34));
+
+
+ return Lineout;
+}
+
+QString MainWindow::ConvertBlock( int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Block function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Block function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+
+/*ellipse */
+QString MainWindow::ConvertEllipse(int LineCount, int LTypeCount1, int LayerCount1)
+{
+
+ int x;
+ int y;
+
+ QString Lineout;
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString LineStyle;
+
+
+ double center_x1;
+ double center_y1;
+ double center_x2;
+ double center_y2;
+ double ratio;
+ double begin;
+ double einde;
+ double hoek2;
+ double start_angle;
+ double end_angle;
+ double radius;
+
+ double N;
+ double O;
+ double J;
+ double K;
+ double L;
+ double M;
+ double R;
+ double S;
+ double T;
+ double U;
+ double V;
+ double W;
+
+ QString Cx1;
+ QString Cy1;
+ QString Width1;
+ QString Height1;
+
+ QString Hoek1;
+ QString x_center;
+ QString y_center;
+ QString hoogte;
+ QString breedte;
+ QString hoek;
+ QString start_hoek;
+
+
+
+ ui->SectionCount1->setPlaceholderText("Ellipse function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Ellipse function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+ if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive) )
+ {
+ center_x1=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+ {
+ center_y1=-(LineTable1[x].Line2.toDouble());
+ }
+
+ if (LineTable1[x].Line1.contains(" 11", Qt::CaseSensitive) )
+ {
+ center_x2=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 21", Qt::CaseSensitive))
+ {
+ center_y2=-(LineTable1[x].Line2.toDouble());
+ }
+
+ if (LineTable1[x].Line1.contains(" 40", Qt::CaseSensitive))
+ {
+ ratio=LineTable1[x].Line2.toDouble();
+ }
+
+
+ if (LineTable1[x].Line1.contains(" 41", Qt::CaseSensitive))
+ {
+ begin=LineTable1[x].Line2.toDouble();
+ }
+
+ if (LineTable1[x].Line1.contains(" 42", Qt::CaseSensitive))
+ {
+ einde=LineTable1[x].Line2.toDouble();
+ }
+
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable1[x].Line2;
+ }
+
+ if (LineTable1[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable1[x].Line2;
+ }
+
+
+ }
+
+ /* find out line type */
+
+ if (LineTypeOFLine == "")
+ {
+
+ for (y=0;y<LayerCount1+1;y++)
+ {
+
+ if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+ {
+ LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+ }
+ }
+
+ }
+ else
+ {
+ LineStyle=GetLineType(LineTypeOFLine);
+
+ }
+
+ //<arc width="20" x="-15" y="-8" antialias="true" height="38" style="line-style:normal;line-weight:normal;filling:none;color:black" start="-30" angle="-299"/>
+ /*Outputwaarde = " " & " " & "<ellipse x=" & Chr(34) & Round(Center_x, 2) & Chr(34)
+ Outputwaarde = Outputwaarde & " y=" & Chr(34) & Round(Center_y, 2) & Chr(34)
+ Outputwaarde = Outputwaarde & " antialias=" & Chr(34) & "true" & Chr(34)
+ Outputwaarde = Outputwaarde & " width=" & Chr(34) & (Round(Center_x, 2) - Round(End_point_x, 2) * 2) & Chr(34)
+ Outputwaarde = Outputwaarde & " height=" & Chr(34) & ((Round(End_point_x, 2) * Round(Ratio, 2)) * 2) & Chr(34)
+ Outputwaarde = Outputwaarde & " style=" & Chr(34) & "line-style:normal;line-weight:thin;filling:none;color:black" & Chr(34)
+
+ Outputwaarde = Outputwaarde & "/>"*/
+
+
+ Cx1=QString::number (center_x1,'f',2);
+ Cy1=QString::number (center_y1,'f',2);
+ Height1=QString::number ((center_x1-center_x2)*2,'f',2);
+ Width1=QString::number ((center_x1*ratio)*2,'f',2);
+ start_angle = begin;
+ end_angle=einde;
+
+
+
+
+ /* calculate hoek */
+
+ if (begin>einde)
+ {
+ N=einde-begin;
+ }
+ else
+ {
+ N=einde-begin-360;
+ }
+
+ if (N<0)
+ {
+ O=-N;
+ }
+ else
+ {
+ O=N;
+ }
+
+ J=end_angle-start_angle+N;
+ K=360-end_angle;
+ L=360-start_angle;
+ M=K-L;
+ R=-O;
+ S=J-O;
+
+ if (S < -360)
+ {
+ T=S+360;
+ }
+ else
+ {
+ T=S;
+ }
+
+ if (begin<einde)
+ {
+ U=M;
+ }
+ else
+ {
+ U=T;
+ }
+
+ if (U<0)
+ {
+ V=-U;
+ }
+ else
+ {
+ V=U;
+ }
+
+ W=U+V;
+
+ if (W==0)
+ {
+ hoek2=-V;
+ }
+ else
+ {
+ hoek2=T;
+ }
+
+
+
+
+
+
+
+ /* einde omrekening */
+
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<arc x=");
+
+ x_center=QString::number ((center_x1 ),'f',2);
+ y_center=QString::number((center_y1),'f',2);
+
+
+ Lineout.append(QChar(34));
+ Lineout.append(x_center);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" y=");
+ Lineout.append(QChar(34));
+ Lineout.append(y_center);
+ Lineout.append(QChar(34));
+
+
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+
+ breedte=Width1;
+ hoogte=Height1;
+
+ Lineout.append(" width=");
+ Lineout.append(QChar(34));
+ Lineout.append(breedte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append(hoogte);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+
+
+ hoek=QString::number (-hoek2,'f',0);
+ start_hoek=QString::number ((-(begin-90)),'f',0);
+
+
+ Lineout.append(" start=");
+ Lineout.append(QChar(34));
+ Lineout.append(start_hoek);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" angle=");
+ Lineout.append(QChar(34));
+ Lineout.append(hoek);
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+
+
+
+
+
+
+
+
+
+ return Lineout;
+}
+
+QString MainWindow::ConvertInsert(int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Insert function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Insert function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+QString MainWindow::ConvertLwpolyline(int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+ int y;
+ int VertexCount;
+ int forlus1;
+
+ double x_as;
+ double y_as;
+ double LineClose;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+ QString Handle;
+ QString LineTypeOFLine;
+ QString LayerNameOFLine;
+ QString LineStyle;
+ QString Pclose;
+
+
+
+
+
+ ui->SectionCount1->setPlaceholderText("Lwpolyline function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Lwpolyline function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ VertexCount=0;
+
+ for (x=0;x<LineCount;x++)
+ {
+
+ if (LineTable1[x].Line1.contains(" 70"))
+ {
+ LineClose=LineTable1[x].Line2.toDouble();
+
+
+ }
+
+
+ if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ PTable[VertexCount].Line1=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive) )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ PTable[VertexCount].Line2=QString::number(y_as,'f',2);
+ VertexCount=VertexCount+1;
+
+ }
+
+
+ if (LineTable1[x].Line1.contains(" 5", Qt::CaseSensitive) )
+ {
+ Handle=LineTable1[x].Line2;
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 6", Qt::CaseSensitive))
+ {
+ LineTypeOFLine=LineTable1[x].Line2;
+ }
+
+ if (LineTable1[x].Line1.contains(" 8", Qt::CaseSensitive))
+ {
+ LayerNameOFLine=LineTable1[x].Line2;
+ }
+
+
+ if (VertexCount >=2000)
+ {
+ x=LineCount+1;
+ }
+
+
+
+
+ }
+
+ /* find out line type */
+
+ if (LineTypeOFLine == "")
+ {
+
+ for (y=0;y<LayerCount1+1;y++)
+ {
+
+ if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+ {
+ LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+ }
+ }
+
+ }
+ else
+ {
+ LineStyle=GetLineType(LineTypeOFLine);
+
+ }
+
+
+
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append(" ");
+ Lineout.append("<polygon");
+
+ if (LineClose==1)
+ {
+ Pclose="true";
+ }
+ else
+ {
+ Pclose="false";
+ }
+
+ Lineout.append(" closed=");
+ Lineout.append(QChar(34));
+ Lineout.append(Pclose);
+ Lineout.append(QChar(34));
+
+
+ for (forlus1=0 ; forlus1 < (VertexCount) ; forlus1=forlus1+1)
+ {
+ Lineout.append(" x");
+ Lineout.append(QString::number( forlus1+1));
+ Lineout.append("=");
+
+
+
+ Lineout.append(QChar(34));
+ Lineout.append(PTable[forlus1].Line1);
+ Lineout.append(QChar(34));
+
+
+
+
+
+ Lineout.append(" y");
+ Lineout.append(QString::number(forlus1+1));
+ Lineout.append("=");
+
+
+
+ Lineout.append(QChar(34));
+ Lineout.append(PTable [forlus1].Line2);
+ Lineout.append(QChar(34));
+
+
+
+ }
+
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:");
+ Lineout.append(LineStyle);
+ Lineout.append(";");
+ Lineout.append("line-weight:thin;");
+ Lineout.append("filling:none;");
+ Lineout.append("color:black");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+
+ return Lineout;
+}
+
+QString MainWindow::ConvertPoint(int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Point function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Point function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+QString MainWindow::ConvertShape( int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Shape function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Shape function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+QString MainWindow::ConvertSolid( int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Solid function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Solid function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+QString MainWindow::ConvertSpline(int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Spline function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Spline function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+/* vector of polyline */
+QString MainWindow::ConvertVertex(int LineCount)
+{
+
+
+
+ int x;
+ //int x2;
+ //int forlus1;
+
+ QString Lineout;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+
+ //QString PolyTable [200] [2];
+
+ double polyx;
+ double polyy;
+
+ ui->SectionCount1->setPlaceholderText("Vertex function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Vertex function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+ if (LineTable2[x].Line1.contains(" 10"))
+ {
+ polyx=LineTable2[x].Line2.toDouble();
+ PTable[VectorCount].Line1=QString::number(polyx,'f',2);
+
+ }
+
+ if (LineTable2[x].Line1.contains(" 20") )
+ {
+ polyy=-LineTable2[x].Line2.toDouble();
+ PTable[VectorCount].Line2=QString::number(polyy,'f',2);
+ VectorCount=VectorCount+1;
+ }
+
+
+ }
+
+
+ return Lineout;
+
+}
+
+/* polyline vector function */
+QString MainWindow::ConvertPolylineVector( int LineCount)
+{
+
+
+
+ int forlus1;
+
+ QString Lineout;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+
+ ui->SectionCount1->setPlaceholderText("PolylineVector function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Polyline vector function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (forlus1=0 ; forlus1 < (VectorCount) ; forlus1=forlus1+1)
+ {
+ Lineout.append(" x");
+ Lineout.append(QString::number( forlus1+1));
+ Lineout.append("=");
+
+
+
+ Lineout.append(QChar(34));
+ Lineout.append(PTable[forlus1].Line1);
+ Lineout.append(QChar(34));
+
+
+
+
+
+ Lineout.append(" y");
+ Lineout.append(QString::number(forlus1+1));
+ Lineout.append("=");
+
+
+
+ Lineout.append(QChar(34));
+ Lineout.append(PTable [forlus1].Line2);
+ Lineout.append(QChar(34));
+
+
+
+ }
+
+
+
+ return Lineout;
+}
+
+
+
+QString MainWindow::ConvertXline(int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Xline function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Xline function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+
+QString MainWindow::ConvertImage(int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Image function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Image function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+
+QString MainWindow::ConvertHatch(int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Hatch function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Hatch function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+
+QString MainWindow::ConvertMline( int LineCount, int LTypeCount1, int LayerCount1)
+{
+ int x;
+
+ double x_as;
+ double y_as;
+
+ QString startx;
+ QString starty;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+ QString Lineout;
+
+
+ ui->SectionCount1->setPlaceholderText("Mline function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Mline function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ for (x=0;x<LineCount;x++)
+ {
+
+
+
+
+ if (LineTable1[x].Line1.contains(" 10"))
+ {
+ x_as=LineTable1[x].Line2.toDouble();
+ startx=QString::number(x_as,'f',2);
+
+ }
+
+ if (LineTable1[x].Line1.contains(" 20") )
+ {
+ y_as=-LineTable1[x].Line2.toDouble();
+ starty=QString::number(y_as,'f',2);
+ }
+
+
+
+
+ }
+
+
+ return Lineout;
+}
+
+
+/* polyline end */
+QString MainWindow::ConvertPolylineEnd(int LineCount)
+{
+
+
+
+ QString Lineout;
+ QString ActiveFunction;
+ QString StatusbarMessage;
+
+ ui->SectionCount1->setPlaceholderText("PolylineEnd function");
+ ui->SectionCount1->repaint();
+
+ ActiveFunction="Polyline end function";
+
+ StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+ Lineout.append(" antialias=");
+ Lineout.append(QChar(34));
+ Lineout.append("false");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" style=");
+ Lineout.append(QChar(34));
+ Lineout.append("line-style:normal;line-weight:thin;filling:none;color:black");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" />");
+ Lineout.append('\n');
+
+ return Lineout;
+}
+
+/* send actions to statusbar */
+QString MainWindow::SetStatusBarMessage(int Counter, QString InLine1, QString InLine2, QString ActiveFunc)
+{
+ QString StatusbarMessage;
+
+ StatusbarMessage="";
+ StatusbarMessage.append(QString::number(Counter));
+ StatusbarMessage.append(" / ");
+ StatusbarMessage.append( InLine1);
+ StatusbarMessage.append(" / ");
+ StatusbarMessage.append( InLine2);
+ StatusbarMessage.append(" / ");
+ StatusbarMessage.append(ActiveFunc);
+
+ ui->statusBar->clearMessage();
+ ui->statusBar->showMessage(StatusbarMessage );
+
+ return StatusbarMessage;
+}
+
+/* check line style */
+QString MainWindow::GetLineType (QString FindLT)
+{
+ QString LineStyle;
+
+ if (FindLT == "Continuous" )
+ {
+ LineStyle="normal";
+ }
+
+ if (FindLT == "CONTINUOUS" )
+ {
+ LineStyle="normal";
+ }
+
+ if (FindLT == "Center" )
+ {
+ LineStyle="dashdotted";
+ }
+
+ if (FindLT == "CENTER" )
+ {
+ LineStyle="dashdotted";
+ }
+
+ if (FindLT == "CENTER2" )
+ {
+ LineStyle="dashdotted";
+ }
+
+ if (FindLT == "CENTERX2" )
+ {
+ LineStyle="dashdotted";
+ }
+
+ if (FindLT == "DASHED" )
+ {
+ LineStyle="dashed";
+ }
+
+ if (FindLT == "DASHED2" )
+ {
+ LineStyle="dashed";
+ }
+
+ if (FindLT == "DASHEDX2" )
+ {
+ LineStyle="dashed";
+ }
+
+
+ if (FindLT == "HIDDEN" )
+ {
+ LineStyle="dashed";
+ }
+
+ if (FindLT == "HIDDEN2" )
+ {
+ LineStyle="dashed";
+ }
+
+ if (FindLT == "HIDDENX2" )
+ {
+ LineStyle="dashed";
+ }
+
+ if (FindLT == "EPL_DASH" )
+ {
+ LineStyle="dashed";
+ }
+
+ if (FindLT == "EPL_DASHDOT" )
+ {
+ LineStyle="dashdotted";
+ }
+
+ if (FindLT == "DASHDOT" )
+ {
+ LineStyle="dashdotted";
+ }
+
+ if (FindLT == "DASHDOT2" )
+ {
+ LineStyle="dashdotted";
+ }
+
+ if (FindLT == "DASHDOTX2" )
+ {
+ LineStyle="dashdotted";
+ }
+
+ return LineStyle;
+}
+
+void MainWindow::fillElmtName() {
+ QString name = m_file_path.split("/").last();
+ name.remove(".dxf");
+ ui->m_elmt_name_le->setText(name);
+}
+
+void MainWindow::on_m_save_elmt_pb_clicked() {
+
+ QFile file(m_path_dir + "/" + ui->m_elmt_name_le->text() + ".elmt");
+ if (!file.open(QFile::WriteOnly | QFile::Text)) {
+ QMessageBox::warning(this, tr("Application"),
+ tr("Cannot write file %1:\n%2.")
+ .arg(m_path_dir)
+ .arg(file.errorString()));
+ return;
+ }
+
+ QTextStream out(&file);
+ out << ui->ExportToELMT->toPlainText();
+
+ file.close();
+ QMessageBox::information(this, tr("Export"), tr("L'\351l\351ment %1 \340 bien \351t\351 enregistr\351").arg(ui->m_elmt_name_le->text()));
+}
+
+void MainWindow::on_m_load_dxf_pb_clicked() {
+ loadFile();
+}
+
+void MainWindow::on_LineCountDXF_textEdited(const QString &arg1)
+{
+
+}
+
Added: branches/dxftoelmt/src/ui/tables.cpp
===================================================================
--- branches/dxftoelmt/src/ui/tables.cpp (rev 0)
+++ branches/dxftoelmt/src/ui/tables.cpp 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,111 @@
+
+Aantal_Tekens = Line2.length();
+if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("TABLES", Qt::CaseSensitive)and Aantal_Tekens==6)
+{
+ ActiveSection=3;
+
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ while(switch2==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ Aantal_Tekens = Line2.length();
+ if (Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("TABLE",Qt::CaseSensitive)and Aantal_Tekens==5)
+ {
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+
+
+ Aantal_Tekens = Line2.length();
+ if(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LTYPE",Qt::CaseSensitive) and Aantal_Tekens==5)
+ {
+ switch3=false;
+ LineCount2=1;
+
+ switch3=(Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("ENDTAB",Qt::CaseSensitive)and Aantal_Tekens==6);
+ while (switch3==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ LineTable2[LineCount2].Line1=Line1;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ LineTable2[LineCount2].Line2=Line2;
+ LineCount2=LineCount2+1;
+ dxfLineCounter=dxfLineCounter+2;
+
+ Aantal_Tekens = Line2.length();
+ switch3=(Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("ENDTAB",Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ if (LineCount2>=200)
+ {
+ switch3=true;
+ }
+ }
+ }
+ }
+
+ Aantal_Tekens = Line2.length();
+ if(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LAYER",Qt::CaseSensitive) and Aantal_Tekens==5)
+ {
+
+ switch4=false;
+ LineCount3=1;
+
+
+ switch4=(Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("ENDTAB",Qt::CaseSensitive)and Aantal_Tekens==6);
+ while (switch4==false)
+ {
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ LineTable3[LineCount3].Line1=Line1;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ LineTable3[LineCount3].Line2=Line2;
+ LineCount3=LineCount3+1;
+ dxfLineCounter=dxfLineCounter+2;
+
+
+ Aantal_Tekens = Line2.length();
+ switch4=(Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("ENDTAB",Qt::CaseSensitive)and Aantal_Tekens==6);
+
+ if (LineCount3>=200)
+ {
+ switch4=true;
+ }
+ }
+
+ }
+
+ Aantal_Tekens = Line2.length();
+ switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+ if (LineCount2>=2000)
+ {
+ switch2=1;
+
+ }
+
+ ReadLine=in.readLine();
+ Line1=ReadLine;
+ ReadLine=in.readLine();
+ Line2=ReadLine;
+ dxfLineCounter=dxfLineCounter+2;
+
+ }
+
+ DXF_LType Load_LType;
+ Load_LType.LoadLTypeTable(LineCount2, LineTable2);
+
+ DXF_Layer Load_Layer;
+ Load_Layer.LoadLayerTable(LineCount3, LineTable3);
+
+}
Added: branches/dxftoelmt/src/ui_mainwindow.h
===================================================================
--- branches/dxftoelmt/src/ui_mainwindow.h (rev 0)
+++ branches/dxftoelmt/src/ui_mainwindow.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,177 @@
+/********************************************************************************
+** Form generated from reading UI file 'mainwindow.ui'
+**
+** Created by: Qt User Interface Compiler version 4.8.6
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_MAINWINDOW_H
+#define UI_MAINWINDOW_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QGridLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QMainWindow>
+#include <QtGui/QMenuBar>
+#include <QtGui/QPushButton>
+#include <QtGui/QStatusBar>
+#include <QtGui/QTextEdit>
+#include <QtGui/QToolBar>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+
+
+
+QT_BEGIN_NAMESPACE
+
+class Ui_MainWindow
+{
+public:
+ QWidget *centralWidget;
+ QVBoxLayout *verticalLayout;
+ QGridLayout *gridLayout_2;
+ QTextEdit *ImportDXF;
+ QLineEdit *SectionCount1;
+ QLineEdit *LineCountDXF;
+ QLabel *label;
+ QLabel *label_2;
+ QLineEdit *m_import_file_path_le;
+ QLabel *labelSectionCount;
+ QLineEdit *ExportFile;
+ QLabel *label_4;
+ QLineEdit *m_elmt_name_le;
+ QPushButton *m_save_elmt_pb;
+ QTextEdit *ExportToELMT;
+ QPushButton *m_load_dxf_pb;
+ QMenuBar *menuBar;
+ QToolBar *mainToolBar;
+ QStatusBar *statusBar;
+
+ void setupUi(QMainWindow *MainWindow)
+ {
+ if (MainWindow->objectName().isEmpty())
+ MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
+ MainWindow->resize(758, 488);
+ centralWidget = new QWidget(MainWindow);
+ centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
+ verticalLayout = new QVBoxLayout(centralWidget);
+ verticalLayout->setSpacing(6);
+ verticalLayout->setContentsMargins(11, 11, 11, 11);
+ verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+ gridLayout_2 = new QGridLayout();
+ gridLayout_2->setSpacing(6);
+ gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+ ImportDXF = new QTextEdit(centralWidget);
+ ImportDXF->setObjectName(QString::fromUtf8("ImportDXF"));
+
+ gridLayout_2->addWidget(ImportDXF, 4, 0, 1, 2);
+
+ SectionCount1 = new QLineEdit(centralWidget);
+ SectionCount1->setObjectName(QString::fromUtf8("SectionCount1"));
+ QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ sizePolicy.setHorizontalStretch(0);
+ sizePolicy.setVerticalStretch(0);
+ sizePolicy.setHeightForWidth(SectionCount1->sizePolicy().hasHeightForWidth());
+ SectionCount1->setSizePolicy(sizePolicy);
+
+ gridLayout_2->addWidget(SectionCount1, 3, 1, 1, 1);
+
+ label = new QLabel(centralWidget);
+ label->setObjectName(QString::fromUtf8("label"));
+
+ gridLayout_2->addWidget(label, 2, 0, 1, 1);
+
+ label_2 = new QLabel(centralWidget);
+ label_2->setObjectName(QString::fromUtf8("label_2"));
+
+ gridLayout_2->addWidget(label_2, 2, 2, 1, 1);
+
+ m_import_file_path_le = new QLineEdit(centralWidget);
+ m_import_file_path_le->setObjectName(QString::fromUtf8("m_import_file_path_le"));
+ m_import_file_path_le->setMaximumSize(QSize(16777165, 16777215));
+
+ gridLayout_2->addWidget(m_import_file_path_le, 2, 1, 1, 1);
+
+ labelSectionCount = new QLabel(centralWidget);
+ labelSectionCount->setObjectName(QString::fromUtf8("labelSectionCount"));
+
+ gridLayout_2->addWidget(labelSectionCount, 3, 0, 1, 1);
+
+ ExportFile = new QLineEdit(centralWidget);
+ ExportFile->setObjectName(QString::fromUtf8("ExportFile"));
+
+ gridLayout_2->addWidget(ExportFile, 2, 3, 1, 1);
+
+ label_4 = new QLabel(centralWidget);
+ label_4->setObjectName(QString::fromUtf8("label_4"));
+
+ gridLayout_2->addWidget(label_4, 3, 2, 1, 1);
+
+ m_elmt_name_le = new QLineEdit(centralWidget);
+ m_elmt_name_le->setObjectName(QString::fromUtf8("m_elmt_name_le"));
+
+ gridLayout_2->addWidget(m_elmt_name_le, 3, 3, 1, 1);
+
+ m_save_elmt_pb = new QPushButton(centralWidget);
+ m_save_elmt_pb->setObjectName(QString::fromUtf8("m_save_elmt_pb"));
+
+ gridLayout_2->addWidget(m_save_elmt_pb, 1, 2, 1, 2);
+
+ ExportToELMT = new QTextEdit(centralWidget);
+ ExportToELMT->setObjectName(QString::fromUtf8("ExportToELMT"));
+ ExportToELMT->setLineWrapMode(QTextEdit::NoWrap);
+
+ gridLayout_2->addWidget(ExportToELMT, 4, 2, 1, 2);
+
+ m_load_dxf_pb = new QPushButton(centralWidget);
+ m_load_dxf_pb->setObjectName(QString::fromUtf8("m_load_dxf_pb"));
+
+ gridLayout_2->addWidget(m_load_dxf_pb, 1, 0, 1, 2);
+
+
+ verticalLayout->addLayout(gridLayout_2);
+
+ MainWindow->setCentralWidget(centralWidget);
+ menuBar = new QMenuBar(MainWindow);
+ menuBar->setObjectName(QString::fromUtf8("menuBar"));
+ menuBar->setGeometry(QRect(0, 0, 758, 20));
+ MainWindow->setMenuBar(menuBar);
+ mainToolBar = new QToolBar(MainWindow);
+ mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
+ MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
+ statusBar = new QStatusBar(MainWindow);
+ statusBar->setObjectName(QString::fromUtf8("statusBar"));
+ MainWindow->setStatusBar(statusBar);
+
+ retranslateUi(MainWindow);
+
+ QMetaObject::connectSlotsByName(MainWindow);
+ } // setupUi
+
+ void retranslateUi(QMainWindow *MainWindow)
+ {
+ MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8));
+ label->setText(QApplication::translate("MainWindow", "Import file path :", 0, QApplication::UnicodeUTF8));
+ label_2->setText(QApplication::translate("MainWindow", "Export directory path :", 0, QApplication::UnicodeUTF8));
+ labelSectionCount->setText(QApplication::translate("MainWindow", "Section count", 0, QApplication::UnicodeUTF8));
+ label_4->setText(QApplication::translate("MainWindow", "element name :", 0, QApplication::UnicodeUTF8));
+ m_save_elmt_pb->setText(QApplication::translate("MainWindow", "save to elmt file", 0, QApplication::UnicodeUTF8));
+ m_load_dxf_pb->setText(QApplication::translate("MainWindow", "Load DXF file", 0, QApplication::UnicodeUTF8));
+ } // retranslateUi
+
+};
+
+namespace Ui {
+ class MainWindow: public Ui_MainWindow {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_MAINWINDOW_H
Added: branches/dxftoelmt/ui_mainwindow.h
===================================================================
--- branches/dxftoelmt/ui_mainwindow.h (rev 0)
+++ branches/dxftoelmt/ui_mainwindow.h 2014-09-21 15:06:35 UTC (rev 3323)
@@ -0,0 +1,178 @@
+/********************************************************************************
+** Form generated from reading UI file 'mainwindow.ui'
+**
+** Created by: Qt User Interface Compiler version 4.8.6
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_MAINWINDOW_H
+#define UI_MAINWINDOW_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QGridLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QMainWindow>
+#include <QtGui/QMenuBar>
+#include <QtGui/QPushButton>
+#include <QtGui/QStatusBar>
+#include <QtGui/QTextEdit>
+#include <QtGui/QToolBar>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_MainWindow
+{
+public:
+ QWidget *centralWidget;
+ QVBoxLayout *verticalLayout;
+ QGridLayout *gridLayout_2;
+ QLineEdit *SectionCount1;
+ QLabel *label;
+ QLabel *label_2;
+ QLineEdit *m_import_file_path_le;
+ QLabel *labelSectionCount;
+ QLineEdit *ExportFile;
+ QLabel *label_4;
+ QLineEdit *m_elmt_name_le;
+ QPushButton *m_save_elmt_pb;
+ QPushButton *m_load_dxf_pb;
+ QTextEdit *ImportDXF;
+ QTextEdit *ExportToELMT;
+ QMenuBar *menuBar;
+ QToolBar *mainToolBar;
+ QStatusBar *statusBar;
+
+ void setupUi(QMainWindow *MainWindow)
+ {
+ if (MainWindow->objectName().isEmpty())
+ MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
+ MainWindow->resize(758, 488);
+ centralWidget = new QWidget(MainWindow);
+ centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
+ verticalLayout = new QVBoxLayout(centralWidget);
+ verticalLayout->setSpacing(6);
+ verticalLayout->setContentsMargins(11, 11, 11, 11);
+ verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+ gridLayout_2 = new QGridLayout();
+ gridLayout_2->setSpacing(6);
+ gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+ SectionCount1 = new QLineEdit(centralWidget);
+ SectionCount1->setObjectName(QString::fromUtf8("SectionCount1"));
+ QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ sizePolicy.setHorizontalStretch(0);
+ sizePolicy.setVerticalStretch(0);
+ sizePolicy.setHeightForWidth(SectionCount1->sizePolicy().hasHeightForWidth());
+ SectionCount1->setSizePolicy(sizePolicy);
+
+ gridLayout_2->addWidget(SectionCount1, 3, 1, 1, 1);
+
+ label = new QLabel(centralWidget);
+ label->setObjectName(QString::fromUtf8("label"));
+
+ gridLayout_2->addWidget(label, 2, 0, 1, 1);
+
+ label_2 = new QLabel(centralWidget);
+ label_2->setObjectName(QString::fromUtf8("label_2"));
+
+ gridLayout_2->addWidget(label_2, 2, 2, 1, 1);
+
+ m_import_file_path_le = new QLineEdit(centralWidget);
+ m_import_file_path_le->setObjectName(QString::fromUtf8("m_import_file_path_le"));
+ m_import_file_path_le->setMaximumSize(QSize(16777165, 16777215));
+
+ gridLayout_2->addWidget(m_import_file_path_le, 2, 1, 1, 1);
+
+ labelSectionCount = new QLabel(centralWidget);
+ labelSectionCount->setObjectName(QString::fromUtf8("labelSectionCount"));
+
+ gridLayout_2->addWidget(labelSectionCount, 3, 0, 1, 1);
+
+ ExportFile = new QLineEdit(centralWidget);
+ ExportFile->setObjectName(QString::fromUtf8("ExportFile"));
+
+ gridLayout_2->addWidget(ExportFile, 2, 3, 1, 1);
+
+ label_4 = new QLabel(centralWidget);
+ label_4->setObjectName(QString::fromUtf8("label_4"));
+
+ gridLayout_2->addWidget(label_4, 3, 2, 1, 1);
+
+ m_elmt_name_le = new QLineEdit(centralWidget);
+ m_elmt_name_le->setObjectName(QString::fromUtf8("m_elmt_name_le"));
+
+ gridLayout_2->addWidget(m_elmt_name_le, 3, 3, 1, 1);
+
+ m_save_elmt_pb = new QPushButton(centralWidget);
+ m_save_elmt_pb->setObjectName(QString::fromUtf8("m_save_elmt_pb"));
+
+ gridLayout_2->addWidget(m_save_elmt_pb, 1, 2, 1, 2);
+
+ m_load_dxf_pb = new QPushButton(centralWidget);
+ m_load_dxf_pb->setObjectName(QString::fromUtf8("m_load_dxf_pb"));
+
+ gridLayout_2->addWidget(m_load_dxf_pb, 1, 0, 1, 2);
+
+ ImportDXF = new QTextEdit(centralWidget);
+ ImportDXF->setObjectName(QString::fromUtf8("ImportDXF"));
+ QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Expanding);
+ sizePolicy1.setHorizontalStretch(0);
+ sizePolicy1.setVerticalStretch(0);
+ sizePolicy1.setHeightForWidth(ImportDXF->sizePolicy().hasHeightForWidth());
+ ImportDXF->setSizePolicy(sizePolicy1);
+
+ gridLayout_2->addWidget(ImportDXF, 4, 0, 1, 2);
+
+ ExportToELMT = new QTextEdit(centralWidget);
+ ExportToELMT->setObjectName(QString::fromUtf8("ExportToELMT"));
+ ExportToELMT->setLineWrapMode(QTextEdit::NoWrap);
+
+ gridLayout_2->addWidget(ExportToELMT, 4, 2, 1, 2);
+
+
+ verticalLayout->addLayout(gridLayout_2);
+
+ MainWindow->setCentralWidget(centralWidget);
+ menuBar = new QMenuBar(MainWindow);
+ menuBar->setObjectName(QString::fromUtf8("menuBar"));
+ menuBar->setGeometry(QRect(0, 0, 758, 25));
+ MainWindow->setMenuBar(menuBar);
+ mainToolBar = new QToolBar(MainWindow);
+ mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
+ MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
+ statusBar = new QStatusBar(MainWindow);
+ statusBar->setObjectName(QString::fromUtf8("statusBar"));
+ MainWindow->setStatusBar(statusBar);
+
+ retranslateUi(MainWindow);
+
+ QMetaObject::connectSlotsByName(MainWindow);
+ } // setupUi
+
+ void retranslateUi(QMainWindow *MainWindow)
+ {
+ MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8));
+ label->setText(QApplication::translate("MainWindow", "Import file path :", 0, QApplication::UnicodeUTF8));
+ label_2->setText(QApplication::translate("MainWindow", "Export directory path :", 0, QApplication::UnicodeUTF8));
+ labelSectionCount->setText(QApplication::translate("MainWindow", "Section count", 0, QApplication::UnicodeUTF8));
+ label_4->setText(QApplication::translate("MainWindow", "element name :", 0, QApplication::UnicodeUTF8));
+ m_save_elmt_pb->setText(QApplication::translate("MainWindow", "save to elmt file", 0, QApplication::UnicodeUTF8));
+ m_load_dxf_pb->setText(QApplication::translate("MainWindow", "Load DXF file", 0, QApplication::UnicodeUTF8));
+ } // retranslateUi
+
+};
+
+namespace Ui {
+ class MainWindow: public Ui_MainWindow {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_MAINWINDOW_H