[qet] [3777] Added dxf to set conversion (working test version) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3777
Author: rdsivd
Date: 2015-03-01 12:40:53 +0100 (Sun, 01 Mar 2015)
Log Message:
-----------
Added dxf to set conversion (working test version)
Modified Paths:
--------------
branches/dxftoelmt/src/ui/dxf_elmt_output.cpp
branches/dxftoelmt/src/ui/dxf_elmt_output.h
Modified: branches/dxftoelmt/src/ui/dxf_elmt_output.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_elmt_output.cpp 2015-02-28 11:59:07 UTC (rev 3776)
+++ branches/dxftoelmt/src/ui/dxf_elmt_output.cpp 2015-03-01 11:40:53 UTC (rev 3777)
@@ -22,7 +22,7 @@
ResultElmt.append(elmt_BlockCreation(BlockCount,Flag,BlockList,Filename1));
- ResultElmt2=elmt_BlockCreationEinde(BlockCount,Flag,BlockList,Filename1);
+ ResultElmt.append(elmt_BlockCreationEinde(BlockCount,Flag,BlockList,Filename1));
ResultElmt.append(elmt_Eof());
@@ -63,8 +63,8 @@
ResultElmt.append(qet_collection_einde(BlockCount, Flag, BlockList, Filename1));
+ ResultElmt.append(qet_Einde(BlockCount, Flag, BlockList, Filename1));
-
return Flag;
}
@@ -73,6 +73,8 @@
QString dxf_elmt_output::qet_category_einde(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -87,6 +89,8 @@
QString dxf_elmt_output::qet_category_begin(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -132,6 +136,8 @@
QString dxf_elmt_output::qet_collection_begin(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -144,6 +150,9 @@
QString dxf_elmt_output::qet_collection_element_begin(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -164,6 +173,9 @@
QString dxf_elmt_output::qet_collection_element_einde(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -181,9 +193,12 @@
QString dxf_elmt_output::qet_collection_element(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
int x;
+ QString Lineout3;
+ QString Lineout2;
+
x=0;
-
+ Lineout2="";
Lineout3="";
@@ -192,6 +207,7 @@
if (x==0 )
{
+ Lineout3="";
Lineout3.append(" ");
Lineout3.append(" ");
Lineout3.append(" ");
@@ -222,14 +238,18 @@
Lineout3.append(elmt_Einde());
+ Lineout3.append("</definition>");
- //Lineout3.append("</element>");
+ Lineout3.append('\n');
+ Lineout3.append("</element>");
+
Lineout3.append('\n');
}
else
{
+ Lineout3="";
Lineout3.append(" ");
Lineout3.append(" ");
Lineout3.append(" ");
@@ -244,8 +264,8 @@
Lineout3.append('\n');
+ Part="";
-
Part.append(BlockList[x].BlockDef);
Part.replace(QString("/partdescript"),QString("/description"));
Part.replace(QString("partdescript"),QString("description"));
@@ -268,17 +288,21 @@
Lineout3.append('\n');
}
-
+ Lineout2.append(Lineout3);
+ Lineout3="";
}
//
- return Lineout3;
+ return Lineout2;
}
QString dxf_elmt_output::qet_collection_einde(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -295,6 +319,10 @@
bool sp2;
int sp3;
int x;
+ QString Lineout2;
+ QString Lineout3;
+ QString Lineout4;
+
x=0;
ElementsPart=BlockList[0].BlockDef;
@@ -401,6 +429,9 @@
QString dxf_elmt_output::qet_elements_einde(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+
+ QString Lineout5;
+
Lineout5="";
Lineout5.append(" ");
@@ -413,6 +444,9 @@
QString dxf_elmt_output::qet_diagram_einde(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -430,6 +464,8 @@
displaycols="true" height="1020" colsize="100" order="1" rows="10" author="rds"
filename="" date="20141011" rowsize="100">*/
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -544,6 +580,9 @@
{
//<project folioSheetQuantity="0" title="" version="0.4">
+
+ QString Lineout2;
+
Lineout2="";
Lineout2="<project folioSheetQuantity=";
@@ -566,9 +605,29 @@
return Lineout2;
}
+QString dxf_elmt_output::qet_Einde(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
+{
+ //<project folioSheetQuantity="0" title="" version="0.4">
+
+
+ QString Lineout2;
+
+ Lineout2="";
+
+ Lineout2="</project>";
+
+ Lineout2.append('\n');
+
+
+
+ return Lineout2;
+}
+
QString dxf_elmt_output::qet_properties(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -580,6 +639,8 @@
QString dxf_elmt_output::qet_newdiagrams(int BlockCount, int Flag, _Block_ACAD BlockList[], QString Filename1)
{
+ QString Lineout2;
+
Lineout2="";
Lineout2=" ";
@@ -796,194 +857,214 @@
QString dxf_elmt_output::elmt_Begin()
{
+ QString Lineout2;
+ Lineout2="";
+
xwidth1=x2-x1;
xheight1=y2-y1;
width1=QString::number (xwidth1,'f',2);
height1=QString::number (xheight1,'f',2);
/* definition */
- Lineout="<definition";
+ Lineout2="<definition";
- Lineout.append(" width=");
- Lineout.append(QChar(34));
- Lineout.append(width1);
- Lineout.append(QChar(34));
+ Lineout2.append(" width=");
+ Lineout2.append(QChar(34));
+ Lineout2.append(width1);
+ Lineout2.append(QChar(34));
- Lineout.append(" height=");
- Lineout.append(QChar(34));
- Lineout.append(height1);
- Lineout.append(QChar(34));
+ Lineout2.append(" height=");
+ Lineout2.append(QChar(34));
+ Lineout2.append(height1);
+ Lineout2.append(QChar(34));
- Lineout.append(" version=");
- Lineout.append(QChar(34));
- Lineout.append("0.4");
- Lineout.append(QChar(34));
+ Lineout2.append(" version=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("0.4");
+ Lineout2.append(QChar(34));
- Lineout.append(" hotspot_x=");
- Lineout.append(QChar(34));
- Lineout.append("5");
- Lineout.append(QChar(34));
+ Lineout2.append(" hotspot_x=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("5");
+ Lineout2.append(QChar(34));
- Lineout.append(" hotspot_y=");
- Lineout.append(QChar(34));
- Lineout.append("5");
- Lineout.append(QChar(34));
+ Lineout2.append(" hotspot_y=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("5");
+ Lineout2.append(QChar(34));
- Lineout.append(" type=");
- Lineout.append(QChar(34));
- Lineout.append("element");
- Lineout.append(QChar(34));
+ Lineout2.append(" type=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("element");
+ Lineout2.append(QChar(34));
- Lineout.append(" orientation=");
- Lineout.append(QChar(34));
- Lineout.append("dyyy");
- Lineout.append(QChar(34));
+ Lineout2.append(" orientation=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("dyyy");
+ Lineout2.append(QChar(34));
- Lineout.append(" ic=");
- Lineout.append(QChar(34));
- Lineout.append("true");
- Lineout.append(QChar(34));
+ Lineout2.append(" ic=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("true");
+ Lineout2.append(QChar(34));
- Lineout.append(" lin_type=");
- Lineout.append(QChar(34));
- Lineout.append("simple");
- Lineout.append(QChar(34));
+ Lineout2.append(" lin_type=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("simple");
+ Lineout2.append(QChar(34));
- Lineout.append(">");
- Lineout.append('\n');
+ Lineout2.append(">");
+ Lineout2.append('\n');
- return Lineout;
+ return Lineout2;
}
QString dxf_elmt_output::elmt_Einde()
{
- Lineout=" ";
- Lineout.append(" ");
- Lineout.append(" ");
- Lineout.append("<terminal x=");
- Lineout.append(QChar(34));
- Lineout.append("0");
- Lineout.append(QChar(34));
+ QString Lineout2;
- Lineout.append(" y=");
+ Lineout2="";
- Lineout.append(QChar(34));
- Lineout.append("0");
- Lineout.append(QChar(34));
+ Lineout2=" ";
+ Lineout2.append(" ");
+ Lineout2.append(" ");
+ Lineout2.append("<terminal x=");
- Lineout.append(" orientation=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("0");
+ Lineout2.append(QChar(34));
- Lineout.append(QChar(34));
- Lineout.append("n");
- Lineout.append(QChar(34));
+ Lineout2.append(" y=");
- Lineout.append(" />");
- Lineout.append('\n');
+ Lineout2.append(QChar(34));
+ Lineout2.append("0");
+ Lineout2.append(QChar(34));
+ Lineout2.append(" orientation=");
+
+ Lineout2.append(QChar(34));
+ Lineout2.append("n");
+ Lineout2.append(QChar(34));
+
+ Lineout2.append(" />");
+ Lineout2.append('\n');
+
//<input x="3" y="1" size="9" rotate="true" text="_" tagg="label"/>
- Lineout.append(" ");
- Lineout.append(" ");
- Lineout.append(" ");
- Lineout.append("<input x=");
+ Lineout2.append(" ");
+ Lineout2.append(" ");
+ Lineout2.append(" ");
+ Lineout2.append("<input x=");
- Lineout.append(QChar(34));
- Lineout.append("-15");
- Lineout.append(QChar(34));
+ Lineout2.append(QChar(34));
+ Lineout2.append("-15");
+ Lineout2.append(QChar(34));
- Lineout.append(" y=");
+ Lineout2.append(" y=");
- Lineout.append(QChar(34));
- Lineout.append("0");
- Lineout.append(QChar(34));
+ Lineout2.append(QChar(34));
+ Lineout2.append("0");
+ Lineout2.append(QChar(34));
- Lineout.append(" size=");
+ Lineout2.append(" size=");
- Lineout.append(QChar(34));
- Lineout.append("9");
- Lineout.append(QChar(34));
+ Lineout2.append(QChar(34));
+ Lineout2.append("9");
+ Lineout2.append(QChar(34));
- Lineout.append(" rotate=");
+ Lineout2.append(" rotate=");
- Lineout.append(QChar(34));
- Lineout.append("true");
- Lineout.append(QChar(34));
+ Lineout2.append(QChar(34));
+ Lineout2.append("true");
+ Lineout2.append(QChar(34));
- Lineout.append(" text=");
+ Lineout2.append(" text=");
- Lineout.append(QChar(34));
- Lineout.append("_");
- Lineout.append(QChar(34));
+ Lineout2.append(QChar(34));
+ Lineout2.append("_");
+ Lineout2.append(QChar(34));
- Lineout.append(" tagg=");
+ Lineout2.append(" tagg=");
- Lineout.append(QChar(34));
- Lineout.append("label");
- Lineout.append(QChar(34));
+ Lineout2.append(QChar(34));
+ Lineout2.append("label");
+ Lineout2.append(QChar(34));
- Lineout.append(" />");
- Lineout.append('\n');
+ Lineout2.append(" />");
+ Lineout2.append('\n');
- Lineout.append(" ");
- Lineout.append("</description>");
- Lineout.append('\n');
+ Lineout2.append(" ");
+ Lineout2.append("</description>");
+ Lineout2.append('\n');
- return Lineout;
+ return Lineout2;
}
QString dxf_elmt_output::elmt_Eof()
{
- Lineout.append("</definition>");
+ QString Lineout2;
- Lineout.append('\n');
+ Lineout2="";
- return Lineout;
+ Lineout2.append("</definition>");
+
+ Lineout2.append('\n');
+
+ return Lineout2;
}
QString dxf_elmt_output::elmt_Info()
{
- Lineout=" ";
- Lineout.append("<informations>");
- Lineout.append('\n');
+ QString Lineout2;
- Lineout.append(" ");
- Lineout.append(" ");
- Lineout.append("Author convertor: Ronny Desmedt");
- Lineout.append('\n');
+ Lineout2="";
- Lineout.append(" ");
- Lineout.append(" ");
- Lineout.append("ELMT created by dxfTOelmt converter V1.0");
- Lineout.append('\n');
+ Lineout2=" ";
+ Lineout2.append("<informations>");
+ Lineout2.append('\n');
- Lineout.append(" ");
- Lineout.append("</informations>");
- Lineout.append('\n');
+ Lineout2.append(" ");
+ Lineout2.append(" ");
+ Lineout2.append("Author convertor: Ronny Desmedt");
+ Lineout2.append('\n');
- Lineout.append(" ");
- Lineout.append("<description>");
- Lineout.append('\n');
+ Lineout2.append(" ");
+ Lineout2.append(" ");
+ Lineout2.append("ELMT created by dxfTOelmt converter V1.0");
+ Lineout2.append('\n');
+ Lineout2.append(" ");
+ Lineout2.append("</informations>");
+ Lineout2.append('\n');
- return Lineout;
+ Lineout2.append(" ");
+ Lineout2.append("<description>");
+ Lineout2.append('\n');
+
+
+ return Lineout2;
}
QString dxf_elmt_output::elmt_Taal()
{
- Lineout=" ";
- Lineout.append(" ");
- Lineout.append("<names>");
- Lineout.append('\n');
+ QString Lineout2;
+ Lineout2="";
+ Lineout2=" ";
+ Lineout2.append(" ");
+ Lineout2.append("<names>");
+ Lineout2.append('\n');
+
+
/*Lineout.append(" ");
Lineout.append(" ");
Lineout.append(" ");
@@ -996,17 +1077,17 @@
Lineout.append("</name>");
Lineout.append('\n');*/
- Lineout.append(" ");
- Lineout.append(" ");
- Lineout.append(" ");
- Lineout.append("<name lang=");
- Lineout.append(QChar(34));
- Lineout.append("en");
- Lineout.append(QChar(34));
- Lineout.append(">");
- Lineout.append(Filename);
- Lineout.append("</name>");
- Lineout.append('\n');
+ Lineout2.append(" ");
+ Lineout2.append(" ");
+ Lineout2.append(" ");
+ Lineout2.append("<name lang=");
+ Lineout2.append(QChar(34));
+ Lineout2.append("en");
+ Lineout2.append(QChar(34));
+ Lineout2.append(">");
+ Lineout2.append(Filename);
+ Lineout2.append("</name>");
+ Lineout2.append('\n');
/*Lineout.append(" ");
Lineout.append(" ");
@@ -1189,13 +1270,13 @@
Lineout.append('\n');*/
- Lineout.append(" ");
- Lineout.append(" ");
- Lineout.append("</names>");
- Lineout.append('\n');
+ Lineout2.append(" ");
+ Lineout2.append(" ");
+ Lineout2.append("</names>");
+ Lineout2.append('\n');
- return Lineout;
+ return Lineout2;
}
@@ -1203,37 +1284,46 @@
{
int x;
- Lineout="";
+ //Lineout="";
+ QString Lineout2;
+ Lineout2="";
+
for(x=1;x<BlockCount;x++)
{
- Lineout.append(BlockList[x].BlockDef);
+ Lineout2.append(BlockList[x].BlockDef);
}
- return Lineout;
+ return Lineout2;
}
QString dxf_elmt_output::elmt_BlockCreationBegin(int BlockCount, int Flag, struct _Block_ACAD BlockList[], QString Filename1)
{
- Lineout="";
- Lineout.append("<parts>");
- Lineout.append('\n');
+ QString Lineout2;
- return Lineout;
+ Lineout2="";
+
+ Lineout2="";
+ Lineout2.append("<parts>");
+ Lineout2.append('\n');
+
+ return Lineout2;
}
QString dxf_elmt_output::elmt_BlockCreationEinde(int BlockCount, int Flag, struct _Block_ACAD BlockList[], QString Filename1)
{
+ QString Lineout2;
+ Lineout2="";
- Lineout="</parts>";
- Lineout.append('\n');
+ Lineout2="</parts>";
+ Lineout2.append('\n');
- return Lineout;
+ return Lineout2;
}
Modified: branches/dxftoelmt/src/ui/dxf_elmt_output.h
===================================================================
--- branches/dxftoelmt/src/ui/dxf_elmt_output.h 2015-02-28 11:59:07 UTC (rev 3776)
+++ branches/dxftoelmt/src/ui/dxf_elmt_output.h 2015-03-01 11:40:53 UTC (rev 3777)
@@ -22,10 +22,10 @@
QString ResultElmt2;
QString Filename;
- QString Lineout2;
- QString Lineout3;
- QString Lineout4;
- QString Lineout5;
+ //QString Lineout2;
+ //QString Lineout3;
+ //QString Lineout4;
+ //QString Lineout5;
QString Part;
QString ElementsPart;
QString ElementsName;
@@ -63,6 +63,7 @@
int qet(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
QString qet_Begin(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
+ QString qet_Einde(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
QString qet_properties(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
QString qet_newdiagrams(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
QString qet_diagram_begin(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);