[qet] [3785] modify conversion of names to lower case |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 3785
Author: rdsivd
Date: 2015-03-02 21:41:19 +0100 (Mon, 02 Mar 2015)
Log Message:
-----------
modify conversion of names to lower case
and special characters =,+,* to _
Modified Paths:
--------------
branches/dxftoelmt/src/ui/dxf_block.cpp
branches/dxftoelmt/src/ui/dxf_elmt_output.cpp
branches/dxftoelmt/src/ui/dxf_insert.cpp
Modified: branches/dxftoelmt/src/ui/dxf_block.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_block.cpp 2015-03-02 20:16:07 UTC (rev 3784)
+++ branches/dxftoelmt/src/ui/dxf_block.cpp 2015-03-02 20:41:19 UTC (rev 3785)
@@ -59,10 +59,31 @@
BlockNames=Load_dxf_output.elmt_Taal();
+ /* definition width="0.00" height="-3.00"
+ * version="0.4" hotspot_x="5" hotspot_y="5"
+ * type="element" orientation="dyyy" ic="true"
+ * link_type="simple" */
Lineout=" ";
- Lineout.append("<part hotspot_x=");
+ Lineout.append("<part");
+
+ Lineout.append(" width=");
Lineout.append(QChar(34));
+ Lineout.append("0.00");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" version=");
+ Lineout.append(QChar(34));
+ Lineout.append("0.4");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" height=");
+ Lineout.append(QChar(34));
+ Lineout.append("0.00");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" hotspot_x=");
+ Lineout.append(QChar(34));
Lineout.append(QString::number(center_x,'f',2));
Lineout.append(QChar(34));
@@ -71,12 +92,31 @@
Lineout.append(QString::number(center_y,'f',2));
Lineout.append(QChar(34));
+ Lineout.append(" type=");
+ Lineout.append(QChar(34));
+ Lineout.append("element");
+ Lineout.append(QChar(34));
- Lineout.append(" name=");
+ Lineout.append(" orientation=");
Lineout.append(QChar(34));
- Lineout.append(BlockName);
+ Lineout.append("dyyy");
Lineout.append(QChar(34));
+ Lineout.append(" ic=");
+ Lineout.append(QChar(34));
+ Lineout.append("true");
+ Lineout.append(QChar(34));
+
+ Lineout.append(" link_type=");
+ Lineout.append(QChar(34));
+ Lineout.append("simple");
+ Lineout.append(QChar(34));
+
+ //Lineout.append(" name=");
+ //Lineout.append(QChar(34));
+ //Lineout.append(BlockName);
+ //Lineout.append(QChar(34));
+
Lineout.append(" >");
Lineout.append('\n');
Modified: branches/dxftoelmt/src/ui/dxf_elmt_output.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_elmt_output.cpp 2015-03-02 20:16:07 UTC (rev 3784)
+++ branches/dxftoelmt/src/ui/dxf_elmt_output.cpp 2015-03-02 20:41:19 UTC (rev 3785)
@@ -213,6 +213,7 @@
Lineout2.append(" name=");
Lineout2.append(QChar(34));
Lineout2.append(Filename1);
+
Lineout2.append(QChar(34));
Lineout2.append(">");
Lineout2.append(QChar(34));
@@ -245,6 +246,7 @@
int x;
QString Lineout3;
QString Lineout2;
+ QString Flname;
x=0;
@@ -265,7 +267,16 @@
Lineout3.append("<element");
Lineout3.append(" name=");
Lineout3.append(QChar(34));
- Lineout3.append(Filename1);
+
+ Flname="";
+ Flname=Filename1.toLower();
+ Flname.replace(QString("="),QString("_"));
+ Flname.replace(QString("+"),QString("_"));
+ Flname.replace(QString("*"),QString("_"));
+ //Flname.toLower();
+
+ Lineout3.append(Flname);
+ Lineout3.append(".elmt");
Lineout3.append(QChar(34));
Lineout3.append(">");
@@ -307,7 +318,18 @@
Lineout3.append("<element");
Lineout3.append(" name=");
Lineout3.append(QChar(34));
- Lineout3.append(BlockList[x].BlockName);
+
+
+ Flname="";
+ Flname=BlockList[x].BlockName.toLower();
+ Flname.replace(QString("="),QString("_"));
+ Flname.replace(QString("+"),QString("_"));
+ Flname.replace(QString("*"),QString("_"));
+ //Flname.toLower();
+
+
+ Lineout3.append(Flname);
+ Lineout3.append(".elmt");
Lineout3.append(QChar(34));
Lineout3.append(">");
@@ -372,6 +394,7 @@
QString Lineout2;
QString Lineout3;
QString Lineout4;
+ QString Flname;
x=0;
@@ -399,7 +422,16 @@
Lineout2.append(" type=");
Lineout2.append(QChar(34));
Lineout2.append("embed://import/dxfconverter/");
- Lineout2.append(Filename1);
+
+
+ Flname="";
+ Flname=Filename1.toLower();
+ Flname.replace(QString("="),QString("_"));
+ Flname.replace(QString("+"),QString("_"));
+ Flname.replace(QString("*"),QString("_"));
+
+
+ Lineout2.append(Flname);
Lineout2.append(".elmt");
Lineout2.append(QChar(34));
Lineout2.append(" uuid=");
Modified: branches/dxftoelmt/src/ui/dxf_insert.cpp
===================================================================
--- branches/dxftoelmt/src/ui/dxf_insert.cpp 2015-03-02 20:16:07 UTC (rev 3784)
+++ branches/dxftoelmt/src/ui/dxf_insert.cpp 2015-03-02 20:41:19 UTC (rev 3785)
@@ -14,6 +14,7 @@
QString y_center;
QString part_name;
QString rotation1;
+ QString Flname;
double center_x;
double center_y;
@@ -65,7 +66,15 @@
Lineout.append(" name=");
Lineout.append(QChar(34));
- Lineout.append(part_name);
+
+ Flname="";
+ Flname=part_name.toLower();
+ Flname.replace(QString("="),QString("_"));
+ Flname.replace(QString("+"),QString("_"));
+ Flname.replace(QString("*"),QString("_"));
+
+
+ Lineout.append(Flname);
Lineout.append(QChar(34));
Lineout.append(" rotation=");
- Messages sorted by: [ date | thread ]
- Prev by Date:
[qet] [3784] Refresh .pro to Qt5 libs
- Next by Date:
[qet] [3786] Update TS files for Qt5 -> /usr/lib/x86_64-linux-gnu/qt5/bin/ lupdate -noobsolete qelectrotech.pro -ts lang/qet_{en,es,ru,pt,cs,pl,ca,de ,ro,it,ar,sl,hr,el,nl,be}.ts
- Previous by thread:
[qet] [3784] Refresh .pro to Qt5 libs
- Next by thread:
[qet] [3786] Update TS files for Qt5 -> /usr/lib/x86_64-linux-gnu/qt5/bin/ lupdate -noobsolete qelectrotech.pro -ts lang/qet_{en,es,ru,pt,cs,pl,ca,de ,ro,it,ar,sl,hr,el,nl,be}.ts