diff --git a/app/scanner/Scanner_zh_CN.qm b/app/scanner/Scanner_zh_CN.qm
index 4a497e40..92a5f420 100644
Binary files a/app/scanner/Scanner_zh_CN.qm and b/app/scanner/Scanner_zh_CN.qm differ
diff --git a/app/scanner/Scanner_zh_CN.ts b/app/scanner/Scanner_zh_CN.ts
index b6c4fc69..613c5844 100644
--- a/app/scanner/Scanner_zh_CN.ts
+++ b/app/scanner/Scanner_zh_CN.ts
@@ -4,85 +4,85 @@
CutPaperTool
-
+
-
+
-
+
-
+
-
+
-
+
0×0×0 {200?}
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
@@ -1418,6 +1418,97 @@ Please make sure the two passwords are the same.
高
+
+ Dialog_updateProgress
+
+
+
+ 安装包下载中...
+
+
+
+
+ 停止
+
+
+
+ Dialog_upgrade
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 升级到最新版本
+
+
+
+
+ 选择其他版本
+
+
+
+
+ 检测到可安装版本:
+
+
+
+
+ 安装
+
+
+
+
+ 取消
+
+
+
+
+ 检查更新
+
+
+
+
+ 升级内容:
+
+
+
+
+ 错误描述:
+
+
+
+
+ 当前为最新版本!版本号为:
+
+
+
+
+ 发现新版本:
+
+
+
+
+ ,当前版本为:
+
+
+
+
+ 提示
+
+
+
+
+ 当前版本已安装!
+
+
GraphicsScene
@@ -1557,316 +1648,321 @@ Please make sure the two passwords are the same.
信息
-
+
设备
-
+
工具栏
-
+
打开...
-
+
插入本地文件...
-
+
保存
-
+
另存为...
-
+
导出...
-
+
关闭选中项
-
+
关闭所有项
-
+
图像信息
-
+
退出
-
+
扫描设置...
-
+
扫描
-
+
扫描单张
-
+
扫描至...
-
+
全屏显示
-
+
适应视图框尺寸
-
+
适应视图框宽度
-
+
真实大小
-
+
放大
-
+
缩小
-
+
工具栏
-
+
状态栏
-
+
缩略图栏
-
+
色彩信息
-
+
上一张
-
+
下一张
-
+
第一张
-
+
最后一张
-
+
跳转至...
-
+
上一页
-
+
下一页
-
+
第一页
-
+
最后一页
-
+
亮度/对比度/伽马...
-
+
左旋转90度
-
+
右旋转90度
-
+
旋转180度
-
+
多页旋转...
-
+
自动裁剪...
-
+
登录...
-
+
密码修改...
-
+
登出
-
+
日志管理...
-
+
清除缓存...
-
+
耗材状态...
-
+
帮助
-
+
关于...
-
+
从扫描插入...
-
+
清除滚轴计数
-
+
图像编辑...
-
+
书籍排序
-
+
自动保存
-
+
+
+ 检查更新
+
+
+
华高扫描软件
-
+
多列显示
-
+
移动到...
-
+
插入文件
-
-
-
+
+
+
没有发现扫描仪
-
-
-
-
-
-
+
+
+
+
+
+
警告
-
-
+
+
图像已被修改。
是否保存修改?
-
+
文件已丢失,是否删除?
@@ -1875,7 +1971,7 @@ Please make sure the two passwords are the same.
已连接
-
+
已断开连接
@@ -1892,182 +1988,192 @@ Please make sure the two passwords are the same.
扫描完成
-
+
清空并启动扫描
-
+
不清空并启动扫描
-
+
图像列表中已存在图像。
是否清空?
-
+
消息
-
+
磁盘空间不足,请删除不需要的文件,以保证有足够的空间
-
+
打开图片
-
+
插入图片
-
-
-
-
-
+
+
+
+
+
信息
-
-
-
+
+
+
保存失败
-
-
+
+
图片名在列表中已存在
-
+
文件名
-
+
文件路径
-
+
文件大小
-
+
创建时间
-
+
修改时间
-
+
访问时间
-
+
格式
-
+
宽度
-
+
高度
-
+
深度
-
+
色彩模式
-
+
每英寸像素点
-
+
打印尺寸
-
+
帧
-
+
无
-
+
黑白
-
+
灰度
-
+
彩色
-
+
警告
-
+
设备正在运行!
请先结束扫描。
-
+
您确定要关闭
-
+
吗?
-
-
+
+
关闭
+
+
+
+ 错误
+
+
+
+
+ 获取版本列表错误
+
@@ -2075,258 +2181,258 @@ Continue to close?
是否继续关闭?
-
+
是否确定登出管理员账户?
-
+
确认操作
-
+
你确定要清除滚轴计数吗
-
+
请重新进入关于界面以获取最新值
-
+
-
+
-
+
滚轴张数
-
+
打开扫描仪
-
-
+
+
华高扫描软件
-
-
+
+
成功
-
+
应用配置
-
+
成功
-
+
失败
-
-
+
+
失败
-
+
警告
-
+
当前路径磁盘空间不足,
请重新选择路径或及时清理磁盘空间。
-
+
配置丢失
-
+
应用配置
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
启动失败
-
+
汉王扫描软件
-
+
立思辰扫描软件
-
+
自动保存
-
+
切换图片时,不提醒,直接保存编辑过的图片
-
+
启用自动保存
-
+
取消自动保存
-
+
切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
确定
-
+
保存,不再提醒
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
取消
-
+
发现设备
-
+
重新连接
-
+
已经连接,但打开失败
-
-
+
+
%1%2%3.%4
-
+
有图像未保存,确定关闭?
-
+
提示
-
+
确定关闭?
-
+
确认操作
-
+
您确定要清除滚轴计数吗
-
-
-
+
+
+
提示
-
-
+
+
辊轴计数已置零
-
-
+
+
重置辊轴计数失败
-
+
错误
-
+
文档丢失!文档可能已被删除或被重命名。
@@ -2359,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>
@@ -2604,7 +2710,7 @@ Are you sure to close?
- 配置方案管理
+ 配置方案管理
diff --git a/app/scanner/dialog_aquireinto.cpp b/app/scanner/dialog_aquireinto.cpp
index f2f3253c..c6a51c3d 100644
--- a/app/scanner/dialog_aquireinto.cpp
+++ b/app/scanner/dialog_aquireinto.cpp
@@ -40,6 +40,11 @@ Dialog_AquireInto::Dialog_AquireInto(QWidget* parent) :
#else
ui->lineEdit_fileName->setText(getCfgValue("aquire", "namePrefix", QString("HGScan")));
#endif
+
+#if defined(OEM_LISICHENG)
+ ui->cbox_format->removeItem(7);
+ ui->cbox_format->removeItem(6);
+#endif
ui->spin_index->setValue(getCfgValue("aquire", "startIndex", 1));
ui->cbox_digit->setCurrentIndex(getCfgValue("aquire", "digit", 2));
ui->cbox_evenOdd->setCurrentIndex(getCfgValue("aquire", "evenOdd", 0));
@@ -62,6 +67,7 @@ Dialog_AquireInto::Dialog_AquireInto(QWidget* parent) :
ui->spin_index->setFixedWidth(160);
ui->cbox_digit->setFixedWidth(80);
+
}
Dialog_AquireInto::~Dialog_AquireInto()
diff --git a/app/scanner/dialog_export.cpp b/app/scanner/dialog_export.cpp
index 2c3aec40..c4aae079 100644
--- a/app/scanner/dialog_export.cpp
+++ b/app/scanner/dialog_export.cpp
@@ -25,6 +25,14 @@ static struct
int attr;
}g_support_type[] =
{
+#if defined(OEM_LISICHENG)
+ {".jpg", "JPG - JPEG / JFIF", FILE_TYPE_ATTR_MORE_OPTIONS}
+ , {".bmp", "BMP - Windows Bitmap", FILE_TYPE_ATTR_NO_MORE_OPTION}
+ , {".png", "PNG - Portable Network Graphics", FILE_TYPE_ATTR_NO_MORE_OPTION}
+ , {".tif", "TIF - TIFF Revision 6", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES | FILE_TYPE_ATTR_MORE_OPTIONS}
+ , {".pdf", "PDF - Portable Document Format", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES}
+ , {".ofd", "OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES}
+#else
{".jpg", "JPG - JPEG / JFIF", FILE_TYPE_ATTR_MORE_OPTIONS}
, {".bmp", "BMP - Windows Bitmap", FILE_TYPE_ATTR_NO_MORE_OPTION}
, {".png", "PNG - Portable Network Graphics", FILE_TYPE_ATTR_NO_MORE_OPTION}
@@ -33,6 +41,7 @@ static struct
, {".ofd", "OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_CONTAIN_MULTI_PAGES}
, {".pdf", "OCR->PDF - Portable Document Format", FILE_TYPE_ATTR_THIRD_HANDLER}
, {".ofd", "OCR->OFD - Open Fixed-layout Document", FILE_TYPE_ATTR_THIRD_HANDLER}
+#endif
};
Dialog_Export::Dialog_Export(int total, const std::vector &selectedIndexs, QWidget *parent) :
diff --git a/app/scanner/dialog_saveas.cpp b/app/scanner/dialog_saveas.cpp
index 0f0bf0d2..a8ea17ae 100644
--- a/app/scanner/dialog_saveas.cpp
+++ b/app/scanner/dialog_saveas.cpp
@@ -15,7 +15,14 @@ Dialog_SaveAs::Dialog_SaveAs(QWidget *parent) :
ui->fileDialog->setWindowFlags(ui->fileDialog->windowFlags() & ~Qt::Dialog);
ui->fileDialog->setOption(QFileDialog::DontUseNativeDialog, true);
ui->fileDialog->setSizeGripEnabled(false);
-
+#if defined(OEM_LISICHENG)
+ ui->fileDialog->setNameFilter("JPG - JPEG / JFIF(*.jpg);;"
+ "BMP - Windows Bitmap(*.bmp);;"
+ "PNG - Portable Network Graphics(*.png);;"
+ "TIF - TIFF Revision 6(*.tif);;"
+ "PDF - Portable Document Format(*.pdf);;"
+ "OFD - Open Fixed-layout Document(*.ofd)");
+#else
ui->fileDialog->setNameFilter("JPG - JPEG / JFIF(*.jpg);;"
"BMP - Windows Bitmap(*.bmp);;"
"PNG - Portable Network Graphics(*.png);;"
@@ -24,6 +31,7 @@ Dialog_SaveAs::Dialog_SaveAs(QWidget *parent) :
"OFD - Open Fixed-layout Document(*.ofd);;"
"OCR->PDF - Portable Document Format(*.pdf);;"
"OCR->OFD - Open Fixed-layout Document(*.ofd)");
+#endif
connect(ui->fileDialog, SIGNAL(accepted()), this, SLOT(on_dialog_accepted()));
connect(ui->fileDialog, SIGNAL(rejected()), this, SLOT(close()));
diff --git a/app/scanner/dialog_updateprogress.cpp b/app/scanner/dialog_updateprogress.cpp
index e5120832..c807c31d 100644
--- a/app/scanner/dialog_updateprogress.cpp
+++ b/app/scanner/dialog_updateprogress.cpp
@@ -78,7 +78,7 @@ void Dialog_updateProgress::ThreadFunc(HGThread thread, HGPointer param)
#endif
emit p->finish();
- emit p->upgradeApp(p->m_savePath);
+ emit p->upgrade(p->m_savePath);
}
else
{
diff --git a/app/scanner/dialog_updateprogress.h b/app/scanner/dialog_updateprogress.h
index 8d279083..17b884f3 100644
--- a/app/scanner/dialog_updateprogress.h
+++ b/app/scanner/dialog_updateprogress.h
@@ -25,7 +25,7 @@ private:
signals:
void updateProgress(int value);
void finish();
- void upgradeApp(QString pkgPath);
+ void upgrade(QString pkgPath);
private slots:
void on_updateProgress(int value);
void on_finish();
diff --git a/app/scanner/dialog_upgrade.cpp b/app/scanner/dialog_upgrade.cpp
new file mode 100644
index 00000000..216de841
--- /dev/null
+++ b/app/scanner/dialog_upgrade.cpp
@@ -0,0 +1,158 @@
+#include "dialog_upgrade.h"
+#include "ui_dialog_upgrade.h"
+#include "base/HGUtility.h"
+#include
+#include
+#include
+#include
+
+Dialog_upgrade::Dialog_upgrade(class VersionDll *versionDll, QWidget *parent) :
+ QDialog(parent)
+ , ui(new Ui::Dialog_upgrade)
+ , m_versionDll(versionDll)
+{
+ ui->setupUi(this);
+ setWindowTitle(tr("upgrade online"));
+ setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
+ this->layout()->setSizeConstraint(QLayout::SetFixedSize);
+
+ ui->listWidget->setVisible(false);
+ ui->pbtn_upgrade->setVisible(false);
+ ui->pbtn_install->setVisible(false);
+ ui->pbtn_cancel->setVisible(false);
+ ui->label->setVisible(false);
+
+ HGVersionInfo *versionInfo = NULL;
+ HGUInt versionCount = 0;
+ m_versionDll->GetVersionList(HGVERSION_APPNAME_SCANNER, &versionInfo, &versionCount);
+
+ for(HGUInt i = 0; i < versionCount; ++i)
+ {
+ QListWidgetItem *listwidgetItem = new QListWidgetItem;
+ listwidgetItem->setText(QString(versionInfo[i].version));
+ listwidgetItem->setData(Qt::UserRole, versionInfo[i].url);
+ listwidgetItem->setData(Qt::UserRole+1, versionInfo[i].md5);
+ listwidgetItem->setToolTip(tr("upgrade contents: ") + versionInfo[i].desc + tr(" bug description: ") + versionInfo[i].bugInfo);
+ ui->listWidget->addItem(listwidgetItem);
+ }
+
+ if(ui->listWidget->count() > 0)
+ {
+ QListWidgetItem *item = ui->listWidget->item(0);
+ item->setSelected(true);
+ }
+
+ HGChar currVersion[64] = {0};
+ m_versionDll->GetCurrVersion(HGVERSION_APPNAME_SCANNER, currVersion, 64);
+ HGInt result = 0;
+ std::string newestVersionNum = ui->listWidget->item(0)->text().toStdString().c_str();
+ m_versionDll->CompareVersion(currVersion, newestVersionNum.c_str(), &result);
+ if(result == 0)
+ {
+ ui->label_detectResult->setText(tr("The current version is the latest! The current version number is : ") + currVersion);
+ ui->pbtn_upgrade->setVisible(false);
+ return;
+ }
+ else
+ {
+ ui->pbtn_upgrade->setVisible(true);
+ ui->label_detectResult->setText(tr("Discover the new version : ") +
+ ui->listWidget->item(0)->text().toStdString().c_str() +
+ tr(" ,the current version is : ") + currVersion);
+ }
+
+ connect(ui->listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(on_listWidget_itemDoubleClicked(QListWidgetItem*)), Qt::QueuedConnection);
+
+ m_versionDll->ReleaseVersionList(versionInfo, versionCount);
+}
+
+Dialog_upgrade::~Dialog_upgrade()
+{
+ delete ui;
+}
+
+void Dialog_upgrade::on_pbtn_install_clicked()
+{
+ QListWidgetItem *item = ui->listWidget->currentItem();
+ on_listWidget_itemDoubleClicked(item);
+ close();
+}
+
+void Dialog_upgrade::on_pbtn_cancel_clicked()
+{
+ close();
+}
+
+void Dialog_upgrade::on_listWidget_itemDoubleClicked(QListWidgetItem *item)
+{
+ close();
+
+ HGChar currVersion[64] = {0};
+ m_versionDll->GetCurrVersion(HGVERSION_APPNAME_SCANNER, currVersion, 64);
+
+ std::string selectVersionNum = item->text().toStdString().c_str();
+ HGInt result = 0;
+ m_versionDll->CompareVersion(currVersion, selectVersionNum.c_str(), &result);
+ if(result == 0)
+ {
+ QMessageBox::information(this, tr("tip"), tr("Already in current version"));
+ return;
+ }
+ else
+ {
+ QString url = item->data(Qt::UserRole).toString();
+ QString versionNum = item->text();
+ QString md5 = item->data(Qt::UserRole+1).toString();
+
+ HGChar savePath[512];
+ HGBase_GetConfigPath(savePath, 512);
+ HGBase_CreateDir(savePath);
+ strcat(savePath, (versionNum + QString("%1").arg(".exe")).toLatin1().data());
+
+ QFile saveFile(savePath);
+ saveFile.open(QFile::ReadOnly);
+ QByteArray fileMsg = saveFile.readAll();
+ saveFile.close();
+ QString md5_2 = QCryptographicHash::hash(fileMsg , QCryptographicHash::Md5).toHex();
+
+ QFile f(savePath);
+ if(!f.exists() || md5 != md5_2)
+ {
+ Dialog_updateProgress *dlg = new Dialog_updateProgress(m_versionDll, url, savePath);
+ dlg->exec();
+ connect(dlg, SIGNAL(upgrade(QString)), this, SLOT(on_upgrade(QString)), Qt::QueuedConnection);
+ }
+ else
+ {
+ on_upgrade(savePath);
+ }
+ }
+}
+
+void Dialog_upgrade::on_upgrade(QString pkgPath)
+{
+ emit upgradeApp(pkgPath);
+}
+
+void Dialog_upgrade::on_pbtn_selectVersion_clicked()
+{
+ if(ui->listWidget->count() == 0)
+ {
+ ui->pbtn_install->setVisible(false);
+ }
+ else
+ {
+ ui->pbtn_install->setVisible(true);
+ }
+ ui->pbtn_selectVersion->setVisible(false);
+ ui->listWidget->setVisible(true);
+ ui->pbtn_cancel->setVisible(true);
+ ui->label->setVisible(true);
+}
+
+void Dialog_upgrade::on_pbtn_upgrade_clicked()
+{
+ QListWidgetItem *item = ui->listWidget->item(0);
+ on_listWidget_itemDoubleClicked(item);
+ close();
+}
diff --git a/app/scanner/dialog_upgrade.h b/app/scanner/dialog_upgrade.h
new file mode 100644
index 00000000..375353af
--- /dev/null
+++ b/app/scanner/dialog_upgrade.h
@@ -0,0 +1,41 @@
+#ifndef DIALOG_UPGRADE_H
+#define DIALOG_UPGRADE_H
+
+#include
+#include "VersionDll.h"
+#include "dialog_updateprogress.h"
+
+namespace Ui {
+class Dialog_upgrade;
+}
+
+class Dialog_upgrade : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit Dialog_upgrade(class VersionDll *versionDll, QWidget *parent = nullptr);
+ ~Dialog_upgrade();
+
+private slots:
+ void on_pbtn_install_clicked();
+
+ void on_pbtn_cancel_clicked();
+
+ void on_listWidget_itemDoubleClicked(QListWidgetItem *item);
+ void on_upgrade(QString pkgPath);
+
+ void on_pbtn_selectVersion_clicked();
+
+ void on_pbtn_upgrade_clicked();
+
+signals:
+ void upgradeApp(QString pkgPath);
+
+private:
+ Ui::Dialog_upgrade *ui;
+
+ VersionDll *m_versionDll;
+};
+
+#endif // DIALOG_UPGRADE_H
diff --git a/app/scanner/dialog_upgrade.ui b/app/scanner/dialog_upgrade.ui
new file mode 100644
index 00000000..77c7fd56
--- /dev/null
+++ b/app/scanner/dialog_upgrade.ui
@@ -0,0 +1,113 @@
+
+
+ Dialog_upgrade
+
+
+
+ 0
+ 0
+ 431
+ 253
+
+
+
+ Dialog
+
+
+ -
+
+
+ detect result. versionNum:
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ upgrade the latest version
+
+
+
+ -
+
+
+ select version
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Detected installable versions:
+
+
+
+ -
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ install
+
+
+
+ -
+
+
+ cancel
+
+
+
+
+
+
+
+
+
+
diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp
index cd09155f..60cc67d9 100644
--- a/app/scanner/mainwindow.cpp
+++ b/app/scanner/mainwindow.cpp
@@ -29,6 +29,7 @@
#include "dialog_moveto.h"
#include "dialog_imageeditor.h"
#include "dialog_updateprogress.h"
+#include "dialog_upgrade.h"
#include "hg_settingdialog.h"
#include "base/HGInfo.h"
#include "imgfmt/HGPdf.h"
@@ -1092,52 +1093,6 @@ void MainWindow::on_statusInfoDblClick()
m_dialogLog->show();
}
-void MainWindow::on_upgrade(QListWidgetItem *item)
-{
- HGChar currVersion[64] = {0};
- m_versionDll->GetCurrVersion(HGVERSION_APPNAME_SCANNER, currVersion, 64);
-
- std::string selectVersionNum = item->text().toStdString().c_str();
-
- m_listwidget->close();
- HGInt result = 0;
- m_versionDll->CompareVersion(currVersion, selectVersionNum.c_str(), &result);
- if(result == 0)
- {
- QMessageBox::information(this, "tip", "Already in current version");
- return;
- }
- else
- {
- QString url = item->data(Qt::UserRole).toString();
- QString versionNum = item->text();
- QString md5 = item->data(Qt::UserRole+1).toString();
-
- HGChar savePath[512];
- HGBase_GetConfigPath(savePath, 512);
- HGBase_CreateDir(savePath);
- strcat(savePath, (versionNum + QString("%1").arg(".exe")).toLatin1().data());
-
- QFile saveFile(savePath);
- saveFile.open(QFile::ReadOnly);
- QByteArray fileMsg = saveFile.readAll();
- saveFile.close();
- QString md5_2 = QCryptographicHash::hash(fileMsg , QCryptographicHash::Md5).toHex();
-
- QFile f(savePath);
- if(!f.exists() || md5 != md5_2)
- {
- Dialog_updateProgress *dlg = new Dialog_updateProgress(m_versionDll, url, savePath);
- dlg->exec();
- connect(dlg, SIGNAL(upgradeApp(QString)), this, SLOT(on_upgradeApp(QString)), Qt::QueuedConnection);
- }
- else
- {
- on_upgradeApp(savePath);
- }
- }
-}
-
void MainWindow::on_upgradeApp(QString pkgPath)
{
QProcess proc;
@@ -3187,31 +3142,19 @@ void MainWindow::on_act_sortPages_triggered()
void MainWindow::on_actionact_update_triggered()
{
- m_listwidget = new QListWidget;
- m_listwidget->setWindowTitle("chose the version");
-
HGVersionInfo *versionInfo = NULL;
HGUInt versionCount = 0;
m_versionDll->GetVersionList(HGVERSION_APPNAME_SCANNER, &versionInfo, &versionCount);
-
if(versionCount > 0)
{
- for(HGUInt i = 0; i < versionCount; ++i)
- {
- QListWidgetItem *listwidgetItem = new QListWidgetItem;
- listwidgetItem->setText(QString(versionInfo[i].version));
- listwidgetItem->setData(Qt::UserRole, versionInfo[i].url);
- listwidgetItem->setData(Qt::UserRole+1, versionInfo[i].md5);
- listwidgetItem->setToolTip(versionInfo[i].desc + tr(" buginfo: ") + versionInfo[i].bugInfo);
- m_listwidget->addItem(listwidgetItem);
- }
- m_listwidget->show();
- connect(m_listwidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(on_upgrade(QListWidgetItem*)), Qt::QueuedConnection);
-
- m_versionDll->ReleaseVersionList(versionInfo, versionCount);
+ Dialog_upgrade dlg(m_versionDll, this);
+ connect(&dlg, SIGNAL(upgradeApp(QString)), this, SLOT(on_upgradeApp(QString)), Qt::QueuedConnection);
+ dlg.exec();
+ disconnect(&dlg, SIGNAL(upgradeApp(QString)), this, SLOT(on_upgradeApp(QString)));
}
else
{
QMessageBox::critical(this, tr("error"), tr("get versionlist failed"));
+ return;
}
}
diff --git a/app/scanner/mainwindow.h b/app/scanner/mainwindow.h
index 39f81a3c..ff6c9652 100644
--- a/app/scanner/mainwindow.h
+++ b/app/scanner/mainwindow.h
@@ -122,7 +122,6 @@ private slots:
void on_continueScan();
void on_stopScan();
void on_statusInfoDblClick();
- void on_upgrade(QListWidgetItem *item);
void on_upgradeApp(QString pkgPath);
void on_act_thumbnailBar_triggered(bool checked);
diff --git a/app/scanner/qt_zh_CN.ts b/app/scanner/qt_zh_CN.ts
index e71303a9..8d2df614 100644
--- a/app/scanner/qt_zh_CN.ts
+++ b/app/scanner/qt_zh_CN.ts
@@ -1132,6 +1132,80 @@ Please make sure the two passwords are the same.
+
+ Dialog_updateProgress
+
+
+
+
+
+
+
+
+
+
+ Dialog_upgrade
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
GraphicsScene
@@ -1834,6 +1908,18 @@ Are you sure to close?
+
+
+
+
+
+
+
+
+
+
+
+
Phonon::
diff --git a/build-qt/HGSolution/HGScanner/HGScanner.pro b/build-qt/HGSolution/HGScanner/HGScanner.pro
index ec2f5afb..eddeabcc 100644
--- a/build-qt/HGSolution/HGScanner/HGScanner.pro
+++ b/build-qt/HGSolution/HGScanner/HGScanner.pro
@@ -162,8 +162,9 @@ SOURCES += \
../../../app/scanner/HGImgView.cpp \
../../../app/scanner/HGUIGlobal.cpp \
../../../utility/HGString.cpp \
- ../../../app/scanner/dialog_input.cpp\
- ../../../app/scanner/dialog_updateprogress.cpp
+ ../../../app/scanner/dialog_input.cpp \
+ ../../../app/scanner/dialog_updateprogress.cpp \
+ ../../../app/scanner/dialog_upgrade.cpp
HEADERS += \
../../../app/scanner/VersionDll.h \
@@ -208,8 +209,9 @@ HEADERS += \
../../../app/scanner/HGUIGlobal.h \
../../../utility/HGString.h \
../../../app/scanner/dialog_input.h \
- ../../../app/scanner/custom_file_dialog.h\
- ../../../app/scanner/dialog_updateprogress.h
+ ../../../app/scanner/custom_file_dialog.h \
+ ../../../app/scanner/dialog_updateprogress.h \
+ ../../../app/scanner/dialog_upgrade.h
FORMS += \
../../../app/scanner/cutdialog.ui \
@@ -240,7 +242,8 @@ FORMS += \
../../../app/scanner/widget_statusbar.ui \
../../../app/scanner/dialog_log.ui \
../../../app/scanner/dialog_input.ui \
- ../../../app/scanner/dialog_updateprogress.ui
+ ../../../app/scanner/dialog_updateprogress.ui \
+ ../../../app/scanner/dialog_upgrade.ui
TRANSLATIONS += \
../../../app/scanner/Scanner_zh_CN.ts \