[qet] qet/qet: [4851] minor changes

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


Revision: 4851
Author:   rdsivd
Date:     2017-01-15 23:07:25 +0100 (Sun, 15 Jan 2017)
Log Message:
-----------
minor changes

Modified Paths:
--------------
    branches/DXFtoQET3_DB/dxftoqet3db.cpp
    branches/DXFtoQET3_DB/dxftoqet3db.h
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h

Modified: branches/DXFtoQET3_DB/dxftoqet3db.cpp
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.cpp	2017-01-15 19:36:40 UTC (rev 4850)
+++ branches/DXFtoQET3_DB/dxftoqet3db.cpp	2017-01-15 22:07:25 UTC (rev 4851)
@@ -49,6 +49,8 @@
 	ui->progressBar1->repaint();
 
 	connect (this ,SIGNAL (send_log(const QString &)),this,SLOT(update_log(const QString &)));
+	connect (this, SIGNAL (send_elmt(const QString &)),this,SLOT(update_elmt(const QString &)));
+	connect (this, SIGNAL (send_process(const QString &)),this,SLOT(update_proces(const QString &)));
 
 	connect (this,SIGNAL(send_text(const QString &)),this,SLOT(on_progressBar_text(const QString &)));
 	connect (this,SIGNAL(send_min(const int &)),this,SLOT(on_progressBar_valueMin(const int &)));
@@ -5117,33 +5119,26 @@
 	DXF_main_base[0].QDXF_text_color="black";
 	DXF_main_base[0].QDXF_solid_color="black";
 
+	Signal_log1.clear();
+	Signal_log1.append("============================================================================");
+	Signal_log1.append(QTime::currentTime().toString());
+	Signal_log1.append(" - Start creating elmt : ");
+	Signal_log1.append(QString::number(entities_max_items));
+	Signal_log1.append("============================================================================");
 
-	ui->dxf_log->insertPlainText("============================================================================\n");
+	emit send_log(Signal_log1);
 
-	ui->dxf_log->insertPlainText(QTime::currentTime().toString());
-	ui->dxf_log->insertPlainText("=> Start creating converting to ELMT \n");
-	ui->dxf_log->insertPlainText("============================================================================\n");
-
-
-	ui->dxf_log->moveCursor(QTextCursor::End);
-	ui->dxf_log->repaint();
-
 	Filename_db=DXF_main_base[0].dxf_savepath + "/" +DXF_main_base[0].dxf_openfile;
 	Filename_db.append(".db3");
 
-	ui->dxf_log->insertPlainText("Open : ");
-	ui->dxf_log->insertPlainText(Filename_db);
-	ui->dxf_log->insertPlainText("\n");
-	ui->dxf_log->moveCursor(QTextCursor::End);
-	ui->dxf_log->repaint();
+	Signal_log1.clear();
+	Signal_log1.append("Open : ");
+	Signal_log1.append(Filename_db);
+	Signal_log1.append("\n");
+	Signal_log1.append("Get dxf Header information");
 
+	emit send_log(Signal_log1);
 
-
-	ui->dxf_log->insertPlainText("Get dxf Header information\n");
-	ui->dxf_log->moveCursor(QTextCursor::End);
-	ui->dxf_log->repaint();
-
-
 	ELMT_header_steps NewHeader;
 
 	NewHeader.Open_SQL_DB(Filename_db);
@@ -5154,10 +5149,11 @@
 
 	elmt_tables NewLayerTable;
 
-	ui->dxf_log->insertPlainText("Get dxf Layer information\n");
-	ui->dxf_log->moveCursor(QTextCursor::End);
-	ui->dxf_log->repaint();
+	Signal_log1.clear();
+	Signal_log1.append("Get dxf Layer information");
 
+	emit send_log(Signal_log1);
+
 	NewLayerTable.Open_SQL_DB(Filename_db);
 
 	ui->dxf_log->insertPlainText(NewLayerTable.Get_Tables_Layers(Filename_db));
@@ -5168,15 +5164,14 @@
 	ui->dxf_log->moveCursor(QTextCursor::End);
 	ui->dxf_log->repaint();
 
-
-
 	ResultELMT="";
 	BaseELMT NewBase;
 
-	ui->dxf_log->insertPlainText("Creating header of ELMT file \n");
-	ui->dxf_log->moveCursor(QTextCursor::End);
-	ui->dxf_log->repaint();
+	Signal_log1.clear();
+	Signal_log1.append("Creating header of ELMT file");
 
+	emit send_log(Signal_log1);
+
 	NewBase.ELMT_definition_width=NewHeader.Calc_Width();
 	NewBase.ELMT_definition_height=NewHeader.Calc_Height();
 	NewBase.ELMT_definition_version="0.51";
@@ -5207,74 +5202,65 @@
 
 	//ResultELMT.append(NewBase.DefinitionStart());
 	DXF_Entities_List.DXF_Result.append(NewBase.DefinitionStart());
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
+	emit send_elmt(Signal_elmt1);
 
 	//ResultELMT.append(NewBase.Uuid());
 	DXF_Entities_List.DXF_Result.append(NewBase.Uuid());
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
+	emit send_elmt(Signal_elmt1);
 
 	//ResultELMT.append(NewBase.Names());
 	DXF_Entities_List.DXF_Result.append(NewBase.Names());
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
+	emit send_elmt(Signal_elmt1);
 
 	//ResultELMT.append(NewBase.KindInformation());
 	DXF_Entities_List.DXF_Result.append(NewBase.KindInformation());
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
+	emit send_elmt(Signal_elmt1);
 
 	//ResultELMT.append(NewBase.Informations());
 	DXF_Entities_List.DXF_Result.append(NewBase.Informations());
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
+	emit send_elmt(Signal_elmt1);
 
 	//ResultELMT.append(NewBase.DescriptionStart());
 	DXF_Entities_List.DXF_Result.append(NewBase.DescriptionStart());
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
+	emit send_elmt(Signal_elmt1);
 
-	ui->ELMT_Result->clear();
-
 	elmt_entities NewEntity(this);
 
 	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();
+	connect(&NewEntity ,SIGNAL (send_log(const QString &)),this ,SLOT(update_log(const QString &)));
+	connect(&NewEntity ,SIGNAL (send_elmt(const QString &)),this ,SLOT(update_elmt(const QString &)));
 
+
+	Signal_log1.clear();
+	Signal_log1.append("Add DXF entities to ELMT file");
+
+	emit send_log(Signal_log1);
+
 	NewEntity.Open_SQL_DB(Filename_db);
 
 	ui->ELMT_Result->clear();
@@ -5286,51 +5272,38 @@
 
 	NewEntity.Close_SQL_DB(Filename_db);
 
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
+	emit send_elmt(Signal_elmt1);
 
-	//ResultELMT.append(DXF_Entities_List.DXF_Result);
-	//DXF_Entities_List.DXF_Result;
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
-
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
-
-
-
 	//ResultELMT.append(NewBase.DescriptionEnd());
 	DXF_Entities_List.DXF_Result.append(NewBase.DescriptionEnd());
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
+	emit send_elmt(Signal_elmt1);
 
 	//ResultELMT.append(NewBase.DefinitionEnd());
 	DXF_Entities_List.DXF_Result.append(NewBase.DefinitionEnd());
-	ResultELMT=DXF_Entities_List.DXF_Result;
 
-	ui->ELMT_Result->clear();
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	ui->ELMT_Result->insertPlainText(ResultELMT);
-	ui->ELMT_Result->moveCursor(QTextCursor::End);
-	ui->ELMT_Result->repaint();
+	emit send_elmt(Signal_elmt1);
 
-	ui->dxf_log->insertPlainText("DXF file converted to ELMT file\n");
-	ui->dxf_log->moveCursor(QTextCursor::End);
-	ui->dxf_log->repaint();
+	Signal_log1.clear();
+	Signal_log1.append("DXF file converted to ELMT file");
+	Signal_log1.append("\n");
+	Signal_log1.append("============================================================================\n");
+	Signal_log1.append(QTime::currentTime().toString());
+	Signal_log1.append(" => End of converting DXF to ELMT \n");
+	Signal_log1.append("============================================================================");
 
-	ui->dxf_log->insertPlainText("============================================================================\n");
+	emit send_log(Signal_log1);
 
-	ui->dxf_log->insertPlainText(QTime::currentTime().toString());
-	ui->dxf_log->insertPlainText("=> End of converting DXF to ELMT \n");
-	ui->dxf_log->insertPlainText("============================================================================\n");
-
-
 }
 
 void DXFtoQET3DB::on_Choose_DB_clicked()

Modified: branches/DXFtoQET3_DB/dxftoqet3db.h
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.h	2017-01-15 19:36:40 UTC (rev 4850)
+++ branches/DXFtoQET3_DB/dxftoqet3db.h	2017-01-15 22:07:25 UTC (rev 4851)
@@ -271,6 +271,7 @@
 		//QStringList split_tables_list;
 
 		QString Signal_log1;
+		QString Signal_elmt1;
 
 
 	public:
@@ -326,6 +327,8 @@
 		void send_actual(const int &valueactual);
 
 		void send_log(const QString &Waarde2);
+		void send_elmt(const QString &Waarde3);
+		void send_process(const QString &Waarde4);
 
 
 	public slots:

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp	2017-01-15 19:36:40 UTC (rev 4850)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp	2017-01-15 22:07:25 UTC (rev 4851)
@@ -71,6 +71,15 @@
 		QSqlRecord Record2=NewQuery.record();
 		Recordvalue=Record2.value("Command").toString();
 
+		Signal_waarde1.clear();
+		Signal_waarde1.append(QET_handle);
+		Signal_waarde1.append(" : ");
+		Signal_waarde1.append(Record2.value("Command").toString());
+		Signal_waarde1.append(" : ");
+		Signal_waarde1.append(Record2.value("dxf_5").toString());
+
+		emit Signal1(Signal_waarde1);
+
 		if (Record2.value("Command_count").toInt()==0 and Record2.value("Command").toString()=="BLOCK")
 		{
 			Block_count++;
@@ -532,7 +541,7 @@
 						Logtext.append(" \n");
 					}
 
-					while (end_lwpoly==0 and count_vertex<max_vertex+1)
+					while (end_lwpoly==0 and count_vertex<max_vertex-1)
 					{
 						NewQuery.next();
 						QSqlRecord Record4=NewQuery.record();

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h	2017-01-15 19:36:40 UTC (rev 4850)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h	2017-01-15 22:07:25 UTC (rev 4851)
@@ -80,6 +80,7 @@
 	QString DXF_Block_Value;
 	QString DXF_Block_Name;
 
+	QString Signal_waarde1;
 
 
 	QString Insert_Block();
@@ -87,6 +88,8 @@
 
 	signals:
 
+	void Signal1 (const QString &Waarde1);
+
 	public slots:
 };
 

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp	2017-01-15 19:36:40 UTC (rev 4850)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp	2017-01-15 22:07:25 UTC (rev 4851)
@@ -55,7 +55,10 @@
 	dxf_base_polyline New_DXF_SOLID;
 	elmt_block_level2 New_DXF_blocks2;
 
+	connect(&New_DXF_blocks2 ,SIGNAL (Signal1(const QString &)),parent() ,SLOT(update_proces(const QString &)));
 
+
+
 	Logtext.append("Converting DXF blocks\n");
 
 	end_block=0;
@@ -71,6 +74,16 @@
 		QSqlRecord Record2=NewQuery.record();
 		Recordvalue=Record2.value("Command").toString();
 
+
+		Signal_waarde1.clear();
+		Signal_waarde1.append(QET_handle);
+		Signal_waarde1.append(" : ");
+		Signal_waarde1.append(Record2.value("Command").toString());
+		Signal_waarde1.append(" : ");
+		Signal_waarde1.append(Record2.value("dxf_5").toString());
+
+		emit Signal1(Signal_waarde1);
+
 		if (Record2.value("Command_count").toInt()==0 and Record2.value("Command").toString()=="BLOCK")
 		{
 			Block_count++;
@@ -84,6 +97,8 @@
 
 		DXF_Block_Name=Record2.value("dxf_2").toString();
 
+
+
 		if (Record2.value("Command").toString()=="BLOCK" and Record2.value("dxf_2").toString()==Block_name)
 		{
 			end_block=0;
@@ -93,6 +108,17 @@
 				NewQuery.next();
 				QSqlRecord Record3=NewQuery.record();
 
+				Signal_waarde1.clear();
+				Signal_waarde1.append(QET_handle);
+				Signal_waarde1.append(" : ");
+				Signal_waarde1.append(Record2.value("Command").toString());
+				Signal_waarde1.append(" : ");
+				Signal_waarde1.append(Record2.value("dxf_5").toString());
+				Signal_waarde1.append(" : ");
+				Signal_waarde1.append(Record3.value("Command_count").toInt());
+
+				emit Signal1(Signal_waarde1);
+
 				if (Record3.value("Command").toString()=="LINE" and Record3.value("Command_count").toInt()==0)
 				{
 					/*<line length1="1.5" length2="1.5" antialias="false"
@@ -471,16 +497,18 @@
 					}
 					New_DXF_blocks2.Block_rotation=Record3.value("dxf_43").toDouble();
 
-					Logtext.append("block : ");
-					Logtext.append(Record3.value("dxf_2").toString());
-					Logtext.append(" inside block :");
-					Logtext.append(FromBlock);
-					Logtext.append(" will be converted as a drawing part");
-					Logtext.append(" \n");
+					Signal_waarde1.clear();
+					Signal_waarde1.append("block : ");
+					Signal_waarde1.append(Record3.value("dxf_2").toString());
+					Signal_waarde1.append(" inside block :");
+					Signal_waarde1.append(FromBlock);
+					Signal_waarde1.append(" will be converted as a part of the elmt");
 
+					emit Signal1(Signal_waarde1);
+
 					New_DXF_blocks2.FromBlock=Record3.value("dxf_2").toString();
 
-					Logtext.append(New_DXF_blocks2.Insert_Block());
+					//Logtext.append(New_DXF_blocks2.Insert_Block());
 					//DXF_Entities_List.DXF_Result.append(New_DXF_blocks2.Insert_Block());
 
 				}
@@ -533,7 +561,7 @@
 						Logtext.append(" \n");
 					}
 
-					while (end_lwpoly==0 and count_vertex<max_vertex+1)
+					while (end_lwpoly==0 and count_vertex<max_vertex-1)
 					{
 						NewQuery.next();
 						QSqlRecord Record4=NewQuery.record();

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h	2017-01-15 19:36:40 UTC (rev 4850)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h	2017-01-15 22:07:25 UTC (rev 4851)
@@ -80,12 +80,17 @@
 	QString DXF_Block_Value;
 	QString DXF_Block_Name;
 
+	QString Signal_waarde1;
 
-
 	QString Insert_Block();
 
 	signals:
 
+	void Signal1 (const QString &Waarde1);
+	void send_log(const QString &Waarde2);
+	void send_elmt(const QString &Waarde3);
+	void send_process(const QString &Waarde4);
+
 	public slots:
 
 };

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp	2017-01-15 19:36:40 UTC (rev 4850)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp	2017-01-15 22:07:25 UTC (rev 4851)
@@ -66,11 +66,12 @@
 	dxf_base_polyline New_DXF_SOLID;
 	elmt_blocks New_DXF_blocks;
 
-	// basic part for creating a correct ELMT file
+	connect(&New_DXF_blocks ,SIGNAL (Signal1(const QString &)),parent() ,SLOT(update_proces(const QString &)));
 
-	//DXF_Entities_List.DXF_Result.clear();
+	connect(&New_DXF_blocks ,SIGNAL (send_log(const QString &)),parent() ,SLOT(update_log(const QString &)));
+	connect(&New_DXF_blocks ,SIGNAL (send_elmt(const QString &)),parent() ,SLOT(update_elmt(const QString &)));
 
-	Logtext.append("Insert basic ELMT items\n");
+	// basic part for creating a correct ELMT file
 
 	Signal_waarde1.clear();
 	Signal_waarde1.append("Insert basic ELMT items\n");
@@ -108,9 +109,12 @@
 
 	DXF_Entities_List.DXF_Result.append(New_DXF_Terminal.Create_terminal());
 
+	Signal_elmt1.clear();
+	Signal_elmt1.append(DXF_Entities_List.DXF_Result);
 
-	Logtext.append("Converting DXF entities\n");
+	emit send_elmt(Signal_elmt1);
 
+
 	Signal_waarde1.clear();
 	Signal_waarde1.append("Converting DXF entities\n");
 
@@ -132,6 +136,11 @@
 
 		emit Signal1(Signal_waarde1);
 
+		Signal_elmt1.clear();
+		Signal_elmt1.append(DXF_Entities_List.DXF_Result);
+
+		emit send_elmt(Signal_elmt1);
+
 		if (Record2.value("Command_count").toInt()==0)
 		{
 
@@ -546,7 +555,7 @@
 
 
 
-			while (end_lwpoly==0 and count_vertex<max_vertex+1)
+			while (end_lwpoly==0 and count_vertex<max_vertex-1)
 			{
 				NewQuery.next();
 				QSqlRecord Record3=NewQuery.record();
@@ -669,7 +678,19 @@
 
 			DXF_Entities_List.DXF_Result.append(New_DXF_SOLID.Create_polyline());
 
+			Signal_waarde1.clear();
+			Signal_waarde1.append(Record2.value("Command").toString());
+			Signal_waarde1.append(" : ");
+			Signal_waarde1.append(Record2.value("dxf_5").toString());
+			//Signal_waarde1.append(" : maxvertex => ");
+			//Signal_waarde1.append(Record2.value("dxf_90").toString());
+			//Signal_waarde1.append(" : count vertex => ");
+			//Signal_waarde1.append(QString::number(count_vertex));
+			//Signal_waarde1.append(" : ");
+			//Signal_waarde1.append();
 
+			emit Signal1(Signal_waarde1);
+
 		}
 
 	}

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h	2017-01-15 19:36:40 UTC (rev 4850)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h	2017-01-15 22:07:25 UTC (rev 4851)
@@ -45,7 +45,10 @@
 	QString Recordvalue2;
 
 	QString Signal_waarde1;
+	QString Signal_log1;
+	QString Signal_elmt1;
 
+
 	QString ELMT_ID_instruction;
 
 
@@ -57,6 +60,9 @@
 	signals:
 
 	void Signal1 (const QString &Waarde1);
+	void send_log(const QString &Waarde2);
+	void send_elmt(const QString &Waarde3);
+	void send_process(const QString &Waarde4);
 
 	public slots:
 };


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