[qet] [4213] DXFtoQET converter

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4213
Author:   rdsivd
Date:     2015-09-17 21:22:51 +0200 (Thu, 17 Sep 2015)
Log Message:
-----------
DXFtoQET converter
smale corrrection on input creation

Modified Paths:
--------------
    branches/dxftoqet2/dxf_create_elmt.cpp
    branches/dxftoqet2/dxftoqet_mainwindow.ui
    branches/dxftoqet2/src/dxf/dxf_attdef.cpp
    branches/dxftoqet2/src/dxf/dxf_attdef.h
    branches/dxftoqet2/src/dxf/dxf_attr.cpp
    branches/dxftoqet2/src/dxf/dxf_attr.h
    branches/dxftoqet2/src/dxf_base_types/dxf_base_input.cpp
    branches/dxftoqet2/src/dxf_base_types/dxf_base_input.h

Modified: branches/dxftoqet2/dxf_create_elmt.cpp
===================================================================
--- branches/dxftoqet2/dxf_create_elmt.cpp	2015-09-17 18:53:25 UTC (rev 4212)
+++ branches/dxftoqet2/dxf_create_elmt.cpp	2015-09-17 19:22:51 UTC (rev 4213)
@@ -301,6 +301,7 @@
 	 db_input.rotate="true";
 	 db_input.text="_";
 	 db_input.tag="label";
+	 db_input.rotation=0;
 
 	 Result_input.append(db_input.Create_ATTDEF());
 
@@ -375,9 +376,10 @@
 
 		dxb_attdef2.x=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_10;
 		dxb_attdef2.y=-DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_20;
-		dxb_attdef2.rotate=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_50;
+		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=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_2;
+		dxb_attdef2.tag="label"; //DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_2;
+		dxb_attdef2.rotate="true";
 
 		db_txt_check.TextToCheck=DXF_input_entities_attdef[Count_lines].DXF_entities_attdef_code_1;
 
@@ -409,9 +411,10 @@
 
 		dxb_attr.x=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_10;					// x start
 		dxb_attr.y=-DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_20;					// y start
-		dxb_attr.rotate=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_50;				//text rotation
+		dxb_attr.rotation=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_50;			//text rotation
 		dxb_attr.size=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_40;				//text height
-		dxb_attr.tag=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_2;					// tag
+		dxb_attr.tag="label"; //DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_2;		// tag
+		dxb_attr.rotate="true";
 
 		db_txt_check2.TextToCheck=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_1;	// value
 

Modified: branches/dxftoqet2/dxftoqet_mainwindow.ui
===================================================================
--- branches/dxftoqet2/dxftoqet_mainwindow.ui	2015-09-17 18:53:25 UTC (rev 4212)
+++ branches/dxftoqet2/dxftoqet_mainwindow.ui	2015-09-17 19:22:51 UTC (rev 4213)
@@ -470,7 +470,7 @@
             <enum>QTabWidget::Rounded</enum>
            </property>
            <property name="currentIndex">
-            <number>4</number>
+            <number>2</number>
            </property>
            <widget class="QWidget" name="tab_ELMT">
             <property name="sizePolicy">
@@ -757,7 +757,7 @@
               <string notr="true">BACKGROUND:rgb(225, 225, 225)</string>
              </property>
              <property name="currentIndex">
-              <number>0</number>
+              <number>3</number>
              </property>
              <widget class="QWidget" name="tab_dxf_sections">
               <attribute name="title">
@@ -2182,6 +2182,9 @@
                 </item>
                 <item row="5" column="0">
                  <widget class="QLabel" name="label_27">
+                  <property name="styleSheet">
+                   <string notr="true">BACKGROUND:rgb(165, 198, 130)</string>
+                  </property>
                   <property name="text">
                    <string>ATTRIB</string>
                   </property>

Modified: branches/dxftoqet2/src/dxf/dxf_attdef.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_attdef.cpp	2015-09-17 18:53:25 UTC (rev 4212)
+++ branches/dxftoqet2/src/dxf/dxf_attdef.cpp	2015-09-17 19:22:51 UTC (rev 4213)
@@ -19,6 +19,7 @@
 	db_attdef.QET_tag=tag;
 	db_attdef.QET_text=text;
 	db_attdef.QET_rotate=rotate;
+	db_attdef.QET_rotation=rotation;
 
 
 	Result_attdef.append(db_attdef.Create_input());

Modified: branches/dxftoqet2/src/dxf/dxf_attdef.h
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_attdef.h	2015-09-17 18:53:25 UTC (rev 4212)
+++ branches/dxftoqet2/src/dxf/dxf_attdef.h	2015-09-17 19:22:51 UTC (rev 4213)
@@ -17,6 +17,7 @@
 	//QET xml var
 	double x; //10
 	double y; //20
+	double rotation; //50
 	int size;
 	QString rotate;
 	QString text;

Modified: branches/dxftoqet2/src/dxf/dxf_attr.cpp
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_attr.cpp	2015-09-17 18:53:25 UTC (rev 4212)
+++ branches/dxftoqet2/src/dxf/dxf_attr.cpp	2015-09-17 19:22:51 UTC (rev 4213)
@@ -19,6 +19,7 @@
 	db_attr.QET_tag=tag;
 	db_attr.QET_text=text;
 	db_attr.QET_rotate=rotate;
+	db_attr.QET_rotation=rotation;
 
 
 	Result_attr.append(db_attr.Create_input());

Modified: branches/dxftoqet2/src/dxf/dxf_attr.h
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_attr.h	2015-09-17 18:53:25 UTC (rev 4212)
+++ branches/dxftoqet2/src/dxf/dxf_attr.h	2015-09-17 19:22:51 UTC (rev 4213)
@@ -21,6 +21,7 @@
 	QString rotate;
 	QString text;
 	QString tag;
+	double rotation;//50
 
 	QString Create_ATTR();
 

Modified: branches/dxftoqet2/src/dxf_base_types/dxf_base_input.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_base_types/dxf_base_input.cpp	2015-09-17 18:53:25 UTC (rev 4212)
+++ branches/dxftoqet2/src/dxf_base_types/dxf_base_input.cpp	2015-09-17 19:22:51 UTC (rev 4213)
@@ -19,7 +19,8 @@
 
 
 
-	/* <input x="3" y="1" size="9" rotate="true" text="_" tagg="label"/> */
+	/* <input x="3" y="1" size="9" rotate="true" text="_" tagg="label"/>
+	   <input text="_" rotation="90" tagg="label" x="-20" y="-5" size="9" rotate="true"/>*/
 
 	Result.append("     ");
 	Result.append("<input");
@@ -37,18 +38,27 @@
 	Result.append(QChar(34));
 	Result.append(QString::number(QET_size,10));
 	Result.append(QChar(34));
+
+	Result.append(" rotation=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_rotation,'f',2));
+	Result.append(QChar(34));
+
 	Result.append(" rotate=");
 	Result.append(QChar(34));
-	Result.append("true");
+	Result.append(QET_rotate);
 	Result.append(QChar(34));
+
 	Result.append(" text=");
 	Result.append(QChar(34));
 	Result.append(QET_text);
 	Result.append(QChar(34));
+
 	Result.append(" tagg=");
 	Result.append(QChar(34));
 	Result.append(QET_tag);
 	Result.append(QChar(34));
+
 	Result.append(" />");
 	Result.append('\n');
 

Modified: branches/dxftoqet2/src/dxf_base_types/dxf_base_input.h
===================================================================
--- branches/dxftoqet2/src/dxf_base_types/dxf_base_input.h	2015-09-17 18:53:25 UTC (rev 4212)
+++ branches/dxftoqet2/src/dxf_base_types/dxf_base_input.h	2015-09-17 19:22:51 UTC (rev 4213)
@@ -16,6 +16,7 @@
 	//QET xml var
 	double QET_x; //10
 	double QET_y; //20
+	double QET_rotation; //20
 
 	int QET_size;
 	QString QET_rotate;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/