[qet] qet/qet: [4835] some corrections on diferent files

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


Revision: 4835
Author:   rdsivd
Date:     2017-01-07 16:07:39 +0100 (Sat, 07 Jan 2017)
Log Message:
-----------
some corrections on diferent files

Modified Paths:
--------------
    branches/DXFtoQET3_DB/Convertion prestations.ods
    branches/DXFtoQET3_DB/db/dbmanager.cpp
    branches/DXFtoQET3_DB/dxftoqet3db.cpp
    branches/DXFtoQET3_DB/dxftoqet3db.h
    branches/DXFtoQET3_DB/dxftoqet3db.ui
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.cpp

Modified: branches/DXFtoQET3_DB/Convertion prestations.ods
===================================================================
(Binary files differ)

Modified: branches/DXFtoQET3_DB/db/dbmanager.cpp
===================================================================
--- branches/DXFtoQET3_DB/db/dbmanager.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/db/dbmanager.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -1311,7 +1311,6 @@
 	Query_block.exec();
 }
 
-
 void dbManager::dbManager_load_dxf_list(const QString &pathname)
 {
 	QSqlQuery Query_List;

Modified: branches/DXFtoQET3_DB/dxftoqet3db.cpp
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/dxftoqet3db.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -14,7 +14,7 @@
 DXFtoQET3DB::DXFtoQET3DB(QWidget *parent) :
 	QWidget(parent),
 	ui(new Ui::DXFtoQET3DB)
-{
+	{
 
 	ui->setupUi(this);
 
@@ -54,7 +54,9 @@
 	ui->progressBar1->setValue(0);
 	ui->progressBar1->repaint();
 
+	connect (elmt_entities::elmt_entities ,SIGNAL (Signal1(const QString &Waarde1 )),this,SLOT(update_proces(const QString &waarde1)));
 
+
 }
 
 DXFtoQET3DB::~DXFtoQET3DB()
@@ -74,7 +76,6 @@
 	}
 }
 
-
 void DXFtoQET3DB::on_OpenFile_clicked()
 {
 	ui->MainTab->setCurrentIndex(0);
@@ -5606,6 +5607,8 @@
 
 	elmt_entities NewEntity;
 
+	//connect(NewEntity ,SIGNAL (Signal1(const QString &)),this ,SLOT(update_proces(const QString &)));
+
 	ui->dxf_log->insertPlainText("Add DXF entities to ELMT file \n");
 	ui->dxf_log->moveCursor(QTextCursor::End);
 	ui->dxf_log->repaint();
@@ -5757,3 +5760,9 @@
 	ui->progressBar1->text()=text1;
 	ui->progressBar1->repaint();
 }
+
+void DXFtoQET3DB::update_proces(QString &waarde1)
+{
+	ui->Procesing_dxf->setPlainText(waarde1);
+	ui->Procesing_dxf->repaint();
+}

Modified: branches/DXFtoQET3_DB/dxftoqet3db.h
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.h	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/dxftoqet3db.h	2017-01-07 15:07:39 UTC (rev 4835)
@@ -34,7 +34,8 @@
 #include "src/ELMT_steps/elmt_entities.h"
 
 
-namespace Ui {
+namespace Ui
+{
 	class DXFtoQET3DB;
 }
 
@@ -269,19 +270,6 @@
 		QStringList thumbnailimage_split;
 		//QStringList split_tables_list;
 
-	signals:
-
-		void send_text (const QString &text2);
-		void send_min(const int &valuemin);
-		void send_max(const int &valuemax);
-		void send_actual(const int &valueactual);
-
-
-	protected:
-		void changeEvent(QEvent *e);
-
-		private slots:
-
 		void on_OpenFile_clicked();
 
 		void on_savepath_2_clicked();
@@ -339,11 +327,28 @@
 		void on_SavetoELMT_clicked();
 		void on_Convert_dxf_blocks_clicked();
 		void on_Convert_dxf_entities_clicked();
+
+	signals:
+
+		void send_text (const QString &text2);
+		void send_min(const int &valuemin);
+		void send_max(const int &valuemax);
+		void send_actual(const int &valueactual);
+
+
+	public slots:
+
+
 		void on_progressBar_valueChanged(int value1);
 		void on_progressBar_valueMin(int value1);
 		void on_progressBar_valueMax(int value1);
 		void on_progressBar_text(QString text1);
 
+		void update_proces(QString &waarde1);
+
+	protected:
+		void changeEvent(QEvent *e);
+
 		private:
 		Ui::DXFtoQET3DB *ui;
 };

Modified: branches/DXFtoQET3_DB/dxftoqet3db.ui
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.ui	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/dxftoqet3db.ui	2017-01-07 15:07:39 UTC (rev 4835)
@@ -38,7 +38,7 @@
     <enum>QTabWidget::West</enum>
    </property>
    <property name="currentIndex">
-    <number>5</number>
+    <number>1</number>
    </property>
    <widget class="QWidget" name="Log">
     <attribute name="title">
@@ -70,11 +70,30 @@
       <rect>
        <x>10</x>
        <y>10</y>
-       <width>981</width>
+       <width>621</width>
        <height>551</height>
       </rect>
      </property>
+     <property name="lineWrapMode">
+      <enum>QPlainTextEdit::NoWrap</enum>
+     </property>
     </widget>
+    <widget class="QPlainTextEdit" name="Procesing_dxf">
+     <property name="geometry">
+      <rect>
+       <x>640</x>
+       <y>10</y>
+       <width>351</width>
+       <height>551</height>
+      </rect>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::Panel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+    </widget>
    </widget>
    <widget class="QWidget" name="Home">
     <attribute name="title">

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -13,7 +13,7 @@
  *  line-weight:normal;filling:none;color:black"
  *  start="-30" angle="-299"/> */
 
-	Result_arc="";
+	Result_arc.clear();
 
 	DXF_layer_control New_Layer_Control;
 	DXF_Ltype_control New_LType_Control;

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -11,7 +11,7 @@
 	 * style="line-style:normal;line-weight:thin;filling:none;color:black"
 	 * diameter="22"/> */
 
-	Result_circle="";
+	Result_circle.clear();
 
 	DXF_layer_control New_Layer_Control;
 	DXF_Ltype_control New_LType_Control;

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -12,7 +12,7 @@
 	 * antialias="true"
 	 * height="13"
 	 * style="line-style:normal;line-weight:normal;filling:none;color:black"/>*/
-	Result_ellipse="";
+	Result_ellipse.clear();
 
 	DXF_layer_control New_Layer_Control;
 	DXF_Ltype_control New_LType_Control;

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -18,6 +18,7 @@
 
 	DXF_Text_control New_Text_control;
 
+	Result.clear();
 
 	/* <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"/>*/

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -8,7 +8,7 @@
 QString dxf_base_line::CreateElmt()
 {
 
-	Result="";
+	Result.clear();
 
 	DXF_layer_control New_Layer_Control;
 	DXF_Ltype_control New_LType_Control;

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -26,7 +26,7 @@
 	 * x1="107" y1="-179" x2="107" y2="-179"
 	 * x3="107" y3="-179" x4="107" y4="-179" /> */
 
-	Result_polyline="";
+	Result_polyline.clear();
 
 	DXF_layer_control New_Layer_Control;
 	DXF_Ltype_control New_LType_Control;
@@ -77,20 +77,20 @@
 	Result_polyline.append(QET_antialias);
 	Result_polyline.append(QChar(34));
 
-	for (count_segments=1; (count_segments<segments+1) and (count_segments<QET_L_POLYLINE);count_segments++)
+	for (count_segments=0; (count_segments<segments-1) and (count_segments<QET_L_POLYLINE);count_segments++)
 	{
 		Result_polyline.append(" x");
-		Result_polyline.append(QString::number(count_segments));
+		Result_polyline.append(QString::number(count_segments+1));
 		Result_polyline.append("=");
 		Result_polyline.append(QChar(34));
-		Result_polyline.append(QString::number(QET_x[count_segments-1],'f',0));
+		Result_polyline.append(QString::number(QET_x[count_segments],'f',2));
 		Result_polyline.append(QChar(34));
 
 		Result_polyline.append(" y");
-		Result_polyline.append(QString::number(count_segments));
+		Result_polyline.append(QString::number(count_segments+1));
 		Result_polyline.append("=");
 		Result_polyline.append(QChar(34));
-		Result_polyline.append(QString::number(-QET_y[count_segments-1],'f',0));
+		Result_polyline.append(QString::number(-QET_y[count_segments],'f',2));
 		Result_polyline.append(QChar(34));
 	}
 

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -14,7 +14,7 @@
 
 
 
-	Result_rect="";
+	Result_rect.clear();
 
 	DXF_layer_control New_Layer_Control;
 	DXF_Ltype_control New_LType_Control;

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -14,6 +14,8 @@
 
 	 /* <terminal x="-10" y="-20" orientation="n"/> */
 
+	Result.clear();
+
 	Result.append("     ");
 	Result.append("<terminal");
 

Modified: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -12,7 +12,7 @@
 		<text x="-7" y="-8" size="3" text="HC-SR04"/>
 		<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
 
-	Result_text="";
+	Result_text.clear();
 
 	DXF_Text_control New_Text_control;
 

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -63,6 +63,8 @@
 	//while (NewQuery.next() and end_block==0)
 	//while (NewQuery.next())
 
+	//QSqlRecord Record2=NewQuery.record();
+
 	while (NewQuery.next() and end_block==0)
 	{
 
@@ -418,7 +420,12 @@
 						}
 						else
 						{
-							count_vertex++;
+							if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
+							{
+								end_seqend=1;
+							}
+
+							//count_vertex++;
 						}
 						if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
 						{
@@ -540,7 +547,13 @@
 						}
 						else
 						{
-							count_vertex++;
+
+							if (count_vertex>max_vertex)
+							{
+								end_lwpoly=1;
+							}
+
+							//count_vertex++;
 						}
 						if (count_vertex>max_vertex)
 						{

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -63,6 +63,8 @@
 	//while (NewQuery.next() and end_block==0)
 	//while (NewQuery.next())
 
+	//QSqlRecord Record2=NewQuery.record();
+
 	while (NewQuery.next() and end_block==0)
 	{
 
@@ -420,7 +422,12 @@
 						}
 						else
 						{
-							count_vertex++;
+							if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
+							{
+								end_seqend=1;
+							}
+
+							//count_vertex++;
 						}
 						if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
 						{
@@ -541,7 +548,12 @@
 						}
 						else
 						{
-							count_vertex++;
+							if (count_vertex>max_vertex)
+							{
+								end_lwpoly=1;
+							}
+
+							//count_vertex++;
 						}
 
 						if (count_vertex>max_vertex)

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -12,6 +12,7 @@
 elmt_entities::elmt_entities(QWidget *parent) : QWidget(parent)
 {
 
+	//connect (this ,SIGNAL (Signal1(const QString &)),DXFtoQET3DB,SLOT(update_proces(const QString &)));
 }
 
 void elmt_entities::Open_SQL_DB (QString ELMT_filename)
@@ -27,7 +28,7 @@
 {
 
 	dbManager mydb2;
-	mydb2.dbManager1(ELMT_filename);
+	mydb2.dbManager_close(ELMT_filename);
 
 
 }
@@ -40,12 +41,12 @@
 	DXF_main_base[0].QDXF_entitie_ellipse_color="black";
 	DXF_main_base[0].QDXF_entitie_input_color="black";
 	DXF_main_base[0].QDXF_entitie_line_color="black";
-	DXF_main_base[0].QDXF_entitie_lwpolyline_color="black";
-	DXF_main_base[0].QDXF_entitie_polyline_color="black";
+	DXF_main_base[0].QDXF_entitie_lwpolyline_color="red";
+	DXF_main_base[0].QDXF_entitie_polyline_color="blue";
 	DXF_main_base[0].QDXF_entitie_rectangel_color="black";
 	DXF_main_base[0].QDXF_entitie_terminal_color="black";
 	DXF_main_base[0].QDXF_entitie_text_color="black";
-	DXF_main_base[0].QDXF_entitie_solid_color="black";
+	DXF_main_base[0].QDXF_entitie_solid_color="green";
 
 	xcount=0;
 	Logtext="";
@@ -53,10 +54,6 @@
 
 	QSqlQuery NewQuery("SELECT * FROM dxf_entities");
 
-
-
-
-
 	dxf_base_line New_DXF_Line;
 	dxf_base_circle New_DXF_Circle;
 	dxf_base_arc New_DXF_Arc;
@@ -75,6 +72,10 @@
 
 	Logtext.append("Insert basic ELMT items\n");
 
+	Signal_waarde1="Insert basic ELMT items\n";
+
+	emit Signal1(Signal_waarde1);
+
 	/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
 		<text x="-7" y="-8" size="3" text="HC-SR04"/>
 		<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
@@ -109,7 +110,9 @@
 
 	Logtext.append("Converting DXF entities\n");
 
+	//QSqlRecord Record2=NewQuery.record();
 
+
 	while (NewQuery.next())
 	{
 
@@ -419,7 +422,12 @@
 				}
 				else
 				{
-					count_vertex++;
+					if (Record3.value("Command").toString()=="SEQEND" and Record3.value("Command_count").toInt()==0)
+					{
+						end_seqend=1;
+					}
+
+					//count_vertex++;
 				}
 				if (Record3.value("Command").toString()=="SEQEND" and Record3.value("Command_count").toInt()==0)
 				{
@@ -435,7 +443,6 @@
 
 		}
 
-
 		if (Record2.value("Command").toString()=="INSERT" and Record2.value("Command_count").toInt()==0)
 		{
 
@@ -526,7 +533,12 @@
 				}
 				else
 				{
-					count_vertex++;
+					if (count_vertex>max_vertex)
+					{
+						end_lwpoly=1;
+					}
+
+					//count_vertex++;
 				}
 
 				if (count_vertex>max_vertex)

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h	2017-01-07 15:07:39 UTC (rev 4835)
@@ -25,6 +25,7 @@
 class elmt_entities : public QWidget
 {
 	Q_OBJECT
+
 	public:
 	explicit elmt_entities(QWidget *parent = 0);
 
@@ -43,6 +44,8 @@
 	QString Recordvalue;
 	QString Recordvalue2;
 
+	QString Signal_waarde1;
+
 	QString ELMT_ID_instruction;
 
 
@@ -53,6 +56,8 @@
 
 	signals:
 
+	void Signal1 (QString &Waarde1);
+
 	public slots:
 };
 

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -25,7 +25,7 @@
 {
 
 	dbManager mydb2;
-	mydb2.dbManager1(ELMT_filename);
+	mydb2.dbManager_close (ELMT_filename);
 
 
 }

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.cpp	2017-01-05 19:32:52 UTC (rev 4834)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.cpp	2017-01-07 15:07:39 UTC (rev 4835)
@@ -89,7 +89,7 @@
 void elmt_tables::Close_SQL_DB (QString ELMT_filename)
 {
 	dbManager mydb2;
-	mydb2.dbManager1(ELMT_filename);
+	mydb2.dbManager_close(ELMT_filename);
 }
 
 void elmt_tables::GetTable_info (QString ELMT_filename)


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