1.实现书籍排序功能

2.解决扫描到缓存目录时图像质量不佳的问题
This commit is contained in:
luoliangyi 2022-05-16 14:38:22 +08:00
parent b729bbaa4d
commit 1198b95fb2
8 changed files with 269 additions and 173 deletions

Binary file not shown.

View File

@ -1505,326 +1505,331 @@ Please make sure the two passwords are the same.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="118"/>
<location filename="mainwindow.ui" line="119"/>
<source>menu_image</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="122"/>
<location filename="mainwindow.ui" line="123"/>
<source>menuRotate</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="136"/>
<location filename="mainwindow.ui" line="137"/>
<source>menu_user</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="151"/>
<location filename="mainwindow.ui" line="152"/>
<source>menu_info</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="159"/>
<location filename="mainwindow.ui" line="160"/>
<source>menu_device</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="174"/>
<location filename="mainwindow.ui" line="175"/>
<source>toolBar</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="205"/>
<location filename="mainwindow.ui" line="206"/>
<source>act_open</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="210"/>
<location filename="mainwindow.ui" line="211"/>
<source>act_insert</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="219"/>
<location filename="mainwindow.ui" line="220"/>
<source>act_save</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="228"/>
<location filename="mainwindow.ui" line="229"/>
<source>act_saveAs</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="233"/>
<location filename="mainwindow.ui" line="234"/>
<source>act_Export</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="242"/>
<location filename="mainwindow.ui" line="243"/>
<source>act_closeFile</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="251"/>
<location filename="mainwindow.ui" line="252"/>
<source>act_closeAll</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="256"/>
<location filename="mainwindow.ui" line="257"/>
<source>act_imageInfo</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="261"/>
<location filename="mainwindow.ui" line="262"/>
<source>act_exit</source>
<translation>退</translation>
</message>
<message>
<location filename="mainwindow.ui" line="270"/>
<location filename="mainwindow.ui" line="271"/>
<source>act_scannerSettings</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="279"/>
<location filename="mainwindow.ui" line="280"/>
<source>act_acquire</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="284"/>
<location filename="mainwindow.ui" line="285"/>
<source>act_acquireSingle</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="289"/>
<location filename="mainwindow.ui" line="290"/>
<source>act_acquireInto</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="298"/>
<location filename="mainwindow.ui" line="299"/>
<source>act_fullscreen</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="307"/>
<location filename="mainwindow.ui" line="308"/>
<source>act_fitWindowSize</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="316"/>
<location filename="mainwindow.ui" line="317"/>
<source>act_fitWindowWidth</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="325"/>
<location filename="mainwindow.ui" line="326"/>
<source>act_realSize</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="334"/>
<location filename="mainwindow.ui" line="335"/>
<source>act_zoomIn</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="343"/>
<location filename="mainwindow.ui" line="344"/>
<source>act_zoomOut</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="354"/>
<location filename="mainwindow.ui" line="355"/>
<source>act_toolBar</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="365"/>
<location filename="mainwindow.ui" line="366"/>
<source>act_statusBar</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="376"/>
<location filename="mainwindow.ui" line="377"/>
<source>act_thumbnailBar</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="384"/>
<location filename="mainwindow.ui" line="385"/>
<source>act_colorInfo</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="393"/>
<location filename="mainwindow.ui" line="394"/>
<source>act_previous</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="402"/>
<location filename="mainwindow.ui" line="403"/>
<source>act_next</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="407"/>
<location filename="mainwindow.ui" line="408"/>
<source>act_first</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="412"/>
<location filename="mainwindow.ui" line="413"/>
<source>act_last</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="417"/>
<location filename="mainwindow.ui" line="418"/>
<source>act_openPageNum</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="426"/>
<location filename="mainwindow.ui" line="427"/>
<source>act_previousPage</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="435"/>
<location filename="mainwindow.ui" line="436"/>
<source>act_nextPage</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="440"/>
<location filename="mainwindow.ui" line="441"/>
<source>act_firstPage</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="445"/>
<location filename="mainwindow.ui" line="446"/>
<source>act_lastPage</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="454"/>
<location filename="mainwindow.ui" line="455"/>
<source>act_adjust</source>
<translation>//...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="463"/>
<location filename="mainwindow.ui" line="464"/>
<source>act_90Left</source>
<translation>90</translation>
</message>
<message>
<location filename="mainwindow.ui" line="472"/>
<location filename="mainwindow.ui" line="473"/>
<source>act_90Right</source>
<translation>90</translation>
</message>
<message>
<location filename="mainwindow.ui" line="477"/>
<location filename="mainwindow.ui" line="478"/>
<source>act_180</source>
<translation>180</translation>
</message>
<message>
<location filename="mainwindow.ui" line="482"/>
<location filename="mainwindow.ui" line="483"/>
<source>act_multiRotate</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="491"/>
<location filename="mainwindow.ui" line="492"/>
<source>act_autoCrop</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="500"/>
<location filename="mainwindow.ui" line="501"/>
<source>act_signIn</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="505"/>
<location filename="mainwindow.ui" line="506"/>
<source>act_passwordChange</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="510"/>
<location filename="mainwindow.ui" line="511"/>
<source>act_signOut</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="515"/>
<location filename="mainwindow.ui" line="516"/>
<source>act_log</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="520"/>
<location filename="mainwindow.ui" line="521"/>
<source>act_clrCache</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="525"/>
<location filename="mainwindow.ui" line="526"/>
<source>act_consume</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="534"/>
<location filename="mainwindow.ui" line="535"/>
<source>act_help</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="539"/>
<location filename="mainwindow.ui" line="540"/>
<source>act_about</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="544"/>
<location filename="mainwindow.ui" line="545"/>
<source>act_insertFromScanner</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="549"/>
<location filename="mainwindow.ui" line="550"/>
<source>act_clearRoller</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="558"/>
<location filename="mainwindow.ui" line="559"/>
<source>act_imageEdit</source>
<translation type="unfinished">...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="568"/>
<source>act_sortPages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="64"/>
<source>HuaGoScan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="190"/>
<location filename="mainwindow.cpp" line="191"/>
<source>Grid</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="195"/>
<location filename="mainwindow.cpp" line="196"/>
<source>Move To...</source>
<translation type="unfinished">...</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="199"/>
<location filename="mainwindow.cpp" line="200"/>
<source>Insert files</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="224"/>
<location filename="mainwindow.cpp" line="225"/>
<location filename="mainwindow.cpp" line="226"/>
<location filename="mainwindow.cpp" line="227"/>
<source>nodevice</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="384"/>
<location filename="mainwindow.cpp" line="429"/>
<location filename="mainwindow.cpp" line="1156"/>
<location filename="mainwindow.cpp" line="1180"/>
<location filename="mainwindow.cpp" line="1825"/>
<location filename="mainwindow.cpp" line="2116"/>
<location filename="mainwindow.cpp" line="385"/>
<location filename="mainwindow.cpp" line="430"/>
<location filename="mainwindow.cpp" line="1212"/>
<location filename="mainwindow.cpp" line="1236"/>
<location filename="mainwindow.cpp" line="1881"/>
<location filename="mainwindow.cpp" line="2172"/>
<source>Question</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="385"/>
<location filename="mainwindow.cpp" line="1157"/>
<location filename="mainwindow.cpp" line="386"/>
<location filename="mainwindow.cpp" line="1213"/>
<source>modified, save it?</source>
<translation>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="430"/>
<location filename="mainwindow.cpp" line="431"/>
<source>file lost, remove it?</source>
<translation type="unfinished"></translation>
</message>
@ -1833,7 +1838,7 @@ Please make sure the two passwords are the same.</source>
<translation type="vanished"> </translation>
</message>
<message>
<location filename="mainwindow.cpp" line="660"/>
<location filename="mainwindow.cpp" line="661"/>
<source> disconnected</source>
<translation> </translation>
</message>
@ -1850,161 +1855,161 @@ Please make sure the two passwords are the same.</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1177"/>
<location filename="mainwindow.cpp" line="1233"/>
<source>Clear, then start scan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1178"/>
<location filename="mainwindow.cpp" line="1234"/>
<source>Do NOT clear, then start scan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1181"/>
<location filename="mainwindow.cpp" line="1237"/>
<source>Already exist images in image list.
Do you want to clear?</source>
<translation>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1215"/>
<location filename="mainwindow.cpp" line="1271"/>
<source>Information</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1216"/>
<location filename="mainwindow.cpp" line="1272"/>
<source>Insufficient disk space</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1402"/>
<location filename="mainwindow.cpp" line="1458"/>
<source>Open images</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1413"/>
<location filename="mainwindow.cpp" line="1469"/>
<source>Insert images</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1536"/>
<location filename="mainwindow.cpp" line="1541"/>
<location filename="mainwindow.cpp" line="1595"/>
<location filename="mainwindow.cpp" line="1650"/>
<location filename="mainwindow.cpp" line="1655"/>
<location filename="mainwindow.cpp" line="1592"/>
<location filename="mainwindow.cpp" line="1597"/>
<location filename="mainwindow.cpp" line="1651"/>
<location filename="mainwindow.cpp" line="1706"/>
<location filename="mainwindow.cpp" line="1711"/>
<source>info</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1536"/>
<location filename="mainwindow.cpp" line="1595"/>
<location filename="mainwindow.cpp" line="1650"/>
<location filename="mainwindow.cpp" line="1592"/>
<location filename="mainwindow.cpp" line="1651"/>
<location filename="mainwindow.cpp" line="1706"/>
<source>save failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1541"/>
<location filename="mainwindow.cpp" line="1655"/>
<location filename="mainwindow.cpp" line="1597"/>
<location filename="mainwindow.cpp" line="1711"/>
<source>find savePath in thumbnail</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1732"/>
<location filename="mainwindow.cpp" line="1788"/>
<source>File name</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1732"/>
<location filename="mainwindow.cpp" line="1788"/>
<source>File path</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1732"/>
<location filename="mainwindow.cpp" line="1788"/>
<source>File size</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1732"/>
<location filename="mainwindow.cpp" line="1788"/>
<source>Creation date/time</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1732"/>
<location filename="mainwindow.cpp" line="1788"/>
<source>Modified date/time</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1732"/>
<location filename="mainwindow.cpp" line="1788"/>
<source>Accessed date/time</source>
<translation>访</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1775"/>
<location filename="mainwindow.cpp" line="1831"/>
<source>Format</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1775"/>
<location filename="mainwindow.cpp" line="1831"/>
<source>Width</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1775"/>
<location filename="mainwindow.cpp" line="1831"/>
<source>Height</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1775"/>
<location filename="mainwindow.cpp" line="1831"/>
<source>depth</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1775"/>
<location filename="mainwindow.cpp" line="1831"/>
<source>Color model</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1775"/>
<location filename="mainwindow.cpp" line="1831"/>
<source>DPI</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1775"/>
<location filename="mainwindow.cpp" line="1831"/>
<source>Print size</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1775"/>
<location filename="mainwindow.cpp" line="1831"/>
<source>Frame</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1783"/>
<location filename="mainwindow.cpp" line="1839"/>
<source>None</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1783"/>
<location filename="mainwindow.cpp" line="1839"/>
<source>Mono</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1783"/>
<location filename="mainwindow.cpp" line="1839"/>
<source>Gray</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1783"/>
<location filename="mainwindow.cpp" line="1839"/>
<source>Color</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1804"/>
<location filename="mainwindow.cpp" line="1860"/>
<source>Warning</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1804"/>
<location filename="mainwindow.cpp" line="1860"/>
<source>Device is Running!
Please finish scanning first.</source>
<translation>
@ -2017,166 +2022,166 @@ Continue to close?</source>
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2117"/>
<location filename="mainwindow.cpp" line="2173"/>
<source>Sure to sign out administrator account?</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2262"/>
<location filename="mainwindow.cpp" line="2318"/>
<source>&lt;p&gt;%1: &lt;a href=&apos;%2&apos;&gt;%3&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2264"/>
<location filename="mainwindow.cpp" line="2320"/>
<source>&lt;p&gt;%1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2596"/>
<location filename="mainwindow.cpp" line="2657"/>
<source>open scanner </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2597"/>
<location filename="mainwindow.cpp" line="2643"/>
<location filename="mainwindow.cpp" line="2658"/>
<location filename="mainwindow.cpp" line="2704"/>
<source>app name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2602"/>
<location filename="mainwindow.cpp" line="2676"/>
<location filename="mainwindow.cpp" line="2663"/>
<location filename="mainwindow.cpp" line="2737"/>
<source>success</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2611"/>
<location filename="mainwindow.cpp" line="2672"/>
<source>apply setting </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2611"/>
<location filename="mainwindow.cpp" line="2672"/>
<source> success</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2611"/>
<location filename="mainwindow.cpp" line="2672"/>
<source> failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2629"/>
<location filename="mainwindow.cpp" line="2691"/>
<location filename="mainwindow.cpp" line="2690"/>
<location filename="mainwindow.cpp" line="2752"/>
<source>failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2651"/>
<location filename="mainwindow.cpp" line="2712"/>
<source>lost config</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2672"/>
<location filename="mainwindow.cpp" line="2733"/>
<source>apply setting</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="883"/>
<location filename="mainwindow.cpp" line="884"/>
<location filename="mainwindow.cpp" line="885"/>
<location filename="mainwindow.cpp" line="2351"/>
<location filename="mainwindow.cpp" line="2352"/>
<location filename="mainwindow.cpp" line="2353"/>
<location filename="mainwindow.cpp" line="2398"/>
<location filename="mainwindow.cpp" line="2399"/>
<location filename="mainwindow.cpp" line="2400"/>
<location filename="mainwindow.cpp" line="939"/>
<location filename="mainwindow.cpp" line="940"/>
<location filename="mainwindow.cpp" line="941"/>
<location filename="mainwindow.cpp" line="2407"/>
<location filename="mainwindow.cpp" line="2408"/>
<location filename="mainwindow.cpp" line="2409"/>
<location filename="mainwindow.cpp" line="2454"/>
<location filename="mainwindow.cpp" line="2455"/>
<location filename="mainwindow.cpp" line="2456"/>
<location filename="mainwindow.cpp" line="2457"/>
<location filename="mainwindow.cpp" line="2516"/>
<location filename="mainwindow.cpp" line="2517"/>
<location filename="mainwindow.cpp" line="2518"/>
<location filename="mainwindow.cpp" line="2519"/>
<location filename="mainwindow.cpp" line="2578"/>
<location filename="mainwindow.cpp" line="2579"/>
<location filename="mainwindow.cpp" line="2580"/>
<source>start failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="387"/>
<location filename="mainwindow.cpp" line="432"/>
<location filename="mainwindow.cpp" line="1159"/>
<location filename="mainwindow.cpp" line="1217"/>
<location filename="mainwindow.cpp" line="1828"/>
<location filename="mainwindow.cpp" line="1842"/>
<location filename="mainwindow.cpp" line="2118"/>
<location filename="mainwindow.cpp" line="388"/>
<location filename="mainwindow.cpp" line="433"/>
<location filename="mainwindow.cpp" line="1215"/>
<location filename="mainwindow.cpp" line="1273"/>
<location filename="mainwindow.cpp" line="1884"/>
<location filename="mainwindow.cpp" line="1898"/>
<location filename="mainwindow.cpp" line="2174"/>
<source>yes</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="388"/>
<location filename="mainwindow.cpp" line="433"/>
<location filename="mainwindow.cpp" line="1160"/>
<location filename="mainwindow.cpp" line="1829"/>
<location filename="mainwindow.cpp" line="1843"/>
<location filename="mainwindow.cpp" line="2119"/>
<location filename="mainwindow.cpp" line="389"/>
<location filename="mainwindow.cpp" line="434"/>
<location filename="mainwindow.cpp" line="1216"/>
<location filename="mainwindow.cpp" line="1885"/>
<location filename="mainwindow.cpp" line="1899"/>
<location filename="mainwindow.cpp" line="2175"/>
<source>no</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="612"/>
<location filename="mainwindow.cpp" line="613"/>
<source>found device </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="622"/>
<location filename="mainwindow.cpp" line="623"/>
<source> reconnected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="756"/>
<location filename="mainwindow.cpp" line="798"/>
<location filename="mainwindow.cpp" line="771"/>
<location filename="mainwindow.cpp" line="854"/>
<source>%1%2%3.%4</source>
<translation type="unfinished">%1%2%3.%4</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1826"/>
<location filename="mainwindow.cpp" line="1882"/>
<source>There are pictures that have not been saved.
Are you sure to close?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1839"/>
<location filename="mainwindow.cpp" line="1895"/>
<source>tips</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1840"/>
<location filename="mainwindow.cpp" line="1896"/>
<source>Are you sure to close?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2178"/>
<location filename="mainwindow.cpp" line="2180"/>
<location filename="mainwindow.cpp" line="2222"/>
<location filename="mainwindow.cpp" line="2234"/>
<location filename="mainwindow.cpp" line="2236"/>
<location filename="mainwindow.cpp" line="2278"/>
<source>hint</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2178"/>
<location filename="mainwindow.cpp" line="2214"/>
<location filename="mainwindow.cpp" line="2234"/>
<location filename="mainwindow.cpp" line="2270"/>
<source>Roller scanned count has been set to 0.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2180"/>
<location filename="mainwindow.cpp" line="2220"/>
<location filename="mainwindow.cpp" line="2236"/>
<location filename="mainwindow.cpp" line="2276"/>
<source>Roller scanned count reset failed.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2193"/>
<location filename="mainwindow.cpp" line="2249"/>
<source>Error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2193"/>
<location filename="mainwindow.cpp" line="2249"/>
<source>Document missing! It would be deleted or renamed.</source>
<translation></translation>
</message>
@ -2209,28 +2214,28 @@ Are you sure 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="2240"/>
<location filename="mainwindow.cpp" line="2296"/>
<source>About %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2241"/>
<location filename="mainwindow.cpp" line="2297"/>
<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="2256"/>
<location filename="mainwindow.cpp" line="2312"/>
<source>about %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="2257"/>
<location filename="mainwindow.cpp" line="2313"/>
<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="2258"/>
<location filename="mainwindow.cpp" line="2314"/>
<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>

View File

@ -84,6 +84,7 @@ MainWindow::MainWindow(QWidget *parent)
ui->toolBar->addAction(ui->act_next);
ui->toolBar->addAction(ui->act_previousPage);
ui->toolBar->addAction(ui->act_nextPage);
ui->toolBar->addAction(ui->act_sortPages);
ui->toolBar->addSeparator();
ui->toolBar->addAction(ui->act_help);
@ -716,13 +717,9 @@ void MainWindow::on_new_image(void *img)
QString fileName = getCacheFileName();
HGImgFmtSaveInfo saveInfo;
saveInfo.jpegQuality = (HGUInt)m_aquireIntoSaveParam.m_jpegQuality;
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_NONE;
if (1 == m_aquireIntoSaveParam.m_tiffCompression)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_LZW;
else if (2 == m_aquireIntoSaveParam.m_tiffCompression)
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_JPEG;
saveInfo.tiffJpegQuality = (HGUInt)m_aquireIntoSaveParam.m_tiffQuality;
saveInfo.jpegQuality = 80;
saveInfo.tiffCompression = HGIMGFMT_TIFFCOMP_JPEG;
saveInfo.tiffJpegQuality = 80;
HGImgFmt_SaveImage(image, 0, &saveInfo, getStdString(fileName).c_str());
if (-1 == m_scanInsertPos)
@ -1165,6 +1162,7 @@ void MainWindow::updateActionStatus()
m_multiPageLineEdit->setText(QString("%1/%2").arg(m_multiIndex + 1).arg(m_multiPageCount));
ui->toolBar->actions().at(16)->setVisible(-1 != m_currIndex && m_multiPageCount > 1 && -1 != m_multiIndex
&& (!cur_dev_.is_online() || !m_isScanning));
ui->act_sortPages->setEnabled(0 != count && (!cur_dev_.is_online() || !m_isScanning));
ui->act_imageEdit->setEnabled(nullptr != img);
ui->act_zoomIn->setEnabled(nullptr != img);
@ -2766,3 +2764,13 @@ void MainWindow::on_scanOptions_changed(const QString &device, const QString &op
updateActionStatus();
setWindowTitle(title);
}
void MainWindow::on_act_sortPages_triggered()
{
if (cur_dev_.is_online() && m_isScanning)
{
return;
}
m_thumb->bookSort();
}

View File

@ -193,6 +193,8 @@ private slots:
void on_scanOptions_changed(const QString &device, const QString &option, bool checked_now);
void on_act_sortPages_triggered();
public slots:
void my_url_handler(const QUrl& url);

View File

@ -112,6 +112,7 @@
<addaction name="act_openPageNum"/>
<addaction name="separator"/>
<addaction name="menu_multiPages"/>
<addaction name="act_sortPages"/>
</widget>
<widget class="QMenu" name="menu_image">
<property name="title">
@ -558,6 +559,15 @@
<string>act_imageEdit</string>
</property>
</action>
<action name="act_sortPages">
<property name="icon">
<iconset resource="Scanner_resource.qrc">
<normaloff>:/images/image_rsc/actions/sortpages.png</normaloff>:/images/image_rsc/actions/sortpages.png</iconset>
</property>
<property name="text">
<string>act_sortPages</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@ -1724,6 +1724,10 @@ Are you sure to close?</source>
<source>Are you sure to close?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>act_sortPages</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Phonon::</name>

View File

@ -1819,6 +1819,72 @@ HGResult HGImgThumb::removeAllItems(ThumbRemoveFlag flag)
return HGBASE_ERR_OK;
}
HGResult HGImgThumb::bookSort()
{
if (MouseStatus_Null != m_mousePressStatus || 0 != m_operate || m_draging || m_frameSelection)
{
return HGBASE_ERR_FAIL;
}
int oldCurItemIndex = m_curItemIndex;
for (int i = 0; i < (int)m_frontItems.size(); ++i)
{
if (m_curItemIndex == i)
{
if (0 == i % 2)
m_curItemIndex = i / 2;
else
m_curItemIndex = (int)m_frontItems.size() - (i + 1) / 2;
break;
}
}
for (int i = 0; i < (int)m_frontItems.size(); ++i)
{
if (m_signItemIndex == i)
{
if (0 == i % 2)
m_signItemIndex = i / 2;
else
m_signItemIndex = (int)m_frontItems.size() - (i + 1) / 2;
break;
}
}
std::list<HGImgThumbItem *> items1, items2;
for (int i = 0; i < (int)m_frontItems.size(); ++i)
{
HGImgThumbItem *item = m_frontItems[i];
if (0 == i % 2)
items1.push_back(item);
else
items2.push_front(item);
}
HGBase_EnterLock(m_lockFront);
m_frontItems.clear();
std::list<HGImgThumbItem *>::const_iterator iter;
for (iter = items1.begin(); iter != items1.end(); ++iter)
m_frontItems.push_back(*iter);
for (iter = items2.begin(); iter != items2.end(); ++iter)
m_frontItems.push_back(*iter);
HGBase_LeaveLock(m_lockFront);
if (-1 != m_curItemIndex)
{
locateItem(m_curItemIndex);
recalcShowRect(this->width(), this->height(), m_scrollSize, m_type, m_hScroll, m_vScroll, m_showThumb, m_thumbRect);
}
m_hotItemIndex = getItemIndex(mapFromGlobal(QCursor::pos()), m_mouseMoveStatus);
Show();
if (oldCurItemIndex != m_curItemIndex)
emit currItemChanged(m_curItemIndex);
return HGBASE_ERR_OK;
}
HGResult HGImgThumb::selectItem(int index, bool select)
{
if (MouseStatus_Null != m_mousePressStatus || 0 != m_operate || m_draging || m_frameSelection)

View File

@ -65,6 +65,7 @@ public:
HGResult removeItem(int index, ThumbRemoveFlag flag);
HGResult removeItems(const std::vector<int> &indexs, ThumbRemoveFlag flag);
HGResult removeAllItems(ThumbRemoveFlag flag);
HGResult bookSort();
HGResult selectItem(int index, bool select);
HGResult itemIsSelect(int index, bool *select);
HGResult updateItem(int index, const QString &fileName);