将app关于信息从驱动层分离到上层管理
This commit is contained in:
parent
9da68e179f
commit
894a47c94a
Binary file not shown.
|
@ -2738,7 +2738,7 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
|
|||
<message>
|
||||
<location filename="mainwindow.cpp" line="2903"/>
|
||||
<source><p>Vendor: %1</p></source>
|
||||
<translation><p>Vendor: %1</p></translation>
|
||||
<translation><p>Manufacturer/Developer: %1</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2909"/>
|
||||
|
@ -2750,24 +2750,24 @@ Please contact the equipment supplier promptly to purchase a replacement paper r
|
|||
<location filename="mainwindow.cpp" line="2908"/>
|
||||
<location filename="mainwindow.cpp" line="2912"/>
|
||||
<source><p>Company website: <a href=%1>%1</p></source>
|
||||
<translation><p>Company website: <a href=%1>%1</p></translation>
|
||||
<translation><p>Company URL: <a href=%1>%1</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2906"/>
|
||||
<location filename="mainwindow.cpp" line="2913"/>
|
||||
<source><p>Company address: %1</p></source>
|
||||
<translation><p>Company address: %1</p></translation>
|
||||
<translation><p>Address: %1</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2907"/>
|
||||
<location filename="mainwindow.cpp" line="2914"/>
|
||||
<source><p>Company telephone: %1</p></source>
|
||||
<translation><p>Company telephone: %1</p></translation>
|
||||
<translation><p>Contact number: %1</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2915"/>
|
||||
<source><p>Company GPS: <a href=%1>%2</p></source>
|
||||
<translation><p>Company GPS: <a href=%1>%2</p></translation>
|
||||
<translation><p>Navigation address: <a href=%1>%2</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2915"/>
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
#include "HGUIGlobal.h"
|
||||
#include "HGString.h"
|
||||
#include "app_cfg.h"
|
||||
#include "app_about_info/appAboutInfo.h"
|
||||
#include <assert.h>
|
||||
#include "dialog_wrong_img.h"
|
||||
#include "../../code_device/hgdriver/hgdev/char_const.h"
|
||||
#include "lang/app_language.h"
|
||||
|
||||
#define PASSWORD_KEY 4
|
||||
|
@ -2900,39 +2900,65 @@ void MainWindow::on_act_help_triggered()
|
|||
|
||||
void MainWindow::on_act_about_triggered()
|
||||
{
|
||||
if (m_devUser == nullptr)
|
||||
{
|
||||
QMessageBox::information(this, tr("Prompt"), tr("Please go to 'Menu Bar ->Scan' to select a device"));
|
||||
return;
|
||||
}
|
||||
const char* oem = HGVERSION_OEMNAME_HUAGO;
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
HGTwainDeviceCustomInfo info = {0};
|
||||
m_devUser->GetDeviceCustomInfo(&info);
|
||||
#else
|
||||
HGSaneDeviceCustomInfo info = {0};
|
||||
m_devUser->GetDeviceCustomInfo(&info);
|
||||
#if defined(OEM_HANWANG)
|
||||
oem = HGVERSION_OEMNAME_HANVON;
|
||||
#elif defined(OEM_LISICHENG)
|
||||
oem = HGVERSION_OEMNAME_LANXUM;
|
||||
#elif defined(OEM_CANGTIAN)
|
||||
oem = HGVERSION_OEMNAME_CUMTENN;
|
||||
#elif defined(OEM_ZHONGJING)
|
||||
oem = HGVERSION_OEMNAME_MICROTEK;
|
||||
#elif defined(OEM_ZIGUANG)
|
||||
oem = HGVERSION_OEMNAME_UNIS;
|
||||
#elif defined(OEM_NEUTRAL)
|
||||
oem = HGVERSION_OEMNAME_NEUTRAL;
|
||||
#elif defined(OEM_DELI)
|
||||
oem = HGVERSION_OEMNAME_DELI;
|
||||
#endif
|
||||
|
||||
HGChar version[32] = { 0 };
|
||||
HGVersion_GetCurrVersion(HGVERSION_APPNAME_SCANNER, oem, version, 32);
|
||||
|
||||
QString title = tr("about %1").arg(windowTitle());
|
||||
QString content;
|
||||
content += tr("<p>DriverVer: %1</p>").arg(QString(info.driverVer));
|
||||
content += tr("<p>Vendor: %1</p>").arg(QString::fromLocal8Bit(info.vendor));
|
||||
content += tr("<p>DriverVer: %1</p>").arg(QString::fromLocal8Bit(version));
|
||||
|
||||
#if defined(OEM_ZHONGJING)
|
||||
content += tr("<p>Company address: %1</p>").arg(QString::fromLocal8Bit(info.comAddr));
|
||||
content += tr("<p>Company telephone: %1</p>").arg(QString(info.comTel));
|
||||
content += tr("<p>Company website: <a href=%1>%1</p>").arg(QString(info.comUrl));
|
||||
content += tr("<p>Copyright: %1</p>").arg(QString::fromLocal8Bit(info.copyright));
|
||||
#if defined(OEM_NEUTRAL)
|
||||
QMessageBox::about(this, title, content);
|
||||
#else
|
||||
content += tr("<p>Copyright: %1</p>").arg(QString::fromLocal8Bit(info.copyright));
|
||||
content += tr("<p>Company website: <a href=%1>%1</p>").arg(QString(info.comUrl));
|
||||
content += tr("<p>Company address: %1</p>").arg(QString::fromLocal8Bit(info.comAddr));
|
||||
content += tr("<p>Company telephone: %1</p>").arg(QString(info.comTel));
|
||||
content += tr("<p>Company GPS: <a href=%1>%2</p>").arg(QString(info.comGps)).arg(tr("Baidu map access"));
|
||||
#endif
|
||||
|
||||
#if defined(OEM_ZHONGJING)
|
||||
QString appLang = getCfgValue("global", "language", QString("chinese"));
|
||||
if (appLang == "chinese")
|
||||
{
|
||||
content += tr("<p>Vendor: %1</p>").arg(QString::fromLocal8Bit(COMPANY_NAME));
|
||||
content += tr("<p>Company address: %1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_ADDRESS));
|
||||
content += tr("<p>Company telephone: %1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_TEL));
|
||||
content += tr("<p>Company website: <a href=%1>%1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_URL));
|
||||
content += tr("<p>Copyright: %1</p>").arg(QString::fromLocal8Bit(BRAND_COPYRIGHT));
|
||||
}
|
||||
else if(appLang == "english")
|
||||
{
|
||||
content += tr("<p>Vendor: %1</p>").arg(QString::fromLocal8Bit(COMPANY_NAME_EN));
|
||||
content += tr("<p>Company address: %1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_ADDRESS_EN));
|
||||
content += tr("<p>Company telephone: %1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_TEL));
|
||||
content += tr("<p>Company website: <a href=%1>%1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_URL));
|
||||
content += tr("<p>Copyright: %1</p>").arg(QString::fromLocal8Bit(BRAND_COPYRIGHT_EN));
|
||||
}
|
||||
#else
|
||||
content += tr("<p>Vendor: %1</p>").arg(QString::fromLocal8Bit(COMPANY_NAME));
|
||||
content += tr("<p>Copyright: %1</p>").arg(QString::fromLocal8Bit(BRAND_COPYRIGHT));
|
||||
content += tr("<p>Company website: <a href=%1>%1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_URL));
|
||||
content += tr("<p>Company address: %1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_ADDRESS));
|
||||
content += tr("<p>Company telephone: %1</p>").arg(QString::fromLocal8Bit(BRAND_COMPANY_TEL));
|
||||
content += tr("<p>Company GPS: <a href=%1>%2</p>").arg(QString::fromLocal8Bit(BRAND_URL_GPS)).arg(tr("Baidu map access"));
|
||||
#endif
|
||||
|
||||
QMessageBox::about(this, title, content);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::on_act_scannerSettings_triggered()
|
||||
|
@ -2957,6 +2983,7 @@ void MainWindow::on_act_scannerSettings_triggered()
|
|||
deviceIsOnline = false;
|
||||
else if (HGSANE_ERR_FAIL == ret)
|
||||
openSucceed = false;
|
||||
#endif
|
||||
|
||||
if (!deviceIsOnline)
|
||||
{
|
||||
|
@ -2968,8 +2995,6 @@ void MainWindow::on_act_scannerSettings_triggered()
|
|||
QMessageBox::information(this, tr("Prompt"), tr("Open failed"));
|
||||
deleteDevUser();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_act_acquire_triggered()
|
||||
|
|
|
@ -85,7 +85,7 @@ win32 {
|
|||
|
||||
LIBS += -lgdi32 -lgdiplus -ldbghelp -luser32 -ladvapi32
|
||||
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX}Base -l$${OEM_PREFIX}ImgFmt -l$${OEM_PREFIX}ImgProc\
|
||||
-l$${OEM_PREFIX}TwainUser
|
||||
-l$${OEM_PREFIX}TwainUser -l$${OEM_PREFIX}Version
|
||||
LIBS += -L$$PWD/../../../../sdk/lib/win/$${MY_ARCH}/OEM/$${OEM_NAME} -llang
|
||||
|
||||
# sane.dll
|
||||
|
@ -130,7 +130,7 @@ unix {
|
|||
|
||||
LIBS += -lpthread -ldl
|
||||
LIBS += -L$$PWD/../../build/$${MY_OS}/$${OEM_NAME}/$${MY_ARCH}/$${MY_CONFIGURE} -l$${OEM_PREFIX2}Base -l$${OEM_PREFIX2}ImgFmt -l$${OEM_PREFIX2}ImgProc\
|
||||
-l$${OEM_PREFIX2}SaneUI -l$${OEM_PREFIX2}SaneUser
|
||||
-l$${OEM_PREFIX2}SaneUI -l$${OEM_PREFIX2}SaneUser -l$${OEM_PREFIX2}Version
|
||||
|
||||
LIBS += -L$$PWD/../../../../release/$${MY_OS}/$${MY_ARCH2} -llang
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue