sane 去除扫描上传张数

This commit is contained in:
yangjiaxuan 2023-06-12 10:58:25 +08:00
parent f387dcf03d
commit 477a3e4330
2 changed files with 9 additions and 85 deletions

View File

@ -25,7 +25,7 @@ Dialog_Device_Scan::Dialog_Device_Scan(const SANEAPI* saneApi, SANE_Handle dev,
m_thread = NULL;
setWindowTitle(QString::fromStdString(devName));
setWindowFlags(windowFlags() & ~Qt::WindowCloseButtonHint);
setWindowFlags(Qt::SubWindow | Qt::Popup);
m_timer = new QTimer(this);
connect(this, SIGNAL(eventFunc(int, QString)), this, SLOT(on_eventFunc(int, QString)));
@ -39,11 +39,6 @@ Dialog_Device_Scan::Dialog_Device_Scan(const SANEAPI* saneApi, SANE_Handle dev,
ui->label_totalImgRecived->setVisible(false);
ui->lineEdit_imgRecived->setText(QString::number(0));
ui->label_imgUploaded->setVisible(false);
ui->lineEdit_imgUploaded->setVisible(false);
ui->label_totalImgUploaded->setVisible(false);
ui->lineEdit_imgUploaded->setText(QString::number(0));
startScan();
}
@ -75,15 +70,10 @@ void Dialog_Device_Scan::on_eventFunc(int flag, QString errInfo)
ui->pushButton_Cancel->setVisible(false);
ui->pushButton_Complete->setVisible(true);
ui->label_imgRecived->setVisible(false);
ui->lineEdit_imgRecived->setVisible(false);
ui->label_totalImgRecived->setVisible(false);
ui->label_imgUploaded->setVisible(false);
ui->lineEdit_imgUploaded->setVisible(false);
ui->label_totalImgUploaded->setVisible(true);
ui->label_totalImgUploaded->setText(tr("Total scanned images: %1").arg(ui->lineEdit_imgRecived->text()));
ui->label_totalImgRecived->setVisible(true);
ui->label_totalImgRecived->setText(tr("Total scanned images: %1").arg(ui->lineEdit_imgRecived->text()));
if (0 == flag)
{
@ -109,7 +99,6 @@ void Dialog_Device_Scan::on_pushButton_Complete_clicked()
void Dialog_Device_Scan::on_imageCount(int count)
{
ui->lineEdit_imgRecived->setText(QString::number(count));
ui->lineEdit_imgUploaded->setText(QString::number(count));
}
void Dialog_Device_Scan::startScan()
@ -134,8 +123,6 @@ void Dialog_Device_Scan::startScan()
ui->pushButton_Complete->setVisible(false);
ui->label_imgRecived->setVisible(true);
ui->lineEdit_imgRecived->setVisible(true);
ui->label_imgUploaded->setVisible(true);
ui->lineEdit_imgUploaded->setVisible(true);
ui->label->setText(tr("Start scan"));
}

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>345</width>
<height>163</height>
<width>336</width>
<height>146</height>
</rect>
</property>
<property name="sizePolicy">
@ -18,14 +18,14 @@
</property>
<property name="minimumSize">
<size>
<width>345</width>
<height>163</height>
<width>336</width>
<height>146</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>345</width>
<height>163</height>
<width>336</width>
<height>146</height>
</size>
</property>
<property name="windowTitle">
@ -82,69 +82,6 @@
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_imgUploaded">
<property name="text">
<string>image uploaded:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_imgUploaded">
<property name="minimumSize">
<size>
<width>61</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>61</width>
<height>20</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_totalImgUploaded">
<property name="text">
<string>total image uploaded:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>