diff --git a/LibManagementSystem/book_info.cpp b/LibManagementSystem/book_info.cpp index fb2342e0ceab0d3e5ea91e7e4b5f6012dce8e70f..b38c1944f6054f844443534b15486989dde5bbf0 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 7a677e842234c2da6c94c638ecf378ab685472e5..811096f8d5e6d50a11ca71c447211095dcc8af2b 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 653eb4caf6c87cc3e442952d16771d6e7f12c07c..c366de0c65a7e058a9a316f9bad031d33fd00f75 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 72e08c25dd4586601ec063ba3e782017c1c85912..cb612ef37f13cb75d135bf8ab7ea02b43837e895 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();