HGGitLab

Commit aaf5aea2 authored by luoliangyi's avatar luoliangyi

解决导出时不能多张导出的问题

parent bfca5cb4
......@@ -102,130 +102,130 @@
<translation>开始索引</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="147"/>
<location filename="dialog_aquireinto.ui" line="153"/>
<source>Digit(s)</source>
<translation>数字</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="158"/>
<location filename="dialog_aquireinto.ui" line="164"/>
<source>1</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="163"/>
<location filename="dialog_aquireinto.ui" line="169"/>
<source>2</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="168"/>
<location filename="dialog_aquireinto.ui" line="174"/>
<source>3</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="173"/>
<location filename="dialog_aquireinto.ui" line="179"/>
<source>4</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="178"/>
<location filename="dialog_aquireinto.ui" line="184"/>
<source>5</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="186"/>
<location filename="dialog_aquireinto.ui" line="192"/>
<source>e.g. &apos;HGScan001&apos;</source>
<translation>例如 HGScan001</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="211"/>
<location filename="dialog_aquireinto.ui" line="217"/>
<source>Even and odd pages</source>
<translation>偶数和奇数页</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="216"/>
<location filename="dialog_aquireinto.ui" line="222"/>
<source>Odd pages</source>
<translation>奇数页</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="221"/>
<location filename="dialog_aquireinto.ui" line="227"/>
<source>Even pages</source>
<translation>偶数页</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="249"/>
<location filename="dialog_aquireinto.ui" line="255"/>
<source>Format</source>
<translation>格式</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="257"/>
<location filename="dialog_aquireinto.ui" line="263"/>
<source>JPG - JPG / JFIF(*.jpg)</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="262"/>
<location filename="dialog_aquireinto.ui" line="268"/>
<source>BMP - Windows Bitmap(*.bmp)</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="267"/>
<location filename="dialog_aquireinto.ui" line="273"/>
<source>PNG - Portable Network Graphics(*.png)</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="272"/>
<location filename="dialog_aquireinto.ui" line="278"/>
<source>TIF - TIFF Revision 6(*.tif)</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="277"/>
<location filename="dialog_aquireinto.ui" line="283"/>
<source>PDF - Portable Document Format(*.pdf)</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="282"/>
<location filename="dialog_aquireinto.ui" line="288"/>
<source>OFD - Open Fixed-layout Document(*.ofd)</source>
<translation></translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="290"/>
<location filename="dialog_aquireinto.ui" line="296"/>
<source>Compression option</source>
<translation>选项</translation>
<translation type="unfinished">压缩选项</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="304"/>
<location filename="dialog_aquireinto.ui" line="310"/>
<source>用户自定义页数</source>
<translation>用户自定义页数</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="311"/>
<location filename="dialog_aquireinto.ui" line="317"/>
<source>Save as multipages (TIFF/PDF/OFD)</source>
<translation>多页保存(TIFF/PDF/OFD)</translation>
</message>
<message>
<location filename="dialog_aquireinto.ui" line="340"/>
<location filename="dialog_aquireinto.ui" line="346"/>
<source>所有页</source>
<translation>所有页</translation>
</message>
<message>
<location filename="dialog_aquireinto.cpp" line="34"/>
<location filename="dialog_aquireinto.cpp" line="136"/>
<location filename="dialog_aquireinto.cpp" line="163"/>
<location filename="dialog_aquireinto.cpp" line="170"/>
<location filename="dialog_aquireinto.cpp" line="42"/>
<location filename="dialog_aquireinto.cpp" line="156"/>
<location filename="dialog_aquireinto.cpp" line="183"/>
<location filename="dialog_aquireinto.cpp" line="190"/>
<source>e.g. &apos;%1%2&apos;</source>
<translation>例如.%1%2</translation>
</message>
<message>
<location filename="dialog_aquireinto.cpp" line="42"/>
<location filename="dialog_aquireinto.cpp" line="50"/>
<source>ok</source>
<translation>确定</translation>
</message>
<message>
<location filename="dialog_aquireinto.cpp" line="43"/>
<location filename="dialog_aquireinto.cpp" line="51"/>
<source>cancel</source>
<translation>取消</translation>
</message>
<message>
<location filename="dialog_aquireinto.cpp" line="102"/>
<location filename="dialog_aquireinto.cpp" line="111"/>
<source>Browse directory</source>
<translation>文件夹路径</translation>
</message>
......@@ -279,7 +279,7 @@
<translation>关闭</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="34"/>
<location filename="dialog_clrcache.cpp" line="44"/>
<source>Question</source>
<translation>询问</translation>
</message>
......@@ -290,45 +290,45 @@ Continue to clear?</source>
继续清除?</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="35"/>
<location filename="dialog_clrcache.cpp" line="45"/>
<source>Main window contains temporary files, clear cache would remove all of them.
Continue to clear?</source>
<translation>主窗口中包含临时文件,清除缓存将会移除这些文件。
继续清除?</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="37"/>
<location filename="dialog_clrcache.cpp" line="47"/>
<source>yes</source>
<translation>确定</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="38"/>
<location filename="dialog_clrcache.cpp" line="48"/>
<source>no</source>
<translation>取消</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="30"/>
<location filename="dialog_clrcache.cpp" line="49"/>
<location filename="dialog_clrcache.cpp" line="40"/>
<location filename="dialog_clrcache.cpp" line="59"/>
<source>Information</source>
<translation>消息</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="30"/>
<location filename="dialog_clrcache.cpp" line="40"/>
<source>No cached file is available</source>
<translation>暂无缓存文件</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="49"/>
<location filename="dialog_clrcache.cpp" line="59"/>
<source>Cache clear successfully.</source>
<translation>缓存清除成功。</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="53"/>
<location filename="dialog_clrcache.cpp" line="63"/>
<source>Warning</source>
<translation>警告</translation>
</message>
<message>
<location filename="dialog_clrcache.cpp" line="53"/>
<location filename="dialog_clrcache.cpp" line="63"/>
<source>Cache clear failed or incompletely clear.</source>
<translation>缓存清除失败或者未清除干净。</translation>
</message>
......@@ -377,8 +377,14 @@ Page range will be &quot;Chosen Pages&quot;.</source>
<translation></translation>
</message>
<message>
<location filename="dialog_export.cpp" line="141"/>
<location filename="dialog_export.cpp" line="152"/>
<location filename="dialog_export.ui" line="120"/>
<source>Save as multipages (TIFF/PDF/OFD)</source>
<translation type="unfinished">多页保存(TIFF/PDF/OFD)</translation>
</message>
<message>
<location filename="dialog_export.cpp" line="70"/>
<location filename="dialog_export.cpp" line="199"/>
<location filename="dialog_export.cpp" line="210"/>
<source>Input is not valid.
Page range will be &apos;Chosen Pages&apos;.</source>
<translation>输入无效。
......@@ -743,7 +749,7 @@ Continue to clear?</source>
<translation type="unfinished">移动到</translation>
</message>
<message>
<location filename="dialog_moveto.ui" line="52"/>
<location filename="dialog_moveto.ui" line="45"/>
<source>insert pos: </source>
<translation type="unfinished">插入位置:</translation>
</message>
......@@ -966,12 +972,12 @@ Please make sure the two passwords are the same.</source>
<translation>压缩质量设置</translation>
</message>
<message>
<location filename="dialog_savequality.cpp" line="13"/>
<location filename="dialog_savequality.cpp" line="12"/>
<source>ok</source>
<translation>确定</translation>
</message>
<message>
<location filename="dialog_savequality.cpp" line="14"/>
<location filename="dialog_savequality.cpp" line="13"/>
<source>cancel</source>
<translation>取消</translation>
</message>
......@@ -1312,18 +1318,18 @@ Please make sure the two passwords are the same.</source>
<message>
<location filename="mainwindow.cpp" line="384"/>
<location filename="mainwindow.cpp" line="431"/>
<location filename="mainwindow.cpp" line="1134"/>
<location filename="mainwindow.cpp" line="1388"/>
<location filename="mainwindow.cpp" line="1428"/>
<location filename="mainwindow.cpp" line="1691"/>
<location filename="mainwindow.cpp" line="1949"/>
<location filename="mainwindow.cpp" line="1165"/>
<location filename="mainwindow.cpp" line="1419"/>
<location filename="mainwindow.cpp" line="1459"/>
<location filename="mainwindow.cpp" line="1704"/>
<location filename="mainwindow.cpp" line="1963"/>
<source>Question</source>
<translation>警告</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="385"/>
<location filename="mainwindow.cpp" line="1389"/>
<location filename="mainwindow.cpp" line="1429"/>
<location filename="mainwindow.cpp" line="1420"/>
<location filename="mainwindow.cpp" line="1460"/>
<source>modified, save it?</source>
<translation>图像已被修改。
是否保存修改?</translation>
......@@ -1348,10 +1354,8 @@ Please make sure the two passwords are the same.</source>
<translation> 已断开连接</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="804"/>
<location filename="mainwindow.cpp" line="823"/>
<source>%1/%2%3.%4</source>
<translation>%1/%2%3.%4</translation>
<translation type="vanished">%1/%2%3.%4</translation>
</message>
<message>
<source>scan starting...</source>
......@@ -1362,239 +1366,243 @@ Please make sure the two passwords are the same.</source>
<translation type="vanished">扫描完成</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1131"/>
<location filename="mainwindow.cpp" line="1162"/>
<source>Clear, then start scan</source>
<translation>清空并启动扫描</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1132"/>
<location filename="mainwindow.cpp" line="1163"/>
<source>Do NOT clear, then start scan</source>
<translation>不清空并启动扫描</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1135"/>
<location filename="mainwindow.cpp" line="1166"/>
<source>Already exist images in image list.
Do you want to clear?</source>
<translation>图像列表中已存在图像。
是否清空?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1169"/>
<location filename="mainwindow.cpp" line="1200"/>
<source>Information</source>
<translation type="unfinished">消息</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1170"/>
<location filename="mainwindow.cpp" line="1201"/>
<source>Insufficient disk space</source>
<translation type="unfinished">磁盘空间不足,请删除不需要的文件,以保证有足够的空间!</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1337"/>
<location filename="mainwindow.cpp" line="1368"/>
<source>Open images</source>
<translation>打开图片</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1348"/>
<location filename="mainwindow.cpp" line="1379"/>
<source>Insert images</source>
<translation>插入图片</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1471"/>
<location filename="mainwindow.cpp" line="1514"/>
<location filename="mainwindow.cpp" line="1519"/>
<location filename="mainwindow.cpp" line="1583"/>
<location filename="mainwindow.cpp" line="1502"/>
<location filename="mainwindow.cpp" line="1545"/>
<location filename="mainwindow.cpp" line="1550"/>
<source>info</source>
<translation type="unfinished">信息</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1471"/>
<location filename="mainwindow.cpp" line="1514"/>
<location filename="mainwindow.cpp" line="1502"/>
<location filename="mainwindow.cpp" line="1545"/>
<source>save failed</source>
<translation type="unfinished">保存失败</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1519"/>
<location filename="mainwindow.cpp" line="1583"/>
<location filename="mainwindow.cpp" line="1550"/>
<source>find savePath in thumbnail</source>
<translation type="unfinished">图片名在列表中已存在</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1610"/>
<location filename="mainwindow.cpp" line="1623"/>
<source>File name</source>
<translation>文件名</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1610"/>
<location filename="mainwindow.cpp" line="1623"/>
<source>File path</source>
<translation>文件路径</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1610"/>
<location filename="mainwindow.cpp" line="1623"/>
<source>File size</source>
<translation>文件大小</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1610"/>
<location filename="mainwindow.cpp" line="1623"/>
<source>Creation date/time</source>
<translation>创建时间</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1610"/>
<location filename="mainwindow.cpp" line="1623"/>
<source>Modified date/time</source>
<translation>修改时间</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1610"/>
<location filename="mainwindow.cpp" line="1623"/>
<source>Accessed date/time</source>
<translation>访问时间</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1653"/>
<location filename="mainwindow.cpp" line="1666"/>
<source>Format</source>
<translation>格式</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1653"/>
<location filename="mainwindow.cpp" line="1666"/>
<source>Width</source>
<translation>宽度</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1653"/>
<location filename="mainwindow.cpp" line="1666"/>
<source>Height</source>
<translation>高度</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1653"/>
<location filename="mainwindow.cpp" line="1666"/>
<source>depth</source>
<translation>深度</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1653"/>
<location filename="mainwindow.cpp" line="1666"/>
<source>Color model</source>
<translation>色彩模式</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1653"/>
<location filename="mainwindow.cpp" line="1666"/>
<source>DPI</source>
<translation>每英寸像素点</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1653"/>
<location filename="mainwindow.cpp" line="1666"/>
<source>Print size</source>
<translation>打印尺寸</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1653"/>
<location filename="mainwindow.cpp" line="1666"/>
<source>Frame</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1661"/>
<location filename="mainwindow.cpp" line="1674"/>
<source>None</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1661"/>
<location filename="mainwindow.cpp" line="1674"/>
<source>Mono</source>
<translation>黑白</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1661"/>
<location filename="mainwindow.cpp" line="1674"/>
<source>Gray</source>
<translation>灰度</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1661"/>
<location filename="mainwindow.cpp" line="1674"/>
<source>Color</source>
<translation>彩色</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1682"/>
<location filename="mainwindow.cpp" line="1695"/>
<source>Warning</source>
<translation>警告</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1682"/>
<location filename="mainwindow.cpp" line="1695"/>
<source>Device is Running!
Please finish scanning first.</source>
<translation>设备正在运行!
请先结束扫描。</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1692"/>
<location filename="mainwindow.cpp" line="1705"/>
<source>Application is about to close.Make sure all needed files are saved.
Continue to close?</source>
<translation>应用程序即将关闭。请确认所有需要的文件已被保存。
是否继续关闭?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1950"/>
<location filename="mainwindow.cpp" line="1964"/>
<source>Sure to sign out administrator account?</source>
<translation>是否确定登出管理员账户?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="880"/>
<location filename="mainwindow.cpp" line="881"/>
<location filename="mainwindow.cpp" line="882"/>
<location filename="mainwindow.cpp" line="2130"/>
<location filename="mainwindow.cpp" line="2131"/>
<location filename="mainwindow.cpp" line="2132"/>
<location filename="mainwindow.cpp" line="2173"/>
<location filename="mainwindow.cpp" line="2174"/>
<location filename="mainwindow.cpp" line="2175"/>
<location filename="mainwindow.cpp" line="2219"/>
<location filename="mainwindow.cpp" line="2220"/>
<location filename="mainwindow.cpp" line="2221"/>
<location filename="mainwindow.cpp" line="2277"/>
<location filename="mainwindow.cpp" line="2278"/>
<location filename="mainwindow.cpp" line="2279"/>
<location filename="mainwindow.cpp" line="911"/>
<location filename="mainwindow.cpp" line="912"/>
<location filename="mainwindow.cpp" line="913"/>
<location filename="mainwindow.cpp" line="2145"/>
<location filename="mainwindow.cpp" line="2146"/>
<location filename="mainwindow.cpp" line="2147"/>
<location filename="mainwindow.cpp" line="2189"/>
<location filename="mainwindow.cpp" line="2190"/>
<location filename="mainwindow.cpp" line="2191"/>
<location filename="mainwindow.cpp" line="2243"/>
<location filename="mainwindow.cpp" line="2244"/>
<location filename="mainwindow.cpp" line="2245"/>
<location filename="mainwindow.cpp" line="2302"/>
<location filename="mainwindow.cpp" line="2303"/>
<location filename="mainwindow.cpp" line="2304"/>
<source>start failed</source>
<translation>启动失败</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="387"/>
<location filename="mainwindow.cpp" line="434"/>
<location filename="mainwindow.cpp" line="1171"/>
<location filename="mainwindow.cpp" line="1391"/>
<location filename="mainwindow.cpp" line="1431"/>
<location filename="mainwindow.cpp" line="1694"/>
<location filename="mainwindow.cpp" line="1951"/>
<location filename="mainwindow.cpp" line="1202"/>
<location filename="mainwindow.cpp" line="1422"/>
<location filename="mainwindow.cpp" line="1462"/>
<location filename="mainwindow.cpp" line="1707"/>
<location filename="mainwindow.cpp" line="1965"/>
<source>yes</source>
<translation>确定</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="388"/>
<location filename="mainwindow.cpp" line="435"/>
<location filename="mainwindow.cpp" line="1392"/>
<location filename="mainwindow.cpp" line="1432"/>
<location filename="mainwindow.cpp" line="1695"/>
<location filename="mainwindow.cpp" line="1952"/>
<location filename="mainwindow.cpp" line="1423"/>
<location filename="mainwindow.cpp" line="1463"/>
<location filename="mainwindow.cpp" line="1708"/>
<location filename="mainwindow.cpp" line="1966"/>
<source>no</source>
<translation>取消</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2006"/>
<location filename="mainwindow.cpp" line="2008"/>
<location filename="mainwindow.cpp" line="832"/>
<location filename="mainwindow.cpp" line="851"/>
<source>%1%2%3.%4</source>
<translation type="unfinished">%1%2%3.%4</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2020"/>
<location filename="mainwindow.cpp" line="2022"/>
<source>hint</source>
<translation>提示</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2006"/>
<location filename="mainwindow.cpp" line="2020"/>
<source>Roller scanned count has been set to 0.</source>
<translation>辊轴计数已置零</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2008"/>
<location filename="mainwindow.cpp" line="2022"/>
<source>Roller scanned count reset failed.</source>
<translation>重置辊轴计数失败</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2021"/>
<location filename="mainwindow.cpp" line="2035"/>
<source>Error</source>
<translation>错误</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2021"/>
<location filename="mainwindow.cpp" line="2035"/>
<source>Document missing! It would be deleted or renamed.</source>
<translation>文档丢失!文档可能已被删除或被重命名。</translation>
</message>
......@@ -1627,39 +1635,39 @@ Continue to close?</source>
<translation type="vanished">&lt;br&gt;导航地址: &lt;a href=&apos;https://j.map.baidu.com/7e/1TO&apos;&gt;百度地图访问&lt;/a&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2040"/>
<location filename="mainwindow.cpp" line="2054"/>
<source>About %1</source>
<translation>关于 %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2041"/>
<location filename="mainwindow.cpp" line="2055"/>
<source>&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;Version: %2&lt;br&gt;CopyRight: &amp;#169; %3&lt;/p&gt;&lt;p&gt;%4%5%6%7%8%9&lt;/p&gt;</source>
<translation>&lt;p&gt;%1&lt;/p&gt;&lt;p&gt;版本: %2&lt;br&gt;版权: &amp;#169; %3&lt;/p&gt;&lt;p&gt;%4%5%6%7%8%9&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2055"/>
<location filename="mainwindow.cpp" line="2069"/>
<source>about %1</source>
<translation>关于 %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2056"/>
<location filename="mainwindow.cpp" line="2070"/>
<source>&lt;p&gt;Version: %1&lt;/p&gt;</source>
<oldsource>&lt;p&gt;版本: %1&lt;/p&gt;</oldsource>
<translation>&lt;p&gt;版本: %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2057"/>
<location filename="mainwindow.cpp" line="2071"/>
<source>&lt;p&gt;CopyRight: &amp;#169; %1&lt;/p&gt;</source>
<oldsource>&lt;p&gt;版权: &amp;#169; %1&lt;/p&gt;</oldsource>
<translation>&lt;p&gt;版权: &amp;#169; %1&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2061"/>
<location filename="mainwindow.cpp" line="2075"/>
<source>&lt;p&gt;%1: &lt;a href=&apos;%2&apos;&gt;%3&lt;/a&gt;&lt;/p&gt;</source>
<translation>&lt;p&gt;%1: &lt;a href=&apos;%2&apos;&gt;%3&lt;/a&gt;&lt;/p&gt;</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2063"/>
<location filename="mainwindow.cpp" line="2077"/>
<source>&lt;p&gt;%1: %2&lt;/p&gt;</source>
<translation>&lt;p&gt;%1: %2&lt;/p&gt;</translation>
</message>
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>443</width>
<width>442</width>
<height>360</height>
</rect>
</property>
......
......@@ -43,6 +43,8 @@ Dialog_Export::Dialog_Export(int total, const std::vector<int> &selectedIndexs,
m_saveQuality = getCfgValue("export", "quality", 0);
m_suffix = getCfgValue("export", "suffix", 0);
ui->fileDialog->selectNameFilter(ui->fileDialog->nameFilters().at(m_suffix));
ui->check_saveAsMulti->setEnabled(m_suffix > 2);
ui->check_saveAsMulti->setChecked(getCfgValue("export", "saveAsMulti", false));
int exportType = getCfgValue("export", "exportType", 0);
if (0 == exportType)
......@@ -79,11 +81,26 @@ QString Dialog_Export::getSavePath()
return m_savePath;
}
QString Dialog_Export::getSaveName()
{
return m_saveName;
}
QString Dialog_Export::getSaveExt()
{
return m_saveExt;
}
int Dialog_Export::getSaveQuality()
{
return m_saveQuality;
}
bool Dialog_Export::isSaveAsMultiPage()
{
return ui->check_saveAsMulti->isChecked();
}
void Dialog_Export::getSaveIndexs(std::vector<int> &indexs)
{
indexs = m_saveIndexs;
......@@ -126,7 +143,9 @@ void Dialog_Export::on_dialog_accepted()
if (-1 != pos)
name = name.left(pos);
m_savePath = getStdFileName(path + name + extName);
m_savePath = getStdFileName(path);
m_saveName = name;
m_saveExt = extName;
}
makeSaveIndexs();
......@@ -142,6 +161,7 @@ void Dialog_Export::on_dialog_accepted()
else if (ui->radio_nominatedPages->isChecked())
exportType = 2;
saveCfgValue("export", "exportType", exportType);
saveCfgValue("export", "saveAsMulti", ui->check_saveAsMulti->isChecked());
accept();
}
......@@ -149,6 +169,9 @@ void Dialog_Export::on_dialog_accepted()
void Dialog_Export::on_filterSelected(const QString& filterName)
{
m_suffix = ui->fileDialog->nameFilters().indexOf(filterName);
ui->check_saveAsMulti->setEnabled(m_suffix > 2);
if (m_suffix <= 2)
ui->check_saveAsMulti->setChecked(false);
}
void Dialog_Export::on_btn_option_clicked()
......
......@@ -16,7 +16,10 @@ public:
~Dialog_Export();
QString getSavePath();
QString getSaveName();
QString getSaveExt();
int getSaveQuality();
bool isSaveAsMultiPage();
void getSaveIndexs(std::vector<int> &indexs);
private slots:
......@@ -36,6 +39,8 @@ private:
std::vector<int> m_selectedIndexs;
QString m_savePath;
QString m_saveName;
QString m_saveExt;
int m_saveQuality;
std::vector<int> m_saveIndexs;
int m_suffix;
......
......@@ -114,6 +114,13 @@ Page range will be &quot;Chosen Pages&quot;.</string>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="check_saveAsMulti">
<property name="text">
<string>Save as multipages (TIFF/PDF/OFD)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
......@@ -3,10 +3,14 @@
#include "imgfmt/HGImgFmt.h"
#include "HGUIGlobal.h"
Dialog_ExportImageFile::Dialog_ExportImageFile(const QString &destFile, int saveQuality, const QStringList &srcFiles, QWidget *parent) :
QDialog(parent)
Dialog_ExportImageFile::Dialog_ExportImageFile(const QString &destPath, const QString &destName, const QString &destExt,
bool isSaveAsMulti, int saveQuality, const QStringList &srcFiles, QWidget *parent)
: QDialog(parent)
, ui(new Ui::Dialog_ExportImageFile)
, m_destFile(destFile)
, m_destPath(destPath)
, m_destName(destName)
, m_destExt(destExt)
, m_isSaveAsMulti(isSaveAsMulti)
, m_saveQuality(saveQuality)
, m_srcFiles(srcFiles)
{
......@@ -39,10 +43,56 @@ void Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param)
(void)thread;
Dialog_ExportImageFile *p = (Dialog_ExportImageFile *)param;
HGImgFmtWriter imgFmtWriter = nullptr;
HGImgFmt_OpenImageWriter(getStdString(p->m_destFile).c_str(), 0, &imgFmtWriter);
if (nullptr != imgFmtWriter)
if (p->m_isSaveAsMulti)
{
QString fileName = p->m_destPath + p->m_destName + p->m_destExt;
HGImgFmtWriter imgFmtWriter = nullptr;
HGImgFmt_OpenImageWriter(getStdString(fileName).c_str(), 0, &imgFmtWriter);
if (nullptr != imgFmtWriter)
{
for (int i = 0; i < p->m_srcFiles.size(); ++i)
{
if (p->m_stopThread)
{
break;
}
emit p->updateProgress(i);
HGImgFmtReader imgFmtReader = nullptr;
HGImgFmt_OpenImageReader(getStdString(p->m_srcFiles[i]).c_str(), 0, &imgFmtReader);
if (nullptr != imgFmtReader)
{
HGUInt count = 0;
HGImgFmt_GetImagePageCount(imgFmtReader, &count);
for (HGUInt j = 0; j < count; ++j)
{
if (p->m_stopThread)
{
break;
}
HGImage img = nullptr;
HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, HGBASE_IMGTYPE_RGB, HGBASE_IMGORIGIN_TOP, &img);
if (nullptr != img)
{
HGImgFmt_SaveImageToWriter(imgFmtWriter, img, nullptr, (HGUInt)p->m_saveQuality);
HGBase_DestroyImage(img);
}
}
HGImgFmt_CloseImageReader(imgFmtReader);
}
}
HGImgFmt_CloseImageWriter(imgFmtWriter);
}
}
else
{
int index = 1;
for (int i = 0; i < p->m_srcFiles.size(); ++i)
{
if (p->m_stopThread)
......@@ -69,7 +119,13 @@ void Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param)
HGImgFmt_LoadImageFromReader(imgFmtReader, j, nullptr, HGBASE_IMGTYPE_RGB, HGBASE_IMGORIGIN_TOP, &img);
if (nullptr != img)
{
HGImgFmt_SaveImageToWriter(imgFmtWriter, img, nullptr, (HGUInt)p->m_saveQuality);
char fileName[512];
sprintf(fileName, "%s%03d", getStdString(p->m_destName).c_str(), index);
++index;
QString saveFileName = p->m_destPath + QString(StdStringToUtf8(fileName).c_str()) + p->m_destExt;
HGImgFmt_SaveImage(img, 0, nullptr, (HGUInt)p->m_saveQuality, getStdString(saveFileName).c_str());
HGBase_DestroyImage(img);
}
}
......@@ -77,8 +133,6 @@ void Dialog_ExportImageFile::ThreadFunc(HGThread thread, HGPointer param)
HGImgFmt_CloseImageReader(imgFmtReader);
}
}
HGImgFmt_CloseImageWriter(imgFmtWriter);
}
emit p->finish();
......
......@@ -13,7 +13,8 @@ class Dialog_ExportImageFile : public QDialog
Q_OBJECT
public:
explicit Dialog_ExportImageFile(const QString &destFile, int saveQuality, const QStringList &srcFiles, QWidget *parent = nullptr);
explicit Dialog_ExportImageFile(const QString &destPath, const QString &destName, const QString &destExt,
bool isSaveAsMulti, int saveQuality, const QStringList &srcFiles, QWidget *parent = nullptr);
~Dialog_ExportImageFile();
private:
......@@ -34,7 +35,10 @@ protected:
private:
Ui::Dialog_ExportImageFile *ui;
QString m_destFile;
QString m_destPath;
QString m_destName;
QString m_destExt;
bool m_isSaveAsMulti;
int m_saveQuality;
QStringList m_srcFiles;
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>252</width>
<height>149</height>
<width>262</width>
<height>97</height>
</rect>
</property>
<property name="windowTitle">
......@@ -16,8 +16,8 @@
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>70</x>
<y>100</y>
<x>80</x>
<y>50</y>
<width>171</width>
<height>32</height>
</rect>
......@@ -29,13 +29,13 @@
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<x>20</x>
<y>20</y>
<width>231</width>
<height>21</height>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
......@@ -47,7 +47,14 @@
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox"/>
<widget class="QSpinBox" name="spinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
......
......@@ -7,8 +7,6 @@ Dialog_SaveQuality::Dialog_SaveQuality(int quality, QWidget *parent) :
ui(new Ui::Dialog_SaveQuality)
{
ui->setupUi(this);
ui->spinBox->setFixedWidth(180);
ui->spinBox->setValue(quality);
ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("ok"));
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>397</width>
<height>252</height>
<width>326</width>
<height>105</height>
</rect>
</property>
<property name="windowTitle">
......@@ -18,6 +18,12 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSlider" name="horizontalSlider">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>100</number>
</property>
......@@ -28,6 +34,12 @@
</item>
<item>
<widget class="QSpinBox" name="spinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>100</number>
</property>
......
......@@ -1573,45 +1573,27 @@ void MainWindow::on_act_Export_triggered()
Dialog_Export dlg(count, selectIndexs, this);
if (dlg.exec())
{
QString savePath = dlg.getSavePath();
QStringList srcFiles;
bool find = false;
for (int i = 0; i < count; ++i)
std::vector<int> saveIndexs;
dlg.getSaveIndexs(saveIndexs);
for (size_t i = 0; i < saveIndexs.size(); ++i)
{
QString fileName;
m_thumb->getItemFileName(i, fileName);
assert(!fileName.isEmpty());
if (fileName == savePath)
{
find = true;
break;
}
m_thumb->getItemFileName(saveIndexs[i], fileName);
srcFiles.append(fileName);
}
if (!find)
if (!srcFiles.isEmpty())
{
QStringList srcFiles;
std::vector<int> saveIndexs;
dlg.getSaveIndexs(saveIndexs);
for (size_t i = 0; i < saveIndexs.size(); ++i)
{
QString fileName;
m_thumb->getItemFileName(saveIndexs[i], fileName);
srcFiles.append(fileName);
}
QString savePath = dlg.getSavePath();
QString saveName = dlg.getSaveName();
QString saveExt = dlg.getSaveExt();
bool isSaveAsMulti = dlg.isSaveAsMultiPage();
int saveQuality = dlg.getSaveQuality();
if (!srcFiles.isEmpty())
{
int saveQuality = dlg.getSaveQuality();
Dialog_ExportImageFile dlgExport(savePath, saveQuality, srcFiles, this);
dlgExport.exec();
}
}
else
{
QMessageBox::information(this, tr("info"), tr("find savePath in thumbnail"));
Dialog_ExportImageFile dlgExport(savePath, saveName, saveExt, isSaveAsMulti, saveQuality, srcFiles, this);
dlgExport.exec();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment