取消确认复位提醒,调整设置畸变值对话框
This commit is contained in:
parent
061b52a06a
commit
6f692b5e37
Binary file not shown.
|
@ -949,7 +949,7 @@
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="79"/>
|
||||
<source>act_close</source>
|
||||
<translation>关闭</translation>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="84"/>
|
||||
|
|
|
@ -83,6 +83,12 @@ parameter *Dialog_UserInput::getParam()
|
|||
return param;
|
||||
}
|
||||
|
||||
void Dialog_UserInput::setDistortValue(double value)
|
||||
{
|
||||
ui->lineEdit->setText(QString::number(value, 'f'));
|
||||
ui->lineEdit->selectAll();
|
||||
}
|
||||
|
||||
void Dialog_UserInput::on_pbtn_yes_clicked()
|
||||
{
|
||||
if (ui->lineEdit->text().isEmpty() && (m_type == ui_helper::VAL_TYPE_INT || m_type == ui_helper::VAL_TYPE_FLOAT || m_type == ui_helper::VAL_TYPE_STRING))
|
||||
|
|
|
@ -34,6 +34,7 @@ public:
|
|||
~Dialog_UserInput();
|
||||
|
||||
parameter *getParam();
|
||||
void setDistortValue(double value);
|
||||
|
||||
private slots:
|
||||
void on_pbtn_yes_clicked();
|
||||
|
|
|
@ -78,8 +78,8 @@ Form_mainInterface::Form_mainInterface(class MainWindow *mainwnd, Dialog_logIn::
|
|||
ui->label_destortionInfo->setVisible(false);
|
||||
|
||||
setMinimumWidth(500);
|
||||
ui->tableWidget->setMinimumWidth(400);
|
||||
ui->tableWidget->setMaximumWidth(400);
|
||||
ui->tableWidget->setMinimumWidth(450);
|
||||
ui->tableWidget->setMaximumWidth(450);
|
||||
m_textTips = new Form_textTips();
|
||||
m_view = new HGImgView();
|
||||
ui->stackedWidget->addWidget(m_textTips);
|
||||
|
@ -208,6 +208,11 @@ void Form_mainInterface::on_testDistortion(SANE_DISTORTION_VAL data)
|
|||
ui->label_imgInfo->setText(tr("image pixel: ") + QString::number(data.w, 'f') + " * " + QString::number(data.h, 'f'));
|
||||
ui->label_destortionInfo->setText(tr("destortion value: ") + QString::number(data.scaleXY, 'f'));
|
||||
|
||||
if (m_hg != nullptr)
|
||||
{
|
||||
m_hg->setDistortValue(data.scaleXY);
|
||||
}
|
||||
|
||||
// updateImgPixelInfo();
|
||||
|
||||
updateUiEnabled(true);
|
||||
|
|
|
@ -11,6 +11,7 @@ hgscanner::hgscanner(Form_mainInterface *form, Form_BurnMode *burnMode, Dialog_I
|
|||
, m_burnMode(burnMode)
|
||||
, m_inputSnDlg(inputSnDlg)
|
||||
, devHandle_(h)
|
||||
, m_distortValue(0.0)
|
||||
{
|
||||
cb_ = nullptr;
|
||||
}
|
||||
|
@ -24,6 +25,10 @@ parameter* hgscanner::get_user_input(data_from from, value_type type, const wcha
|
|||
if (from == DATA_FROM_USER)
|
||||
{
|
||||
Dialog_UserInput dlg(type, QString::fromStdWString(title), desc, m_interface);
|
||||
if (wcscmp(L"SET_DISTORTION_VAL", title) == 0)
|
||||
{
|
||||
dlg.setDistortValue(m_distortValue);
|
||||
}
|
||||
if (dlg.exec())
|
||||
{
|
||||
return dlg.getParam();
|
||||
|
@ -166,3 +171,8 @@ int hgscanner::io_control(unsigned long code, void* data, unsigned* len)
|
|||
sane_io_control(devHandle_, code, data, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void hgscanner::setDistortValue(double value)
|
||||
{
|
||||
m_distortValue = value;
|
||||
}
|
||||
|
|
|
@ -18,10 +18,14 @@ public:
|
|||
virtual int unregister_sane_callback(sane_callback cb);
|
||||
virtual int io_control(unsigned long code, void* data, unsigned* len);
|
||||
sane_callback cb_;
|
||||
|
||||
void setDistortValue(double value);
|
||||
private:
|
||||
class Form_mainInterface *m_interface;
|
||||
class Form_BurnMode *m_burnMode;
|
||||
class Dialog_InputSerialNum *m_inputSnDlg;
|
||||
SANE_Handle devHandle_;
|
||||
|
||||
double m_distortValue;
|
||||
};
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@ MainWindow::MainWindow(HGPdtToolDbUserMgr pdtToolDbuserMgr, Dialog_logIn::LogInT
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->act_newDevice->setVisible(false);
|
||||
|
||||
QFont ft;
|
||||
ft.setPointSize(15);
|
||||
this->setFont(ft);
|
||||
|
@ -43,7 +45,7 @@ MainWindow::MainWindow(HGPdtToolDbUserMgr pdtToolDbuserMgr, Dialog_logIn::LogInT
|
|||
{
|
||||
setWindowTitle(tr("production tool-burn station"));
|
||||
|
||||
ui->act_newDevice->setVisible(false);
|
||||
// ui->act_newDevice->setVisible(false);
|
||||
ui->act_refreshDevice->setVisible(false);
|
||||
|
||||
m_formBurnMode = new Form_BurnMode(this, this);
|
||||
|
@ -55,7 +57,7 @@ MainWindow::MainWindow(HGPdtToolDbUserMgr pdtToolDbuserMgr, Dialog_logIn::LogInT
|
|||
}
|
||||
else
|
||||
{
|
||||
ui->act_refreshDevice->setVisible(true);
|
||||
// ui->act_refreshDevice->setVisible(true);
|
||||
|
||||
m_top_splitter = new QSplitter(Qt::Horizontal);
|
||||
m_bot_splitter = new QSplitter(Qt::Horizontal);
|
||||
|
@ -407,11 +409,11 @@ QString MainWindow::getDevFwNum(SANE_Handle handle)
|
|||
void MainWindow::on_sane_dev_arrive(QString devName)
|
||||
{
|
||||
ui->act_refreshDevice->setEnabled(false);
|
||||
QTime curTimer = QTime::currentTime().addMSecs(5000);
|
||||
while (QTime::currentTime() < curTimer)
|
||||
{
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
}
|
||||
// QTime curTimer = QTime::currentTime().addMSecs(5000);
|
||||
// while (QTime::currentTime() < curTimer)
|
||||
// {
|
||||
// QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
// }
|
||||
ui->act_refreshDevice->setEnabled(true);
|
||||
|
||||
if (m_loginType == Dialog_logIn::LogInType_Burn)
|
||||
|
@ -427,12 +429,12 @@ void MainWindow::on_sane_dev_arrive(QString devName)
|
|||
return;
|
||||
}
|
||||
|
||||
QString str = tr("Confirm whether the device is reset");
|
||||
Dialog_HGMessageBox dlg(str, this);
|
||||
if (!dlg.exec())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// QString str = tr("Confirm whether the device is reset");
|
||||
// Dialog_HGMessageBox dlg(str, this);
|
||||
// if (!dlg.exec())
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
SANE_Handle devHandle = nullptr;
|
||||
sane_open(devName.toStdString().c_str(), &devHandle);
|
||||
|
|
Loading…
Reference in New Issue