From 8387802e35c61663f11112afcc843816a035e57b Mon Sep 17 00:00:00 2001 From: zephyr Date: Wed, 28 Dec 2022 12:00:41 +0800 Subject: [PATCH] 1 --- LibManagementSystem/book_info.cpp | 4 +--- LibManagementSystem/book_info.h | 1 + LibManagementSystem/mainwindow.cpp | 12 ++++++++++++ LibManagementSystem/mainwindow.h | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/LibManagementSystem/book_info.cpp b/LibManagementSystem/book_info.cpp index fb2342e..b38c194 100644 --- a/LibManagementSystem/book_info.cpp +++ b/LibManagementSystem/book_info.cpp @@ -60,7 +60,7 @@ void book_info::picture_fail(QString e) void book_info::on_reload_clicked() { - emit recon(); + emit repic(); emit send_pic(("IMIGEG" + QString::number(book.lib_code).toStdString()).c_str()); ui->progressBar->show(); } @@ -78,7 +78,6 @@ void book_info::processb(int r) void book_info::on_pushButton_clicked() { -// emit ifborcon(); if(user->account=="") { QMessageBox* box = new QMessageBox(this); @@ -177,7 +176,6 @@ void book_info::fail_infoapp(QString failmsg) void book_info::receive_infoapp() { - emit recon(); QMessageBox* box = new QMessageBox(this); box->setIcon(QMessageBox::Information); box->setWindowTitle("提示"); diff --git a/LibManagementSystem/book_info.h b/LibManagementSystem/book_info.h index 7a677e8..811096f 100644 --- a/LibManagementSystem/book_info.h +++ b/LibManagementSystem/book_info.h @@ -26,6 +26,7 @@ signals: void ifborcon(); void ifappcon(); void recon(); + void repic(); public slots: void picture_get(); void picture_fail(QString); diff --git a/LibManagementSystem/mainwindow.cpp b/LibManagementSystem/mainwindow.cpp index 653eb4c..c366de0 100644 --- a/LibManagementSystem/mainwindow.cpp +++ b/LibManagementSystem/mainwindow.cpp @@ -236,6 +236,7 @@ void MainWindow::rw() connect(sea->w,&book_info::ifappcon,this,&MainWindow::ifappcon); connect(sea->w,&book_info::recon,this,&MainWindow::searchC); connect(sea->w,&book_info::recon,this,&MainWindow::disW); + connect(sea->w,&book_info::repic,this,&MainWindow::repic); } void MainWindow::loginC() @@ -274,6 +275,17 @@ void MainWindow::loncon() connect(lo,&login::loncon,this,&MainWindow::loncon); } +void MainWindow::repic() +{ + disconnectAll(); + connect(sea->w,&book_info::ifborcon,this,&MainWindow::ifborcon); + connect(sea->w,&book_info::ifappcon,this,&MainWindow::ifappcon); + connect(sea,&search::send,client,&communication_module::sendmsgPreparation); + connect(client,&communication_module::pic_fail,sea,&search::picture_fail); + connect(client,&communication_module::pic_received,sea,&search::picture_received); + connect(client,&communication_module::process_update,sea,&search::process); + +} void MainWindow::ifborcon() { disconnectAll(); diff --git a/LibManagementSystem/mainwindow.h b/LibManagementSystem/mainwindow.h index 72e08c2..cb612ef 100644 --- a/LibManagementSystem/mainwindow.h +++ b/LibManagementSystem/mainwindow.h @@ -40,6 +40,7 @@ public: signals: public slots: + void repic(); void regcon(); void loncon(); void ifborcon(); -- Gitee