| | |
| | | #include <QMessageBox> |
| | | #include <QSqlQuery> |
| | | #include <QSqlRecord> |
| | | #include <QTimer> |
| | | |
| | | #pragma execution_character_set("utf-8") |
| | | |
| | | extern int g_comId; |
| | | extern QString g_dataRootPath; |
| | |
| | | ui->tableWidget->setColumnWidth(4,ui->tableWidget->columnWidth(4)+15); |
| | | initUi(); |
| | | searchComName(); |
| | | |
| | | ui->statusBar->showMessage("封面信息加载中..."); |
| | | } |
| | | |
| | | ClientMainWindow::~ClientMainWindow() |
| | |
| | | } |
| | | } |
| | | |
| | | 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); |
| | |
| | | |
| | | // 问题整改台账 |
| | | 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))); |
| | |
| | | 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(); // 代理 禁用编辑 |
| | | m_editDelegate = new QItemDelegate(this); // 可编辑 |
| | |
| | | // 默认调用一下下拉框的触发操作 |
| | | on_comboBox_currentIndexChanged("企业(不含金融企业)"); |
| | | |
| | | // 最后触发加载电子表格的信号 |
| | | //emit loadExcelSignal(); |
| | | //qDebug()<<"发射加载电子表格的信号"; |
| | | delay(1000); |
| | | |
| | | } |
| | | |
| | | void ClientMainWindow::readDataFromExcel(QString path) |