Merge branch 'master' of http://192.168.100.140:8099/sane/code_app
This commit is contained in:
commit
beefaad609
Binary file not shown.
|
@ -1544,42 +1544,64 @@ Please make sure the two passwords are the same.</source>
|
|||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="15"/>
|
||||
<location filename="dialog_upgrade.cpp" line="17"/>
|
||||
<source>upgrade online</source>
|
||||
<translation>检查更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="35"/>
|
||||
<source>upgrade contents: </source>
|
||||
<translation>升级内容:</translation>
|
||||
<translation type="vanished">升级内容:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="35"/>
|
||||
<source> bug description: </source>
|
||||
<translation>错误描述:</translation>
|
||||
<translation type="vanished">错误描述:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="52"/>
|
||||
<location filename="dialog_upgrade.cpp" line="37"/>
|
||||
<source>bug description:
|
||||
</source>
|
||||
<translation>错误描述:
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="41"/>
|
||||
<location filename="dialog_upgrade.cpp" line="45"/>
|
||||
<source>upgrade contents:
|
||||
</source>
|
||||
<translation>升级内容:
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="45"/>
|
||||
<source>
|
||||
bug description:
|
||||
</source>
|
||||
<translation>
|
||||
错误描述:
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="63"/>
|
||||
<source>The current version is the latest! The current version number is : </source>
|
||||
<translation>当前为最新版本!版本号为:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="59"/>
|
||||
<location filename="dialog_upgrade.cpp" line="69"/>
|
||||
<source>Discover the new version : </source>
|
||||
<translation>发现新版本:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="61"/>
|
||||
<location filename="dialog_upgrade.cpp" line="71"/>
|
||||
<source> ,the current version is : </source>
|
||||
<translation> ,当前版本为:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="98"/>
|
||||
<location filename="dialog_upgrade.cpp" line="107"/>
|
||||
<source>tip</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_upgrade.cpp" line="98"/>
|
||||
<location filename="dialog_upgrade.cpp" line="107"/>
|
||||
<source>Already in current version</source>
|
||||
<translation>当前版本已安装!</translation>
|
||||
</message>
|
||||
|
@ -2003,46 +2025,46 @@ Please make sure the two passwords are the same.</source>
|
|||
<translation>华高扫描软件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="228"/>
|
||||
<location filename="mainwindow.cpp" line="231"/>
|
||||
<source>Grid</source>
|
||||
<translation>多列显示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="233"/>
|
||||
<location filename="mainwindow.cpp" line="236"/>
|
||||
<source>Move To...</source>
|
||||
<translation>移动到...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="237"/>
|
||||
<location filename="mainwindow.cpp" line="240"/>
|
||||
<source>Insert files</source>
|
||||
<translation>插入文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="263"/>
|
||||
<location filename="mainwindow.cpp" line="264"/>
|
||||
<location filename="mainwindow.cpp" line="265"/>
|
||||
<location filename="mainwindow.cpp" line="266"/>
|
||||
<location filename="mainwindow.cpp" line="267"/>
|
||||
<location filename="mainwindow.cpp" line="268"/>
|
||||
<source>nodevice</source>
|
||||
<translation>没有发现扫描仪</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="479"/>
|
||||
<location filename="mainwindow.cpp" line="534"/>
|
||||
<location filename="mainwindow.cpp" line="1373"/>
|
||||
<location filename="mainwindow.cpp" line="1397"/>
|
||||
<location filename="mainwindow.cpp" line="2124"/>
|
||||
<location filename="mainwindow.cpp" line="2444"/>
|
||||
<location filename="mainwindow.cpp" line="482"/>
|
||||
<location filename="mainwindow.cpp" line="537"/>
|
||||
<location filename="mainwindow.cpp" line="1476"/>
|
||||
<location filename="mainwindow.cpp" line="1500"/>
|
||||
<location filename="mainwindow.cpp" line="2227"/>
|
||||
<location filename="mainwindow.cpp" line="2547"/>
|
||||
<source>Question</source>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="480"/>
|
||||
<location filename="mainwindow.cpp" line="1374"/>
|
||||
<location filename="mainwindow.cpp" line="483"/>
|
||||
<location filename="mainwindow.cpp" line="1477"/>
|
||||
<source>modified, save it?</source>
|
||||
<translation>图像已被修改。
|
||||
是否保存修改?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="535"/>
|
||||
<location filename="mainwindow.cpp" line="538"/>
|
||||
<source>file lost, remove it?</source>
|
||||
<translation>文件已丢失,是否删除?</translation>
|
||||
</message>
|
||||
|
@ -2051,7 +2073,7 @@ Please make sure the two passwords are the same.</source>
|
|||
<translation type="vanished"> 已连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="765"/>
|
||||
<location filename="mainwindow.cpp" line="768"/>
|
||||
<source> disconnected</source>
|
||||
<translation> 已断开连接</translation>
|
||||
</message>
|
||||
|
@ -2068,189 +2090,190 @@ Please make sure the two passwords are the same.</source>
|
|||
<translation type="vanished">扫描完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1394"/>
|
||||
<location filename="mainwindow.cpp" line="1497"/>
|
||||
<source>Clear, then start scan</source>
|
||||
<translation>清空并启动扫描</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1395"/>
|
||||
<location filename="mainwindow.cpp" line="1498"/>
|
||||
<source>Do NOT clear, then start scan</source>
|
||||
<translation>不清空并启动扫描</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1398"/>
|
||||
<location filename="mainwindow.cpp" line="1501"/>
|
||||
<source>Already exist images in image list.
|
||||
Do you want to clear?</source>
|
||||
<translation>图像列表中已存在图像。
|
||||
是否清空?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1432"/>
|
||||
<location filename="mainwindow.cpp" line="1535"/>
|
||||
<source>Information</source>
|
||||
<translation>消息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1433"/>
|
||||
<location filename="mainwindow.cpp" line="1536"/>
|
||||
<source>Insufficient disk space</source>
|
||||
<translation>磁盘空间不足,请删除不需要的文件,以保证有足够的空间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1619"/>
|
||||
<location filename="mainwindow.cpp" line="1722"/>
|
||||
<source>Open images</source>
|
||||
<translation>打开图片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1630"/>
|
||||
<location filename="mainwindow.cpp" line="1733"/>
|
||||
<source>Insert images</source>
|
||||
<translation>插入图片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1804"/>
|
||||
<location filename="mainwindow.cpp" line="1809"/>
|
||||
<location filename="mainwindow.cpp" line="1864"/>
|
||||
<location filename="mainwindow.cpp" line="1940"/>
|
||||
<location filename="mainwindow.cpp" line="1945"/>
|
||||
<location filename="mainwindow.cpp" line="1907"/>
|
||||
<location filename="mainwindow.cpp" line="1912"/>
|
||||
<location filename="mainwindow.cpp" line="1967"/>
|
||||
<location filename="mainwindow.cpp" line="2043"/>
|
||||
<location filename="mainwindow.cpp" line="2048"/>
|
||||
<source>info</source>
|
||||
<translation>信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1804"/>
|
||||
<location filename="mainwindow.cpp" line="1864"/>
|
||||
<location filename="mainwindow.cpp" line="1940"/>
|
||||
<location filename="mainwindow.cpp" line="1907"/>
|
||||
<location filename="mainwindow.cpp" line="1967"/>
|
||||
<location filename="mainwindow.cpp" line="2043"/>
|
||||
<source>save failed</source>
|
||||
<translation>保存失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1809"/>
|
||||
<location filename="mainwindow.cpp" line="1945"/>
|
||||
<location filename="mainwindow.cpp" line="1912"/>
|
||||
<location filename="mainwindow.cpp" line="2048"/>
|
||||
<source>find savePath in thumbnail</source>
|
||||
<translation>图片名在列表中已存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2029"/>
|
||||
<location filename="mainwindow.cpp" line="2132"/>
|
||||
<source>File name</source>
|
||||
<translation>文件名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2029"/>
|
||||
<location filename="mainwindow.cpp" line="2132"/>
|
||||
<source>File path</source>
|
||||
<translation>文件路径</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2029"/>
|
||||
<location filename="mainwindow.cpp" line="2132"/>
|
||||
<source>File size</source>
|
||||
<translation>文件大小</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2029"/>
|
||||
<location filename="mainwindow.cpp" line="2132"/>
|
||||
<source>Creation date/time</source>
|
||||
<translation>创建时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2029"/>
|
||||
<location filename="mainwindow.cpp" line="2132"/>
|
||||
<source>Modified date/time</source>
|
||||
<translation>修改时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2029"/>
|
||||
<location filename="mainwindow.cpp" line="2132"/>
|
||||
<source>Accessed date/time</source>
|
||||
<translation>访问时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2072"/>
|
||||
<location filename="mainwindow.cpp" line="2175"/>
|
||||
<source>Format</source>
|
||||
<translation>格式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2072"/>
|
||||
<location filename="mainwindow.cpp" line="2175"/>
|
||||
<source>Width</source>
|
||||
<translation>宽度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2072"/>
|
||||
<location filename="mainwindow.cpp" line="2175"/>
|
||||
<source>Height</source>
|
||||
<translation>高度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2072"/>
|
||||
<location filename="mainwindow.cpp" line="2175"/>
|
||||
<source>depth</source>
|
||||
<translation>深度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2072"/>
|
||||
<location filename="mainwindow.cpp" line="2175"/>
|
||||
<source>Color model</source>
|
||||
<translation>色彩模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2072"/>
|
||||
<location filename="mainwindow.cpp" line="2175"/>
|
||||
<source>DPI</source>
|
||||
<translation>每英寸像素点</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2072"/>
|
||||
<location filename="mainwindow.cpp" line="2175"/>
|
||||
<source>Print size</source>
|
||||
<translation>打印尺寸</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2072"/>
|
||||
<location filename="mainwindow.cpp" line="2175"/>
|
||||
<source>Frame</source>
|
||||
<translation>帧</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2080"/>
|
||||
<location filename="mainwindow.cpp" line="2183"/>
|
||||
<source>None</source>
|
||||
<translation>无</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2080"/>
|
||||
<location filename="mainwindow.cpp" line="2183"/>
|
||||
<source>Mono</source>
|
||||
<translation>黑白</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2080"/>
|
||||
<location filename="mainwindow.cpp" line="2183"/>
|
||||
<source>Gray</source>
|
||||
<translation>灰度</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2080"/>
|
||||
<location filename="mainwindow.cpp" line="2183"/>
|
||||
<source>Color</source>
|
||||
<translation>彩色</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2101"/>
|
||||
<location filename="mainwindow.cpp" line="2204"/>
|
||||
<source>Warning</source>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2101"/>
|
||||
<location filename="mainwindow.cpp" line="2204"/>
|
||||
<source>Device is Running!
|
||||
Please finish scanning first.</source>
|
||||
<translation>设备正在运行!
|
||||
请先结束扫描。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3112"/>
|
||||
<location filename="mainwindow.cpp" line="3215"/>
|
||||
<source>Are you sure to close </source>
|
||||
<translation>您确定要关闭</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3112"/>
|
||||
<location filename="mainwindow.cpp" line="3215"/>
|
||||
<source> ?</source>
|
||||
<translation>吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3121"/>
|
||||
<location filename="mainwindow.cpp" line="3122"/>
|
||||
<location filename="mainwindow.cpp" line="3224"/>
|
||||
<location filename="mainwindow.cpp" line="3225"/>
|
||||
<source>close </source>
|
||||
<translation>关闭</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3159"/>
|
||||
<location filename="mainwindow.cpp" line="1206"/>
|
||||
<location filename="mainwindow.cpp" line="3315"/>
|
||||
<source>error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3159"/>
|
||||
<location filename="mainwindow.cpp" line="3315"/>
|
||||
<source>get versionlist failed</source>
|
||||
<translation>获取版本列表错误</translation>
|
||||
</message>
|
||||
|
@ -2261,115 +2284,115 @@ Continue to close?</source>
|
|||
是否继续关闭?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2445"/>
|
||||
<location filename="mainwindow.cpp" line="2548"/>
|
||||
<source>Sure to sign out administrator account?</source>
|
||||
<translation>是否确定登出管理员账户?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2566"/>
|
||||
<location filename="mainwindow.cpp" line="2669"/>
|
||||
<source>confirm the operation</source>
|
||||
<translation>确认操作</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2567"/>
|
||||
<location filename="mainwindow.cpp" line="2670"/>
|
||||
<source>Are you sure to clear the rollor acount?</source>
|
||||
<translation>你确定要清除滚轴计数吗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2583"/>
|
||||
<location filename="mainwindow.cpp" line="2686"/>
|
||||
<source>Please re-enter the Abount screen to obtain the latest value</source>
|
||||
<translation>请重新进入关于界面以获取最新值</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2628"/>
|
||||
<location filename="mainwindow.cpp" line="2731"/>
|
||||
<source><p>%1: <a href='%2'>%3</a></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2630"/>
|
||||
<location filename="mainwindow.cpp" line="2733"/>
|
||||
<source><p>%1: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2632"/>
|
||||
<location filename="mainwindow.cpp" line="2735"/>
|
||||
<source>roller number</source>
|
||||
<translation>滚轴张数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2982"/>
|
||||
<location filename="mainwindow.cpp" line="3085"/>
|
||||
<source>open scanner </source>
|
||||
<translation>打开扫描仪</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2983"/>
|
||||
<location filename="mainwindow.cpp" line="3046"/>
|
||||
<location filename="mainwindow.cpp" line="3086"/>
|
||||
<location filename="mainwindow.cpp" line="3149"/>
|
||||
<source>app name</source>
|
||||
<translation>华高扫描软件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2988"/>
|
||||
<location filename="mainwindow.cpp" line="3085"/>
|
||||
<location filename="mainwindow.cpp" line="3091"/>
|
||||
<location filename="mainwindow.cpp" line="3188"/>
|
||||
<source>success</source>
|
||||
<translation>成功</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2997"/>
|
||||
<location filename="mainwindow.cpp" line="3100"/>
|
||||
<source>apply setting </source>
|
||||
<translation>应用配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2997"/>
|
||||
<location filename="mainwindow.cpp" line="3100"/>
|
||||
<source> success</source>
|
||||
<translation>成功</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2997"/>
|
||||
<location filename="mainwindow.cpp" line="3100"/>
|
||||
<source> failed</source>
|
||||
<translation>失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3015"/>
|
||||
<location filename="mainwindow.cpp" line="3100"/>
|
||||
<location filename="mainwindow.cpp" line="3118"/>
|
||||
<location filename="mainwindow.cpp" line="3203"/>
|
||||
<source>failed</source>
|
||||
<translation>失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3038"/>
|
||||
<location filename="mainwindow.cpp" line="3141"/>
|
||||
<source>warning</source>
|
||||
<translation>警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3038"/>
|
||||
<location filename="mainwindow.cpp" line="3141"/>
|
||||
<source>the disk space in the current path is unsufficient, please select a new path or clear the disk space in time.</source>
|
||||
<translation>当前路径磁盘空间不足,
|
||||
请重新选择路径或及时清理磁盘空间。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3054"/>
|
||||
<location filename="mainwindow.cpp" line="3157"/>
|
||||
<source>lost config</source>
|
||||
<translation>配置丢失</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3081"/>
|
||||
<location filename="mainwindow.cpp" line="3184"/>
|
||||
<source>apply setting</source>
|
||||
<translation>应用配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="1052"/>
|
||||
<location filename="mainwindow.cpp" line="1053"/>
|
||||
<location filename="mainwindow.cpp" line="1054"/>
|
||||
<location filename="mainwindow.cpp" line="2718"/>
|
||||
<location filename="mainwindow.cpp" line="2719"/>
|
||||
<location filename="mainwindow.cpp" line="2720"/>
|
||||
<location filename="mainwindow.cpp" line="2766"/>
|
||||
<location filename="mainwindow.cpp" line="2767"/>
|
||||
<location filename="mainwindow.cpp" line="2768"/>
|
||||
<location filename="mainwindow.cpp" line="2829"/>
|
||||
<location filename="mainwindow.cpp" line="2830"/>
|
||||
<location filename="mainwindow.cpp" line="2831"/>
|
||||
<location filename="mainwindow.cpp" line="2892"/>
|
||||
<location filename="mainwindow.cpp" line="2893"/>
|
||||
<location filename="mainwindow.cpp" line="2894"/>
|
||||
<location filename="mainwindow.cpp" line="1055"/>
|
||||
<location filename="mainwindow.cpp" line="1056"/>
|
||||
<location filename="mainwindow.cpp" line="1057"/>
|
||||
<location filename="mainwindow.cpp" line="2821"/>
|
||||
<location filename="mainwindow.cpp" line="2822"/>
|
||||
<location filename="mainwindow.cpp" line="2823"/>
|
||||
<location filename="mainwindow.cpp" line="2869"/>
|
||||
<location filename="mainwindow.cpp" line="2870"/>
|
||||
<location filename="mainwindow.cpp" line="2871"/>
|
||||
<location filename="mainwindow.cpp" line="2932"/>
|
||||
<location filename="mainwindow.cpp" line="2933"/>
|
||||
<location filename="mainwindow.cpp" line="2934"/>
|
||||
<location filename="mainwindow.cpp" line="2995"/>
|
||||
<location filename="mainwindow.cpp" line="2996"/>
|
||||
<location filename="mainwindow.cpp" line="2997"/>
|
||||
<source>start failed</source>
|
||||
<translation>启动失败</translation>
|
||||
</message>
|
||||
|
@ -2384,135 +2407,141 @@ Continue to close?</source>
|
|||
<translation>立思辰扫描软件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="284"/>
|
||||
<location filename="mainwindow.cpp" line="287"/>
|
||||
<source>auto save</source>
|
||||
<translation>自动保存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="285"/>
|
||||
<location filename="mainwindow.cpp" line="288"/>
|
||||
<source>when switching pictures, save the edited pictures directly without reminding</source>
|
||||
<translation>切换图片时,不提醒,直接保存编辑过的图片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="437"/>
|
||||
<location filename="mainwindow.cpp" line="440"/>
|
||||
<source>enabling automatic saving</source>
|
||||
<translation>启用自动保存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="441"/>
|
||||
<location filename="mainwindow.cpp" line="444"/>
|
||||
<source>cancel auto save</source>
|
||||
<translation>取消自动保存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="474"/>
|
||||
<location filename="mainwindow.cpp" line="477"/>
|
||||
<source>Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save</source>
|
||||
<translation>切换图片时,自动保存编辑过的图像。若想取消,请取消勾选菜单项:图像->自动保存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="482"/>
|
||||
<location filename="mainwindow.cpp" line="537"/>
|
||||
<location filename="mainwindow.cpp" line="1376"/>
|
||||
<location filename="mainwindow.cpp" line="1434"/>
|
||||
<location filename="mainwindow.cpp" line="2127"/>
|
||||
<location filename="mainwindow.cpp" line="2141"/>
|
||||
<location filename="mainwindow.cpp" line="2446"/>
|
||||
<location filename="mainwindow.cpp" line="2500"/>
|
||||
<location filename="mainwindow.cpp" line="2569"/>
|
||||
<location filename="mainwindow.cpp" line="3114"/>
|
||||
<location filename="mainwindow.cpp" line="485"/>
|
||||
<location filename="mainwindow.cpp" line="540"/>
|
||||
<location filename="mainwindow.cpp" line="1209"/>
|
||||
<location filename="mainwindow.cpp" line="1479"/>
|
||||
<location filename="mainwindow.cpp" line="1537"/>
|
||||
<location filename="mainwindow.cpp" line="2230"/>
|
||||
<location filename="mainwindow.cpp" line="2244"/>
|
||||
<location filename="mainwindow.cpp" line="2549"/>
|
||||
<location filename="mainwindow.cpp" line="2603"/>
|
||||
<location filename="mainwindow.cpp" line="2672"/>
|
||||
<location filename="mainwindow.cpp" line="3217"/>
|
||||
<source>yes</source>
|
||||
<translation>确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="483"/>
|
||||
<location filename="mainwindow.cpp" line="486"/>
|
||||
<source>save, do not remind again</source>
|
||||
<translation>保存,不再提醒</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="484"/>
|
||||
<location filename="mainwindow.cpp" line="538"/>
|
||||
<location filename="mainwindow.cpp" line="1377"/>
|
||||
<location filename="mainwindow.cpp" line="2128"/>
|
||||
<location filename="mainwindow.cpp" line="2142"/>
|
||||
<location filename="mainwindow.cpp" line="2447"/>
|
||||
<location filename="mainwindow.cpp" line="2501"/>
|
||||
<location filename="mainwindow.cpp" line="2570"/>
|
||||
<location filename="mainwindow.cpp" line="3115"/>
|
||||
<location filename="mainwindow.cpp" line="487"/>
|
||||
<location filename="mainwindow.cpp" line="541"/>
|
||||
<location filename="mainwindow.cpp" line="1480"/>
|
||||
<location filename="mainwindow.cpp" line="2231"/>
|
||||
<location filename="mainwindow.cpp" line="2245"/>
|
||||
<location filename="mainwindow.cpp" line="2550"/>
|
||||
<location filename="mainwindow.cpp" line="2604"/>
|
||||
<location filename="mainwindow.cpp" line="2673"/>
|
||||
<location filename="mainwindow.cpp" line="3218"/>
|
||||
<source>no</source>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="717"/>
|
||||
<location filename="mainwindow.cpp" line="720"/>
|
||||
<source>found device </source>
|
||||
<translation>发现设备</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="727"/>
|
||||
<location filename="mainwindow.cpp" line="730"/>
|
||||
<source> reconnected</source>
|
||||
<translation>重新连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="729"/>
|
||||
<location filename="mainwindow.cpp" line="732"/>
|
||||
<source>already connected, but open faild</source>
|
||||
<translation>已经连接,但打开失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="845"/>
|
||||
<location filename="mainwindow.cpp" line="944"/>
|
||||
<location filename="mainwindow.cpp" line="848"/>
|
||||
<location filename="mainwindow.cpp" line="947"/>
|
||||
<source>%1%2%3.%4</source>
|
||||
<translation>%1%2%3.%4</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2125"/>
|
||||
<location filename="mainwindow.cpp" line="1207"/>
|
||||
<source>start failed!</source>
|
||||
<translation>启动安装程序失败!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2228"/>
|
||||
<source>There are pictures that have not been saved.
|
||||
Are you sure to close?</source>
|
||||
<translation>有图像未保存,确定关闭?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2138"/>
|
||||
<location filename="mainwindow.cpp" line="2241"/>
|
||||
<source>tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2139"/>
|
||||
<location filename="mainwindow.cpp" line="2242"/>
|
||||
<source>Are you sure to close?</source>
|
||||
<translation>确定关闭?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2497"/>
|
||||
<location filename="mainwindow.cpp" line="2600"/>
|
||||
<source>confirm operation</source>
|
||||
<translation>确认操作</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2498"/>
|
||||
<location filename="mainwindow.cpp" line="2601"/>
|
||||
<source>are you sure to clear the roller count?</source>
|
||||
<translation>您确定要清除滚轴计数吗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2510"/>
|
||||
<location filename="mainwindow.cpp" line="2512"/>
|
||||
<location filename="mainwindow.cpp" line="2588"/>
|
||||
<location filename="mainwindow.cpp" line="2613"/>
|
||||
<location filename="mainwindow.cpp" line="2615"/>
|
||||
<location filename="mainwindow.cpp" line="2691"/>
|
||||
<source>hint</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2510"/>
|
||||
<location filename="mainwindow.cpp" line="2580"/>
|
||||
<location filename="mainwindow.cpp" line="2613"/>
|
||||
<location filename="mainwindow.cpp" line="2683"/>
|
||||
<source>Roller scanned count has been set to 0.</source>
|
||||
<translation>辊轴计数已置零</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2512"/>
|
||||
<location filename="mainwindow.cpp" line="2586"/>
|
||||
<location filename="mainwindow.cpp" line="2615"/>
|
||||
<location filename="mainwindow.cpp" line="2689"/>
|
||||
<source>Roller scanned count reset failed.</source>
|
||||
<translation>重置辊轴计数失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2555"/>
|
||||
<location filename="mainwindow.cpp" line="2658"/>
|
||||
<source>Error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2555"/>
|
||||
<location filename="mainwindow.cpp" line="2658"/>
|
||||
<source>Document missing! It would be deleted or renamed.</source>
|
||||
<translation>文档丢失!文档可能已被删除或被重命名。</translation>
|
||||
</message>
|
||||
|
@ -2545,28 +2574,28 @@ Are you sure to close?</source>
|
|||
<translation type="vanished"><br>导航地址: <a href='https://j.map.baidu.com/7e/1TO'>百度地图访问</a></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2606"/>
|
||||
<location filename="mainwindow.cpp" line="2709"/>
|
||||
<source>About %1</source>
|
||||
<translation>关于 %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2607"/>
|
||||
<location filename="mainwindow.cpp" line="2710"/>
|
||||
<source><p>%1</p><p>Version: %2<br>CopyRight: &#169; %3</p><p>%4%5%6%7%8%9</p></source>
|
||||
<translation><p>%1</p><p>版本: %2<br>版权: &#169; %3</p><p>%4%5%6%7%8%9</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2622"/>
|
||||
<location filename="mainwindow.cpp" line="2725"/>
|
||||
<source>about %1</source>
|
||||
<translation>关于 %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2623"/>
|
||||
<location filename="mainwindow.cpp" line="2726"/>
|
||||
<source><p>Version: %1</p></source>
|
||||
<oldsource><p>版本: %1</p></oldsource>
|
||||
<translation><p>版本: %1</p></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2624"/>
|
||||
<location filename="mainwindow.cpp" line="2727"/>
|
||||
<source><p>CopyRight: &#169; %1</p></source>
|
||||
<oldsource><p>版权: &#169; %1</p></oldsource>
|
||||
<translation><p>版权: &#169; %1</p></translation>
|
||||
|
@ -2580,6 +2609,13 @@ Are you sure to close?</source>
|
|||
<translation type="vanished"><p>%1: %2</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>error</source>
|
||||
<translation type="obsolete">错误</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Widget</name>
|
||||
<message>
|
||||
|
|
|
@ -169,6 +169,7 @@ HGResult VersionDll::Free()
|
|||
m_mgr = NULL;
|
||||
HGBase_DestroyDll(m_dll);
|
||||
m_dll = NULL;
|
||||
return HGBASE_ERR_OK;
|
||||
}
|
||||
|
||||
HGBool VersionDll::IsValid()
|
||||
|
|
|
@ -28,7 +28,23 @@ Dialog_upgrade::Dialog_upgrade(class VersionDll *versionDll, HGVersionInfo *vers
|
|||
{
|
||||
QListWidgetItem *listwidgetItem = new QListWidgetItem;
|
||||
listwidgetItem->setText(QString(m_versionInfo[i].version));
|
||||
listwidgetItem->setToolTip(tr("upgrade contents: ") + m_versionInfo[i].desc + tr(" bug description: ") + m_versionInfo[i].bugInfo);
|
||||
|
||||
std::string desc = m_versionInfo[i].desc;
|
||||
std::string bugInfo = m_versionInfo[i].bugInfo;
|
||||
|
||||
if(desc.empty() && !bugInfo.empty())
|
||||
{
|
||||
listwidgetItem->setToolTip(tr("bug description: \n") + m_versionInfo[i].bugInfo);
|
||||
}
|
||||
if(!desc.empty() && bugInfo.empty())
|
||||
{
|
||||
listwidgetItem->setToolTip(tr("upgrade contents: \n") + m_versionInfo[i].desc);
|
||||
}
|
||||
if(!desc.empty() && !bugInfo.empty())
|
||||
{
|
||||
listwidgetItem->setToolTip(tr("upgrade contents: \n") + m_versionInfo[i].desc + tr("\nbug description: \n") + m_versionInfo[i].bugInfo);
|
||||
}
|
||||
|
||||
ui->listWidget->addItem(listwidgetItem);
|
||||
}
|
||||
|
||||
|
|
|
@ -1097,84 +1097,6 @@ void MainWindow::on_statusInfoDblClick()
|
|||
m_dialogLog->show();
|
||||
}
|
||||
|
||||
void MainWindow::on_upgradeApp(QString pkgPath)
|
||||
{
|
||||
QString curPath = QDir::currentPath();
|
||||
QString tmpPath = QDir::tempPath();
|
||||
QFile file(curPath);
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
#if defined(OEM_HANWANG)
|
||||
file.copy("HwUpgradeApp.exe", tmpPath + "/HwUpgradeApp.exe");
|
||||
file.copy("HwBase.dll", tmpPath + "/HwBase.dll");
|
||||
file.copy("HwVersion.dll", tmpPath + "/HwVersion.dll");
|
||||
#elif defined(OEM_LISICHENG)
|
||||
file.copy("LscUpgradeApp.exe", tmpPath + "/LscUpgradeApp.exe");
|
||||
file.copy("LscBase.dll", tmpPath + "/LscBase.dll");
|
||||
file.copy("LscVersion.dll", tmpPath + "/LscVersion.dll");
|
||||
#else
|
||||
file.copy("HGUpgradeApp.exe", tmpPath + "/HGUpgradeApp.exe");
|
||||
file.copy("HGBase.dll", tmpPath + "/HGBase.dll");
|
||||
file.copy("HGVersion.dll", tmpPath + "/HGVersion.dll");
|
||||
#endif
|
||||
|
||||
file.copy("msvcp140.dll", tmpPath + "/msvcp140.dll");
|
||||
file.copy("Qt5Core.dll", tmpPath + "/Qt5Core.dll");
|
||||
file.copy("Qt5Gui.dll", tmpPath + "/Qt5Gui.dll");
|
||||
file.copy("Qt5Widgets.dll", tmpPath + "/Qt5Widgets.dll");
|
||||
file.copy("vcruntime140.dll", tmpPath + "/vcruntime140.dll");
|
||||
QDir dir;
|
||||
dir.mkdir(tmpPath + "/platforms");
|
||||
file.copy("platforms/qwindows.dll", tmpPath + "/platforms/qwindows.dll");
|
||||
dir.mkdir(tmpPath + "/imageformats");
|
||||
file.copy("imageformats/qgif.dll", tmpPath + "/imageformats/qgif.dll");
|
||||
#else
|
||||
#if defined(OEM_HANWANG)
|
||||
file.copy("HwUpgradeApp", tmpPath + "/HwUpgradeApp");
|
||||
file.copy("libHwBase.so", tmpPath + "/libHwBase.so");
|
||||
file.copy("libHwVersion.so", tmpPath + "/libHwVersion.so");
|
||||
#elif defined(OEM_LISICHENG)
|
||||
file.copy("LscUpgradeApp", tmpPath + "/LscUpgradeApp");
|
||||
file.copy("libLscBase.so", tmpPath + "/libLscBase.so");
|
||||
file.copy("libLscVersion.so", tmpPath + "/libLscVersion.so");
|
||||
#else
|
||||
file.copy("HGUpgradeApp", tmpPath + "/HGUpgradeApp");
|
||||
file.copy("libHGBase.so", tmpPath + "/libHGBase.so");
|
||||
file.copy("libHGVersion.so", tmpPath + "/libHGVersion.so");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
QProcess proc;
|
||||
|
||||
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("-type=%1").arg("upgrade"));
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
#if defined(OEM_HANWANG)
|
||||
proc.startDetached(tmpPath + "/HwUpgradeApp.exe", argList);
|
||||
#elif defined(OEM_LISICHENG)
|
||||
proc.startDetached(tmpPath + "/LscUpgradeApp.exe", argList);
|
||||
#else
|
||||
proc.startDetached(tmpPath + "/HGUpgradeApp.exe", argList);
|
||||
#endif
|
||||
#else
|
||||
#if defined(OEM_HANWANG)
|
||||
proc.startDetached(tmpPath + "/HwUpgradeApp", argList);
|
||||
#elif defined(OEM_LISICHENG)
|
||||
proc.startDetached(tmpPath + "/LscUpgradeApp", argList);
|
||||
#else
|
||||
proc.startDetached(tmpPath + "/HGUpgradeApp", argList);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
m_closeTip = false;
|
||||
close();
|
||||
}
|
||||
|
||||
void MainWindow::on_act_thumbnailBar_triggered(bool checked)
|
||||
{
|
||||
ui->dockWidget->setVisible(checked);
|
||||
|
@ -3108,6 +3030,118 @@ bool MainWindow::judgeDiskSpace(QString currentPath)
|
|||
return true;
|
||||
}
|
||||
|
||||
void MainWindow::upgradeApp(QString pkgPath)
|
||||
{
|
||||
QString curPath = QDir::currentPath();
|
||||
QString tmpPath = QDir::tempPath();
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
#if defined(OEM_HANWANG)
|
||||
QFile::remove(tmpPath + "/HwUpgradeApp.exe");
|
||||
QFile::copy(curPath + "/HwUpgradeApp.exe", tmpPath + "/HwUpgradeApp.exe");
|
||||
QFile::remove(tmpPath + "/HwBase.dll");
|
||||
QFile::copy(curPath + "/HwBase.dll", tmpPath + "/HwBase.dll");
|
||||
QFile::remove(tmpPath + "/HwVersion.dll");
|
||||
QFile::copy(curPath + "/HwVersion.dll", tmpPath + "/HwVersion.dll");
|
||||
#elif defined(OEM_LISICHENG)
|
||||
QFile::remove(tmpPath + "/LscUpgradeApp.exe");
|
||||
QFile::copy(curPath + "/LscUpgradeApp.exe", tmpPath + "/LscUpgradeApp.exe");
|
||||
QFile::remove(tmpPath + "/LscBase.dll");
|
||||
QFile::copy(curPath + "/LscBase.dll", tmpPath + "/LscBase.dll");
|
||||
QFile::remove(tmpPath + "/LscVersion.dll");
|
||||
QFile::copy(curPath + "/LscVersion.dll", tmpPath + "/LscVersion.dll");
|
||||
#else
|
||||
QFile::remove(tmpPath + "/HGUpgradeApp.exe");
|
||||
QFile::copy(curPath + "/HGUpgradeApp.exe", tmpPath + "/HGUpgradeApp.exe");
|
||||
QFile::remove(tmpPath + "/HGBase.dll");
|
||||
QFile::copy(curPath + "/HGBase.dll", tmpPath + "/HGBase.dll");
|
||||
QFile::remove(tmpPath + "/HGVersion.dll");
|
||||
QFile::copy(curPath + "/HGVersion.dll", tmpPath + "/HGVersion.dll");
|
||||
#endif
|
||||
|
||||
QFile::remove(tmpPath + "/msvcp140.dll");
|
||||
QFile::copy(curPath + "/msvcp140.dll", tmpPath + "/msvcp140.dll");
|
||||
QFile::remove(tmpPath + "/Qt5Core.dll");
|
||||
QFile::copy(curPath + "/Qt5Core.dll", tmpPath + "/Qt5Core.dll");
|
||||
QFile::remove(tmpPath + "/Qt5Gui.dll");
|
||||
QFile::copy(curPath + "/Qt5Gui.dll", tmpPath + "/Qt5Gui.dll");
|
||||
QFile::remove(tmpPath + "/Qt5Widgets.dll");
|
||||
QFile::copy(curPath + "/Qt5Widgets.dll", tmpPath + "/Qt5Widgets.dll");
|
||||
QFile::remove(tmpPath + "/vcruntime140.dll");
|
||||
QFile::copy(curPath + "/vcruntime140.dll", tmpPath + "/vcruntime140.dll");
|
||||
QDir dir;
|
||||
dir.mkdir(tmpPath + "/platforms");
|
||||
QFile::remove(tmpPath + "/platforms/qwindows.dll");
|
||||
QFile::copy(curPath + "/platforms/qwindows.dll", tmpPath + "/platforms/qwindows.dll");
|
||||
dir.mkdir(tmpPath + "/imageformats");
|
||||
QFile::remove(tmpPath + "/imageformats/qgif.dll");
|
||||
QFile::copy(curPath + "/imageformats/qgif.dll", tmpPath + "/imageformats/qgif.dll");
|
||||
#else
|
||||
#if defined(OEM_HANWANG)
|
||||
QFile::remove(tmpPath + "/HwUpgradeApp");
|
||||
QFile::copy(curPath + "/HwUpgradeApp", tmpPath + "/HwUpgradeApp");
|
||||
QFile::remove(tmpPath + "/libHwBase.so");
|
||||
QFile::copy(curPath + "/libHwBase.so", tmpPath + "/libHwBase.so");
|
||||
QFile::remove(tmpPath + "/libHwVersion.so");
|
||||
QFile::copy(curPath + "/libHwVersion.so", tmpPath + "/libHwVersion.so");
|
||||
#elif defined(OEM_LISICHENG)
|
||||
QFile::remove(tmpPath + "/LscUpgradeApp");
|
||||
QFile::copy(curPath + "/LscUpgradeApp", tmpPath + "/LscUpgradeApp");
|
||||
QFile::remove(tmpPath + "/libLscBase.so");
|
||||
QFile::copy(curPath + "/libLscBase.so", tmpPath + "/libLscBase.so");
|
||||
QFile::remove(tmpPath + "/libLscVersion.so");
|
||||
QFile::copy(curPath + "/libLscVersion.so", tmpPath + "/libLscVersion.so");
|
||||
#else
|
||||
QFile::remove(tmpPath + "/HGUpgradeApp");
|
||||
QFile::copy(curPath + "/HGUpgradeApp", tmpPath + "/HGUpgradeApp");
|
||||
QFile::remove(tmpPath + "/libHGBase.so");
|
||||
QFile::copy(curPath + "/libHGBase.so", tmpPath + "/libHGBase.so");
|
||||
QFile::remove(tmpPath + "/libHGVersion.so");
|
||||
QFile::copy(curPath + "/libHGVersion.so", tmpPath + "/libHGVersion.so");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
QProcess proc;
|
||||
bool isSuccessdStart = false;
|
||||
|
||||
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("-type=%1").arg("upgrade"));
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
#if defined(OEM_HANWANG)
|
||||
isSuccessdStart = proc.startDetached(tmpPath + "/HwUpgradeApp.exe", argList);
|
||||
#elif defined(OEM_LISICHENG)
|
||||
isSuccessdStart = proc.startDetached(tmpPath + "/LscUpgradeApp.exe", argList);
|
||||
#else
|
||||
isSuccessdStart = proc.startDetached(tmpPath + "/HGUpgradeApp.exe", argList);
|
||||
#endif
|
||||
#else
|
||||
#if defined(OEM_HANWANG)
|
||||
isSuccessdStart = proc.startDetached(tmpPath + "/HwUpgradeApp", argList);
|
||||
#elif defined(OEM_LISICHENG)
|
||||
isSuccessdStart = proc.startDetached(tmpPath + "/LscUpgradeApp", argList);
|
||||
#else
|
||||
isSuccessdStart = proc.startDetached(tmpPath + "/HGUpgradeApp", argList);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (isSuccessdStart)
|
||||
{
|
||||
m_closeTip = false;
|
||||
close();
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Critical, tr("error"),
|
||||
tr("start failed!"),
|
||||
QMessageBox::Ok, this);
|
||||
msg.setButtonText(QMessageBox::Ok, tr("yes"));
|
||||
msg.exec();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_scanOptions_changed(const QString &device, const QString &option, bool checked_now)
|
||||
{
|
||||
QString title(tr("app name"));
|
||||
|
@ -3234,10 +3268,15 @@ void MainWindow::on_actionact_update_triggered()
|
|||
|
||||
assert(!url.isEmpty() && !md5.isEmpty());
|
||||
|
||||
HGChar suffix[64];
|
||||
HGBase_GetFileSuffix(url.toStdString().c_str(), suffix, 64);
|
||||
|
||||
HGChar savePath[512];
|
||||
HGBase_GetConfigPath(savePath, 512);
|
||||
HGBase_CreateDir(savePath);
|
||||
strcat(savePath, (versionNum + QString("%1").arg(".exe")).toLatin1().data());
|
||||
HGChar fileName[128];
|
||||
sprintf(fileName, "%s.%s", versionNum.toStdString().c_str(), suffix);
|
||||
strcat(savePath, fileName);
|
||||
|
||||
QFile saveFile(savePath);
|
||||
saveFile.open(QFile::ReadOnly);
|
||||
|
@ -3259,13 +3298,13 @@ void MainWindow::on_actionact_update_triggered()
|
|||
|
||||
if (md5 == md5_2)
|
||||
{
|
||||
on_upgradeApp(savePath);
|
||||
upgradeApp(savePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
on_upgradeApp(savePath);
|
||||
upgradeApp(savePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,7 +122,6 @@ private slots:
|
|||
void on_continueScan();
|
||||
void on_stopScan();
|
||||
void on_statusInfoDblClick();
|
||||
void on_upgradeApp(QString pkgPath);
|
||||
|
||||
void on_act_thumbnailBar_triggered(bool checked);
|
||||
|
||||
|
@ -229,6 +228,7 @@ private:
|
|||
QString passwordDecrypt(const QString& transcode);
|
||||
bool open_scanner(const QString& name, OPTSCHEME* schm);
|
||||
bool judgeDiskSpace(QString currentPath);
|
||||
void upgradeApp(QString pkgPath);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
|
|
@ -1236,14 +1236,6 @@ Please make sure the two passwords are the same.</source>
|
|||
<source>upgrade online</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>upgrade contents: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source> bug description: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The current version is the latest! The current version number is : </source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1264,6 +1256,22 @@ Please make sure the two passwords are the same.</source>
|
|||
<source>Already in current version</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>bug description:
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>upgrade contents:
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>
|
||||
bug description:
|
||||
</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GraphicsScene</name>
|
||||
|
@ -1983,6 +1991,10 @@ Are you sure to close?</source>
|
|||
<source>act_feedback</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>start failed!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Phonon::</name>
|
||||
|
|
|
@ -80,15 +80,28 @@ bool AppIsRun(const std::string& appName)
|
|||
|
||||
std::string cmd;
|
||||
std::string appPath;
|
||||
#if defined(OEM_HANWANG)
|
||||
cmd = "ps -wef | grep HanvonScan";
|
||||
appPath = "/opt/apps/com.hanvonchina.hanvonscan/files/bin/HanvonScan";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
cmd = "ps -wef | grep LanxumScan";
|
||||
appPath = "/opt/apps/com.lanxumchina.lanxumscan/files/bin/LanxumScan";
|
||||
#if defined (UOS)
|
||||
#if defined(OEM_HANWANG)
|
||||
cmd = "ps -wef | grep HanvonScan";
|
||||
appPath = "/opt/apps/com.hanvonchina.hanvonscan/files/bin/HanvonScan";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
cmd = "ps -wef | grep LanxumScan";
|
||||
appPath = "/opt/apps/com.lanxumchina.lanxumscan/files/bin/LanxumScan";
|
||||
#else
|
||||
cmd = "ps -wef | grep HuaGoScan";
|
||||
appPath = "/opt/apps/com.huagaochina.huagoscan/files/bin/HuaGoScan";
|
||||
#endif
|
||||
#else
|
||||
cmd = "ps -wef | grep HuaGoScan";
|
||||
appPath = "/opt/apps/com.huagaochina.huagoscan/files/bin/HuaGoScan";
|
||||
#if defined(OEM_HANWANG)
|
||||
cmd = "ps -wef | grep HanvonScan";
|
||||
appPath = "/opt/apps/scanner-driver-hanvon/HanvonScan";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
cmd = "ps -wef | grep LanxumScan";
|
||||
appPath = "/opt/apps/scanner-driver-lanxum/LanxumScan";
|
||||
#else
|
||||
cmd = "ps -wef | grep HuaGoScan";
|
||||
appPath = "/opt/apps/scanner-driver-huagao/HuaGoScan";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool ret = false;
|
||||
|
@ -116,36 +129,6 @@ bool AppIsRun(const std::string& appName)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Upgrade(const std::string& pkgPath)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
|
||||
PROCESS_INFORMATION ProcessInfo;
|
||||
STARTUPINFOA StartupInfo;
|
||||
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
|
||||
StartupInfo.cb = sizeof(StartupInfo);
|
||||
|
||||
char command[256];
|
||||
sprintf(command, "%s %s", pkgPath.c_str(), "/verysilent");
|
||||
if (CreateProcessA(nullptr, command, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &StartupInfo, &ProcessInfo))
|
||||
{
|
||||
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
|
||||
CloseHandle(ProcessInfo.hThread);
|
||||
CloseHandle(ProcessInfo.hProcess);
|
||||
ret = true;
|
||||
}
|
||||
|
||||
#else
|
||||
std::string cmd = "dpkg -i \"" + pkgPath + "\"";
|
||||
if (0 == system(cmd.c_str()))
|
||||
ret = true;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void RunApp(const std::string& appName)
|
||||
{
|
||||
if (appName == HGVERSION_APPNAME_SCANNER)
|
||||
|
@ -184,12 +167,22 @@ void RunApp(const std::string& appName)
|
|||
#else
|
||||
|
||||
std::string appPath;
|
||||
#if defined(OEM_HANWANG)
|
||||
appPath = "sh /opt/apps/com.hanvonchina.hanvonscan/files/bin/HanvonScan.sh &";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
appPath = "sh /opt/apps/com.lanxumchina.lanxumscan/files/bin/LanxumScan.sh &";
|
||||
#if defined (UOS)
|
||||
#if defined(OEM_HANWANG)
|
||||
appPath = "sh /opt/apps/com.hanvonchina.hanvonscan/files/bin/HanvonScan.sh &";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
appPath = "sh /opt/apps/com.lanxumchina.lanxumscan/files/bin/LanxumScan.sh &";
|
||||
#else
|
||||
appPath = "sh /opt/apps/com.huagaochina.huagoscan/files/bin/HuaGoScan.sh &";
|
||||
#endif
|
||||
#else
|
||||
appPath = "sh /opt/apps/com.huagaochina.huagoscan/files/bin/HuaGoScan.sh &";
|
||||
#if defined(OEM_HANWANG)
|
||||
appPath = "sh /opt/apps/scanner-driver-hanvon/HanvonScan.sh &";
|
||||
#elif defined(OEM_LISICHENG)
|
||||
appPath = "sh /opt/apps/scanner-driver-lanxum/LanxumScan.sh &";
|
||||
#else
|
||||
appPath = "sh /opt/apps/scanner-driver-huagao/HuaGoScan.sh &";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
system(appPath.c_str());
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
// 判断app是否在运行
|
||||
bool AppIsRun(const std::string& appName);
|
||||
|
||||
// 升级安装, 使用之前的安装路径
|
||||
bool Upgrade(const std::string& pkgPath);
|
||||
|
||||
// 运行app
|
||||
void RunApp(const std::string& appName);
|
||||
|
||||
|
|
Binary file not shown.
|
@ -19,14 +19,43 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="16"/>
|
||||
<location filename="mainwindow.cpp" line="23"/>
|
||||
<source>Installation</source>
|
||||
<translation>安装</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="19"/>
|
||||
<location filename="mainwindow.cpp" line="26"/>
|
||||
<source>Installation in progress, please wait...</source>
|
||||
<translation>安装中,请稍候...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="main.cpp" line="71"/>
|
||||
<source>tip</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.cpp" line="72"/>
|
||||
<source>install succeed!</source>
|
||||
<translation>安装成功!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.cpp" line="74"/>
|
||||
<location filename="main.cpp" line="85"/>
|
||||
<source>yes</source>
|
||||
<translation>确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.cpp" line="82"/>
|
||||
<source>error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="main.cpp" line="83"/>
|
||||
<source>install failed!</source>
|
||||
<translation>安装失败!</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QThread>
|
||||
#include <QScreen>
|
||||
#include <QTranslator>
|
||||
#include <QMessageBox>
|
||||
#include "version/HGVersion.h"
|
||||
#include "HGUpgrade.h"
|
||||
|
||||
|
@ -65,8 +66,25 @@ int main(int argc, char *argv[])
|
|||
w.show();
|
||||
a.exec();
|
||||
|
||||
if (!AppIsRun(appName))
|
||||
RunApp(appName);
|
||||
if (w.isInstallSuccess())
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, QObject::tr("tip"),
|
||||
QObject::tr("install succeed!"),
|
||||
QMessageBox::Ok);
|
||||
msg.setButtonText(QMessageBox::Ok, QObject::tr("yes"));
|
||||
msg.exec();
|
||||
|
||||
if (!AppIsRun(appName))
|
||||
RunApp(appName);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Critical, QObject::tr("error"),
|
||||
QObject::tr("install failed!"),
|
||||
QMessageBox::Ok);
|
||||
msg.setButtonText(QMessageBox::Ok, QObject::tr("yes"));
|
||||
msg.exec();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "HGUpgrade.h"
|
||||
#include "base/HGDef.h"
|
||||
#include "base/HGInc.h"
|
||||
#include <QLabel>
|
||||
#include <QMovie>
|
||||
#include <QMessageBox>
|
||||
#if defined(HG_CMP_MSC)
|
||||
#include <shellapi.h>
|
||||
#include <tlhelp32.h>
|
||||
#endif
|
||||
|
||||
MainWindow::MainWindow(const std::string &appName, const std::string& pkgPath, QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
|
@ -10,6 +16,7 @@ MainWindow::MainWindow(const std::string &appName, const std::string& pkgPath, Q
|
|||
, m_appName(appName)
|
||||
, m_pkgPath(pkgPath)
|
||||
, m_thread(nullptr)
|
||||
, m_success(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -38,11 +45,49 @@ MainWindow::~MainWindow()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
bool MainWindow::isInstallSuccess()
|
||||
{
|
||||
return m_success;
|
||||
}
|
||||
|
||||
bool MainWindow::Upgrade(const std::string& pkgPath)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
|
||||
PROCESS_INFORMATION ProcessInfo;
|
||||
STARTUPINFOA StartupInfo;
|
||||
ZeroMemory(&StartupInfo, sizeof(StartupInfo));
|
||||
StartupInfo.cb = sizeof(StartupInfo);
|
||||
|
||||
char command[256];
|
||||
sprintf(command, "%s %s", pkgPath.c_str(), "/verysilent");
|
||||
if (CreateProcessA(nullptr, command, nullptr, nullptr, FALSE, 0, nullptr, nullptr, &StartupInfo, &ProcessInfo))
|
||||
{
|
||||
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
|
||||
DWORD dwCode = 0;
|
||||
GetExitCodeProcess(ProcessInfo.hProcess, &dwCode);
|
||||
CloseHandle(ProcessInfo.hThread);
|
||||
CloseHandle(ProcessInfo.hProcess);
|
||||
ret = (0 == dwCode);
|
||||
}
|
||||
|
||||
#else
|
||||
std::string cmd = "pkexec dpkg -i \"" + pkgPath + "\"";
|
||||
int status = system(cmd.c_str());
|
||||
if (-1 != status && WIFEXITED(status) && 0 == WEXITSTATUS(status))
|
||||
ret = true;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void MainWindow::ThreadFunc(HGThread thread, HGPointer param)
|
||||
{
|
||||
(void)thread;
|
||||
MainWindow* p = (MainWindow*)param;
|
||||
Upgrade(p->m_pkgPath);
|
||||
p->m_success = Upgrade(p->m_pkgPath);
|
||||
|
||||
emit p->closeWnd();
|
||||
}
|
||||
|
|
|
@ -16,10 +16,13 @@ public:
|
|||
MainWindow(const std::string &appName, const std::string &pkgPath, QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
bool isInstallSuccess();
|
||||
|
||||
signals:
|
||||
void closeWnd();
|
||||
|
||||
private:
|
||||
static bool Upgrade(const std::string& pkgPath);
|
||||
static void ThreadFunc(HGThread thread, HGPointer param);
|
||||
|
||||
private:
|
||||
|
@ -28,5 +31,6 @@ private:
|
|||
std::string m_appName;
|
||||
std::string m_pkgPath;
|
||||
HGThread m_thread;
|
||||
bool m_success;
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
project(testdemo)
|
||||
|
||||
FILE(GLOB SRC "*.cpp" "*.h" "*.c")
|
||||
include_directories(${PROJECT_SOURCE_DIR}/../include)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SRC})
|
||||
|
||||
target_link_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/../lib)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} LscBase lscdriver LscImgFmt LscImgProc LscScannerLib mupdf pdf sane-lscsane)
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../bin)
|
|
@ -0,0 +1,193 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdlib.h>
|
||||
#include <thread>
|
||||
#include "HGScannerLib.h"
|
||||
#include "sane_option_definitions.h"
|
||||
|
||||
#define DELEAY_MS(x) std::this_thread::sleep_for(std::chrono::milliseconds((x)))
|
||||
using namespace std;
|
||||
|
||||
//有图事件回调
|
||||
static void DeviceScanImageFunc(HGLibDevice device, HGLibImage image, HGPointer param)
|
||||
{
|
||||
static int indeximg = 0;
|
||||
string savepath = std::to_string(++indeximg) + ".jpg";
|
||||
cout << "save image : " << savepath << endl;
|
||||
auto ret = HGLib_SaveImage(image, savepath.c_str(), 0);
|
||||
cout << "save image : " << savepath << (ret ? " success" : " failed") << endl;
|
||||
}
|
||||
|
||||
//设备热拔插事件回调
|
||||
static void DeviceHotPlugEvent(HGUInt event, const HGChar *deviceName, HGPointer param)
|
||||
{
|
||||
cout << "Devices : " << deviceName << " DeviceHotPlugEvent : " << (event == HGLIB_DEVHOTPLUG_EVENT_ARRIVE ? "HGLIB_DEVHOTPLUG_EVENT_ARRIVE " : "HGLIB_DEVHOTPLUG_EVENT_LEFT") << endl;
|
||||
}
|
||||
|
||||
//扫描状态事件回调
|
||||
static void DeviceScanEvent(HGLibDevice device, HGUInt event, HGBool err, const HGChar *info, HGPointer param)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case HGLIB_DEVSCAN_EVENT_BEGIN:
|
||||
cout << "DeviceScanEvent Start Scan" << endl;
|
||||
break;
|
||||
case HGLIB_DEVSCAN_EVENT_END:
|
||||
cout << "DeviceScanEvent Scan stopped" << endl;
|
||||
break;
|
||||
case HGLIB_DEVSCAN_EVENT_INFO:
|
||||
cout << "DeviceScanEvent info : " << info << endl;
|
||||
break;
|
||||
default:
|
||||
cout << "Unkownun DeviceScanEvent " << event << endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int main(unsigned char argc, unsigned char *argv[])
|
||||
{
|
||||
std::cout << "*********Enter LSC Scanner SDK Demo *********" << std::endl;
|
||||
HGLib_InitDevice(DeviceHotPlugEvent, 0); //初始化调用模块
|
||||
DELEAY_MS(5000);
|
||||
|
||||
HGChar **devNameList = HGLib_GetDeviceNameList(); //获取已连接的设备列表,已字符数组的形式返回
|
||||
if (devNameList)
|
||||
{
|
||||
HGLibDevice dev = HGLib_OpenDevice(devNameList[0]); //此示例代码中调用设备列表中第一个设备
|
||||
if (dev)
|
||||
{
|
||||
|
||||
HGUInt grpCount = 0;
|
||||
HGLibDeviceGetParamGroup *groups = HGLib_GetDeviceParamGroupList(dev, &grpCount);
|
||||
if (groups)
|
||||
{
|
||||
//获取sdk支持的功能项及配置项内容
|
||||
for (size_t i = 0; i < grpCount; i++)
|
||||
{
|
||||
cout << groups[i].groupName << endl;
|
||||
for (size_t j = 0; j < groups[i].paramCount; j++)
|
||||
{
|
||||
cout << " title: " << groups[i].param[j].param.title
|
||||
<< " type: " << groups[i].param[j].param.type << endl;
|
||||
switch (groups[i].param[j].rangeType)
|
||||
{
|
||||
case HGLIB_DEVPARAM_RANGETYPE_INTLIST:
|
||||
for (size_t k = 0; k < groups[i].param[j].intValueList.count; k++)
|
||||
{
|
||||
cout<<"support value["<<k<<"]="<<groups[i].param[j].intValueList.value[k]<<endl;
|
||||
}
|
||||
break;
|
||||
case HGLIB_DEVPARAM_RANGETYPE_STRINGLIST:
|
||||
for (size_t k = 0; k < groups[i].param[j].stringValueList.count; k++)
|
||||
{
|
||||
cout<<"support value["<<k<<"]="<<groups[i].param[j].stringValueList.value[k]<<endl;
|
||||
}
|
||||
break;
|
||||
case HGLIB_DEVPARAM_RANGETYPE_DOUBLELIST:
|
||||
for (size_t k = 0; k < groups[i].param[j].doubleValueList.count; k++)
|
||||
{
|
||||
cout<<"support value["<<k<<"]="<<groups[i].param[j].doubleValueList.value[k]<<endl;
|
||||
}
|
||||
break;
|
||||
case HGLIB_DEVPARAM_RANGETYPE_INTRANGE:
|
||||
cout<<"support value range min = "<<groups[i].param[j].intValueRange.minValue <<" max = "<<groups[i].param[j].intValueRange.maxValue<<endl;
|
||||
break;
|
||||
case HGLIB_DEVPARAM_RANGETYPE_DOUBLERANGE:
|
||||
cout<<"support value range min = "<<groups[i].param[j].intValueRange.minValue <<" max = "<<groups[i].param[j].intValueRange.maxValue<<endl;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (groups[i].param[j].param.type)
|
||||
{
|
||||
case HGLIB_DEVPARAM_TYPE_INT:
|
||||
cout << " intValue: " << groups[i].param[j].param.intValue << endl;
|
||||
break;
|
||||
case HGLIB_DEVPARAM_TYPE_STRING:
|
||||
cout << " stringValue: " << groups[i].param[j].param.stringValue << endl;
|
||||
break;
|
||||
case HGLIB_DEVPARAM_TYPE_DOUBLE:
|
||||
cout << " doubleValue: " << groups[i].param[j].param.doubleValue << endl;
|
||||
break;
|
||||
case HGLIB_DEVPARAM_TYPE_BOOL:
|
||||
cout << " boolValue: " << groups[i].param[j].param.boolValue << endl;
|
||||
break;
|
||||
default:
|
||||
cout << "unkownun type" << endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//设置颜色模式
|
||||
HGLibDeviceSetParam setparam;
|
||||
setparam.title = OPTION_TITLE_YSMS;
|
||||
setparam.type = HGLIB_DEVPARAM_TYPE_STRING;
|
||||
setparam.stringValue = OPTION_VALUE_YSMS_HB;
|
||||
HGLib_SetDeviceParam(dev,&setparam,1);
|
||||
|
||||
//设置分辨率
|
||||
setparam.title = OPTION_TITLE_FBL;
|
||||
setparam.type = HGLIB_DEVPARAM_TYPE_INT;
|
||||
setparam.intValue = 300;
|
||||
HGLib_SetDeviceParam(dev,&setparam,1);
|
||||
|
||||
//设置单双面或跳过空白页
|
||||
setparam.title = OPTION_TITLE_SMYM;
|
||||
setparam.type = HGLIB_DEVPARAM_TYPE_STRING;
|
||||
setparam.stringValue = OPTION_VALUE_SMYM_DM;
|
||||
HGLib_SetDeviceParam(dev,&setparam,1);
|
||||
|
||||
|
||||
//设置纸张尺寸 A3 A4 或匹配原始尺寸
|
||||
setparam.title = OPTION_TITLE_ZZCC;
|
||||
setparam.type = HGLIB_DEVPARAM_TYPE_STRING;
|
||||
setparam.stringValue = OPTION_VALUE_ZZCC_PPYSCC;//匹配原始尺寸
|
||||
|
||||
//设置旋转 90° 180° 270°
|
||||
setparam.title = OPTION_TITLE_WGFX;
|
||||
setparam.type = HGLIB_DEVPARAM_TYPE_STRING;
|
||||
setparam.stringValue = OPTION_VALUE_WGFX_90;
|
||||
HGLib_SetDeviceParam(dev,&setparam,1);
|
||||
|
||||
|
||||
// //设置扫描张数 -1: 连续扫描 其他:>0 指定数量扫描
|
||||
// setparam.title = OPTION_TITLE_SMZS;
|
||||
// setparam.type = HGLIB_DEVPARAM_TYPE_STRING;
|
||||
// setparam.stringValue = OPTION_VALUE_SMZS_LXSM;//连续扫描
|
||||
// HGLib_SetDeviceParam(dev,&setparam,1);
|
||||
|
||||
|
||||
setparam.title = OPTION_TITLE_SMZS;
|
||||
setparam.type = HGLIB_DEVPARAM_TYPE_STRING;
|
||||
setparam.stringValue = OPTION_VALUE_SMZS_SMZDZS;//指定张数扫描
|
||||
HGLib_SetDeviceParam(dev,&setparam,1);
|
||||
|
||||
setparam.title = OPTION_TITLE_SMSL;
|
||||
setparam.type = HGLIB_DEVPARAM_TYPE_INT;
|
||||
setparam.intValue = 1;//扫描张数
|
||||
HGLib_SetDeviceParam(dev,&setparam,1);
|
||||
if (HGLib_StartDeviceScan(dev, DeviceScanEvent, 0, DeviceScanImageFunc, 0)) //开始启动扫描并注册扫描事件以及图像回调
|
||||
{
|
||||
DELEAY_MS(10000); //实际走纸延时等待处理
|
||||
HGLib_StopDeviceScan(dev);
|
||||
}
|
||||
HGBool ret = HGLib_ReleaseDeviceParamGroupList(groups,grpCount);
|
||||
if(!ret)
|
||||
cout << "HGLib_ReleaseDeviceParamGroupList failed"<<endl;
|
||||
|
||||
HGLib_CloseDevice(dev); //关闭当前打开的设备
|
||||
}
|
||||
else
|
||||
cout << "Open device : " << devNameList[0] << "failed " << endl;
|
||||
|
||||
HGLib_ReleaseDeviceNameList(devNameList); //释放设备列表
|
||||
}
|
||||
else
|
||||
cout << "devices not found" << endl;
|
||||
|
||||
HGLib_DeinitDevice(); //退出扫描模块
|
||||
cout << "*********Exit LSC Scanner SDK Demo *********" << endl;
|
||||
return 0;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
#include "HGScannerLib.h"
|
||||
#include <Windows.h>
|
||||
|
||||
static void DeviceScanImageFunc(HGLibDevice device, HGLibImage image, HGPointer param)
|
||||
{
|
||||
HGLib_SaveImage(image, "D:\\11111.jpg", 0);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
HGLib_InitDevice(0, 0);
|
||||
|
||||
Sleep(100);
|
||||
|
||||
HGChar **devNameList = HGLib_GetDeviceNameList();
|
||||
if (devNameList)
|
||||
{
|
||||
HGLibDevice dev = HGLib_OpenDevice(devNameList[0]);
|
||||
if (dev)
|
||||
{
|
||||
if (HGLib_StartDeviceScan(dev, 0, 0, DeviceScanImageFunc, 0))
|
||||
{
|
||||
Sleep(10000);
|
||||
HGLib_StopDeviceScan(dev);
|
||||
}
|
||||
|
||||
HGLib_CloseDevice(dev);
|
||||
}
|
||||
|
||||
HGLib_ReleaseDeviceNameList(devNameList);
|
||||
}
|
||||
|
||||
HGLib_DeinitDevice();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue