[qet] qet/qet: [4827] update ui

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


Revision: 4827
Author:   rdsivd
Date:     2017-01-02 00:37:42 +0100 (Mon, 02 Jan 2017)
Log Message:
-----------
update ui

Modified Paths:
--------------
    branches/DXFtoQET3_DB/dxftoqet3db.cpp
    branches/DXFtoQET3_DB/dxftoqet3db.h
    branches/DXFtoQET3_DB/dxftoqet3db.ui

Modified: branches/DXFtoQET3_DB/dxftoqet3db.cpp
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.cpp	2016-12-30 20:15:18 UTC (rev 4826)
+++ branches/DXFtoQET3_DB/dxftoqet3db.cpp	2017-01-01 23:37:42 UTC (rev 4827)
@@ -48,7 +48,13 @@
 	ui->QET_user_symbole_path_save->setText(DXF_main_base[0].dxf_savepath);
 	ui->MainTab->repaint();
 
+	//ui->progressBar1->text()="dxf_header";
+	ui->progressBar1->setMinimum(0);
+	ui->progressBar1->setMaximum(100);
+	ui->progressBar1->setValue(0);
+	ui->progressBar1->repaint();
 
+
 }
 
 DXFtoQET3DB::~DXFtoQET3DB()
@@ -1315,6 +1321,20 @@
 	ui->dxf_section->insert("Section Header");
 	ui->dxf_log->repaint();
 
+	//connect (this,SIGNAL(send_text(QString &)),this,SLOT(on_progressBar_text(QString &)));
+	//connect (this,SIGNAL(send_min(int &)),this,SLOT(on_progressBar_valueMin(int &)));
+	//connect (this,SIGNAL(send_max(int &)),this,SLOT(on_progressBar_valueMax(int &)));
+	//connect (this,SIGNAL(send_actual(int &)),this,SLOT(on_progressBar_valueChanged(int &)));
+
+	//emit send_text("dxf_header");
+	//emit send_min(0);
+	//emit send_max(header_max_items);
+
+	ui->progressBar1->text()="dxf_header";
+	ui->progressBar1->setMinimum(0);
+	ui->progressBar1->setMaximum(header_max_items);
+	ui->progressBar1->repaint();
+
 	while (count_header< header_max_items)
 	{
 		text1=QString::number(count_header);
@@ -1341,7 +1361,11 @@
 
 		clear_dxf_code_tables();
 
+		//emit(send_actual(count_header));
 
+		ui->progressBar1->setValue(count_header);
+		ui->progressBar1->repaint();
+
 		// record of temp table split to dxf table
 		max=Split_list("dxf_header", x3, count_header_item, count_header, id_header );
 
@@ -1440,6 +1464,11 @@
 	ui->dxf_section->insert("Section Classes");
 	ui->dxf_log->repaint();
 
+	ui->progressBar1->text()="dxf_classes";
+	ui->progressBar1->setMinimum(0);
+	ui->progressBar1->setMaximum(classes_max_items);
+	ui->progressBar1->repaint();
+
 	while (count_classes< classes_max_items)
 	{
 		text1=QString::number(count_classes);
@@ -1469,6 +1498,9 @@
 
 		clear_dxf_code_tables();
 
+		ui->progressBar1->setValue(count_classes);
+		ui->progressBar1->repaint();
+
 		max=Split_list("dxf_classes", x3, count_classes_item, count_classes, id_header );
 
 		//Record_Count_Tables++;
@@ -1562,6 +1594,11 @@
 	ui->dxf_section->insert("Section Tables");
 	ui->dxf_log->repaint();
 
+	ui->progressBar1->text()="dxf_tables";
+	ui->progressBar1->setMinimum(0);
+	ui->progressBar1->setMaximum(tables_max_items);
+	ui->progressBar1->repaint();
+
 	while (count_tables< tables_max_items)			
 	{
 		text1=QString::number(count_tables);
@@ -1591,6 +1628,9 @@
 
 		clear_dxf_code_tables();
 
+		ui->progressBar1->setValue(count_tables);
+		ui->progressBar1->repaint();
+
 		max=Split_list("dxf_tables", x3, count_tables_item, count_tables, id_header  );
 
 		//Record_Count_Tables++;
@@ -1690,6 +1730,11 @@
 	ui->dxf_section->insert("Section Blocks");
 	ui->dxf_log->repaint();
 
+	ui->progressBar1->text()="dxf_blocks";
+	ui->progressBar1->setMinimum(0);
+	ui->progressBar1->setMaximum(blocks_max_items);
+	ui->progressBar1->repaint();
+
 	while (count_blocks< blocks_max_items)
 	{
 		text1=QString::number(count_blocks);
@@ -1718,6 +1763,9 @@
 
 		clear_dxf_code_tables();
 
+		ui->progressBar1->setValue(count_blocks);
+		ui->progressBar1->repaint();
+
 		max=Split_list("dxf_blocks", x3, count_blocks_item, count_blocks , id_header );
 
 		//Record_Count_Tables++;
@@ -1822,6 +1870,11 @@
 	ui->dxf_section->insert("Section Entities");
 	ui->dxf_log->repaint();
 
+	ui->progressBar1->text()="dxf_entities";
+	ui->progressBar1->setMinimum(0);
+	ui->progressBar1->setMaximum(entities_max_items);
+	ui->progressBar1->repaint();
+
 	while (count_entities< entities_max_items)
 	{
 		text1=QString::number(count_entities);
@@ -1851,6 +1904,9 @@
 
 		clear_dxf_code_tables();
 
+		ui->progressBar1->setValue(count_entities);
+		ui->progressBar1->repaint();
+
 		max=Split_list("dxf_entities", x3, count_entities_item, count_entities, id_header  );
 
 		//Record_Count_Tables++;
@@ -1947,6 +2003,11 @@
 	ui->dxf_section->insert("Section Objects");
 	ui->dxf_log->repaint();
 
+	ui->progressBar1->text()="dxf_objects";
+	ui->progressBar1->setMinimum(0);
+	ui->progressBar1->setMaximum(objects_max_items);
+	ui->progressBar1->repaint();
+
 	while (count_objects< objects_max_items)
 	{
 		text1=QString::number(count_objects);
@@ -1976,6 +2037,9 @@
 
 		clear_dxf_code_tables();
 
+		ui->progressBar1->setValue(count_objects);
+		ui->progressBar1->repaint();
+
 		max=Split_list("dxf_objects", x3, count_object_item, count_objects, id_header  );
 
 		//Record_Count_Tables=Record_Count_Tables+count_objects;
@@ -5644,7 +5708,23 @@
 
 }
 
-void DXFtoQET3DB::on_progressBar_valueChanged(int value)
+void DXFtoQET3DB::on_progressBar_valueChanged(int value1)
 {
-
+	ui->progressBar1->setValue(value1);
+	ui->progressBar1->repaint();
 }
+void DXFtoQET3DB::on_progressBar_valueMin(int value1)
+{
+	ui->progressBar1->setMinimum(value1);
+	ui->progressBar1->repaint();
+}
+void DXFtoQET3DB::on_progressBar_valueMax(int value1)
+{
+	ui->progressBar1->setMaximum(value1);
+	ui->progressBar1->repaint();
+}
+void DXFtoQET3DB::on_progressBar_text(QString text1)
+{
+	ui->progressBar1->text()=text1;
+	ui->progressBar1->repaint();
+}

Modified: branches/DXFtoQET3_DB/dxftoqet3db.h
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.h	2016-12-30 20:15:18 UTC (rev 4826)
+++ branches/DXFtoQET3_DB/dxftoqet3db.h	2017-01-01 23:37:42 UTC (rev 4827)
@@ -271,7 +271,12 @@
 
 	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);
 
@@ -330,24 +335,15 @@
 
 
 		void on_Create_QET_ELMT_clicked();
-
-
-
 		void on_Choose_DB_clicked();
-
 		void on_SavetoELMT_clicked();
-
-
-
-
 		void on_Convert_dxf_blocks_clicked();
-
-
-
 		void on_Convert_dxf_entities_clicked();
+		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 on_progressBar_valueChanged(int value);
-
 		private:
 		Ui::DXFtoQET3DB *ui;
 };

Modified: branches/DXFtoQET3_DB/dxftoqet3db.ui
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.ui	2016-12-30 20:15:18 UTC (rev 4826)
+++ branches/DXFtoQET3_DB/dxftoqet3db.ui	2017-01-01 23:37:42 UTC (rev 4827)
@@ -422,7 +422,7 @@
      </spacer>
     </item>
     <item>
-     <widget class="QProgressBar" name="progressBar">
+     <widget class="QProgressBar" name="progressBar1">
       <property name="value">
        <number>24</number>
       </property>


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