From f12bc89fa43af7c8e7fd08763de553b8d6ab924a Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Thu, 17 Aug 2023 14:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E9=83=A8=E5=88=86=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84=E7=95=8C=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=96=AD=E5=BC=80=E4=B8=8D=E5=86=8D=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=99=BB=E5=87=BA=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scanner2/mainwindow.cpp | 10 +--------- modules/twainui/cutpapertool.ui | 6 ++++++ modules/twainui/hg_settingdialog.cpp | 10 +++++----- modules/twainui/setpicclrtool.cpp | 7 ++++--- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/app/scanner2/mainwindow.cpp b/app/scanner2/mainwindow.cpp index eece52e7..a32ff13c 100644 --- a/app/scanner2/mainwindow.cpp +++ b/app/scanner2/mainwindow.cpp @@ -396,8 +396,6 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent) ui->act_autoSave->setToolTip(tr("when switching pictures, save the edited pictures directly without reminding")); auto_save_info_.index = 0; - ui->act_device_log->setEnabled(false); - ui->act_driver_log->setEnabled(false); m_pbtn_push = new QPushButton(this); m_pbtn_push->setVisible(false); @@ -1733,7 +1731,7 @@ void MainWindow::updateActionStatus() ui->act_insertFromScanner->setEnabled(!m_isScanning && (m_devUser != nullptr)); ui->menu_scan->setEnabled(!m_isScanning); ui->act_device_log->setEnabled(m_admin_loggedIn && !m_isScanning && (m_devUser != nullptr)); - ui->act_driver_log->setEnabled(m_admin_loggedIn && (m_devUser != nullptr)); + ui->act_driver_log->setEnabled(m_admin_loggedIn); // if(m_dialogLog != nullptr) // m_dialogLog->pbtn_export->setEnabled(ui->act_Export->isEnabled()); @@ -4444,12 +4442,6 @@ void MainWindow::on_act_deleteFile_triggered() void MainWindow::on_act_selectDevice_triggered() { - if (m_admin_loggedIn) - { - m_admin_loggedIn = false; - m_versionDll->PostUserLogoutInfo(HGVERSION_APPNAME_SCANNER, m_oemName); - } - if (nullptr != m_devUser) { disconnect(m_devUser, SIGNAL(newImage(void*)), this, SLOT(on_newImage(void*))); diff --git a/modules/twainui/cutpapertool.ui b/modules/twainui/cutpapertool.ui index 0e5178d6..548a4f93 100644 --- a/modules/twainui/cutpapertool.ui +++ b/modules/twainui/cutpapertool.ui @@ -106,6 +106,12 @@ + + + 120 + 0 + + 毫米(mm) diff --git a/modules/twainui/hg_settingdialog.cpp b/modules/twainui/hg_settingdialog.cpp index 5ac4fa17..e9368047 100644 --- a/modules/twainui/hg_settingdialog.cpp +++ b/modules/twainui/hg_settingdialog.cpp @@ -382,7 +382,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout) m_pbtn_addNew = new QPushButton(this); m_pbtn_addNew->setText(tr("Add new")); - m_pbtn_addNew->setFixedWidth(width / 2); + m_pbtn_addNew->setFixedWidth(100); layout->addWidget(m_pbtn_addNew); connect(m_pbtn_addNew, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management())); @@ -390,7 +390,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout) m_pbtn_Save = new QPushButton(this); m_pbtn_Save->setText(tr("Save")); - m_pbtn_Save->setFixedWidth(width / 2); + m_pbtn_Save->setFixedWidth(100); layout->addWidget(m_pbtn_Save); connect(m_pbtn_Save, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management())); @@ -399,7 +399,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout) m_deleteCur = new QPushButton(this); m_deleteCur->setText(tr("Delete")); m_deleteCur->setEnabled(enabled); - m_deleteCur->setFixedWidth(width / 2); + m_deleteCur->setFixedWidth(100); layout->addWidget(m_deleteCur); connect(m_deleteCur, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management())); @@ -408,7 +408,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout) m_deleteAll = new QPushButton(this); m_deleteAll->setText(tr("Delete all")); m_deleteAll->setEnabled(enabled); - m_deleteAll->setFixedWidth(width / 2); + m_deleteAll->setFixedWidth(100); layout->addWidget(m_deleteAll); connect(m_deleteAll, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management())); @@ -422,7 +422,7 @@ void hg_settingdialog::create_scheme_management_ui(QVBoxLayout* layout) m_pbtn_restore = new QPushButton(this); m_pbtn_restore->setText(tr("Restore")); - m_pbtn_restore->setFixedWidth(width / 2); + m_pbtn_restore->setFixedWidth(100); layout->addWidget(m_pbtn_restore); connect(m_pbtn_restore, SIGNAL(clicked(bool)), this, SLOT(slot_pushButton_scheme_management())); diff --git a/modules/twainui/setpicclrtool.cpp b/modules/twainui/setpicclrtool.cpp index 76001c07..13072848 100644 --- a/modules/twainui/setpicclrtool.cpp +++ b/modules/twainui/setpicclrtool.cpp @@ -113,13 +113,14 @@ void setPicClrTool::setRgbAndColorType(int rgbTypeIndex, int colorTypeIndex) { if (0 == m_colorMode) { - ui->comboBox->setCurrentIndex(rgbTypeIndex); - if (1 != colorTypeIndex) + if (rgbTypeIndex >= 0 && rgbTypeIndex <= 4) + ui->comboBox->setCurrentIndex(rgbTypeIndex); + if (0 == colorTypeIndex || (colorTypeIndex >= 2 && colorTypeIndex <= 4)) ui->colorSetCmb->setCurrentIndex(colorTypeIndex); } else { - if (2 != rgbTypeIndex) + if ((rgbTypeIndex >= 0 && rgbTypeIndex <= 1) || (rgbTypeIndex >= 3 && rgbTypeIndex <= 4)) ui->comboBox->setCurrentIndex(rgbTypeIndex); } }