From 52c14f8038858d4ad7ff8b5f86ce2c5473879ae3 Mon Sep 17 00:00:00 2001
From: yangjiaxuan <171295266@qq.com>
Date: Tue, 19 Jul 2022 18:06:08 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=AE=89=E8=A3=85=E7=89=88?=
=?UTF-8?q?=E6=9C=AC=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/scanner/Scanner_resource.qrc | 1 +
app/scanner/Scanner_zh_CN.ts | 232 ++++++++++----------
app/scanner/mainwindow.cpp | 13 +-
app/upgrade/Upgrade_zh_CN.qm | Bin 0 -> 180 bytes
app/upgrade/Upgrade_zh_CN.ts | 32 +++
app/upgrade/main.cpp | 5 +
app/upgrade/mainwindow.cpp | 13 +-
app/upgrade/mainwindow.ui | 132 ++++++++++-
build-qt/HGSolution/HGUpgrade/HGUpgrade.pro | 9 +
9 files changed, 310 insertions(+), 127 deletions(-)
create mode 100644 app/upgrade/Upgrade_zh_CN.qm
create mode 100644 app/upgrade/Upgrade_zh_CN.ts
diff --git a/app/scanner/Scanner_resource.qrc b/app/scanner/Scanner_resource.qrc
index 394425ad..e7bd82ae 100644
--- a/app/scanner/Scanner_resource.qrc
+++ b/app/scanner/Scanner_resource.qrc
@@ -2,6 +2,7 @@
Scanner_zh_CN.qm
qt_zh_CN.qm
+ ../upgrade/Upgrade_zh_CN.qm
image_rsc/action/btnEmailScanedImages.png
diff --git a/app/scanner/Scanner_zh_CN.ts b/app/scanner/Scanner_zh_CN.ts
index 613c5844..15518ae8 100644
--- a/app/scanner/Scanner_zh_CN.ts
+++ b/app/scanner/Scanner_zh_CN.ts
@@ -303,25 +303,25 @@
所有页
-
-
-
-
+
+
+
+
例如.“%1%2”
-
+
确定
-
+
取消
-
+
文件夹路径
@@ -481,9 +481,9 @@ Page range will be "Chosen Pages".
多页保存(TIFF/PDF/OFD)
-
-
-
+
+
+
输入无效。
@@ -1947,16 +1947,16 @@ Please make sure the two passwords are the same.
-
-
-
-
+
+
+
+
警告
-
+
图像已被修改。
是否保存修改?
@@ -1988,189 +1988,189 @@ Please make sure the two passwords are the same.
扫描完成
-
+
清空并启动扫描
-
+
不清空并启动扫描
-
+
图像列表中已存在图像。
是否清空?
-
+
消息
-
+
磁盘空间不足,请删除不需要的文件,以保证有足够的空间
-
+
打开图片
-
+
插入图片
-
-
-
-
-
+
+
+
+
+
信息
-
-
-
+
+
+
保存失败
-
-
+
+
图片名在列表中已存在
-
+
文件名
-
+
文件路径
-
+
文件大小
-
+
创建时间
-
+
修改时间
-
+
访问时间
-
+
格式
-
+
宽度
-
+
高度
-
+
深度
-
+
色彩模式
-
+
每英寸像素点
-
+
打印尺寸
-
+
帧
-
+
无
-
+
黑白
-
+
灰度
-
+
彩色
-
+
警告
-
+
设备正在运行!
请先结束扫描。
-
+
您确定要关闭
-
+
吗?
-
+
关闭
-
+
错误
-
+
获取版本列表错误
@@ -2181,96 +2181,96 @@ Continue to close?
是否继续关闭?
-
+
是否确定登出管理员账户?
-
+
确认操作
-
+
你确定要清除滚轴计数吗
-
+
请重新进入关于界面以获取最新值
-
+
-
+
-
+
滚轴张数
-
+
打开扫描仪
-
-
+
+
华高扫描软件
-
-
+
+
成功
-
+
应用配置
-
+
成功
-
+
失败
-
-
+
+
失败
-
+
警告
-
+
当前路径磁盘空间不足,
请重新选择路径或及时清理磁盘空间。
-
+
配置丢失
-
+
应用配置
@@ -2278,18 +2278,18 @@ Continue to close?
-
-
+
-
+
-
+
+
启动失败
@@ -2331,14 +2331,14 @@ Continue to close?
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
确定
@@ -2350,13 +2350,13 @@ Continue to close?
-
-
-
-
-
-
-
+
+
+
+
+
+
+
取消
@@ -2382,57 +2382,57 @@ Continue to close?
%1%2%3.%4
-
+
有图像未保存,确定关闭?
-
+
提示
-
+
确定关闭?
-
+
确认操作
-
+
您确定要清除滚轴计数吗
-
-
-
+
+
+
提示
-
-
+
+
辊轴计数已置零
-
-
+
+
重置辊轴计数失败
-
+
错误
-
+
文档丢失!文档可能已被删除或被重命名。
@@ -2465,28 +2465,28 @@ Are you sure to close?
<br>导航地址: <a href='https://j.map.baidu.com/7e/1TO'>百度地图访问</a>
-
+
关于 %1
-
+
<p>%1</p><p>版本: %2<br>版权: © %3</p><p>%4%5%6%7%8%9</p>
-
+
关于 %1
-
+
<p>版本: %1</p>
<p>版本: %1</p>
-
+
<p>版权: © %1</p>
<p>版权: © %1</p>
diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp
index 60cc67d9..3560f8b2 100644
--- a/app/scanner/mainwindow.cpp
+++ b/app/scanner/mainwindow.cpp
@@ -169,7 +169,7 @@ MainWindow::MainWindow(QWidget *parent)
m_thumb->setItemSize(120);
m_thumb->setScrollSize(16);
m_thumb->setMinScrollSliderSize(20);
- m_thumb->setItemTextHeight(0);
+ m_thumb->setItemTextHeight(0);
QImage nullScrollImage(":images/image_rsc/scroll/nullScrollImage.png");
m_view->setNullScrollImage(&nullScrollImage);
@@ -883,7 +883,7 @@ void MainWindow::on_new_image(void *img)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_LZW;
else if (2 == m_aquireIntoSaveParam.m_tiffCompression)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_JPEG;
- }
+ }
HGImgFmt_SaveImageToWriter(m_scanImgFmtWriter, image, &saveInfo);
++m_aquireIntoMultiPageCount;
@@ -1015,7 +1015,7 @@ void MainWindow::on_scan_finish(QString finishInfo, int err)
updateActionStatus();
m_wndStatusBar->setDeviceStatusInfo(finishInfo, (err != SANE_STATUS_GOOD));
m_dialogLog->addLog(finishInfo, (err != SANE_STATUS_GOOD), LOG_EVENT_SCAN_STOPPED);
- HGBase_WriteInfo((err != SANE_STATUS_GOOD) ? HGBASE_INFOTYPE_ERROR : HGBASE_INFOTYPE_DESC,
+ HGBase_WriteInfo((err != SANE_STATUS_GOOD) ? HGBASE_INFOTYPE_ERROR : HGBASE_INFOTYPE_DESC,
"%s", getStdString(finishInfo).c_str());
}
@@ -1099,7 +1099,8 @@ void MainWindow::on_upgradeApp(QString pkgPath)
QStringList argList;
argList.push_back(QString("-appName=%1").arg(HGVERSION_APPNAME_SCANNER));
- argList.push_back(QString("-pkgPath=%1").arg(pkgPath.toStdString().c_str()));
+ argList.push_back(QString("-pkgpath=%1").arg(pkgPath.toStdString().c_str()));
+ argList.push_back(QString("-type=%1").arg("upgrade"));
proc.startDetached("HGUpgrade.exe", argList);
m_closeTip = false;
@@ -1306,9 +1307,9 @@ void MainWindow::updateActionStatus()
ui->act_closeAll->setEnabled(0 != count && (!cur_dev_.is_online() || !m_isScanning));
ui->act_imageInfo->setEnabled(-1 != m_currIndex && (!cur_dev_.is_online() || !m_isScanning));
ui->menu_multiPages->setEnabled(m_multiPageCount > 1 && (!cur_dev_.is_online() || !m_isScanning));
- ui->act_previous->setEnabled(count > 0 && (-1 == m_currIndex || m_currIndex > 0)
+ ui->act_previous->setEnabled(count > 0 && (-1 == m_currIndex || m_currIndex > 0)
&& (!cur_dev_.is_online() || !m_isScanning));
- ui->act_next->setEnabled(count > 0 && (-1 == m_currIndex || m_currIndex < count - 1)
+ ui->act_next->setEnabled(count > 0 && (-1 == m_currIndex || m_currIndex < count - 1)
&& (!cur_dev_.is_online() || !m_isScanning));
ui->act_first->setEnabled(count > 0 && 0 != m_currIndex && (!cur_dev_.is_online() || !m_isScanning));
ui->act_last->setEnabled(count > 0 && count - 1 != m_currIndex && (!cur_dev_.is_online() || !m_isScanning));
diff --git a/app/upgrade/Upgrade_zh_CN.qm b/app/upgrade/Upgrade_zh_CN.qm
new file mode 100644
index 0000000000000000000000000000000000000000..32376ae9259f33a9aae3715f60909c7988abc3e3
GIT binary patch
literal 180
zcmcE7ks@*G{hX<16=n7(EZlq7iGhJZfSE_G4@m2C=(61d(hQkE+{FweSfV>Sj&gv6
z*npVFGq1QLF()UnBr`vc9Vo!%o0ypwo|%`DU(N_pE&@{Sr~99$`+F5{fFy$+2*R~%
lAZu61%u^^R%1
+
+
+
+ MainWindow
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 安装
+
+
+
+
+ 安装中,请稍候...
+
+
+
diff --git a/app/upgrade/main.cpp b/app/upgrade/main.cpp
index c2488a89..b910ffd6 100644
--- a/app/upgrade/main.cpp
+++ b/app/upgrade/main.cpp
@@ -3,6 +3,7 @@
#include
#include
#include
+#include
#include "version/HGVersion.h"
#include "HGUpgrade.h"
@@ -54,6 +55,10 @@ int main(int argc, char *argv[])
while (AppIsRun(appName))
QThread::msleep(20);
+ QTranslator translator_upgrade_;
+ if (translator_upgrade_.load(":translation/upgrade/Upgrade_zh_CN.qm"))
+ a.installTranslator(&translator_upgrade_);
+
MainWindow w(appName, pkgPath);
QScreen *screen = QGuiApplication::primaryScreen();
w.move((screen->size().width() - w.width()) / 2, (screen->size().height() - w.height()) / 2);
diff --git a/app/upgrade/mainwindow.cpp b/app/upgrade/mainwindow.cpp
index 41daf08d..ef5cb365 100644
--- a/app/upgrade/mainwindow.cpp
+++ b/app/upgrade/mainwindow.cpp
@@ -1,6 +1,8 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "HGUpgrade.h"
+#include
+#include
MainWindow::MainWindow(const std::string &appName, const std::string& pkgPath, QWidget *parent)
: QMainWindow(parent)
@@ -11,9 +13,18 @@ MainWindow::MainWindow(const std::string &appName, const std::string& pkgPath, Q
{
ui->setupUi(this);
- setWindowTitle(tr("Installation in progress, please wait..."));
+ setWindowTitle(tr("Installation"));
setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint);
+ ui->label_text->setText(tr("Installation in progress, please wait..."));
+
+ QMovie *movie = new QMovie(":images/image_rsc/logo/waiting.gif");
+ ui->label_gif->setMovie(movie);
+ movie->setCacheMode(QMovie::CacheAll);
+ movie->setScaledSize(QSize(ui->label_gif->width(), ui->label_gif->height()));
+ movie->start();
+ ui->label_gif->show();
+
connect(this, SIGNAL(closeWnd()), this, SLOT(close()), Qt::QueuedConnection);
HGBase_OpenThread(ThreadFunc, this, &m_thread);
diff --git a/app/upgrade/mainwindow.ui b/app/upgrade/mainwindow.ui
index b232854b..024f9277 100644
--- a/app/upgrade/mainwindow.ui
+++ b/app/upgrade/mainwindow.ui
@@ -6,15 +6,139 @@
0
0
- 800
- 600
+ 460
+ 152
MainWindow
-
-
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 1
+
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 41
+ 41
+
+
+
+
+ 41
+ 41
+
+
+
+ gif
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ text
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 2
+
+
+
+
+
+
+
diff --git a/build-qt/HGSolution/HGUpgrade/HGUpgrade.pro b/build-qt/HGSolution/HGUpgrade/HGUpgrade.pro
index 3ef125f2..796662a5 100644
--- a/build-qt/HGSolution/HGUpgrade/HGUpgrade.pro
+++ b/build-qt/HGSolution/HGUpgrade/HGUpgrade.pro
@@ -129,3 +129,12 @@ HEADERS += \
FORMS += \
../../../app/upgrade/mainwindow.ui
+
+RESOURCES += \
+ ../../../app/scanner/Scanner_resource.qrc
+
+TRANSLATIONS += \
+ ../../../app/upgrade/Upgrade_zh_CN.ts \
+
+DISTFILES += \
+ ../../../app/upgrade/Upgrade_zh_CN.qm \