[qet] [3844] DXF converter

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


Revision: 3844
Author:   rdsivd
Date:     2015-03-22 18:53:08 +0100 (Sun, 22 Mar 2015)
Log Message:
-----------
DXF converter
modification dans les creation du file QET
mofification on creating QET file

Modified Paths:
--------------
    branches/dxftoelmt/src/ui/dxf_elmt_output.cpp

Modified: branches/dxftoelmt/src/ui/dxf_elmt_output.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_elmt_output.cpp	2015-03-22 17:17:46 UTC (rev 3843)
+++ branches/dxftoelmt/src/ui/dxf_elmt_output.cpp	2015-03-22 17:53:08 UTC (rev 3844)
@@ -406,20 +406,41 @@
 	ElementsLine1=ElementsPart.split("<");
 	sp1=ElementsLine1.count();
 
+	/* <element y="330" orientation="0" uuid="{14cb4c1a-4583-4184-980b-a2bc938fe98a}"
+	 * type="embed://import/knx-schematics/schemasymbolen/voeding-640ma.elmt" x="580">
+	 *
+	 * <definition width="860" version="0.4"
+	 * hotspot_x="82" hotspot_y="50"
+	 * height="100" link_type="master"
+	 * type="element" ic="true" orientation="dyyy"> */
+
 	Lineout2="";
 
 	Lineout2="   ";
 	Lineout2.append("   ");
 	Lineout2.append("<element");
 
-	Lineout2.append(" x=");
+	//Lineout2.append(" x=");
+	//Lineout2.append(QChar(34));
+	//Lineout2.append("0");
+	//Lineout2.append(QChar(34));
+
+	Lineout2.append(" y=");
 	Lineout2.append(QChar(34));
 	Lineout2.append("0");
 	Lineout2.append(QChar(34));
-	Lineout2.append(" y=");
+
+	Lineout2.append(" orientation=");
 	Lineout2.append(QChar(34));
 	Lineout2.append("0");
 	Lineout2.append(QChar(34));
+
+	Lineout2.append(" uuid=");
+	Lineout2.append(QChar(34));
+	Uuidstring=QUuid::createUuid();
+	Lineout2.append(Uuidstring.toString());
+	Lineout2.append(QChar(34));
+
 	Lineout2.append(" type=");
 	Lineout2.append(QChar(34));
 	Lineout2.append("embed://import/dxfconverter/");
@@ -435,13 +456,20 @@
 	Lineout2.append(Flname);
 	Lineout2.append(".elmt");
 	Lineout2.append(QChar(34));
-	Lineout2.append(" uuid=");
+
+	//Lineout2.append(" uuid=");
+	//Lineout2.append(QChar(34));
+	//Uuidstring=QUuid::createUuid();
+	//Lineout2.append(Uuidstring.toString());
+	//Lineout2.append(QChar(34));
+
+	//Lineout2.append(" orientation=");
+	//Lineout2.append(QChar(34));
+	//Lineout2.append("0");
+	//Lineout2.append(QChar(34));
+
+	Lineout2.append(" x=");
 	Lineout2.append(QChar(34));
-	Uuidstring=QUuid::createUuid();
-	Lineout2.append(Uuidstring.toString());
-	Lineout2.append(QChar(34));
-	Lineout2.append(" orientation=");
-	Lineout2.append(QChar(34));
 	Lineout2.append("0");
 	Lineout2.append(QChar(34));
 
@@ -486,36 +514,59 @@
 		if (sp2==1)
 		{
 
+
+
 			ElementsLine2=ElementsLine1[x].split(QChar(34));
 
 			Lineout3.append("   ");
 			Lineout3.append("   ");
 			Lineout3.append("<element");
 
-			Lineout3.append(" x=");
-			Lineout3.append(QChar(34));
-			Lineout3.append(ElementsLine2[1]);
-			Lineout3.append(QChar(34));
+			//Lineout3.append(" x=");
+			//Lineout3.append(QChar(34));
+			//Lineout3.append(ElementsLine2[1]);
+			//Lineout3.append(QChar(34));
+
 			Lineout3.append(" y=");
 			Lineout3.append(QChar(34));
 			Lineout3.append(ElementsLine2[3]);
 			Lineout3.append(QChar(34));
-			Lineout3.append(" type=");
+
+			Lineout3.append(" orientation=");
 			Lineout3.append(QChar(34));
-			Lineout3.append("embed://import/dxfconverter/");
-			Lineout3.append(ElementsLine2[5]);
-			Lineout3.append(".elmt");
+			Lineout3.append(ElementsLine2[7]);
 			Lineout3.append(QChar(34));
+
+			//Lineout3.append(" type=");
+			//Lineout3.append(QChar(34));
+			//Lineout3.append("embed://import/dxfconverter/");
+			//Lineout3.append(ElementsLine2[5]);
+			//Lineout3.append(".elmt");
+			//Lineout3.append(QChar(34));
+
 			Lineout3.append(" uuid=");
 			Lineout3.append(QChar(34));
 			Uuidstring=QUuid::createUuid();
 			Lineout3.append(Uuidstring.toString());
 			Lineout3.append(QChar(34));
-			Lineout3.append(" orientation=");
+
+			//Lineout3.append(" orientation=");
+			//Lineout3.append(QChar(34));
+			//Lineout3.append(ElementsLine2[7]);
+			//Lineout3.append(QChar(34));
+
+			Lineout3.append(" type=");
 			Lineout3.append(QChar(34));
-			Lineout3.append(ElementsLine2[7]);
+			Lineout3.append("embed://import/dxfconverter/");
+			Lineout3.append(ElementsLine2[5]);
+			Lineout3.append(".elmt");
 			Lineout3.append(QChar(34));
 
+			Lineout3.append(" x=");
+			Lineout3.append(QChar(34));
+			Lineout3.append(ElementsLine2[1]);
+			Lineout3.append(QChar(34));
+
 			Lineout3.append(">");
 			Lineout3.append('\n');
 
@@ -1012,12 +1063,6 @@
 	Lineout2.append(width1);
 	Lineout2.append(QChar(34));
 
-	Lineout2.append(" height=");
-	Lineout2.append(QChar(34));
-	Lineout2.append(height1);
-	Lineout2.append(QChar(34));
-
-
 	Lineout2.append(" version=");
 	Lineout2.append(QChar(34));
 	Lineout2.append("0.4");
@@ -1033,24 +1078,29 @@
 	Lineout2.append("5");
 	Lineout2.append(QChar(34));
 
-	Lineout2.append(" type=");
+	Lineout2.append(" height=");
 	Lineout2.append(QChar(34));
-	Lineout2.append("element");
+	Lineout2.append(height1);
 	Lineout2.append(QChar(34));
 
-	Lineout2.append(" orientation=");
+	Lineout2.append(" link_type=");
 	Lineout2.append(QChar(34));
-	Lineout2.append("dyyy");
+	Lineout2.append("simple");
 	Lineout2.append(QChar(34));
 
+	Lineout2.append(" type=");
+	Lineout2.append(QChar(34));
+	Lineout2.append("element");
+	Lineout2.append(QChar(34));
+
 	Lineout2.append(" ic=");
 	Lineout2.append(QChar(34));
 	Lineout2.append("true");
 	Lineout2.append(QChar(34));
 
-	Lineout2.append(" link_type=");
+	Lineout2.append(" orientation=");
 	Lineout2.append(QChar(34));
-	Lineout2.append("simple");
+	Lineout2.append("dyyy");
 	Lineout2.append(QChar(34));
 
 	Lineout2.append(">");


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