app去掉清除滚轴计数,twain去掉扫描上传张数
This commit is contained in:
parent
e353164973
commit
f387dcf03d
|
@ -134,6 +134,7 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
|
|||
resize(950, 720);
|
||||
}
|
||||
|
||||
ui->act_clearRoller->setVisible(false);
|
||||
ui->actionact_update->setVisible(false);
|
||||
ui->act_feedback->setVisible(false);
|
||||
|
||||
|
@ -1543,7 +1544,7 @@ void MainWindow::updateActionStatus()
|
|||
ui->act_log->setEnabled(m_admin_loggedIn);
|
||||
ui->act_clrCache->setEnabled(m_admin_loggedIn);
|
||||
ui->act_consume->setEnabled(m_admin_loggedIn);
|
||||
ui->act_clearRoller->setEnabled(m_admin_loggedIn);
|
||||
// ui->act_clearRoller->setEnabled(m_admin_loggedIn);
|
||||
|
||||
ui->act_acquireInto->setEnabled(!m_isScanning && (m_devUser != nullptr));
|
||||
m_act_acquireInto2->setEnabled(!m_isScanning && (m_devUser != nullptr));
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
Dialog_progress_ui *Dialog_progress_ui::m_param = nullptr;
|
||||
|
||||
static int imageRecivedCount = 0;
|
||||
static int imageUploadedCount = 0;
|
||||
|
||||
Dialog_progress_ui::Dialog_progress_ui(std::function<void (ui_result)> callback, std::function<void (int, void *, int)> *notify, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
|
@ -31,11 +30,6 @@ Dialog_progress_ui::Dialog_progress_ui(std::function<void (ui_result)> callback,
|
|||
ui->label_totalImgRecived->setVisible(false);
|
||||
ui->lineEdit_imgRecived->setText(QString::number(imageRecivedCount));
|
||||
|
||||
ui->label_imgUploaded->setVisible(false);
|
||||
ui->lineEdit_imgUploaded->setVisible(false);
|
||||
ui->label_totalImgUploaded->setVisible(false);
|
||||
ui->lineEdit_imgUploaded->setText(QString::number(imageUploadedCount));
|
||||
|
||||
m_callback = callback;
|
||||
*notify = FuncNotify;
|
||||
|
||||
|
@ -45,7 +39,6 @@ Dialog_progress_ui::Dialog_progress_ui(std::function<void (ui_result)> callback,
|
|||
|
||||
connect(this, SIGNAL(scan_status(QString,bool)), this, SLOT(on_scan_status(QString,bool)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(scan_finish(int, QString)), this, SLOT(on_scan_finish(int, QString)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(image_uploaded()), this, SLOT(on_image_uploaded()), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(image_recived()), this, SLOT(on_image_recived()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
|
@ -54,7 +47,6 @@ Dialog_progress_ui::~Dialog_progress_ui()
|
|||
m_param = nullptr;
|
||||
|
||||
imageRecivedCount = 0;
|
||||
imageUploadedCount = 0;
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
@ -101,8 +93,6 @@ void Dialog_progress_ui::on_scan_status(QString finishInfo, bool isScanning)
|
|||
|
||||
ui->label_imgRecived->setVisible(isScanning);
|
||||
ui->lineEdit_imgRecived->setVisible(isScanning);
|
||||
ui->label_imgUploaded->setVisible(isScanning);
|
||||
ui->lineEdit_imgUploaded->setVisible(isScanning);
|
||||
|
||||
ui->label->setText(finishInfo);
|
||||
ui->pbtn_cancelScan->setVisible(isScanning);
|
||||
|
@ -113,8 +103,8 @@ void Dialog_progress_ui::on_scan_finish(int flag, QString finishInfo)
|
|||
{
|
||||
on_scan_status(finishInfo, false);
|
||||
|
||||
ui->label_totalImgUploaded->setVisible(true);
|
||||
ui->label_totalImgUploaded->setText(tr("Total scanned images: %1").arg(QString::number(imageRecivedCount)));
|
||||
ui->label_totalImgRecived->setVisible(true);
|
||||
ui->label_totalImgRecived->setText(tr("Total scanned images: %1").arg(QString::number(imageRecivedCount)));
|
||||
|
||||
if (SCANNER_ERR_OK == flag || SCANNER_ERR_USER_CANCELED == flag)
|
||||
{
|
||||
|
@ -128,11 +118,6 @@ void Dialog_progress_ui::on_image_recived()
|
|||
ui->lineEdit_imgRecived->setText(QString::number(++imageRecivedCount));
|
||||
}
|
||||
|
||||
void Dialog_progress_ui::on_image_uploaded()
|
||||
{
|
||||
ui->lineEdit_imgUploaded->setText(QString::number(++imageUploadedCount));
|
||||
}
|
||||
|
||||
void Dialog_progress_ui::FuncNotify(int event, void *msg, int flag)
|
||||
{
|
||||
Dialog_progress_ui *p = (Dialog_progress_ui *)m_param;
|
||||
|
@ -162,11 +147,5 @@ void Dialog_progress_ui::FuncNotify(int event, void *msg, int flag)
|
|||
emit p->image_recived();
|
||||
}
|
||||
break;
|
||||
|
||||
case SANE_EVENT_IMG_UPLOADED:
|
||||
{
|
||||
emit p->image_uploaded();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ signals:
|
|||
void scan_status(QString finishInfo, bool isScanning);
|
||||
void scan_finish(int flag, QString finishInfo);
|
||||
void image_recived();
|
||||
void image_uploaded();
|
||||
|
||||
private slots:
|
||||
void on_pbtn_cancelScan_clicked();
|
||||
|
@ -37,7 +36,6 @@ private slots:
|
|||
void on_scan_status(QString finishInfo, bool isScanning);
|
||||
void on_scan_finish(int flag, QString finishInfo);
|
||||
void on_image_recived();
|
||||
void on_image_uploaded();
|
||||
|
||||
public:
|
||||
static void FuncNotify(int event, void *msg, int flag);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>345</width>
|
||||
<height>163</height>
|
||||
<width>338</width>
|
||||
<height>142</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -18,14 +18,14 @@
|
|||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>345</width>
|
||||
<height>163</height>
|
||||
<width>338</width>
|
||||
<height>142</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>345</width>
|
||||
<height>163</height>
|
||||
<width>338</width>
|
||||
<height>142</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>
|
||||
|
|
Loading…
Reference in New Issue