app屏蔽固件升级功能
This commit is contained in:
parent
827e7765fd
commit
f508c00c58
|
@ -225,102 +225,101 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
QImage bottomNormalImg(":images/image_rsc/scroll/bottom_Normal.png");
|
||||
QImage bottomHotImg(":images/image_rsc/scroll/bottom_Hot.png");
|
||||
QImage bottomPushImg(":images/image_rsc/scroll/bottom_Push.png");
|
||||
m_thumb->setVScrollBottomImage(&bottomNormalImg, &bottomHotImg, &bottomPushImg);
|
||||
m_view->setVScrollBottomImage(&bottomNormalImg, &bottomHotImg, &bottomPushImg);
|
||||
m_thumb->setVScrollBottomImage(&bottomNormalImg, &bottomHotImg, &bottomPushImg);
|
||||
m_view->setVScrollBottomImage(&bottomNormalImg, &bottomHotImg, &bottomPushImg);
|
||||
|
||||
HGRect hSliderStretchRect = { 4, 0, 196, 16 };
|
||||
QImage hScrollSliderNormalImage(":images/image_rsc/scroll/hScrollSlider_Normal.png");
|
||||
QImage hScrollSliderHotImage(":images/image_rsc/scroll/hScrollSlider_Hot.png");
|
||||
QImage hScrollSliderPushImage(":images/image_rsc/scroll/hScrollSlider_Push.png");
|
||||
m_thumb->setHScrollSliderImage(&hScrollSliderNormalImage, &hSliderStretchRect,
|
||||
HGRect hSliderStretchRect = { 4, 0, 196, 16 };
|
||||
QImage hScrollSliderNormalImage(":images/image_rsc/scroll/hScrollSlider_Normal.png");
|
||||
QImage hScrollSliderHotImage(":images/image_rsc/scroll/hScrollSlider_Hot.png");
|
||||
QImage hScrollSliderPushImage(":images/image_rsc/scroll/hScrollSlider_Push.png");
|
||||
m_thumb->setHScrollSliderImage(&hScrollSliderNormalImage, &hSliderStretchRect,
|
||||
&hScrollSliderHotImage, &hSliderStretchRect, &hScrollSliderPushImage, &hSliderStretchRect);
|
||||
m_view->setHScrollSliderImage(&hScrollSliderNormalImage, &hSliderStretchRect,
|
||||
m_view->setHScrollSliderImage(&hScrollSliderNormalImage, &hSliderStretchRect,
|
||||
&hScrollSliderHotImage, &hSliderStretchRect, &hScrollSliderPushImage, &hSliderStretchRect);
|
||||
|
||||
HGRect vSliderStretchRect = { 0, 4, 16, 196 };
|
||||
QImage vScrollSliderNormalImage(":images/image_rsc/scroll/vScrollSlider_Normal.png");
|
||||
QImage vScrollSliderHotImage(":images/image_rsc/scroll/vScrollSlider_Hot.png");
|
||||
QImage vScrollSliderPushImage(":images/image_rsc/scroll/vScrollSlider_Push.png");
|
||||
m_thumb->setVScrollSliderImage(&vScrollSliderNormalImage, &vSliderStretchRect,
|
||||
HGRect vSliderStretchRect = { 0, 4, 16, 196 };
|
||||
QImage vScrollSliderNormalImage(":images/image_rsc/scroll/vScrollSlider_Normal.png");
|
||||
QImage vScrollSliderHotImage(":images/image_rsc/scroll/vScrollSlider_Hot.png");
|
||||
QImage vScrollSliderPushImage(":images/image_rsc/scroll/vScrollSlider_Push.png");
|
||||
m_thumb->setVScrollSliderImage(&vScrollSliderNormalImage, &vSliderStretchRect,
|
||||
&vScrollSliderHotImage, &vSliderStretchRect, &vScrollSliderPushImage, &vSliderStretchRect);
|
||||
m_view->setVScrollSliderImage(&vScrollSliderNormalImage, &vSliderStretchRect,
|
||||
m_view->setVScrollSliderImage(&vScrollSliderNormalImage, &vSliderStretchRect,
|
||||
&vScrollSliderHotImage, &vSliderStretchRect, &vScrollSliderPushImage, &vSliderStretchRect);
|
||||
|
||||
QAction* act_thumbGrid = new QAction(tr("Grid"), this);
|
||||
act_thumbGrid->setCheckable(true);
|
||||
act_thumbGrid->setChecked(false);
|
||||
connect(act_thumbGrid, SIGNAL(triggered(bool)), this, SLOT(on_act_thumbGrid_triggered(bool)));
|
||||
QAction* act_thumbGrid = new QAction(tr("Grid"), this);
|
||||
act_thumbGrid->setCheckable(true);
|
||||
act_thumbGrid->setChecked(false);
|
||||
connect(act_thumbGrid, SIGNAL(triggered(bool)), this, SLOT(on_act_thumbGrid_triggered(bool)));
|
||||
|
||||
m_moveToAction = new QAction(tr("Move To..."), this);
|
||||
connect(m_moveToAction, SIGNAL(triggered()), this, SLOT(on_act_moveTo_triggered()));
|
||||
m_moveToAction = new QAction(tr("Move To..."), this);
|
||||
connect(m_moveToAction, SIGNAL(triggered()), this, SLOT(on_act_moveTo_triggered()));
|
||||
|
||||
m_thumbMenu = new QMenu(this);
|
||||
QMenu* menu_imageInsert = new QMenu(tr("Insert files"), m_thumbMenu);
|
||||
m_thumbMenu = new QMenu(this);
|
||||
QMenu* menu_imageInsert = new QMenu(tr("Insert files"), m_thumbMenu);
|
||||
|
||||
m_thumbMenu->addAction(ui->act_closeFile);
|
||||
m_thumbMenu->addAction(ui->act_closeAll);
|
||||
m_thumbMenu->addAction(ui->act_Export);
|
||||
m_thumbMenu->addSeparator();
|
||||
m_thumbMenu->addAction(m_moveToAction);
|
||||
m_thumbMenu->addAction(menu_imageInsert->menuAction());
|
||||
m_thumbMenu->addSeparator();
|
||||
m_thumbMenu->addAction(act_thumbGrid);
|
||||
menu_imageInsert->addAction(ui->act_insert);
|
||||
menu_imageInsert->addAction(ui->act_insertFromScanner);
|
||||
m_thumbMenu->addAction(ui->act_closeFile);
|
||||
m_thumbMenu->addAction(ui->act_closeAll);
|
||||
m_thumbMenu->addAction(ui->act_Export);
|
||||
m_thumbMenu->addSeparator();
|
||||
m_thumbMenu->addAction(m_moveToAction);
|
||||
m_thumbMenu->addAction(menu_imageInsert->menuAction());
|
||||
m_thumbMenu->addSeparator();
|
||||
m_thumbMenu->addAction(act_thumbGrid);
|
||||
menu_imageInsert->addAction(ui->act_insert);
|
||||
menu_imageInsert->addAction(ui->act_insertFromScanner);
|
||||
|
||||
ui->act_consume->setVisible(false);
|
||||
ui->act_consume->setVisible(false);
|
||||
|
||||
connect(this, SIGNAL(sane_dev_arrive(QString, bool)), this, SLOT(on_sane_dev_arrive(QString, bool)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(sane_dev_remove(QString)), this, SLOT(on_sane_dev_remove(QString)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(new_image(void*, int)), this, SLOT(on_new_image(void*, int)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(scan_working(QString)), this, SLOT(on_scan_working(QString)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(scan_finish(QString, int)), this, SLOT(on_scan_finish(QString, int)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(fwUpgradeAndDevLock_Finish()), this, SLOT(on_fwUpgradeAndDevLock_Finish()), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(sane_dev_error(QString)), this, SLOT(on_sane_dev_error(QString)), Qt::QueuedConnection);
|
||||
connect(m_dialogLog, SIGNAL(continueScan()), this, SLOT(on_continueScan()));
|
||||
connect(m_dialogLog, SIGNAL(stopScan()), this, SLOT(on_stopScan()));
|
||||
connect(m_dialogLog, SIGNAL(exportScanned()), this, SLOT(on_export_scanned_image()));
|
||||
connect(m_wndStatusBar, SIGNAL(statusInfoDblClick()), this, SLOT(on_statusInfoDblClick()));
|
||||
connect(this, SIGNAL(sane_dev_arrive(QString, bool)), this, SLOT(on_sane_dev_arrive(QString, bool)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(sane_dev_remove(QString)), this, SLOT(on_sane_dev_remove(QString)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(new_image(void*, int)), this, SLOT(on_new_image(void*, int)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(scan_working(QString)), this, SLOT(on_scan_working(QString)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(scan_finish(QString, int)), this, SLOT(on_scan_finish(QString, int)), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(fwUpgradeAndDevLock_Finish()), this, SLOT(on_fwUpgradeAndDevLock_Finish()), Qt::QueuedConnection);
|
||||
connect(this, SIGNAL(sane_dev_error(QString)), this, SLOT(on_sane_dev_error(QString)), Qt::QueuedConnection);
|
||||
connect(m_dialogLog, SIGNAL(continueScan()), this, SLOT(on_continueScan()));
|
||||
connect(m_dialogLog, SIGNAL(stopScan()), this, SLOT(on_stopScan()));
|
||||
connect(m_dialogLog, SIGNAL(exportScanned()), this, SLOT(on_export_scanned_image()));
|
||||
connect(m_wndStatusBar, SIGNAL(statusInfoDblClick()), this, SLOT(on_statusInfoDblClick()));
|
||||
|
||||
m_wndStatusBar->setDeviceStatusInfo(tr("nodevice"), false);
|
||||
m_dialogLog->addLog(tr("nodevice"), false);
|
||||
HGBase_WriteInfo(HGBASE_INFOTYPE_DESC, "%s", getStdString(tr("nodevice")).c_str());
|
||||
connect(ui->menu_device, SIGNAL(scanOptionsChanged(const QString&, const QString&, bool)), this, SLOT(on_scanOptions_changed(const QString&, const QString&, bool)));
|
||||
m_wndStatusBar->setDeviceStatusInfo(tr("nodevice"), false);
|
||||
m_dialogLog->addLog(tr("nodevice"), false);
|
||||
HGBase_WriteInfo(HGBASE_INFOTYPE_DESC, "%s", getStdString(tr("nodevice")).c_str());
|
||||
connect(ui->menu_device, SIGNAL(scanOptionsChanged(const QString&, const QString&, bool)), this, SLOT(on_scanOptions_changed(const QString&, const QString&, bool)));
|
||||
|
||||
QString password = getCfgValue("login", "password", QString(""));
|
||||
if (password.isEmpty())
|
||||
#if defined(OEM_HANWANG)
|
||||
m_password = "hanvonscan";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
m_password = "lanxum";
|
||||
#else
|
||||
m_password = "huagoscan";
|
||||
#endif
|
||||
else
|
||||
m_password = passwordDecrypt(password);
|
||||
QString password = getCfgValue("login", "password", QString(""));
|
||||
if (password.isEmpty())
|
||||
#if defined(OEM_HANWANG)
|
||||
m_password = "hanvonscan";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
m_password = "lanxum";
|
||||
#else
|
||||
m_password = "huagoscan";
|
||||
#endif
|
||||
else
|
||||
m_password = passwordDecrypt(password);
|
||||
|
||||
m_dlgFullScreen = nullptr;
|
||||
m_dialogLog->updateStatus(!dev_que_.opened_scanner_name().empty() && 0 != m_scanType, m_isScanning);
|
||||
updateActionStatus();
|
||||
ui->act_autoSave->setChecked(auto_save_changes_);
|
||||
ui->act_autoSave->setText(tr("auto save"));
|
||||
m_dlgFullScreen = nullptr;
|
||||
m_dialogLog->updateStatus(!dev_que_.opened_scanner_name().empty() && 0 != m_scanType, m_isScanning);
|
||||
updateActionStatus();
|
||||
ui->act_autoSave->setChecked(auto_save_changes_);
|
||||
ui->act_autoSave->setText(tr("auto save"));
|
||||
|
||||
#if defined(OEM_LISICHENG)
|
||||
ui->act_autoSave->setToolTip(tr("when switching pictures, save the edited pictures directly without reminding"));
|
||||
#else
|
||||
#if defined(OEM_LISICHENG)
|
||||
ui->act_autoSave->setToolTip(tr("when switching pictures, save the edited pictures directly without reminding"));
|
||||
#else
|
||||
ui->act_autoSave->setToolTip(tr("when switching pictures, save the edited pictures directly without reminding"));
|
||||
#endif
|
||||
|
||||
ui->act_autoSave->setToolTip(tr("when switching pictures, save the edited pictures directly without reminding"));
|
||||
#endif
|
||||
auto_save_info_.index = 0;
|
||||
ui->act_device_log->setEnabled(false);
|
||||
ui->act_driver_log->setEnabled(false);
|
||||
|
||||
auto_save_info_.index = 0;
|
||||
ui->act_device_log->setEnabled(false);
|
||||
ui->act_driver_log->setEnabled(false);
|
||||
m_vFwUpgradeAndDevLock.clear();
|
||||
m_threadFwUpgradeAndDevLock = NULL;
|
||||
|
||||
m_vFwUpgradeAndDevLock.clear();
|
||||
m_threadFwUpgradeAndDevLock = NULL;
|
||||
|
||||
SANE_Int v = 0;
|
||||
sane_init_ex(&v, sane_ex_callback, this);
|
||||
SANE_Int v = 0;
|
||||
sane_init_ex(&v, sane_ex_callback, this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -3715,8 +3714,6 @@ void MainWindow::upgradeFwAndLockDevice()
|
|||
}
|
||||
}
|
||||
else if (m_vFwUpgradeAndDevLock[index].m_handleFlag & FwUpgradeAndDevLock::DevLock)
|
||||
{
|
||||
if (m_devVersionNum.length() == 10 && m_devVersionNum.right(8) >= "393B1030")
|
||||
{
|
||||
SANE_Bool b = m_vFwUpgradeAndDevLock[index].m_lock;
|
||||
SANE_Bool b2 = SANE_FALSE;
|
||||
|
@ -3733,7 +3730,6 @@ void MainWindow::upgradeFwAndLockDevice()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_scanOptions_changed(const QString &device, const QString &option, bool checked_now)
|
||||
|
|
|
@ -59,9 +59,9 @@ struct FwUpgradeAndDevLock
|
|||
FwUpgradeAndDevLock(const std::string &devName, const std::string &versionNum)
|
||||
{
|
||||
m_devName = devName;
|
||||
m_checkFlag = 0;
|
||||
if (versionNum.length() == 10 && versionNum.substr(2) >= "393B0429")
|
||||
m_checkFlag = FwUpgrade | DevLock;
|
||||
m_checkFlag = DevLock;
|
||||
//if (versionNum.length() == 10 && versionNum.substr(2) >= "393B0429")
|
||||
// m_checkFlag = FwUpgrade | DevLock;
|
||||
m_handleFlag = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue