解决国产系统进度指示器扫描张数卡顿、显示不全等问题;BUG-924
This commit is contained in:
parent
7d315ffc88
commit
f3dcc88420
|
@ -30,10 +30,8 @@ Dialog_progress_ui::Dialog_progress_ui(class Manager *mgr, std::function<void (u
|
|||
ui->pbtn_close->setVisible(false);
|
||||
ui->label->setText(tr("start scanning"));
|
||||
|
||||
ui->label_imgRecived->setVisible(false);
|
||||
ui->lineEdit_imgRecived->setVisible(false);
|
||||
ui->label_totalImgRecived->setVisible(false);
|
||||
ui->lineEdit_imgRecived->setText(QString::number(m_imageRecivedCount));
|
||||
ui->label_imgRecived->setText(tr("image recived:") + QString::number(m_imageRecivedCount));
|
||||
ui->label_imgRecived->setAlignment(Qt::AlignCenter);
|
||||
|
||||
m_mgr = mgr;
|
||||
m_callback = callback;
|
||||
|
@ -105,9 +103,6 @@ void Dialog_progress_ui::on_scan_status(QString finishInfo, bool isScanning)
|
|||
{
|
||||
m_isScanning = isScanning;
|
||||
|
||||
ui->label_imgRecived->setVisible(isScanning);
|
||||
ui->lineEdit_imgRecived->setVisible(isScanning);
|
||||
|
||||
ui->label->setText(finishInfo);
|
||||
ui->pbtn_cancelScan->setVisible(isScanning);
|
||||
ui->pbtn_close->setVisible(!isScanning);
|
||||
|
@ -117,8 +112,10 @@ void Dialog_progress_ui::on_scan_finish(int flag, QString finishInfo)
|
|||
{
|
||||
on_scan_status(finishInfo, false);
|
||||
|
||||
ui->label_totalImgRecived->setVisible(true);
|
||||
ui->label_totalImgRecived->setText(tr("Total scanned images: %1").arg(QString::number(m_imageRecivedCount)));
|
||||
QString info = tr("Total scanned images: %1").arg(QString::number(m_imageRecivedCount));
|
||||
ui->label_imgRecived->setText(info);
|
||||
ui->label_imgRecived->repaint();
|
||||
this->repaint();
|
||||
|
||||
m_imageRecivedCount = 0;
|
||||
|
||||
|
@ -132,7 +129,9 @@ void Dialog_progress_ui::on_scan_finish(int flag, QString finishInfo)
|
|||
void Dialog_progress_ui::on_image_recived()
|
||||
{
|
||||
m_imageRecivedCount++;
|
||||
ui->lineEdit_imgRecived->setText(QString::number(m_imageRecivedCount));
|
||||
ui->label_imgRecived->setText(tr("image recived:") + QString::number(m_imageRecivedCount));
|
||||
ui->label_imgRecived->repaint();
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void HGAPI Dialog_progress_ui::ThreadFunc(HGThread thread, HGPointer param)
|
||||
|
|
|
@ -83,67 +83,11 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<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_imgRecived">
|
||||
<property name="text">
|
||||
<string>image recived:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_imgRecived">
|
||||
<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_totalImgRecived">
|
||||
<property name="text">
|
||||
<string>total image recived:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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>
|
||||
<widget class="QLabel" name="label_imgRecived">
|
||||
<property name="text">
|
||||
<string>image recived:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
|
|
Loading…
Reference in New Issue