[qet] [4340] Merge latest commit dxftoqet branch |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4340
Author: scorpio810
Date: 2016-02-06 13:52:24 +0100 (Sat, 06 Feb 2016)
Log Message:
-----------
Merge latest commit dxftoqet branch
Modified Paths:
--------------
branches/Qetdxf/sources/dxftoqet2/csv_create_elmt.cpp
branches/Qetdxf/sources/dxftoqet2/csv_create_elmt.h
branches/Qetdxf/sources/dxftoqet2/dxf_create_elmt.cpp
branches/Qetdxf/sources/dxftoqet2/dxf_create_elmt.h
branches/Qetdxf/sources/dxftoqet2/dxftoqet2.pri
branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.cpp
branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.h
branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.ui
branches/Qetdxf/sources/dxftoqet2/main.cpp
branches/Qetdxf/sources/dxftoqet2/src/csv_build_table.cpp
branches/Qetdxf/sources/dxftoqet2/src/csv_build_table.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_arc.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_arc.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attdef.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attdef.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attr.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attr.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_circle.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_circle.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_ellipse.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_ellipse.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_line.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_line.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_lwpolyline.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_lwpolyline.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_point.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_point.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_polyline.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_polyline.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_rect.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_rect.h
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_text.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_text.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_arc.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_arc.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_circle.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_circle.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_ellipse.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_ellipse.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_input.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_input.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_line.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_line.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_polyline.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_polyline.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_rectangel.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_rectangel.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_terminal.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_terminal.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_text.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_text.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_layer_control.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_layer_control.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_ltype_control.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_ltype_control.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_text_control.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_text_control.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_data.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_data.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_load.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_load.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_ltype_control.h
branches/Qetdxf/sources/dxftoqet2/src/dxf_split.cpp
branches/Qetdxf/sources/dxftoqet2/src/dxf_split.h
branches/Qetdxf/sources/dxftoqet2/src/qet_base_types/baseelmt.cpp
branches/Qetdxf/sources/dxftoqet2/src/qet_base_types/baseelmt.h
branches/Qetdxf/sources/dxftoqet2/src/split_csv.cpp
branches/Qetdxf/sources/dxftoqet2/src/split_csv.h
Modified: branches/Qetdxf/sources/dxftoqet2/csv_create_elmt.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/csv_create_elmt.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/csv_create_elmt.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,8 @@
-#include "dxftoqet2/csv_create_elmt.h"
+#include "csv_create_elmt.h"
extern struct DXF_base DXF_main_base[1];
-csv_create_elmt::csv_create_elmt(QWidget *parent) :
- QMainWindow(parent)
+csv_create_elmt::csv_create_elmt(QWidget *parent): QWidget(parent)
{
}
@@ -411,6 +410,7 @@
db_text2.QET_y=Row_pos+(Row_height/4*3);
db_text2.QET_size=TXT_height;
db_text2.QET_rotation=TXT_rotate;
+ db_text2.QET_color="black";
@@ -435,6 +435,7 @@
db_text1.QET_y=Row_pos+(Row_height/4*3);
db_text1.QET_size=TXT_height;
db_text1.QET_rotation=TXT_rotate;
+ db_text1.QET_color="black";
Modified: branches/Qetdxf/sources/dxftoqet2/csv_create_elmt.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/csv_create_elmt.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/csv_create_elmt.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -2,17 +2,18 @@
#define CSV_CREATE_ELMT_H
//#include <QMainWindow>
-#include "dxftoqet2/src/dxf_data.h"
-#include "dxftoqet2/src/qet_base_types/baseelmt.h"
-#include "dxftoqet2/src/dxf_control/dxf_text_control.h"
+#include <QWidget>
+#include "src/dxf_data.h"
+#include "src/qet_base_types/baseelmt.h"
+#include "src/dxf_control/dxf_text_control.h"
-#include "dxftoqet2/src/dxf/dxf_point.h"
-#include "dxftoqet2/src/dxf/dxf_attdef.h"
-#include "dxftoqet2/src/dxf/dxf_rect.h"
-#include "dxftoqet2/src/dxf/dxf_text.h"
+#include "src/dxf/dxf_point.h"
+#include "src/dxf/dxf_attdef.h"
+#include "src/dxf/dxf_rect.h"
+#include "src/dxf/dxf_text.h"
-class csv_create_elmt : public QMainWindow
+class csv_create_elmt : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/dxf_create_elmt.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/dxf_create_elmt.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/dxf_create_elmt.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,4 +1,4 @@
-#include "dxftoqet2/dxf_create_elmt.h"
+#include "dxf_create_elmt.h"
extern struct DXF_base DXF_main_base[1];
extern struct DXF_header DXF_input_header[500];
@@ -33,8 +33,8 @@
extern struct DXF_block_text DXF_input_block_text[100][50];
extern struct DXF_block_vertex DXF_input_block_vertex[100][500];
-DXF_create_elmt::DXF_create_elmt(QWidget *parent) :
- QMainWindow(parent)
+DXF_create_elmt::DXF_create_elmt(QWidget *parent) : QWidget(parent)//:
+ //QMainWindow(parent)
{
}
@@ -102,8 +102,8 @@
DXF_LIMMIN_y= -DXF_LIMMIN_y;
}
- Create_ELMT.ELMT_definition_height=QString::number(DXF_LIMMAX_x+DXF_LIMMIN_x,'f',2);
- Create_ELMT.ELMT_definition_width=QString::number(DXF_LIMMAX_y+DXF_LIMMIN_y,'f',2);
+ Create_ELMT.ELMT_definition_width=QString::number((DXF_LIMMAX_x+DXF_LIMMIN_x)*DXF_main_base[0].dxf_X_factor,'f',2);
+ Create_ELMT.ELMT_definition_height=QString::number((DXF_LIMMAX_y+DXF_LIMMIN_y)*DXF_main_base[0].dxf_Y_factor,'f',2);
}
else
@@ -113,9 +113,8 @@
}
Create_ELMT.ELMT_definition_version="0.5";
- Create_ELMT.ELMT_definition_hotspot_x=QString::number(DXF_LIMMAX_x+DXF_LIMMIN_x,'f',1);
- Create_ELMT.ELMT_definition_hotspot_y=QString::number(DXF_LIMMAX_y+DXF_LIMMIN_y,'f',1);
-
+ Create_ELMT.ELMT_definition_hotspot_x="0";
+ Create_ELMT.ELMT_definition_hotspot_y="0";
Create_ELMT.ELMT_definition_link_type="master";
Create_ELMT.ELMT_definition_type="element";
Create_ELMT.ELMT_definition_orientation="dyyy";
@@ -234,67 +233,119 @@
Result.append(Make_input()); // basic item needed by elmt editor
Result.append(Make_terminal()); // basic item needed by elmt editor
+ /* create function instances */
+
+ dxf_entitie_line Make_entitie_line;
+ dxf_entitie_arc Make_entitie_arc;
+ dxf_entitie_attdef Make_entitie_attdef;
+ dxf_entitie_attrinute Make_entitie_attribute;
+ dxf_entitie_circle Make_entitie_circle;
+ dxf_entitie_point Make_entitie_point;
+ dxf_entitie_text Make_entitie_text;
+ dxf_entitie_ellipse Make_entitie_ellipse;
+ dxf_entitie_polyline Make_entitie_polyline;
+ dxf_entitie_insert Make_entitie_insert;
+ dxf_entitie_lwpolyline Make_entitie_lwpolyline;
+
+
/* LINE */
- Count_entitie_line=DXF_main_base[0].DXF_entities_line_count;
+ Make_entitie_line.Count_entitie_line=DXF_main_base[0].DXF_entities_line_count;
+ Make_entitie_line.Entitie_color="red";
+ Make_entitie_line.Entitie_filling="none";
+ Make_entitie_line.Entitie_line_weight="thin";
- Result.append(Make_LINE());
+ Result.append(Make_entitie_line.dxf_entitie_make_line());
/* ARC */
- Count_entitie_arc=DXF_main_base[0].DXF_entities_arc_count;
+ Make_entitie_arc.Count_entitie_arc=DXF_main_base[0].DXF_entities_arc_count;
+ Make_entitie_arc.Entitie_color="red";
+ Make_entitie_arc.Entitie_antialias="false";
+ Make_entitie_arc.Entitie_filling="none";
+ Make_entitie_arc.Entitie_line_weight="thin";
- Result.append(Make_ARC());
+ Result.append(Make_entitie_arc.dxf_entitie_make_arc());
/* ATTDEF */
- Count_entitie_attdef=DXF_main_base[0].DXF_entities_attdef_count;
+ Make_entitie_attdef.Count_entitie_attdef=DXF_main_base[0].DXF_entities_attdef_count;
+ Make_entitie_attdef.Entitie_color="red";
+ Make_entitie_attdef.Entitie_tag="label";
+ Make_entitie_attdef.Entitie_rotate="true";
- Result.append(Make_ATTDEF());
+ Result.append(Make_entitie_attdef.dxf_entitie_make_attdef());
/* ATTR */
- Count_entitie_attr=DXF_main_base[0].DXF_entities_attrib_count;
+ Make_entitie_attribute.Count_entitie_attr=DXF_main_base[0].DXF_entities_attrib_count;
+ Make_entitie_attribute.Entitie_color="red";
+ Make_entitie_attribute.Entitie_tag="label";
+ Make_entitie_attribute.Entitie_rotate="true";
- Result.append(Make_ATTR());
+ Result.append(Make_entitie_attribute.dxf_entitie_make_attribute());
/* CIRCLE */
- Count_entitie_circle=DXF_main_base[0].DXF_entities_circle_count;
+ Make_entitie_circle.Count_entitie_circle=DXF_main_base[0].DXF_entities_circle_count;
+ Make_entitie_circle.Entitie_color="red";
+ Make_entitie_circle.Entitie_antialias="true";
+ Make_entitie_circle.Entitie_filling="none";
+ Make_entitie_circle.Entitie_line_weight="thin";
- Result.append(Make_CIRCLE());
+ Result.append(Make_entitie_circle.dxf_entitie_make_circle());
/* POINT */
- Count_entitie_point=DXF_main_base[0].DXF_entities_point_count;
+ Make_entitie_point.Count_entitie_point=DXF_main_base[0].DXF_entities_point_count;
+ Make_entitie_point.Entitie_orientation="n";
- Result.append(Make_POINT());
+ Result.append(Make_entitie_point.dxf_entitie_make_point());
/* TEXT */
- Count_entitie_text=DXF_main_base[0].DXF_entities_text_count;
- Result.append(Make_TEXT());
+ Make_entitie_text.Count_entitie_text=DXF_main_base[0].DXF_entities_text_count;
+ Make_entitie_text.Entitie_color="black";
+ Result.append(Make_entitie_text.dxf_entitie_make_text());
+
/* ELLIPSE */
- Count_entitie_ellipse=DXF_main_base[0].DXF_entities_ellipse_count;
- Result.append(Make_ELLIPSE());
+ Make_entitie_ellipse.Count_entitie_ellipse=DXF_main_base[0].DXF_entities_ellipse_count;
+ Make_entitie_ellipse.Entitie_color="red";
+ Make_entitie_ellipse.Entitie_antialias="true";
+ Make_entitie_ellipse.Entitie_filling="none";
+ Make_entitie_ellipse.Entitie_line_weight="thin";
+ Result.append(Make_entitie_ellipse.dxf_entitie_make_ellipse());
+
/* POLYLINE */
- Count_entitie_polyline=DXF_main_base[0].DXF_entities_polyline_count;
- Result.append(Make_POLYLINE());
+ Make_entitie_polyline.Count_entitie_polyline=DXF_main_base[0].DXF_entities_polyline_count;
+ Make_entitie_polyline.Entitie_color="red";
+ Make_entitie_polyline.Entitie_antialias="false";
+ Make_entitie_polyline.Entitie_filling="none";
+ Make_entitie_polyline.Entitie_line_weight="thin";
+ Make_entitie_polyline.Entitie_line_style="normal";
+
+ Result.append(Make_entitie_polyline.dxf_entitie_make_polyline());
+
/* INSERT */
- Count_entitie_insert=DXF_main_base[0].DXF_entities_insert_count;
- Result.append(Make_INSERT());
+ Make_entitie_insert.Count_entitie_insert=DXF_main_base[0].DXF_entities_insert_count;
+ Result.append(Make_entitie_insert.dxf_entitie_make_insert());
/* LWPOLYLINE */
- Count_entitie_lwpolyline=DXF_main_base[0].DXF_entities_lwpolyline_count;
- Result.append(Make_LWPOLYLINE());
+ Make_entitie_lwpolyline.Count_entitie_lwpolyline=DXF_main_base[0].DXF_entities_lwpolyline_count;
+ Make_entitie_lwpolyline.Entitie_color="red";
+ Make_entitie_lwpolyline.Entitie_antialias="false";
+ Make_entitie_lwpolyline.Entitie_filling="none";
+ Make_entitie_lwpolyline.Entitie_line_weight="thin";
+ Make_entitie_lwpolyline.Entitie_line_style="normal";
+ Result.append(Make_entitie_lwpolyline.dxf_entitie_make_lwpolyline());
/* Close elmt description */
@@ -304,7 +355,7 @@
return Result;
}
- QString DXF_create_elmt::Make_LINE()
+/* QString DXF_create_elmt::Make_LINE()
{
DXF_LINE dxb_line;
@@ -323,6 +374,8 @@
dxb_line.ltype=DXF_input_entities_line[Count_lines].DXF_entities_line_code_6;
dxb_line.layer=DXF_input_entities_line[Count_lines].DXF_entities_line_code_8;
dxb_line.color="black";
+ dxb_line.line_weight="thin";
+ dxb_line.filling="none";
Result_line.append(dxb_line.Create_LINE());
@@ -333,7 +386,7 @@
}
return Result_line;
- }
+ }*/
QString DXF_create_elmt::Make_input()
{
@@ -367,6 +420,7 @@
db_terminal.y1=0;
db_terminal.orientation="n";
+
Result_terminal.append(db_terminal.Create_POINT());
@@ -374,7 +428,7 @@
}
- QString DXF_create_elmt::Make_ARC()
+/* QString DXF_create_elmt::Make_ARC()
{
dxf_arc db_arc;
@@ -394,27 +448,23 @@
db_arc.layer=DXF_input_entities_arc[Count_lines].DXF_entities_arc_code_8;
db_arc.ltype=DXF_input_entities_arc[Count_lines].DXF_entities_arc_code_6;
db_arc.color_dxf=-1;
-
- // added rds 2016 01 18
db_arc.antialias="false";
db_arc.line_weight="thin";
db_arc.filling="none";
db_arc.color="black";
- // rds 2016 01 18
Result_arc.append(db_arc.Create_ARC());
Count_lines=Count_lines+1;
-
}
return Result_arc;
- }
+ }*/
- QString DXF_create_elmt::Make_ATTDEF()
+/* QString DXF_create_elmt::Make_ATTDEF()
{
dxf_attdef dxb_attdef2;
@@ -431,13 +481,10 @@
dxb_attdef2.y=-DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_20;
dxb_attdef2.rotation=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_50;
dxb_attdef2.size=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_40;
- dxb_attdef2.tag="label"; //DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_2;
- dxb_attdef2.rotate="true";
+ dxb_attdef2.tag="label"; // label //DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_2;
+ dxb_attdef2.rotate="true"; // true
+ dxb_attdef2.color_attdef="black"; // black
- //added rds 2016 01 18
- dxb_attdef2.color_attdef="black";
- //rds 2016 01 18
-
db_txt_check.TextToCheck=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_1;
dxb_attdef2.text=db_txt_check.Text_control();
@@ -450,9 +497,9 @@
}
return Result_attdef;
- }
+ }*/
- QString DXF_create_elmt::Make_ATTR()
+ /*QString DXF_create_elmt::Make_ATTR()
{
dxf_attdef dxb_attr;
@@ -471,11 +518,7 @@
dxb_attr.size=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_40; //text height
dxb_attr.tag="label"; //DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_2; // tag
dxb_attr.rotate="true";
-
- //added rds 2019 01 18
- dxb_attr.rotate="true";
dxb_attr.color_attdef="black";
- //rds 2016 01 18
db_txt_check2.TextToCheck=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_1; // value
@@ -490,9 +533,9 @@
return Result_attr;
- }
+ }*/
- QString DXF_create_elmt::Make_CIRCLE()
+ /*QString DXF_create_elmt::Make_CIRCLE()
{
dxf_circle db_circle;
@@ -510,14 +553,15 @@
db_circle.layer=DXF_input_entities_circle[Count_lines].DXF_entities_circle_code_8;
db_circle.ltype=DXF_input_entities_circle[Count_lines].DXF_entities_circle_code_6;
- db_circle.color="black";
+ db_circle.color="green";
db_circle.antialias="true";
db_circle.line_weight="thin";
db_circle.filling="none";
- Result_circle.append(db_circle.Create_CIRCLE());
+ Result_circle.append(db_circle.Create_CIRCLE());
+
Count_lines=Count_lines+1;
@@ -526,9 +570,9 @@
return Result_circle;
-}
+}*/
- QString DXF_create_elmt::Make_POINT()
+ /*QString DXF_create_elmt::Make_POINT()
{
Result_point="";
@@ -549,9 +593,9 @@
}
return Result_point;
-}
+}*/
- QString DXF_create_elmt::Make_TEXT()
+/* QString DXF_create_elmt::Make_TEXT()
{
dxf_text db_text;
@@ -568,9 +612,9 @@
db_text.QET_y=-DXF_input_entities_text[Count_lines].DXF_entities_text_code_20;
db_text.QET_rotation=DXF_input_entities_text[Count_lines].DXF_entities_text_code_50;
db_text.QET_size=DXF_input_entities_text[Count_lines].DXF_entities_text_code_40;
+ db_text.QET_color="black";
-
db_txt_check.TextToCheck=DXF_input_entities_text[Count_lines].DXF_entities_text_code_1;
db_text.QET_text=db_txt_check.Text_control();
@@ -583,9 +627,9 @@
}
return Result_text;
- }
+ }*/
- QString DXF_create_elmt::Make_ELLIPSE()
+ /*QString DXF_create_elmt::Make_ELLIPSE()
{
dxf_ellipse db_ellipse;
@@ -603,29 +647,30 @@
db_ellipse.major_radius_x=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_11;
db_ellipse.major_radius_y=-DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_21;
db_ellipse.ratio_of_minor=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_40;
+ //db_ellipse.rotation=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_50;
db_ellipse.start=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_41;
db_ellipse.end2=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_42;
db_ellipse.LineTypeOFLine=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_6;
db_ellipse.LayerNameOFLine=DXF_input_entities_ellipse[Count_lines].DXF_entities_ellipse_code_8;
- db_ellipse.Color="blue";
+ db_ellipse.Color="black";
db_ellipse.Line_weight="thin";
db_ellipse.Filling="none";
+ Result_ellipse2.append(db_ellipse.Create_ELLIPSE());
+ Count_lines=Count_lines+1;
- Result_ellipse2.append(db_ellipse.Create_ELLIPSE());
- Count_lines=Count_lines+1;
-
-
}
return Result_ellipse2;
- }
+ }*/
- QString DXF_create_elmt::Make_POLYLINE()
+ /*QString DXF_create_elmt::Make_POLYLINE()
{
+ // read out table and pas values to xml creator
+
dxf_polyline db_polyline;
Polyline_vertex=DXF_main_base[0].DXF_entities_vertex_count;
@@ -664,7 +709,7 @@
db_polyline.line_style="normal";
db_polyline.line_weight="thin";
db_polyline.filling="none";
- db_polyline.color="magenta";
+ db_polyline.color="red";
db_polyline.closed=DXF_input_entities_polyline[Count_lines].DXF_entities_polyline_code_70;
@@ -686,9 +731,9 @@
}
return Result_polyline;
- }
+ }*/
- QString DXF_create_elmt::Make_LWPOLYLINE()
+ /*QString DXF_create_elmt::Make_LWPOLYLINE()
{
dxf_lwpolyline db_lwpolyline;
@@ -760,14 +805,24 @@
}
return Result_lwpolyline;
- }
+ }*/
- QString DXF_create_elmt::Make_INSERT()
+/*QString DXF_create_elmt::Make_INSERT()
{
Result_insert="";
Count_lines=0;
+ dxf_block_lines insert_Make_Block_Lines;
+ dxf_block_arc insert_Make_Block_Arc;
+ dxf_block_circle insert_Make_Block_Circle;
+ dxf_block_ellipse insert_Make_Block_Ellipse;
+ dxf_block_polyline insert_Make_Block_Polyline;
+ dxf_block_lwpolyline insert_Make_Block_Lwpolyline;
+ dxf_block_attdef insert_Make_Block_Attdef;
+ dxf_block_attribute insert_Make_Block_Attribute;
+ dxf_block_text insert_Make_Block_Text;
+
while (Count_lines<=Count_entitie_insert)
{
@@ -808,44 +863,163 @@
- /* Block LINES */
+ // Block LINES
- Result_insert.append(Make_Block_LINES());
+ insert_Make_Block_Lines.x_insert=x_insert;
+ insert_Make_Block_Lines.y_insert=y_insert;
+ insert_Make_Block_Lines.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Lines.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Lines.xy_rotation=xy_rotation;
+ insert_Make_Block_Lines.Name_insert=Name_insert;
+ insert_Make_Block_Lines.Insert_block_nr=Insert_block_nr;
- /* Block ARC */
+ insert_Make_Block_Lines.block_color="green";
+ insert_Make_Block_Lines.block_filling="none";
+ insert_Make_Block_Lines.block_line_weight="thin";
- Result_insert.append(Make_Block_ARC());
- /* Block CIRCLE */
+ Result_insert.append(insert_Make_Block_Lines.Make_Block_Lines());
- Result_insert.append(Make_Block_CIRCLE());
+ // Block ARC
- /* Block ELLIPSE */
+ insert_Make_Block_Arc.x_insert=x_insert;
+ insert_Make_Block_Arc.y_insert=y_insert;
+ insert_Make_Block_Arc.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Arc.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Arc.xy_rotation=xy_rotation;
+ insert_Make_Block_Arc.Name_insert=Name_insert;
+ insert_Make_Block_Arc.Insert_block_nr=Insert_block_nr;
- Result_insert.append(Make_block_ELLIPSE());
+ insert_Make_Block_Arc.block_color="green";
+ insert_Make_Block_Arc.block_filling="none";
+ insert_Make_Block_Arc.block_line_weight="thin";
+ insert_Make_Block_Arc.block_antialias="false";
- /* Block POLYLINE */
+ Result_insert.append(insert_Make_Block_Arc.Make_Block_Arc());
- Result_insert.append(Make_Block_POLYLINE());
+ // Block CIRCLE
- /* Block POLYLINE */
+ insert_Make_Block_Circle.x_insert=x_insert;
+ insert_Make_Block_Circle.y_insert=y_insert;
+ insert_Make_Block_Circle.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Circle.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Circle.xy_rotation=xy_rotation;
+ insert_Make_Block_Circle.Name_insert=Name_insert;
+ insert_Make_Block_Circle.Insert_block_nr=Insert_block_nr;
- Result_insert.append(Make_Block_LWPOLYLINE());
+ insert_Make_Block_Circle.block_color="green";
+ insert_Make_Block_Circle.block_filling="none";
+ insert_Make_Block_Circle.block_line_weight="thin";
+ insert_Make_Block_Circle.block_antialias="false";
- /* Block ATTDEF */
+ Result_insert.append(insert_Make_Block_Circle.Make_Block_Circle());
- Result_insert.append(Make_Block_ATTDEF());
+ // Block ELLIPSE
- /* Block ATTRIB*/
+ insert_Make_Block_Ellipse.x_insert=x_insert;
+ insert_Make_Block_Ellipse.y_insert=y_insert;
+ insert_Make_Block_Ellipse.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Ellipse.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Ellipse.xy_rotation=xy_rotation;
+ insert_Make_Block_Ellipse.Name_insert=Name_insert;
+ insert_Make_Block_Ellipse.Insert_block_nr=Insert_block_nr;
- Result_insert.append(Make_Block_ATTR());
+ insert_Make_Block_Ellipse.block_color="green";
+ insert_Make_Block_Ellipse.block_filling="none";
+ insert_Make_Block_Ellipse.block_line_weight="thin";
+ insert_Make_Block_Ellipse.block_antialias="false";
- /* Block TEXT*/
- Result_insert.append(Make_Block_TEXT());
+ Result_insert.append(insert_Make_Block_Ellipse.Make_Block_Ellipse());
- /* end of block */
+ // Block POLYLINE
+ insert_Make_Block_Polyline.x_insert=x_insert;
+ insert_Make_Block_Polyline.y_insert=y_insert;
+ insert_Make_Block_Polyline.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Polyline.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Polyline.xy_rotation=xy_rotation;
+ insert_Make_Block_Polyline.Name_insert=Name_insert;
+ insert_Make_Block_Polyline.Insert_block_nr=Insert_block_nr;
+
+ insert_Make_Block_Polyline.block_color="cyan";
+ insert_Make_Block_Polyline.block_filling="none";
+ insert_Make_Block_Polyline.block_line_weight="thin";
+ insert_Make_Block_Polyline.block_line_style="normal";
+
+ Result_insert.append(insert_Make_Block_Polyline.Make_Block_Polyline());
+
+ // Block LWPOLYLINE
+
+ insert_Make_Block_Lwpolyline.x_insert=x_insert;
+ insert_Make_Block_Lwpolyline.y_insert=y_insert;
+ insert_Make_Block_Lwpolyline.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Lwpolyline.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Lwpolyline.xy_rotation=xy_rotation;
+ insert_Make_Block_Lwpolyline.Name_insert=Name_insert;
+ insert_Make_Block_Lwpolyline.Insert_block_nr=Insert_block_nr;
+
+ insert_Make_Block_Lwpolyline.block_color="orange";
+ insert_Make_Block_Lwpolyline.block_filling="none";
+ insert_Make_Block_Lwpolyline.block_line_weight="thin";
+ insert_Make_Block_Lwpolyline.block_line_style="normal";
+
+ Result_insert.append(insert_Make_Block_Lwpolyline.Make_Block_Lwpolyline());
+
+ // Block ATTDEF
+
+ insert_Make_Block_Attdef.x_insert=x_insert;
+ insert_Make_Block_Attdef.y_insert=y_insert;
+ insert_Make_Block_Attdef.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Attdef.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Attdef.xy_rotation=xy_rotation;
+ insert_Make_Block_Attdef.Name_insert=Name_insert;
+ insert_Make_Block_Attdef.Insert_block_nr=Insert_block_nr;
+
+ insert_Make_Block_Attdef.block_color="green";
+ insert_Make_Block_Attdef.block_filling="none";
+ insert_Make_Block_Attdef.block_line_weight="thin";
+ insert_Make_Block_Attdef.block_color_attdef="green";
+
+ Result_insert.append(insert_Make_Block_Attdef.Make_Block_Attdef());
+
+ // Block ATTRIB
+
+ insert_Make_Block_Attribute.x_insert=x_insert;
+ insert_Make_Block_Attribute.y_insert=y_insert;
+ insert_Make_Block_Attribute.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Attribute.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Attribute.xy_rotation=xy_rotation;
+ insert_Make_Block_Attribute.Name_insert=Name_insert;
+ insert_Make_Block_Attribute.Insert_block_nr=Insert_block_nr;
+
+ insert_Make_Block_Attribute.block_color="green";
+ insert_Make_Block_Attribute.block_filling="none";
+ insert_Make_Block_Attribute.block_line_weight="thin";
+ insert_Make_Block_Attribute.block_rotate="true";
+ insert_Make_Block_Attribute.block_color_attrib="green";
+
+ Result_insert.append(insert_Make_Block_Attribute.Make_Block_Attri());
+
+ // Block TEXT
+
+ insert_Make_Block_Text.x_insert=x_insert;
+ insert_Make_Block_Text.y_insert=y_insert;
+ insert_Make_Block_Text.x_insert_scale=x_insert_scale;
+ insert_Make_Block_Text.y_insert_scale=y_insert_scale;
+ insert_Make_Block_Text.xy_rotation=xy_rotation;
+ insert_Make_Block_Text.Name_insert=Name_insert;
+ insert_Make_Block_Text.Insert_block_nr=Insert_block_nr;
+
+ insert_Make_Block_Text.block_color="green";
+ insert_Make_Block_Text.block_filling="none";
+ insert_Make_Block_Text.block_line_weight="thin";
+
+
+ Result_insert.append(insert_Make_Block_Text.Make_Block_Text());
+
+ // end of block
+
Count_lines=Count_lines+1;
}
@@ -855,9 +1029,9 @@
}
return Result_insert;
- }
+ }*/
- QString DXF_create_elmt::Make_Block_LINES()
+/* QString DXF_create_elmt::Make_Block_LINES()
{
Result_Block_Lines="";
Count_lines_block2=0;
@@ -874,7 +1048,9 @@
dxb_line.y2=(-y_insert)+(-(DXF_input_block_line[Insert_block_nr][Count_lines_block2].DXF_block_line_code_21*y_insert_scale));
dxb_line.ltype=DXF_input_block_line[Insert_block_nr][Count_lines_block2].DXF_block_line_code_6;
dxb_line.layer=DXF_input_block_line[Insert_block_nr][Count_lines_block2].DXF_block_line_code_8;
- dxb_line.color="red";
+ dxb_line.color="blue";
+ dxb_line.line_weight="thin";
+ dxb_line.filling="none";
Result_Block_Lines.append(dxb_line.Create_LINE());
@@ -886,9 +1062,9 @@
return Result_Block_Lines;
- }
+ }*/
- QString DXF_create_elmt::Make_Block_ARC()
+/* QString DXF_create_elmt::Make_Block_ARC()
{
Result_Block_Arc="";
Count_lines_block2=0;
@@ -908,22 +1084,26 @@
dxb_arc.layer=DXF_input_block_arc[Insert_block_nr][Count_lines_block2].DXF_block_arc_code_8;
dxb_arc.ltype=DXF_input_block_arc[Insert_block_nr][Count_lines_block2].DXF_block_arc_code_6;
dxb_arc.color_dxf=-1;
- dxb_arc.color="red";
+ dxb_arc.color="blue";
+ dxb_arc.antialias="false";
+ dxb_arc.filling="none";
+ dxb_arc.line_weight="thin";
Result_Block_Arc.append(dxb_arc.Create_ARC());
+
Count_lines_block2=Count_lines_block2+1;
}
return Result_Block_Arc;
- }
+ }*/
- QString DXF_create_elmt::Make_Block_CIRCLE()
+ /*QString DXF_create_elmt::Make_Block_CIRCLE()
{
Result_Block_Circle="";
Count_lines_block2=0;
@@ -939,7 +1119,7 @@
dxb_circle2.layer=DXF_input_block_circle[Insert_block_nr][Count_lines_block2].DXF_block_circle_code_8;
dxb_circle2.ltype=DXF_input_block_circle[Insert_block_nr][Count_lines_block2].DXF_block_circle_code_6;
- dxb_circle2.color="red";
+ dxb_circle2.color="blue";
dxb_circle2.antialias="true";
dxb_circle2.line_weight="thin";
dxb_circle2.filling="none";
@@ -955,9 +1135,9 @@
return Result_Block_Circle;
- }
+ }*/
- QString DXF_create_elmt::Make_block_ELLIPSE()
+ /*QString DXF_create_elmt::Make_block_ELLIPSE()
{
Result_Block_ellipse="";
Count_lines_block2=0;
@@ -972,11 +1152,12 @@
dxb_ellipse2.major_radius_x=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_11;
dxb_ellipse2.major_radius_y=-DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_21;
dxb_ellipse2.ratio_of_minor=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_40;
+ //dxb_ellipse2.rotation=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_50;
dxb_ellipse2.start=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_41;
dxb_ellipse2.end2=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_42;
dxb_ellipse2.LineTypeOFLine=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_6;
dxb_ellipse2.LayerNameOFLine=DXF_input_block_ellipse[Insert_block_nr][Count_lines].DXF_block_ellipse_code_8;
- dxb_ellipse2.Color="red";
+ dxb_ellipse2.Color="blue";
dxb_ellipse2.Line_weight="thin";
dxb_ellipse2.Filling="none";
@@ -992,9 +1173,9 @@
return Result_Block_ellipse;
- }
+ }*/
- QString DXF_create_elmt::Make_Block_POLYLINE()
+/* QString DXF_create_elmt::Make_Block_POLYLINE()
{
Result_Block_polyline="";
Count_lines_block2=0;
@@ -1067,10 +1248,12 @@
return Result_Block_polyline;
- }
+ }*/
- QString DXF_create_elmt::Make_Block_LWPOLYLINE()
+/* QString DXF_create_elmt::Make_Block_LWPOLYLINE()
{
+ // prepare polygon from block items
+
dxf_lwpolyline dxb_lwpolyline;
Count_lines_block2=0;
@@ -1086,7 +1269,7 @@
while (Count_lines2<Count_block_lwpolyline2)
{
- vector_max=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines2].DXF_block_lwpolyline_code_90;
+ vector_max=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines2].DXF_block_lwpolyline_code_90; // max number of vectors
if(vector_max>0)
{
@@ -1118,7 +1301,7 @@
dxb_lwpolyline.line_style="normal";
dxb_lwpolyline.line_weight="thin";
dxb_lwpolyline.filling="none";
- dxb_lwpolyline.color="purple";
+ dxb_lwpolyline.color="black";
dxb_lwpolyline.closed=DXF_input_block_lwpolyline[Insert_block_nr][Count_lines_block2].DXF_block_lwpolyline_code_70;
@@ -1153,9 +1336,9 @@
return Result_Block_lwpolyline;
- }
+ }*/
- QString DXF_create_elmt::Make_Block_ATTDEF()
+/* QString DXF_create_elmt::Make_Block_ATTDEF()
{
Count_lines_block2=0;
@@ -1188,9 +1371,9 @@
}
return Result_Block_attdef;
- }
+ }*/
- QString DXF_create_elmt::Make_Block_ATTR()
+ /*QString DXF_create_elmt::Make_Block_ATTR()
{
Count_lines_block2=0;
@@ -1209,7 +1392,7 @@
dxb_attr2.size=DXF_input_block_attrib[Insert_block_nr][Count_lines_block2].DXF_block_attrib_code_40*((x_insert_scale+y_insert_scale)/2); //text height
dxb_attr2.tag="label"; //DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_2; // tag
dxb_attr2.rotate="true";
- dxb_attr2.color_attrib="red";
+ dxb_attr2.color_attrib="orange";
db_txt_check3.TextToCheck=DXF_input_block_attrib[Insert_block_nr][Count_lines].DXF_block_attrib_code_1; // value
@@ -1221,9 +1404,9 @@
}
return Result_Block_attr;
- }
+ }*/
- QString DXF_create_elmt::Make_Block_TEXT()
+ /*QString DXF_create_elmt::Make_Block_TEXT()
{
Count_lines_block2=0;
Result_Block_Text="";
@@ -1238,8 +1421,8 @@
db_text_block.QET_rotation=DXF_input_block_text[Insert_block_nr][Count_lines_block2].DXF_block_text_code_50;
db_text_block.QET_size=DXF_input_block_text[Insert_block_nr][Count_lines_block2].DXF_block_text_code_40*((x_insert_scale+y_insert_scale)/2);
+ db_text_block.QET_color="green";
-
db_txt_check_block.TextToCheck=DXF_input_block_text[Insert_block_nr][Count_lines_block2].DXF_block_text_code_1;
db_text_block.QET_text=db_txt_check_block.Text_control();
@@ -1249,4 +1432,101 @@
Count_lines_block2=Count_lines_block2+1;
}
return Result_Block_Text;
+ }*/
+
+ QString DXF_create_elmt::Make_Block_INSERT()
+ {
+ Result_insert2="";
+
+ Count_lines3=0;
+
+ /*while (Count_lines3<=Count_entitie_insert)
+ {
+
+ if (DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_2 == "")
+ {
+ Count_lines3=Count_lines3+1;
+
+ }
+ else
+ {
+
+ x_insert2=0;
+ y_insert2=0;
+ x_insert_scale2=1;
+ y_insert_scale2=1;
+
+
+ Insert_block_nr2=Count_lines3;
+
+ x_insert2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_10;
+ y_insert2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_20;
+ x_insert_scale2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_41;
+ y_insert_scale2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_42;
+
+ xy_rotation2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_50;
+ Name_insert2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_2;
+
+ for (Block_counter2=0;Block_counter2<=Count_entitie_insert;Block_counter2++)
+ {
+ if(Name_insert2==DXF_input_table_block_record[Block_counter2].dxf_table_block_record_code_2)
+ {
+ Insert_block_nr2=Block_counter2;
+ Block_counter2=Count_entitie_insert+1;
+ }
+
+
+ }*/
+
+
+
+ /* Block LINES */
+
+ //Result_insert.append(Make_Block_LINES());
+
+ /* Block ARC */
+
+ //Result_insert.append(Make_Block_ARC());
+
+ /* Block CIRCLE */
+
+ //Result_insert.append(Make_Block_CIRCLE());
+
+ /* Block ELLIPSE */
+
+ //Result_insert.append(Make_block_ELLIPSE());
+
+ /* Block POLYLINE */
+
+ //Result_insert.append(Make_Block_POLYLINE());
+
+ /* Block LWPOLYLINE */
+
+ //Result_insert.append(Make_Block_LWPOLYLINE());
+
+ /* Block ATTDEF */
+
+ //Result_insert.append(Make_Block_ATTDEF());
+
+ /* Block ATTRIB*/
+
+ //Result_insert.append(Make_Block_ATTR());
+
+ /* Block TEXT*/
+
+ //Result_insert.append(Make_Block_TEXT());
+
+ /* end of block */
+
+ //Count_lines2=Count_lines2+1;
+
+ //}
+
+
+
+ //}
+
+ return Result_insert2;
+
+
}
Modified: branches/Qetdxf/sources/dxftoqet2/dxf_create_elmt.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/dxf_create_elmt.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/dxf_create_elmt.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,24 +1,48 @@
#ifndef DXF_CREATE_ELMT_H
#define DXF_CREATE_ELMT_H
-//#include <QMainWindow>
-#include "dxftoqet2/src/dxf_data.h"
-#include "dxftoqet2/src/qet_base_types/baseelmt.h"
-#include "dxftoqet2/dxftoqet_mainwindow.h"
+// #include <QMainWindow>
+#include <QWidget>
+
+#include "src/dxf_data.h"
+#include "src/qet_base_types/baseelmt.h"
+#include "dxftoqet_mainwindow.h"
#include "ui_dxftoqet_mainwindow.h"
-#include "dxftoqet2/src/dxf/dxf_line.h"
-#include "dxftoqet2/src/dxf/dxf_point.h"
-#include "dxftoqet2/src/dxf/dxf_attdef.h"
-#include "dxftoqet2/src/dxf/dxf_arc.h"
-#include "dxftoqet2/src/dxf/dxf_circle.h"
-#include "dxftoqet2/src/dxf/dxf_attr.h"
-#include "dxftoqet2/src/dxf/dxf_text.h"
-#include "dxftoqet2/src/dxf/dxf_ellipse.h"
-#include "dxftoqet2/src/dxf/dxf_polyline.h"
-#include "dxftoqet2/src/dxf/dxf_lwpolyline.h"
+#include "src/dxf/dxf_line.h"
+#include "src/dxf/dxf_point.h"
+#include "src/dxf/dxf_attdef.h"
+#include "src/dxf/dxf_arc.h"
+#include "src/dxf/dxf_circle.h"
+#include "src/dxf/dxf_attr.h"
+#include "src/dxf/dxf_text.h"
+#include "src/dxf/dxf_ellipse.h"
+#include "src/dxf/dxf_polyline.h"
+#include "src/dxf/dxf_lwpolyline.h"
-class DXF_create_elmt : public QMainWindow
+#include "src/dxf_block/dxf_block_lines.h"
+#include "src/dxf_block/dxf_block_arc.h"
+#include "src/dxf_block/dxf_block_circle.h"
+#include "src/dxf_block/dxf_block_ellipse.h"
+#include "src/dxf_block/dxf_block_polyline.h"
+#include "src/dxf_block/dxf_block_lwpolyline.h"
+#include "src/dxf_block/dxf_block_attdef.h"
+#include "src/dxf_block/dxf_block_attribute.h"
+#include "src/dxf_block/dxf_block_text.h"
+
+#include "src/dxf_entitie/dxf_entitie_line.h"
+#include "src/dxf_entitie/dxf_entitie_arc.h"
+#include "src/dxf_entitie/dxf_entitie_attdef.h"
+#include "src/dxf_entitie/dxf_entitie_attrinute.h"
+#include "src/dxf_entitie/dxf_entitie_circle.h"
+#include "src/dxf_entitie/dxf_entitie_point.h"
+#include "src/dxf_entitie/dxf_entitie_text.h"
+#include "src/dxf_entitie/dxf_entitie_ellipse.h"
+#include "src/dxf_entitie/dxf_entitie_polyline.h"
+#include "src/dxf_entitie/dxf_entitie_insert.h"
+#include "src/dxf_entitie/dxf_entitie_lwpolyline.h"
+
+class DXF_create_elmt : public QWidget // QMainWindow
{
Q_OBJECT
public:
@@ -39,18 +63,19 @@
QString Make_POLYLINE();
QString Make_LWPOLYLINE();
- QString Make_Block_LINES();
- QString Make_Block_ARC();
- QString Make_Block_ATTDEF();
- QString Make_Block_ATTR();
- QString Make_Block_CIRCLE();
- QString Make_Block_POINT();
- QString Make_block_TEXT();
- QString Make_block_ELLIPSE();
+ //QString Make_Block_LINES();
+ //QString Make_Block_ARC();
+ //QString Make_Block_ATTDEF();
+ //QString Make_Block_ATTR();
+ //QString Make_Block_CIRCLE();
+ //QString Make_Block_POINT();
+ //QString Make_block_TEXT();
+ //QString Make_block_ELLIPSE();
+ //QString Make_Block_INSERT();
+ //QString Make_Block_POLYLINE();
+ //QString Make_Block_LWPOLYLINE();
+ //QString Make_Block_TEXT();
QString Make_Block_INSERT();
- QString Make_Block_POLYLINE();
- QString Make_Block_LWPOLYLINE();
- QString Make_Block_TEXT();
QString Result;
QString Result_line;
@@ -65,6 +90,7 @@
QString Result_ellipse;
QString Result_ellipse2;
QString Result_insert;
+ QString Result_insert2;
QString Result_polyline;
QString Result_lwpolyline;
@@ -94,6 +120,7 @@
int count_vertex2;
int vector_max2;
int Count_lines2;
+ int Count_lines3;
int Count_block_polyline;
int Count_block_lwpolyline2;
@@ -113,10 +140,13 @@
int Count_lines;
int Count_lines_block;
int Count_lines_block2;
+ int Count_lines_block3;
int Count_for;
int Insert_block_nr;
+ int Insert_block_nr2;
int Block_counter;
+ int Block_counter2;
int32_t Polyline_vertex;
int Block_Polyline_vertex;
@@ -132,7 +162,16 @@
QString Name_insert;
+ double x_insert2;
+ double y_insert2;
+ double x_insert_scale2;
+ double y_insert_scale2;
+
+ double xy_rotation2;
+
+ QString Name_insert2;
+
signals:
public slots:
Modified: branches/Qetdxf/sources/dxftoqet2/dxftoqet2.pri
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/dxftoqet2.pri 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/dxftoqet2.pri 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,12 +1,12 @@
SOURCES += \
- $$PWD/dxftoqet_mainwindow.cpp \
+ $$PWD/dxftoqet_mainwindow.cpp \
$$PWD/src/dxf_data.cpp \
$$PWD/src/dxf_load.cpp \
$$PWD/src/dxf_split.cpp \
$$PWD/src/split_csv.cpp \
$$PWD/src/dxf_base_types/dxf_base_line.cpp \
$$PWD/src/qet_base_types/baseelmt.cpp \
- $$PWD/dxf_create_elmt.cpp \
+ $$PWD/dxf_create_elmt.cpp \
$$PWD/src/csv_build_table.cpp \
$$PWD/src/dxf_base_types/dxf_base_terminal.cpp \
$$PWD/src/dxf_base_types/dxf_base_input.cpp \
@@ -30,23 +30,43 @@
$$PWD/src/dxf_base_types/dxf_base_ellipse.cpp \
$$PWD/src/dxf_base_types/dxf_base_polyline.cpp \
$$PWD/src/dxf/dxf_polyline.cpp \
- $$PWD/src/dxf/dxf_lwpolyline.cpp
-
-HEADERS += \
- $$PWD/dxftoqet_mainwindow.h \
+ $$PWD/src/dxf/dxf_lwpolyline.cpp \
+ $$PWD/src/dxf_block/dxf_block_lines.cpp \
+ $$PWD/src/dxf_block/dxf_block_arc.cpp \
+ $$PWD/src/dxf_block/dxf_block_circle.cpp \
+ $$PWD/src/dxf_block/dxf_block_ellipse.cpp \
+ $$PWD/src/dxf_block/dxf_block_polyline.cpp \
+ $$PWD/src/dxf_block/dxf_block_lwpolyline.cpp \
+ $$PWD/src/dxf_block/dxf_block_attdef.cpp \
+ $$PWD/src/dxf_block/dxf_block_attribute.cpp \
+ $$PWD/src/dxf_block/dxf_block_text.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_line.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_arc.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_attdef.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_attrinute.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_circle.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_text.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_ellipse.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_polyline.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_insert.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_lwpolyline.cpp \
+ $$PWD/src/dxf_block/dxf_block_insert.cpp \
+ $$PWD/src/dxf_entitie/dxf_entitie_point.cpp
+
+HEADERS += $$PWD/dxftoqet_mainwindow.h \
$$PWD/src/dxf_data.h \
$$PWD/src/dxf_load.h \
$$PWD/src/dxf_split.h \
$$PWD/src/split_csv.h \
$$PWD/src/dxf_base_types/dxf_base_line.h \
$$PWD/src/qet_base_types/baseelmt.h \
- $$PWD/dxf_create_elmt.h \
+ $$PWD/dxf_create_elmt.h \
$$PWD/src/csv_build_table.h \
$$PWD/src/dxf_base_types/dxf_base_terminal.h \
$$PWD/src/dxf_base_types/dxf_base_input.h \
$$PWD/src/dxf/dxf_line.h \
$$PWD/src/dxf/dxf_point.h \
- $$PWD/src/dxf/dxf_arc.h \
+ $$PWD/src/dxf/dxf_arc.h \
$$PWD/src/dxf/dxf_circle.h \
$$PWD/src/dxf/dxf_attdef.h \
$$PWD/src/dxf_base_types/dxf_base_arc.h \
@@ -65,6 +85,28 @@
$$PWD/src/dxf_base_types/dxf_base_ellipse.h \
$$PWD/src/dxf_base_types/dxf_base_polyline.h \
$$PWD/src/dxf/dxf_polyline.h \
- $$PWD/src/dxf/dxf_lwpolyline.h
+ $$PWD/src/dxf/dxf_lwpolyline.h \
+ $$PWD/src/dxf_block/dxf_block_lines.h \
+ $$PWD/src/dxf_block/dxf_block_arc.h \
+ $$PWD/src/dxf_block/dxf_block_circle.h \
+ $$PWD/src/dxf_block/dxf_block_ellipse.h \
+ $$PWD/src/dxf_block/dxf_block_polyline.h \
+ $$PWD/src/dxf_block/dxf_block_lwpolyline.h \
+ $$PWD/src/dxf_block/dxf_block_attdef.h \
+ $$PWD/src/dxf_block/dxf_block_attribute.h \
+ $$PWD/src/dxf_block/dxf_block_text.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_line.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_arc.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_attdef.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_attrinute.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_circle.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_text.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_ellipse.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_polyline.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_insert.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_lwpolyline.h \
+ $$PWD/src/dxf_block/dxf_block_insert.h \
+ $$PWD/src/dxf_entitie/dxf_entitie_point.h
+
FORMS += $$PWD/dxftoqet_mainwindow.ui
Modified: branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,10 +1,6 @@
-#include "dxftoqet2/dxftoqet_mainwindow.h"
+#include "dxftoqet_mainwindow.h"
#include "ui_dxftoqet_mainwindow.h"
-#include "QTextStream"
-#include <QFileDialog>
-#include <QMessageBox>
-#include <QtWidgets>
/* init extern variable */
@@ -124,7 +120,7 @@
DXFtoQET_MainWindow::DXFtoQET_MainWindow(QWidget *parent) :
- QMainWindow(parent),
+ QWidget(parent),
ui(new Ui::DXFtoQET_MainWindow)
{
ui->setupUi(this);
@@ -185,7 +181,7 @@
void DXFtoQET_MainWindow::changeEvent(QEvent *e)
{
- QMainWindow::changeEvent(e);
+ QWidget::changeEvent(e);
switch (e->type())
{
case QEvent::LanguageChange:
@@ -349,7 +345,7 @@
}
QTextStream out(&file);
- out << ui->ELMT_result->toPlainText(); // converted dxf
+ out << ui->ELMT_result->toPlainText();
file.close();
QMessageBox::information(this, tr("Export as elmt file"), tr("L'element %1 a bien ete enregistre").arg(ui->dxf_open_file->text()));
@@ -1332,9 +1328,9 @@
{
QModelIndex index = model3->index(row2,0,QModelIndex());
- model3->setData(index,DXF_input_table_block_record[row2].dxf_table_block_record_code_2.remove(QRegExp("[$*+-_=#<>]")));
+ model3->setData(index,DXF_input_table_block_record[row2].dxf_table_block_record_code_2);//.remove(QRegExp("[$*+-_=#<>]")));
- blockcount=blockcount+1;
+ //blockcount=blockcount+1;
index = model3->index(row2,1,QModelIndex());
model3->setData(index,QString::number(DXF_main_base[0].DXF_block_3dface_count[row2]));
@@ -1472,6 +1468,8 @@
index = model3->index(row2,45,QModelIndex());
model3->setData(index,QString::number(DXF_main_base[0].DXF_block_xline_count[row2]));
+
+ blockcount=blockcount+1;
}
ui->Block_Items_2->resizeColumnsToContents();
@@ -1502,7 +1500,16 @@
Config_save_to_file.append(Config_QET_User_Symbols);
Config_save_to_file.append("\n");
+ Config_save_to_file.append(ui->Block_color->currentText());
+ Config_save_to_file.append("\n");
+ Config_save_to_file.append(ui->Entitie_color->currentText());
+ Config_save_to_file.append("\n");
+ Config_save_to_file.append(QString::number(ui->X_factor_elmt->value()));
+ Config_save_to_file.append("\n");
+ Config_save_to_file.append(QString::number(ui->Y_factor_elmt->value()));
+ Config_save_to_file.append("\n");
+
QFile file( "..//DXFtoQET.cfg");
if (!file.open(QFile::WriteOnly | QFile::Text)) {
@@ -1519,9 +1526,26 @@
file.close();
DXF_main_base[0].dxf_savepath=Config_QET_User_Symbols;
+ DXF_main_base[0].dxf_block_color=ui->Block_color->currentText();
+ DXF_main_base[0].dxf_entitie_color=ui->Entitie_color->currentText();
+ DXF_main_base[0].dxf_X_factor=ui->X_factor_elmt->value();
+ DXF_main_base[0].dxf_Y_factor=ui->Y_factor_elmt->value();
+
ui->dxf_file_path_save->setText(DXF_main_base[0].dxf_savepath);
ui->dxf_file_path_save->show();
+ ui->Block_color->setCurrentText(DXF_main_base[0].dxf_block_color);
+ ui->Block_color->show();
+
+ ui->Entitie_color->setCurrentText(DXF_main_base[0].dxf_entitie_color);
+ ui->Entitie_color->show();
+
+ ui->X_factor_elmt->setValue(DXF_main_base[0].dxf_X_factor);
+ ui->X_factor_elmt->show();
+
+ ui->Y_factor_elmt->setValue(DXF_main_base[0].dxf_Y_factor);
+ ui->Y_factor_elmt->show();
+
}
void DXFtoQET_MainWindow::on_Open_config_file_clicked()
@@ -1534,6 +1558,8 @@
tr("Cannot read file %1:\n%2.")
.arg("DXFtoQET.cfg")
.arg(file.errorString()));
+
+ on_Save_config_file_clicked();
}
QTextStream in(&file);
@@ -1547,12 +1573,41 @@
Config_save_to_file=Config_list[0];
Config_QET_User_Symbols=Config_list[0];
- DXF_main_base[0].dxf_savepath=Config_QET_User_Symbols;
ui->QET_user_symbole_path_save->setText(Config_QET_User_Symbols);
ui->dxf_file_path_save->setText(Config_list[0]);
ui->dxf_file_path_save->show();
-
ui->QET_user_symbole_path_save->show();
+ if(Config_list.length()>4)
+ {
+
+ DXF_main_base[0].dxf_savepath=Config_list[0];
+ DXF_main_base[0].dxf_block_color=Config_list[1];
+ DXF_main_base[0].dxf_entitie_color=Config_list[2];
+ DXF_main_base[0].dxf_X_factor=Config_list[3].toInt();
+ DXF_main_base[0].dxf_Y_factor=Config_list[4].toInt();
+
+ ui->Block_color->setCurrentText(DXF_main_base[0].dxf_block_color);
+ ui->Block_color->show();
+
+ ui->Entitie_color->setCurrentText(DXF_main_base[0].dxf_entitie_color);
+ ui->Entitie_color->show();
+
+ ui->X_factor_elmt->setValue(DXF_main_base[0].dxf_X_factor);
+ ui->X_factor_elmt->show();
+
+ ui->Y_factor_elmt->setValue(DXF_main_base[0].dxf_Y_factor);
+ ui->Y_factor_elmt->show();
+ }
+ else
+ {
+ on_Save_config_file_clicked();
+ }
+
+
+
+
+
+
}
Modified: branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,18 +1,20 @@
#ifndef DXFTOQET_MAINWINDOW_H
#define DXFTOQET_MAINWINDOW_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include <QObject>
#include <QMessageBox>
#include <QtWidgets>
+#include <QTableView>
-#include "dxftoqet2/src/dxf_data.h"
-#include "dxftoqet2/src/dxf_load.h"
-#include "dxftoqet2/src/dxf_split.h"
-#include "dxftoqet2/src/split_csv.h"
-#include "dxftoqet2/src/csv_build_table.h"
-#include "dxftoqet2/dxf_create_elmt.h"
-#include "dxftoqet2/csv_create_elmt.h"
+#include "src/dxf_data.h"
+#include "src/dxf_load.h"
+#include "src/dxf_split.h"
+#include "src/split_csv.h"
+#include "src/csv_build_table.h"
+#include "dxf_create_elmt.h"
+#include "csv_create_elmt.h"
#include <QTextStream>
#include <QFileDialog>
@@ -28,15 +30,13 @@
}
-class DXFtoQET_MainWindow : public QMainWindow, public dxf_data
+class DXFtoQET_MainWindow : public QWidget , public dxf_data //QMainWindow
{
Q_OBJECT
public:
explicit DXFtoQET_MainWindow(QWidget *parent = 0);
-
-
~DXFtoQET_MainWindow();
@@ -82,7 +82,6 @@
void DXF_Block_table();
protected:
-
void changeEvent(QEvent *e);
private slots:
Modified: branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.ui
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.ui 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/dxftoqet_mainwindow.ui 2016-02-06 12:52:24 UTC (rev 4340)
@@ -2,13 +2,13 @@
<ui version="4.0">
<author>Ronny Desmedt</author>
<class>DXFtoQET_MainWindow</class>
- <widget class="QMainWindow" name="DXFtoQET_MainWindow">
+ <widget class="QWidget" name="DXFtoQET_MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1222</width>
- <height>950</height>
+ <width>1224</width>
+ <height>903</height>
</rect>
</property>
<property name="sizePolicy">
@@ -23,14 +23,22 @@
<property name="styleSheet">
<string notr="true">qlineargradient:(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(58, 91, 113, 255), stop:1 rgba(255, 255, 255, 255))</string>
</property>
- <widget class="QWidget" name="centralWidget">
- <widget class="QWidget" name="layoutWidget_1">
+ <widget class="QWidget" name="centralWidget" native="true">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>1211</width>
+ <height>978</height>
+ </rect>
+ </property>
+ <widget class="QWidget" name="layoutWidget0">
<property name="geometry">
<rect>
<x>10</x>
- <y>11</y>
+ <y>30</y>
<width>1191</width>
- <height>956</height>
+ <height>861</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
@@ -482,34 +490,28 @@
<attribute name="title">
<string>ELMT</string>
</attribute>
- <widget class="QWidget" name="gridLayoutWidget_10">
+ <widget class="QTextEdit" name="ELMT_result">
<property name="geometry">
<rect>
- <x>10</x>
- <y>10</y>
- <width>721</width>
- <height>551</height>
+ <x>11</x>
+ <y>11</y>
+ <width>771</width>
+ <height>571</height>
</rect>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QTextEdit" name="ELMT_result">
- <property name="styleSheet">
- <string notr="true">BACKGROUND:rgb(255, 255, 255)</string>
- </property>
- <property name="lineWrapMode">
- <enum>QTextEdit::NoWrap</enum>
- </property>
- </widget>
- </item>
- </layout>
+ <property name="styleSheet">
+ <string notr="true">BACKGROUND:rgb(255, 255, 255)</string>
+ </property>
+ <property name="lineWrapMode">
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
</widget>
</widget>
- <widget class="QWidget" name="tab">
+ <widget class="QWidget" name="tab_ELMT_langue">
<attribute name="title">
<string>ELMT Langue</string>
</attribute>
- <widget class="QWidget" name="layoutWidget_2">
+ <widget class="QWidget" name="layoutWidget1">
<property name="geometry">
<rect>
<x>10</x>
@@ -757,7 +759,7 @@
<string notr="true">BACKGROUND:rgb(225, 225, 225)</string>
</property>
<property name="currentIndex">
- <number>2</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tab_dxf_sections">
<attribute name="title">
@@ -768,8 +770,8 @@
<rect>
<x>10</x>
<y>10</y>
- <width>301</width>
- <height>301</height>
+ <width>341</width>
+ <height>331</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_8">
@@ -1365,7 +1367,7 @@
<attribute name="title">
<string>Entities</string>
</attribute>
- <widget class="QWidget" name="layoutWidget_3">
+ <widget class="QWidget" name="layoutWidget2">
<property name="geometry">
<rect>
<x>10</x>
@@ -2449,7 +2451,7 @@
<attribute name="title">
<string>CSV items</string>
</attribute>
- <widget class="QWidget" name="layoutWidget_4">
+ <widget class="QWidget" name="layoutWidget3b">
<property name="geometry">
<rect>
<x>10</x>
@@ -2635,15 +2637,12 @@
2= do not use this colum for conversion</string>
</property>
</widget>
- <zorder>CSV_Tablesettings</zorder>
- <zorder>layoutWidget_4</zorder>
- <zorder>plainTextEdit_2</zorder>
</widget>
<widget class="QWidget" name="tab_log">
<attribute name="title">
<string>Log</string>
</attribute>
- <widget class="QWidget" name="layoutWidget_51">
+ <widget class="QWidget" name="layoutWidget3">
<property name="geometry">
<rect>
<x>10</x>
@@ -2740,7 +2739,7 @@
<string>Open config file</string>
</property>
</widget>
- <widget class="QWidget" name="layoutWidget_5">
+ <widget class="QWidget" name="layoutWidget4">
<property name="geometry">
<rect>
<x>40</x>
@@ -2801,7 +2800,7 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="layoutWidget_6">
+ <widget class="QWidget" name="layoutWidget5">
<property name="geometry">
<rect>
<x>40</x>
@@ -2838,11 +2837,15 @@
</spacer>
</item>
<item>
- <widget class="QComboBox" name="Block_color"/>
+ <widget class="QComboBox" name="Block_color">
+ <property name="currentText">
+ <string/>
+ </property>
+ </widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="layoutWidget_7">
+ <widget class="QWidget" name="layoutWidget6">
<property name="geometry">
<rect>
<x>40</x>
@@ -2879,57 +2882,145 @@
</spacer>
</item>
<item>
- <widget class="QComboBox" name="Entitie_color"/>
+ <widget class="QComboBox" name="Entitie_color">
+ <property name="currentText">
+ <string/>
+ </property>
+ </widget>
</item>
</layout>
</widget>
+ <widget class="QWidget" name="layoutWidget7">
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>170</y>
+ <width>241</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_14">
+ <item>
+ <widget class="QLabel" name="label_85">
+ <property name="maximumSize">
+ <size>
+ <width>140</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>X-factor :</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_15">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="X_factor_elmt">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>10</number>
+ </property>
+ <property name="value">
+ <number>2</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="layoutWidget8">
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>210</y>
+ <width>241</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_15">
+ <item>
+ <widget class="QLabel" name="label_84">
+ <property name="maximumSize">
+ <size>
+ <width>140</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Y-factor :</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_16">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="Y_factor_elmt">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>10</number>
+ </property>
+ <property name="value">
+ <number>2</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</widget>
</item>
</layout>
</item>
- <item>
- <spacer name="verticalSpacer_6">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</item>
</layout>
</widget>
</widget>
- <widget class="QMenuBar" name="menuBar">
+ <widget class="QStatusBar" name="statusBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1222</width>
- <height>25</height>
+ <width>3</width>
+ <height>22</height>
</rect>
</property>
- <property name="nativeMenuBar">
- <bool>false</bool>
- </property>
- <widget class="QMenu" name="menuFile">
- <property name="title">
- <string>&File</string>
- </property>
- <addaction name="actionOpen"/>
- <addaction name="actionSave_as_elmt"/>
- <addaction name="actionSave_as_qet"/>
- </widget>
- <addaction name="menuFile"/>
</widget>
- <widget class="QStatusBar" name="statusBar"/>
<widget class="QToolBar" name="toolBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>252</width>
+ <height>29</height>
+ </rect>
+ </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -2945,12 +3036,6 @@
<height>46</height>
</size>
</property>
- <attribute name="toolBarArea">
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
<addaction name="actionOpen"/>
<addaction name="separator"/>
<addaction name="actionSave_as_elmt"/>
@@ -3207,4 +3292,21 @@
</hints>
</connection>
</connections>
+ <designerdata>
+ <property name="gridDeltaX">
+ <number>10</number>
+ </property>
+ <property name="gridDeltaY">
+ <number>10</number>
+ </property>
+ <property name="gridSnapX">
+ <bool>true</bool>
+ </property>
+ <property name="gridSnapY">
+ <bool>true</bool>
+ </property>
+ <property name="gridVisible">
+ <bool>true</bool>
+ </property>
+ </designerdata>
</ui>
Modified: branches/Qetdxf/sources/dxftoqet2/main.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/main.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/main.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,6 +1,6 @@
-#include "dxftoqet2/dxftoqet_mainwindow.h"
+#include "dxftoqet_mainwindow.h"
#include <QApplication>
-#include "dxftoqet2/src/dxf_data.h"
+#include "src/dxf_data.h"
//extern int dxf();
//extern struct DXF_base DXF_main_base[1];
Modified: branches/Qetdxf/sources/dxftoqet2/src/csv_build_table.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/csv_build_table.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/csv_build_table.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,4 +1,4 @@
-#include "dxftoqet2/src/csv_build_table.h"
+#include "csv_build_table.h"
//extern int dxf ();
@@ -114,7 +114,7 @@
extern struct DXF_base DXF_main_base[1];
-/*CSV_Build_table::CSV_Build_table(QWidget *parent)
+CSV_Build_table::CSV_Build_table(QWidget *parent): QWidget(parent)
{
}
@@ -124,11 +124,11 @@
void CSV_Build_table::ConfigTable()
{
// init extern variable
- extern DXF_base DXF_main_base[1];
+ //extern DXF_base DXF_main_base[1];
-}*/
+}
Modified: branches/Qetdxf/sources/dxftoqet2/src/csv_build_table.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/csv_build_table.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/csv_build_table.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -3,7 +3,7 @@
#include <QObject>
#include <QWidget>
-#include <QMainWindow>
+//#include <QMainWindow>
#include "dxftoqet2/src/dxf_data.h"
#include "dxftoqet2/dxftoqet_mainwindow.h"
@@ -14,13 +14,13 @@
}*/
-class CSV_Build_table : public QMainWindow, public dxf_data
+class CSV_Build_table : public QWidget, public dxf_data //QMainWindow
{
Q_OBJECT
public:
- //CSV_Build_table(QWidget *parent = 0);
+ CSV_Build_table(QWidget *parent = 0);
//~CSV_Build_table();
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_arc.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_arc.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_arc.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,8 +1,8 @@
-#include "dxftoqet2/src/dxf/dxf_arc.h"
+#include "dxf_arc.h"
#include "dxftoqet2/src/dxf_base_types/dxf_base_arc.h"
dxf_arc::dxf_arc(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
@@ -17,28 +17,20 @@
db_arc2.QET_y=(center_y) - radius; // 20
db_arc2.QET_width=radius*2;
db_arc2.QET_height=radius*2;
- db_arc2.QET_antialias="false";
+ db_arc2.QET_antialias=antialias;
DXF_Ltype_control db_line_ltype_control;
- db_line_ltype_control.dxf_FindLT=ltype;
- db_line_ltype_control.dxf_Layer=layer;
+ db_line_ltype_control.FindLT=ltype;
+ db_line_ltype_control.Layer=layer;
- db_arc2.QET_line_style=db_line_ltype_control.dxf2_Ltype_control();
+ db_arc2.QET_line_style=db_line_ltype_control.Ltype_control();
- //changed rds 2016 01 19
- //db_arc2.QET_line_weight="thin";
- //db_arc2.QET_filling="none";
-
db_arc2.QET_line_weight=line_weight;
db_arc2.QET_filling=filling;
db_arc2.QET_color=color;
- //db_arc2.QET_color=color;
-
- // rds 2016 01 19
-
/*
h = (450° - acad°)/30
qet° = 30* (450° - acad°)/30 = 450° - acad°
@@ -160,8 +152,12 @@
db_arc2.QET_angle=-hoek2;
db_arc2.QET_start=-(begin-90);
-
- Result_line.append(db_arc2.Create_arc());
-
+ //if(db_arc2.QET_width==0 and db_arc2.QET_height==0)
+ //{
+ //}
+ //else
+ //{
+ Result_line.append(db_arc2.Create_arc());
+ //}
return Result_line;
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_arc.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_arc.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_arc.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,11 +1,13 @@
#ifndef DXF_ARC_H
#define DXF_ARC_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_arc.h"
#include "dxftoqet2/src/dxf_control/dxf_ltype_control.h"
-class dxf_arc : public QMainWindow
+
+class dxf_arc : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attdef.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attdef.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attdef.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_attdef.h"
+#include "dxf_attdef.h"
dxf_attdef::dxf_attdef(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
@@ -20,11 +20,9 @@
db_attdef.QET_text=text;
db_attdef.QET_rotate=rotate;
db_attdef.QET_rotation=rotation;
-
- //added rds 2016 01 19
db_attdef.QET_color=color_attdef;
- //
+
Result_attdef.append(db_attdef.Create_input());
return Result_attdef;
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attdef.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attdef.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attdef.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,10 +1,11 @@
#ifndef DXF_ATTDEF_H
#define DXF_ATTDEF_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_input.h"
-class dxf_attdef : public QMainWindow
+class dxf_attdef : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attr.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attr.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attr.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_attr.h"
+#include "dxf_attr.h"
dxf_attr::dxf_attr(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attr.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attr.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_attr.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,10 +1,11 @@
#ifndef DXF_ATTR_H
#define DXF_ATTR_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_input.h"
-class dxf_attr : public QMainWindow
+class dxf_attr : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_circle.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_circle.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_circle.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_circle.h"
+#include "dxf_circle.h"
dxf_circle::dxf_circle(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
@@ -12,10 +12,10 @@
Result_circle="";
- db_line_ltype_control.dxf_FindLT=ltype;
- db_line_ltype_control.dxf_Layer=layer;
+ db_line_ltype_control.FindLT=ltype;
+ db_line_ltype_control.Layer=layer;
- db_circle.QET_line_style=db_line_ltype_control.dxf2_Ltype_control();
+ db_circle.QET_line_style=db_line_ltype_control.Ltype_control();
db_circle.QET_x=x;
db_circle.QET_y=y;
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_circle.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_circle.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_circle.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,11 +1,12 @@
#ifndef DXF_CIRCLE_H
#define DXF_CIRCLE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_circle.h"
#include "dxftoqet2/src/dxf_control/dxf_ltype_control.h"
-class dxf_circle : public QMainWindow
+class dxf_circle : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_ellipse.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_ellipse.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_ellipse.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_ellipse.h"
+#include "dxf_ellipse.h"
dxf_ellipse::dxf_ellipse(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
@@ -11,22 +11,43 @@
dxf_base_ellipse db_ellipse;
Result_ellipse="";
+ /*pow_major_x=0;
+ pow_major_y=0;
+ major_length=0;
+ minor_length=0;
+ width=0;
+ height=0;
+ start_angle=0;
+ end_angle=0;*/
- pow_major_x= (-major_radius_x);
- pow_major_y= (+major_radius_y);
+ /*pow_major_x= ((center_x-(major_radius_x+center_x))*(center_x-(major_radius_x+center_x)));
+ pow_major_y= ((center_y-(major_radius_y+center_y))*(center_y-(major_radius_y+center_y)));
- if (major_radius_x==0)
+ if (pow_major_x+pow_major_y<0)
{
+ major_length=-(qSqrt(-(pow_major_x+pow_major_y))/4);
+ }
+ else
+ {
+ major_length=qSqrt(pow_major_x+pow_major_y)/4;
+ }*/
+
+ major_length=major_radius_x;
+
+ minor_length=major_length*ratio_of_minor;
+
+ /*if (major_radius_x==0)
+ {
major_x=1;
}
else
{
major_radius_x=major_x;
- }
+ }*/
- rotation=180*((major_radius_y/major_x)/3.141592654);
+ //rotation=180*((major_radius_y/major_x)/3.141592654);
- if (((qPow(pow_major_x,2) - qPow(pow_major_y,2)))<0)
+ /*if (((qPow(pow_major_x,2) - qPow(pow_major_y,2)))<0)
{
width=2*(qSqrt(-(qPow(pow_major_x,2) - qPow(pow_major_y,2))));
}
@@ -37,43 +58,179 @@
- //width=(qSqrt(qPow(pow_major_x,2) - qPow(pow_major_y,2)));
+ width=(qSqrt(qPow(pow_major_x,2) - qPow(pow_major_y,2)));*/
height=(width*ratio_of_minor);
- Pstart=(180*(start/3.141592654));
+ width=major_length*2;
+ height=(width*ratio_of_minor);
+ //height=minor_length*2;
- Pend2=(180*(end2/3.141592654));
+ start_angle=(180*(start/3.141592654));
+ end_angle=(180*(end2/3.141592654));
+ /* hoek ACAD omrekenen naar QET */
- hoek2=Pstart-Pend2;
+ hoek=end_angle-start_angle;
+
+
+ if (start_angle>0 and start_angle<90)
+ {
+
+ }
+ if (start_angle>90 and start_angle<180)
+ {
+
+ }
+ if (start_angle>180 and start_angle<270)
+ {
+
+ }
+ if (start_angle>270 and start_angle<360)
+ {
+
+ }
+
+
+ /*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;
+ }*/
+
+ Pstart=start_angle;
+
+ hoek2=hoek;
+
db_ellipse.QET_x=center_x-(width/2);
db_ellipse.QET_y=center_y-(height/2);
- db_ellipse.QET_start=Pstart+rotation;
- db_ellipse.QET_angle=-hoek2;
+ db_ellipse.QET_start=Pstart;
+ db_ellipse.QET_angle=hoek2;
db_ellipse.QET_width=width;
db_ellipse.QET_height=height;
db_ellipse.QET_antialias="false";
DXF_Ltype_control db_line_ltype_control;
- db_line_ltype_control.dxf_FindLT=ltype;
- db_line_ltype_control.dxf_Layer=layer;
+ db_line_ltype_control.FindLT=ltype;
+ db_line_ltype_control.Layer=layer;
- db_ellipse.QET_line_style=db_line_ltype_control.dxf2_Ltype_control();
+ db_ellipse.QET_line_style=db_line_ltype_control.Ltype_control();
db_ellipse.QET_line_weight=Line_weight;
db_ellipse.QET_filling=Filling;
db_ellipse.QET_color=Color;
+ //if(db_ellipse.QET_width==0 and db_ellipse.QET_height==0)
+ //{
+ //}
+ //else
+ //{
+ Result_ellipse.append(db_ellipse.Create_ellipse());
- Result_ellipse.append(db_ellipse.Create_ellipse());
+ //}
-
return Result_ellipse;
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_ellipse.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_ellipse.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_ellipse.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,12 +1,13 @@
#ifndef DXF_ELLIPSE_H
#define DXF_ELLIPSE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_ellipse.h"
#include "dxftoqet2/src/dxf_control/dxf_ltype_control.h"
#include <QtMath>
-class dxf_ellipse : public QMainWindow
+class dxf_ellipse : public QWidget // QMainWindow
{
Q_OBJECT
public:
@@ -40,9 +41,13 @@
float end2;//42
+ float major_length;
+ float minor_length;
+
float width;
float height;
+ float hoek;
float hoek2;
float Pstart;
@@ -52,7 +57,27 @@
float pow_major_y;
float rotation;
+ float start_angle;
+ float end_angle;
+ float hoek3;
+ float begin;
+ float einde;
+ float begin1;
+ float einde1;
+ float hoek_einde;
+ float N;
+ float O;
+ float J;
+ float K;
+ float L;
+ float M;
+ float R;
+ float S;
+ float T;
+ float U;
+ float V;
+ float W;
QString ltype;
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_line.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_line.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_line.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_line.h"
+#include "dxf_line.h"
DXF_LINE::DXF_LINE(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
@@ -25,21 +25,14 @@
DXF_Ltype_control db_line_ltype_control;
- db_line_ltype_control.dxf_FindLT=ltype;
- db_line_ltype_control.dxf_Layer=layer;
+ db_line_ltype_control.FindLT=ltype;
+ db_line_ltype_control.Layer=layer;
- db_line.QETline_style=db_line_ltype_control.dxf2_Ltype_control();
+ db_line.QETline_style=db_line_ltype_control.Ltype_control();
-
- //changed rds 2016 01 19
- //db_line.QETline_weight="thin";
- //db_line.QETfilling="none";
db_line.QETline_weight=line_weight;
db_line.QETfilling=filling;
- // rds 2016 01 19
-
-
db_line.QETcolor=color;
Result_line.append(db_line.CreateElmt());
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_line.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_line.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_line.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,11 +1,12 @@
#ifndef DXF_LINE_H
#define DXF_LINE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_line.h"
#include "dxftoqet2/src/dxf_control/dxf_ltype_control.h"
-class DXF_LINE : public QMainWindow
+class DXF_LINE : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_lwpolyline.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_lwpolyline.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_lwpolyline.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,6 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_lwpolyline.h"
+#include "dxf_lwpolyline.h"
-dxf_lwpolyline::dxf_lwpolyline(QWidget *parent) : QMainWindow(parent)
+dxf_lwpolyline::dxf_lwpolyline(QWidget *parent) :
+ QWidget(parent)
{
}
@@ -12,15 +13,16 @@
Result_lwpolyline="";
- db_line_ltype_control.dxf_FindLT=ltype;
- db_line_ltype_control.dxf_Layer=layer;
+ db_line_ltype_control.FindLT=ltype;
+ db_line_ltype_control.Layer=layer;
- db_lwpolyline.QET_line_style=db_line_ltype_control.dxf2_Ltype_control();
+ db_lwpolyline.QET_line_style=db_line_ltype_control.Ltype_control();
db_lwpolyline.QET_antialias=antialias;
db_lwpolyline.QET_line_weight=line_weight;
db_lwpolyline.QET_filling=filling;
db_lwpolyline.QET_color=color;
+
if (closed==1)
{
db_lwpolyline.QET_closed="true";
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_lwpolyline.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_lwpolyline.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_lwpolyline.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,11 +1,12 @@
#ifndef DXF_LWPOLYLINE_H
#define DXF_LWPOLYLINE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_polyline.h"
#include "dxftoqet2/src/dxf_control/dxf_ltype_control.h"
-class dxf_lwpolyline : public QMainWindow
+class dxf_lwpolyline : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_point.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_point.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_point.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_point.h"
+#include "dxf_point.h"
dxf_point::dxf_point(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_point.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_point.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_point.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,10 +1,11 @@
#ifndef DXF_POINT_H
#define DXF_POINT_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_terminal.h"
-class dxf_point : public QMainWindow
+class dxf_point : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_polyline.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_polyline.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_polyline.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_polyline.h"
+#include "dxf_polyline.h"
dxf_polyline::dxf_polyline(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
@@ -12,15 +12,17 @@
Result_polyline="";
- db_line_ltype_control.dxf_FindLT=ltype;
- db_line_ltype_control.dxf_Layer=layer;
+ db_line_ltype_control.FindLT=ltype;
+ db_line_ltype_control.Layer=layer;
- db_polyline.QET_line_style=db_line_ltype_control.dxf2_Ltype_control();
+ db_polyline.QET_line_style=db_line_ltype_control.Ltype_control();
db_polyline.QET_antialias=antialias;
db_polyline.QET_line_weight=line_weight;
db_polyline.QET_filling=filling;
db_polyline.QET_color=color;
+
+
if (closed==1)
{
db_polyline.QET_closed="true";
@@ -30,14 +32,14 @@
db_polyline.QET_closed="false";
}
- for (count=1; count<vector_count+1;count++)
+ for (count=1; count<=vector_count;count++)
{
db_polyline.QET_x[count]=x_vector[count];
db_polyline.QET_y[count]=y_vector[count];
-
}
+
db_polyline.segments=vector_count;
Result_polyline.append(db_polyline.Create_polyline());
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_polyline.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_polyline.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_polyline.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,11 +1,12 @@
#ifndef DXF_POLYLINE_H
#define DXF_POLYLINE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_polyline.h"
#include "dxftoqet2/src/dxf_control/dxf_ltype_control.h"
-class dxf_polyline : public QMainWindow
+class dxf_polyline : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_rect.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_rect.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_rect.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_rect.h"
+#include "dxf_rect.h"
dxf_rect::dxf_rect(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_rect.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_rect.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_rect.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,10 +1,11 @@
#ifndef DXF_RECT_H
#define DXF_RECT_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_rectangel.h"
-class dxf_rect : public QMainWindow
+class dxf_rect : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_text.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_text.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_text.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf/dxf_text.h"
+#include "dxf_text.h"
dxf_text::dxf_text(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
@@ -14,10 +14,28 @@
dxf_base_text db_text_base;
+ rotation=QET_rotation;
+
+ /*if (rotation>360)
+ {
+ rotation=rotation-360;
+ }
+ else
+ {
+ if(rotation<0)
+ {
+ rotation=360-rotation;
+ }
+ else
+ {
+
+ }
+ }*/
+
db_text_base.QET_x=QET_x;
- db_text_base.QET_y=QET_y;
+ db_text_base.QET_y=QET_y-QET_size;
db_text_base.QET_size=QET_size;
- db_text_base.QET_rotation=QET_rotation;
+ db_text_base.QET_rotation=rotation;
db_text_base.QET_text=QET_text;
db_text_base.QET_color=QET_color;
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_text.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_text.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf/dxf_text.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,10 +1,11 @@
#ifndef DXF_TEXT_H
#define DXF_TEXT_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_base_types/dxf_base_text.h"
-class dxf_text : public QMainWindow
+class dxf_text : public QWidget // QMainWindow
{
Q_OBJECT
public:
@@ -20,6 +21,8 @@
QString QET_color;
QString Result_text;
+ double rotation;
+
QString Create_Text();
signals:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_arc.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_arc.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_arc.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_arc.h"
+#include "dxf_base_arc.h"
dxf_base_arc::dxf_base_arc(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_arc.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_arc.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_arc.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_ARC_H
#define DXF_BASE_ARC_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_arc : public QMainWindow
+class dxf_base_arc : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_circle.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_circle.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_circle.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_circle.h"
+#include "dxf_base_circle.h"
dxf_base_circle::dxf_base_circle(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_circle.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_circle.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_circle.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_CIRCLE_H
#define DXF_BASE_CIRCLE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_circle : public QMainWindow
+class dxf_base_circle : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_ellipse.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_ellipse.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_ellipse.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_ellipse.h"
+#include "dxf_base_ellipse.h"
dxf_base_ellipse::dxf_base_ellipse(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_ellipse.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_ellipse.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_ellipse.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_ELLIPSE_H
#define DXF_BASE_ELLIPSE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_ellipse : public QMainWindow
+class dxf_base_ellipse : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_input.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_input.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_input.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_input.h"
+#include "dxf_base_input.h"
dxf_base_input::dxf_base_input(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_input.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_input.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_input.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_INPUT_H
#define DXF_BASE_INPUT_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_input : public QMainWindow
+class dxf_base_input : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_line.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_line.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_line.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_line.h"
+#include "dxf_base_line.h"
dxf_base_line::dxf_base_line(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_line.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_line.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_line.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_LINE_H
#define DXF_BASE_LINE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_line : public QMainWindow
+class dxf_base_line : public QWidget //QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_polyline.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_polyline.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_polyline.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,13 +1,15 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_polyline.h"
+#include "dxf_base_polyline.h"
dxf_base_polyline::dxf_base_polyline(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
QString dxf_base_polyline::Create_polyline()
{
+ /* creation of the xml code for a polygon */
+
/* <polygon style="line-style:normal;
* line-weight:thin;filling:none;color:black"
* closed="false"
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_polyline.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_polyline.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_polyline.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_POLYLINE_H
#define DXF_BASE_POLYLINE_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_polyline : public QMainWindow
+class dxf_base_polyline : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_rectangel.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_rectangel.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_rectangel.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_rectangel.h"
+#include "dxf_base_rectangel.h"
dxf_base_rectangel::dxf_base_rectangel(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_rectangel.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_rectangel.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_rectangel.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_RECTANGEL_H
#define DXF_BASE_RECTANGEL_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_rectangel : public QMainWindow
+class dxf_base_rectangel : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_terminal.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_terminal.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_terminal.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_terminal.h"
+#include "dxf_base_terminal.h"
dxf_base_terminal::dxf_base_terminal(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_terminal.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_terminal.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_terminal.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_TERMINAL_H
#define DXF_BASE_TERMINAL_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_terminal : public QMainWindow
+class dxf_base_terminal : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_text.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_text.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_text.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,7 @@
-#include "dxftoqet2/src/dxf_base_types/dxf_base_text.h"
+#include "dxf_base_text.h"
dxf_base_text::dxf_base_text(QWidget *parent) :
- QMainWindow(parent)
+ QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_text.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_text.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_base_types/dxf_base_text.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_BASE_TEXT_H
#define DXF_BASE_TEXT_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class dxf_base_text : public QMainWindow
+class dxf_base_text : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_layer_control.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_layer_control.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_layer_control.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,10 +1,9 @@
-#include "dxftoqet2/src/dxf_control/dxf_layer_control.h"
+#include "dxf_layer_control.h"
extern struct DXF_base DXF_main_base[1];
extern struct DXF_table_layer DXF_input_table_layer[100];
-DXF_layer_control::DXF_layer_control(QWidget *parent) :
- QMainWindow(parent)
+DXF_layer_control::DXF_layer_control(QWidget *parent) : QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_layer_control.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_layer_control.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_layer_control.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,10 +1,11 @@
#ifndef DXF_LAYER_CONTROL_H
#define DXF_LAYER_CONTROL_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_data.h"
-class DXF_layer_control : public QMainWindow
+class DXF_layer_control : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_ltype_control.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_ltype_control.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_ltype_control.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,158 +1,157 @@
-#include "dxftoqet2/src/dxf_control/dxf_ltype_control.h"
+#include "dxf_ltype_control.h"
-DXF_Ltype_control::DXF_Ltype_control(QWidget *parent) :
- QMainWindow(parent)
+DXF_Ltype_control::DXF_Ltype_control(QWidget *parent) : QWidget(parent)
{
}
-QString DXF_Ltype_control::dxf2_Ltype_control()
+QString DXF_Ltype_control::Ltype_control()
{
- dxf_LTfound="normal";
+ LTfound="normal";
- if (dxf_FindLT == "" )
+ if (FindLT == "" )
{
DXF_layer_control db_layer_control;
- db_layer_control.layer_to_find=dxf_Layer;
+ db_layer_control.layer_to_find=Layer;
DXF_Ltype_control db_ltype;
- db_ltype.dxf_FindLT=db_layer_control.dxf_layer_ltype();
+ db_ltype.FindLT=db_layer_control.dxf_layer_ltype();
- dxf_LTfound=db_ltype.dxf2_Ltype_control();
+ LTfound=db_ltype.Ltype_control();
}
- if (dxf_FindLT == "ByLayer" )
+ if (FindLT == "ByLayer" )
{
DXF_layer_control db_layer_control;
- db_layer_control.layer_to_find=dxf_Layer;
+ db_layer_control.layer_to_find=Layer;
DXF_Ltype_control db_ltype;
- db_ltype.dxf_FindLT=db_layer_control.dxf_layer_ltype();
+ db_ltype.FindLT=db_layer_control.dxf_layer_ltype();
- dxf_LTfound=db_ltype.dxf2_Ltype_control();
+ LTfound=db_ltype.Ltype_control();
}
- if (dxf_FindLT == "ByBlock" )
+ if (FindLT == "ByBlock" )
{
- dxf_LTfound="normal";
+ LTfound="normal";
}
- if (dxf_FindLT == "Continuous" )
+ if (FindLT == "Continuous" )
{
- dxf_LTfound="normal";
+ LTfound="normal";
}
- if (dxf_FindLT == "CONTINUOUS" )
+ if (FindLT == "CONTINUOUS" )
{
- dxf_LTfound="normal";
+ LTfound="normal";
}
- if (dxf_FindLT == "Center" )
+ if (FindLT == "Center" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "CENTER" )
+ if (FindLT == "CENTER" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "CENTER2" )
+ if (FindLT == "CENTER2" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "CENTERX2" )
+ if (FindLT == "CENTERX2" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "Dashed" )
+ if (FindLT == "Dashed" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "DASHED" )
+ if (FindLT == "DASHED" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "DASHED2" )
+ if (FindLT == "DASHED2" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "DASHEDX2" )
+ if (FindLT == "DASHEDX2" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "HIDDEN" )
+ if (FindLT == "HIDDEN" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "HIDDEN2" )
+ if (FindLT == "HIDDEN2" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "HIDDENX2" )
+ if (FindLT == "HIDDENX2" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "EPL_DASH" )
+ if (FindLT == "EPL_DASH" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "EPL_DASH2" )
+ if (FindLT == "EPL_DASH2" )
{
- dxf_LTfound="dashed";
+ LTfound="dashed";
}
- if (dxf_FindLT == "EPL_DASHDOT" )
+ if (FindLT == "EPL_DASHDOT" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "EPL_DASHDOTDOT" )
+ if (FindLT == "EPL_DASHDOTDOT" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "DASHDOT" )
+ if (FindLT == "DASHDOT" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "DASHDOT2" )
+ if (FindLT == "DASHDOT2" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "DASHDOTX2" )
+ if (FindLT == "DASHDOTX2" )
{
- dxf_LTfound="dashdotted";
+ LTfound="dashdotted";
}
- if (dxf_FindLT == "normal" )
+ if (FindLT == "normal" )
{
- dxf_LTfound="normal";
+ LTfound="normal";
}
- return dxf_LTfound;
+ return LTfound;
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_ltype_control.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_ltype_control.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_ltype_control.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,20 +1,21 @@
#ifndef DXF_LTYPE_CONTROL_H
#define DXF_LTYPE_CONTROL_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_control/dxf_layer_control.h"
-class DXF_Ltype_control : public QMainWindow
+class DXF_Ltype_control : public QWidget // QMainWindow
{
Q_OBJECT
public:
explicit DXF_Ltype_control(QWidget *parent = 0);
- QString dxf_LTfound;
- QString dxf_FindLT;
- QString dxf_Layer;
+ QString LTfound;
+ QString FindLT;
+ QString Layer;
- QString dxf2_Ltype_control();
+ QString Ltype_control();
signals:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_text_control.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_text_control.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_text_control.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,7 +1,6 @@
-#include "dxftoqet2/src/dxf_control/dxf_text_control.h"
+#include "dxf_text_control.h"
-DXF_Text_control::DXF_Text_control(QWidget *parent) :
- QMainWindow(parent)
+DXF_Text_control::DXF_Text_control(QWidget *parent) : QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_text_control.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_text_control.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_control/dxf_text_control.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_TEXT_CONTROL_H
#define DXF_TEXT_CONTROL_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class DXF_Text_control : public QMainWindow
+class DXF_Text_control : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_data.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_data.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_data.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,4 +1,4 @@
-#include "dxftoqet2/src/dxf_data.h"
+#include "dxf_data.h"
dxf_data::dxf_data()
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_data.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_data.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_data.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -3,7 +3,8 @@
//#include <QObject>
#include <QtCore>
-#include <QtWidgets>
+#include <QWidget>
+//#include <QtWidgets>
struct DXF_file_input
@@ -522,7 +523,13 @@
QString dxf_block_color;
QString dxf_element_color;
+ //QString dxf_block_color;
+ QString dxf_entitie_color;
+ int dxf_X_factor;
+ int dxf_Y_factor;
+
+
QStringList dxf_input;
QString dxf_csv_split[10000][20];
@@ -1349,18 +1356,21 @@
struct DXF_block_insert
{
+ QString DXF_block_insert_code_1;
+ QString DXF_block_insert_code_2;
+ QString DXF_block_insert_code_3;
QString DXF_block_insert_code_5;
QString DXF_block_insert_code_6;
QString DXF_block_insert_code_8;
- double DXF_block_insert_code_10;
+ double DXF_block_insert_code_10[4];
double DXF_block_insert_code_11;
double DXF_block_insert_code_12;
double DXF_block_insert_code_13;
double DXF_block_insert_code_14[5];
- double DXF_block_insert_code_20;
+ double DXF_block_insert_code_20[4];
double DXF_block_insert_code_21;
double DXF_block_insert_code_22;
double DXF_block_insert_code_23;
@@ -1389,9 +1399,23 @@
int16_t DXF_block_insert_code_283;
QString DXF_block_insert_code_310;
- QString DXF_block_insert_code_330;
+ QString DXF_block_insert_code_330[2];
QString DXF_block_insert_code_340;
QString DXF_block_insert_code_360;
+
+ QString DXF_block_insert_code_1000[30];
+ QString DXF_block_insert_code_1001[30];
+ QString DXF_block_insert_code_1002[10];
+
+ double DXF_block_insert_code_1010[10];
+ double DXF_block_insert_code_1011[10];
+ double DXF_block_insert_code_1020[10];
+ double DXF_block_insert_code_1021[10];
+ double DXF_block_insert_code_1030[10];
+ double DXF_block_insert_code_1031[10];
+ double DXF_block_insert_code_1040[10];
+ int16_t DXF_block_insert_code_1070[10];
+ int16_t DXF_block_insert_code_1071[10];
};
struct DXF_block_leader
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_load.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_load.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_load.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,4 +1,4 @@
-#include "dxftoqet2/src/dxf_load.h"
+#include "dxf_load.h"
//init extern variable
@@ -25,8 +25,7 @@
-dxf_load::dxf_load(QWidget *parent) :
- QMainWindow(parent)
+dxf_load::dxf_load(QWidget *parent) : QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_load.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_load.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_load.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -2,14 +2,15 @@
#define DXF_LOAD_H
#include <QObject>
-#include <QMainWindow>
-#include <QtWidgets>
+//#include <QMainWindow>
+#include <QWidget>
+//#include <QtWidgets>
#include "dxftoqet2/src/dxf_data.h"
#include "dxftoqet2/dxftoqet_mainwindow.h"
#include "ui_dxftoqet_mainwindow.h"
-class dxf_load :public QMainWindow, public dxf_data
+class dxf_load :public QWidget, public dxf_data //QMainWindow
{
Q_OBJECT
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_ltype_control.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_ltype_control.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_ltype_control.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,10 @@
#ifndef DXF_LTYPE_CONTROL_H
#define DXF_LTYPE_CONTROL_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
-class DXF_Ltype_control : public QMainWindow
+class DXF_Ltype_control : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_split.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_split.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_split.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,4 +1,4 @@
-#include "dxftoqet2/src/dxf_split.h"
+#include "dxf_split.h"
//extern int dxf ();
//extern const int Max_Blocks=500;
@@ -117,8 +117,7 @@
-dxf_split::dxf_split(QWidget *parent) :
- QMainWindow(parent)
+dxf_split::dxf_split(QWidget *parent) : QWidget(parent)
{
}
@@ -8341,7 +8340,10 @@
block_xline_count=0;
+ break;
+
+
case 5:
if(sw_end_block[5]==0)
@@ -13023,13 +13025,48 @@
}
}
- if (line4=="INSERT" and line4.length()==5)
+ if (line4=="INSERT" and line4.length()==6)
{
Log_1.append("Start reading BLOCK code INSERT \n");
+ Log_1.append(QString::number(block_count1));
+ Log_1.append ("item n°: ");
+ Log_1.append(QString::number(block_line_count));
+ Log_1.append("\n");
block_st5=0;
block_count5=0;
+ for (sw_cleaner=0; sw_cleaner<1072;++sw_cleaner)
+ {
+ sw_block_line[sw_cleaner]=0;
+
+ }
+
+
+ count_block_insert_10=0;
+ count_block_insert_20=0;
+
+ count_block_insert_100=0;
+ count_block_insert_102=0;
+ count_block_insert_330=0;
+
+ count_block_insert_1002=0;
+ count_block_insert_1010=0;
+ count_block_insert_1011=0;
+
+ count_block_insert_1020=0;
+ count_block_insert_1021=0;
+
+ count_block_insert_1030=0;
+ count_block_insert_1031=0;
+
+
+ count_block_insert_1040=0;
+
+ count_block_insert_1070=0;
+ count_block_insert_1071=0;
+
+
while (block_st5==0 and block_count5<49)
{
@@ -13055,9 +13092,767 @@
break;
+
+ case 1:
+
+ if(sw_block_line[1]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1=line8;
+ sw_block_line[1]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 2:
+
+ if(sw_block_line[2]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_2=line8;
+ sw_block_line[2]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 3:
+
+ if(sw_block_line[3]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_3=line8;
+ sw_block_line[3]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+
+
+ case 5:
+
+ if(sw_block_line[5]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_5=line8;
+ sw_block_line[5]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 6:
+
+ if(sw_block_line[6]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_6=line8;
+ sw_block_line[6]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 8:
+
+ if(sw_block_line[8]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_8=line8;
+ sw_block_line[8]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 10:
+
+ if (count_block_insert_10>3)
+ {
+ Log_1.append(found_block_line());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_10[count_block_insert_10]=line8.toDouble();
+ count_block_insert_10=count_block_insert_10+1;
+ }
+ break;
+
+
+
+ case 11:
+
+ if(sw_block_line[11]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_11=line8.toDouble();
+ sw_block_line[11]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ /*case 12:
+
+ if(sw_block_line[12]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_12=line8.toDouble();
+ sw_block_line[12]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 13:
+
+ if(sw_block_line[13]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_13=line8.toDouble();
+ sw_block_line[13]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 14:
+
+ if (count_block_insert_14>4)
+ {
+ Log_1.append(found_block_line());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_line_count].DXF_block_insert_code_14[count_block_insert_14]=line8.toDouble();
+ count_block_insert_14=count_block_insert_14+1;
+ }
+ break;*/
+
+ case 20:
+
+ if (count_block_insert_20>3)
+ {
+ Log_1.append(found_block_line());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_20[count_block_insert_20]=line8.toDouble();
+ count_block_insert_20=count_block_insert_20+1;
+ }
+ break;
+
+
+ case 21:
+
+ if(sw_block_line[21]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_21=line8.toDouble();
+ sw_block_line[21]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ /*case 22:
+
+ if(sw_block_line[22]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_22=line8.toDouble();
+ sw_block_line[22]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 23:
+
+ if(sw_block_line[23]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_23=line8.toDouble();
+ sw_block_line[23]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 24:
+
+ if (count_block_insert_24>4)
+ {
+ Log_1.append(found_block_line());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_line_count].DXF_block_insert_code_24[count_block_insert_24]=line8.toDouble();
+ count_block_insert_24=count_block_insert_24+1;
+ }
+ break;*/
+
+ case 30:
+
+ if(sw_block_line[30]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_30=line8.toDouble();
+ sw_block_line[30]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 31:
+
+ if(sw_block_line[31]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_31=line8.toDouble();
+ sw_block_line[31]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ /*case 32:
+
+ if(sw_block_line[32]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_32=line8.toDouble();
+ sw_block_line[32]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;*/
+
+ /*case 43:
+
+ if(sw_block_line[43]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_43=line8.toDouble();
+ sw_block_line[43]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 48:
+
+ if(sw_block_line[48]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_48=line8.toDouble();
+ sw_block_line[48]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;*/
+
+ case 62:
+
+ if(sw_block_line[62]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_62=line8.toInt();
+ sw_block_line[62]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 70:
+
+ if(sw_block_line[70]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_70=line8.toInt();
+ sw_block_line[70]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ /*case 71:
+
+ if(sw_block_line[71]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_71=line8.toInt();
+ sw_block_line[71]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 72:
+
+ if(sw_block_line[72]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_72=line8.toInt();
+ sw_block_line[72]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 74:
+
+ if(sw_block_line[74]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_74=line8.toInt();
+ sw_block_line[74]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;*/
+
+ case 90:
+
+ if(sw_block_line[90]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_90=line8.toInt();
+ sw_block_line[90]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ /*case 91:
+
+ if(sw_block_line[91]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_91=line8.toInt();
+ sw_block_line[91]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 92:
+
+ if(sw_block_line[92]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_92=line8.toInt();
+ sw_block_line[92]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;*/
+
+ case 100:
+
+ if (count_block_insert_100>4)
+ {
+ Log_1.append(found_block_line());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_100[count_block_insert_100]=line8;
+ count_block_insert_100=count_block_insert_100+1;
+ }
+ break;
+
+ /*case 102:
+
+ if (count_block_insert_102>1)
+ {
+ Log_1.append(found_block_line());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_102[count_block_insert_102]=line8;
+ count_block_insert_102=count_block_insert_102+1;
+ }
+ break;*/
+
+ /*case 280:
+
+ if(sw_block_line[280]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_280=line8.toInt();
+ sw_block_line[280]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 281:
+
+ if(sw_block_line[281]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_281=line8.toInt();
+ sw_block_line[281]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 282:
+
+ if(sw_block_line[282]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_282=line8.toInt();
+ sw_block_line[282]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 283:
+
+ if(sw_block_line[283]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_283=line8.toInt();
+ sw_block_line[283]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;*/
+
+ /*case 310:
+
+ if(sw_block_line[310]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_310=line8;
+ sw_block_line[310]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;*/
+
+ case 330:
+
+ if (count_block_insert_330>1)
+ {
+ Log_1.append(found_block_line());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_330[count_block_insert_330]=line8;
+ count_block_insert_330=count_block_insert_330+1;
+ }
+ break;
+
+
+
+ /*case 340:
+
+ if(sw_block_line[340]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_340=line8;
+ sw_block_line[340]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;
+
+ case 360:
+
+ if(sw_block_line[360]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_360=line8;
+ sw_block_line[360]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;*/
+
+ /*case 370:
+
+ if(sw_block_line[370]==0)
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_370=line8.toInt();
+ sw_block_line[370]=1;
+ }
+ else
+ {
+ Log_1.append(found_block_insert());
+
+ }
+
+ break;*/
+
+ case 1000:
+
+ if (count_block_insert_1000>29)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1000[count_block_insert_1000]=line8;
+ count_block_insert_1000=count_block_insert_1000+1;
+ }
+ break;
+
+ case 1001:
+
+ if (count_block_insert_1001>29)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1001[count_block_insert_1001]=line8;
+ count_block_insert_1001=count_block_insert_1001+1;
+ }
+ break;
+
+
+ case 1002:
+
+ if (count_block_insert_1002>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1000[count_block_insert_1002]=line8;
+ count_block_insert_1002=count_block_insert_1002+1;
+ }
+ break;
+
+
+ case 1010:
+
+ if (count_block_insert_1010>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1010[count_block_insert_1010]=line8.toDouble();
+ count_block_insert_1010=count_block_insert_1010+1;
+ }
+ break;
+
+
+ case 1011:
+
+ if (count_block_insert_1011>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1011[count_block_insert_1011]=line8.toDouble();
+ count_block_insert_1011=count_block_insert_1011+1;
+ }
+ break;
+
+ case 1020:
+
+ if (count_block_insert_1020>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1020[count_block_insert_1020]=line8.toDouble();
+ count_block_insert_1020=count_block_insert_1020+1;
+ }
+ break;
+
+ case 1021:
+
+ if (count_block_insert_1021>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1021[count_block_insert_1021]=line8.toDouble();
+ count_block_insert_1021=count_block_insert_1021+1;
+ }
+ break;
+
+ case 1030:
+
+ if (count_block_insert_1030>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1030[count_block_insert_1030]=line8.toDouble();
+ count_block_insert_1030=count_block_insert_1030+1;
+ }
+ break;
+
+ case 1031:
+
+ if (count_block_insert_1031>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1031[count_block_insert_1031]=line8.toDouble();
+ count_block_insert_1031=count_block_insert_1031+1;
+ }
+ break;
+
+ case 1040:
+
+ if (count_block_insert_1040>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1040[count_block_insert_1040]=line8.toDouble();
+ count_block_insert_1040=count_block_insert_1040+1;
+ }
+ break;
+
+ case 1070:
+
+ if (count_block_insert_1070>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1070[count_block_insert_1070]=line8.toInt();
+ count_block_insert_1070=count_block_insert_1070+1;
+ }
+ break;
+
+ case 1071:
+
+ if (count_block_insert_1071>9)
+ {
+ Log_1.append(found_block_insert());
+ }
+ else
+ {
+ DXF_input_block_insert[block_count1][block_insert_count].DXF_block_insert_code_1071[count_block_insert_1071]=line8.toInt();
+ count_block_insert_1071=count_block_insert_1071+1;
+ }
+ break;
+
+
+
+
+
default:
Log_1.append(found_block_insert());
+
}
@@ -20036,7 +20831,18 @@
if(sw_block[2]==0)
{
- DXF_input_block[block_count1].DXF_block_code_2=line4.remove(QRegExp("[$*+-_=]"));
+ DXF_input_block[block_count1].DXF_block_code_2=line4;//.remove(QRegExp("[$*+-_=]"));
+
+ if (DXF_input_table_block_record[block_count1].dxf_table_block_record_code_2=="")
+ {
+ DXF_input_table_block_record[block_count1].dxf_table_block_record_code_2=line4;
+
+ }
+ else
+ {
+
+ }
+
sw_block[2]=1;
}
else
@@ -23723,7 +24529,7 @@
if(sw_entities_insert[2]==0)
{
- DXF_input_entities_insert[entities_INSERT_count2].DXF_entities_insert_code_2=line6.remove(QRegExp("[$*+-_=]"));
+ DXF_input_entities_insert[entities_INSERT_count2].DXF_entities_insert_code_2=line6;//.remove(QRegExp("[$*+-_=]"));
sw_entities_insert[2]=1;
}
else
@@ -31599,6 +32405,7 @@
}
+/* entitie section */
QString dxf_split::found_entities_circle()
{
@@ -31865,7 +32672,7 @@
return Log_2;
}
-/* bock text */
+/* block text */
QString dxf_split::found_block_image()
{
Modified: branches/Qetdxf/sources/dxftoqet2/src/dxf_split.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/dxf_split.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/dxf_split.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -2,14 +2,15 @@
#define DXF_SPLIT_H
#include <QObject>
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include "dxftoqet2/src/dxf_data.h"
#include "dxftoqet2/dxftoqet_mainwindow.h"
-#include <QtWidgets>
+//#include <QtWidgets>
#include "ui_dxftoqet_mainwindow.h"
-class dxf_split : public QMainWindow,public dxf_data
+class dxf_split : public QWidget ,public dxf_data //QMainWindow
{
Q_OBJECT
@@ -416,6 +417,25 @@
int count_block_line_102;
int count_block_line_330;
+ int count_block_insert_10;
+ int count_block_insert_20;
+
+ int count_block_insert_100;
+ int count_block_insert_102;
+ int count_block_insert_330;
+ int count_block_insert_1000;
+ int count_block_insert_1001;
+ int count_block_insert_1002;
+ int count_block_insert_1010;
+ int count_block_insert_1011;
+ int count_block_insert_1020;
+ int count_block_insert_1021;
+ int count_block_insert_1030;
+ int count_block_insert_1031;
+ int count_block_insert_1040;
+ int count_block_insert_1070;
+ int count_block_insert_1071;
+
int count_end_block_100;
int line1;
Modified: branches/Qetdxf/sources/dxftoqet2/src/qet_base_types/baseelmt.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/qet_base_types/baseelmt.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/qet_base_types/baseelmt.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,9 +1,8 @@
-#include "dxftoqet2/src/qet_base_types/baseelmt.h"
+#include "baseelmt.h"
extern struct DXF_base DXF_main_base[1];
-BaseELMT::BaseELMT(QWidget *parent) :
- QMainWindow(parent)
+BaseELMT::BaseELMT(QWidget *parent) : QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/qet_base_types/baseelmt.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/qet_base_types/baseelmt.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/qet_base_types/baseelmt.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,13 +1,14 @@
#ifndef BASEELMT_H
#define BASEELMT_H
-#include <QMainWindow>
+//#include <QMainWindow>
+#include <QWidget>
#include <QtCore>
#include <qobject.h>
-class BaseELMT : public QMainWindow
+class BaseELMT : public QWidget // QMainWindow
{
Q_OBJECT
public:
Modified: branches/Qetdxf/sources/dxftoqet2/src/split_csv.cpp
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/split_csv.cpp 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/split_csv.cpp 2016-02-06 12:52:24 UTC (rev 4340)
@@ -1,4 +1,4 @@
-#include "dxftoqet2/src/split_csv.h"
+#include "split_csv.h"
//extern int dxf ();
@@ -6,8 +6,7 @@
extern struct DXF_base DXF_main_base[1];
-split_csv::split_csv(QWidget *parent) :
- QMainWindow(parent)
+split_csv::split_csv(QWidget *parent) : QWidget(parent)
{
}
Modified: branches/Qetdxf/sources/dxftoqet2/src/split_csv.h
===================================================================
--- branches/Qetdxf/sources/dxftoqet2/src/split_csv.h 2016-02-01 20:38:39 UTC (rev 4339)
+++ branches/Qetdxf/sources/dxftoqet2/src/split_csv.h 2016-02-06 12:52:24 UTC (rev 4340)
@@ -4,12 +4,12 @@
#include "dxftoqet2/src/dxf_data.h"
#include <QObject>
-#include <QMainWindow>
+//#include <QMainWindow>
#include "dxftoqet2/dxftoqet_mainwindow.h"
-#include <QtWidgets>
+//#include <QtWidgets>
#include "ui_dxftoqet_mainwindow.h"
-class split_csv : public QMainWindow,public dxf_data
+class split_csv : public QWidget ,public dxf_data //QMainwindow
{
Q_OBJECT