From efddb5166089573f9b2508d30b217ddebbb2fab2 Mon Sep 17 00:00:00 2001 From: wumu <mayi@mayi.com> Date: 星期二, 08 十月 2024 22:48:55 +0800 Subject: [PATCH] 1008 --- internal_system_v1/clientmainwindow.cpp | 36 ++++++++++++++++++++++++++++++++---- 1 files changed, 32 insertions(+), 4 deletions(-) diff --git a/internal_system_v1/clientmainwindow.cpp b/internal_system_v1/clientmainwindow.cpp index 00b85fe..940cad8 100644 --- a/internal_system_v1/clientmainwindow.cpp +++ b/internal_system_v1/clientmainwindow.cpp @@ -5,6 +5,9 @@ #include <QMessageBox> #include <QSqlQuery> #include <QSqlRecord> +#include <QTimer> + +#pragma execution_character_set("utf-8") extern int g_comId; extern QString g_dataRootPath; @@ -24,6 +27,8 @@ ui->tableWidget->setColumnWidth(4,ui->tableWidget->columnWidth(4)+15); initUi(); searchComName(); + + ui->statusBar->showMessage("灏侀潰淇℃伅鍔犺浇涓�..."); } ClientMainWindow::~ClientMainWindow() @@ -48,10 +53,19 @@ } } +void ClientMainWindow::delay(int msec) +{ + QTimer::singleShot(msec, this, [=]{ + qDebug()<<"寤舵椂瀹屾垚鍟�..."; + emit loadExcelSignal(); + }); + qDebug()<<"寤舵椂鏃堕暱..."<<msec; +} + void ClientMainWindow::initUi() { m_searchInfo = new SearchInfo(this); - ui->tabWidget->addTab(m_searchInfo,"淇℃伅鏌ヨ"); + //ui->tabWidget->addTab(m_searchInfo,"淇℃伅鏌ヨ"); // 涓嶆樉绀� m_coverInfo = new CoverInfo(this); m_coverInfo->setParent(ui->tab); @@ -92,7 +106,7 @@ // 闂鏁存敼鍙拌处 m_proRecStandingBook = new ProblemRectStandingBook(this); - ui->tabWidget->addTab(m_proRecStandingBook,"闂鏁存敼鍙拌处"); + //ui->tabWidget->addTab(m_proRecStandingBook,"闂鏁存敼鍙拌处"); // 鍏宠仈鍚勪釜鍔熻兘妲� connect(m_coverInfo,SIGNAL(sendComName(QString)),m_searchInfo,SLOT(addComName(QString))); @@ -110,12 +124,21 @@ m_conInfo2 = new ConverInfo2(this); //ui->tabWidget->addTab(m_conInfo2,"鍩烘湰淇℃伅"); ui->tabWidget->insertTab(0,m_conInfo2,"灏侀潰淇℃伅"); + connect(this,SIGNAL(loadExcelSignal()),m_conInfo2,SLOT(showExcelSlot()),Qt::QueuedConnection); + // 鎺у埗鏄剧ず鐘舵�佹爮鐨勪俊鎭� + connect(m_conInfo2,&ConverInfo2::loadFinished,this,[=]{ + ui->statusBar->showMessage("灏侀潰淇℃伅鍔犺浇瀹屾垚",10*1000); + }); + // 鎺у埗鏄剧ず鍔犺浇杩涘害鐨勪俊鎭� + connect(m_conInfo2,&ConverInfo2::loadProgress,this,[=](int val){ + ui->statusBar->showMessage(QString("灏侀潰淇℃伅鍔犺浇宸插畬鎴� %1 %").arg(val)); + }); m_problemList = new ProblemList(this); - ui->tabWidget->addTab(m_problemList,"闂娓呭崟"); + //ui->tabWidget->addTab(m_problemList,"闂娓呭崟"); m_problemRectifResult = new ProblemRectificationResult(this); - ui->tabWidget->addTab(m_problemRectifResult,"鏁存敼鎴愭灉"); + //ui->tabWidget->addTab(m_problemRectifResult,"鏁存敼鎴愭灉"); m_tableItemDelegate = new TableItemDelegate(); // 浠g悊 绂佺敤缂栬緫 m_editDelegate = new QItemDelegate(this); // 鍙紪杈� @@ -131,6 +154,11 @@ // 榛樿璋冪敤涓�涓嬩笅鎷夋鐨勮Е鍙戞搷浣� on_comboBox_currentIndexChanged("浼佷笟(涓嶅惈閲戣瀺浼佷笟)"); + // 鏈�鍚庤Е鍙戝姞杞界數瀛愯〃鏍肩殑淇″彿 + //emit loadExcelSignal(); + //qDebug()<<"鍙戝皠鍔犺浇鐢靛瓙琛ㄦ牸鐨勪俊鍙�"; + delay(1000); + } void ClientMainWindow::readDataFromExcel(QString path) -- Gitblit v1.8.0