Changeset 946f442ab0 in tspsg


Ignore:
Timestamp:
Jan 7, 2010, 3:48:24 PM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
354e06314f
Parents:
f1fb54b9f7
Message:

+ Added the ability to select between using Native and Qt's File Dialog.

  • Updated translations to reflect changes.
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • i18n/en.ts

    rf1fb54b9f7 r946f442ab0  
    147147    <name>MainWindow</name>
    148148    <message>
    149         <location filename="../src/mainwindow.cpp" line="273"/>
    150         <location filename="../src/mainwindow.cpp" line="282"/>
     149        <location filename="../src/mainwindow.cpp" line="267"/>
     150        <location filename="../src/mainwindow.cpp" line="276"/>
    151151        <source>Language change</source>
    152152        <translation type="unfinished"></translation>
    153153    </message>
    154154    <message>
    155         <location filename="../src/mainwindow.cpp" line="632"/>
     155        <location filename="../src/mainwindow.cpp" line="626"/>
    156156        <source>Unable to load translation language.</source>
    157157        <translation type="unfinished"></translation>
    158158    </message>
    159159    <message>
    160         <location filename="../src/mainwindow.cpp" line="642"/>
     160        <location filename="../src/mainwindow.cpp" line="636"/>
    161161        <source>Would you like to save changes in current task?</source>
    162162        <translation type="unfinished"></translation>
     
    164164    <message>
    165165        <location filename="../ui/mainwindow.ui" line="15"/>
    166         <location filename="../src/mainwindow.cpp" line="751"/>
     166        <location filename="../src/mainwindow.cpp" line="742"/>
    167167        <source>Travelling Salesman Problem</source>
    168168        <translation type="unfinished"></translation>
    169169    </message>
    170170    <message>
    171         <location filename="../src/mainwindow.cpp" line="632"/>
     171        <location filename="../src/mainwindow.cpp" line="626"/>
    172172        <source>Language Change</source>
    173173        <translation type="unfinished"></translation>
    174174    </message>
    175175    <message>
    176         <location filename="../src/mainwindow.cpp" line="642"/>
     176        <location filename="../src/mainwindow.cpp" line="636"/>
    177177        <source>Unsaved Changes</source>
    178178        <translation type="unfinished"></translation>
     
    191191    <message>
    192192        <location filename="../src/mainwindow.cpp" line="129"/>
    193         <location filename="../src/mainwindow.cpp" line="188"/>
    194         <location filename="../src/mainwindow.cpp" line="725"/>
     193        <location filename="../src/mainwindow.cpp" line="185"/>
     194        <location filename="../src/mainwindow.cpp" line="719"/>
    195195        <source>All Files</source>
    196196        <translation type="unfinished"></translation>
    197197    </message>
    198198    <message>
    199         <location filename="../src/mainwindow.cpp" line="182"/>
     199        <location filename="../src/mainwindow.cpp" line="179"/>
    200200        <source>PDF Files</source>
    201201        <translation type="unfinished"></translation>
    202202    </message>
    203203    <message>
    204         <location filename="../src/mainwindow.cpp" line="184"/>
     204        <location filename="../src/mainwindow.cpp" line="181"/>
    205205        <source>HTML Files</source>
    206206        <translation type="unfinished"></translation>
    207207    </message>
    208208    <message>
    209         <location filename="../src/mainwindow.cpp" line="186"/>
     209        <location filename="../src/mainwindow.cpp" line="183"/>
    210210        <source>OpenDocument Files</source>
    211211        <translation type="unfinished"></translation>
    212212    </message>
    213213    <message>
    214         <location filename="../src/mainwindow.cpp" line="426"/>
     214        <location filename="../src/mainwindow.cpp" line="420"/>
    215215        <source>Selected candidate for branching: %1.</source>
    216216        <translation type="unfinished"></translation>
    217217    </message>
    218218    <message>
    219         <location filename="../src/mainwindow.cpp" line="426"/>
    220         <location filename="../src/mainwindow.cpp" line="433"/>
     219        <location filename="../src/mainwindow.cpp" line="420"/>
     220        <location filename="../src/mainwindow.cpp" line="427"/>
    221221        <source>(%1;%2)</source>
    222222        <translation type="unfinished"></translation>
    223223    </message>
    224224    <message numerus="yes">
    225         <location filename="../src/mainwindow.cpp" line="435"/>
     225        <location filename="../src/mainwindow.cpp" line="429"/>
    226226        <source>%n alternate candidate(s) for branching: %1.</source>
    227227        <translation>
     
    231231    </message>
    232232    <message numerus="yes">
    233         <location filename="../src/mainwindow.cpp" line="453"/>
     233        <location filename="../src/mainwindow.cpp" line="447"/>
    234234        <source>The price is &lt;b&gt;%n&lt;/b&gt; unit(s).</source>
    235235        <translation>
     
    239239    </message>
    240240    <message>
    241         <location filename="../src/mainwindow.cpp" line="724"/>
     241        <location filename="../src/mainwindow.cpp" line="718"/>
    242242        <source>%1 Task File</source>
    243243        <translation type="unfinished"></translation>
    244244    </message>
    245245    <message>
    246         <location filename="../src/mainwindow.cpp" line="260"/>
     246        <location filename="../src/mainwindow.cpp" line="254"/>
    247247        <source>Settings Changed</source>
    248248        <translation type="unfinished"></translation>
     
    250250    <message>
    251251        <location filename="../src/mainwindow.cpp" line="132"/>
    252         <location filename="../src/mainwindow.cpp" line="134"/>
    253252        <source>Task Load</source>
    254253        <translation type="unfinished"></translation>
    255254    </message>
    256255    <message>
    257         <location filename="../src/mainwindow.cpp" line="260"/>
     256        <location filename="../src/mainwindow.cpp" line="254"/>
    258257        <source>You have changed color settings.
    259258Do you wish to apply them to current solution text?</source>
     
    261260    </message>
    262261    <message>
    263         <location filename="../src/mainwindow.cpp" line="365"/>
     262        <location filename="../src/mainwindow.cpp" line="359"/>
    264263        <source>About TSPSG</source>
    265264        <translation type="unfinished"></translation>
    266265    </message>
    267266    <message>
    268         <location filename="../src/mainwindow.cpp" line="399"/>
     267        <location filename="../src/mainwindow.cpp" line="393"/>
    269268        <source>Data error</source>
    270269        <translation type="unfinished"></translation>
    271270    </message>
    272271    <message>
    273         <location filename="../src/mainwindow.cpp" line="399"/>
     272        <location filename="../src/mainwindow.cpp" line="393"/>
    274273        <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
    275274        <translation type="unfinished"></translation>
    276275    </message>
    277276    <message>
    278         <location filename="../src/mainwindow.cpp" line="412"/>
     277        <location filename="../src/mainwindow.cpp" line="406"/>
    279278        <source>Variant #%1</source>
    280279        <translation type="unfinished"></translation>
    281280    </message>
    282281    <message>
    283         <location filename="../src/mainwindow.cpp" line="413"/>
     282        <location filename="../src/mainwindow.cpp" line="407"/>
    284283        <source>Task:</source>
    285284        <translation type="unfinished"></translation>
    286285    </message>
    287286    <message>
     287        <location filename="../src/mainwindow.cpp" line="410"/>
     288        <location filename="../src/mainwindow.cpp" line="457"/>
     289        <source>Solution of Variant #%1 task</source>
     290        <translation type="unfinished"></translation>
     291    </message>
     292    <message>
    288293        <location filename="../src/mainwindow.cpp" line="416"/>
    289         <location filename="../src/mainwindow.cpp" line="463"/>
    290         <source>Solution of Variant #%1 task</source>
    291         <translation type="unfinished"></translation>
    292     </message>
    293     <message>
    294         <location filename="../src/mainwindow.cpp" line="422"/>
    295294        <source>Step #%1</source>
    296295        <translation type="unfinished"></translation>
    297296    </message>
    298297    <message>
    299         <location filename="../src/mainwindow.cpp" line="448"/>
     298        <location filename="../src/mainwindow.cpp" line="442"/>
    300299        <source>Optimal path:</source>
    301300        <translation type="unfinished"></translation>
    302301    </message>
    303302    <message>
    304         <location filename="../src/mainwindow.cpp" line="450"/>
     303        <location filename="../src/mainwindow.cpp" line="444"/>
    305304        <source>Resulting path:</source>
    306305        <translation type="unfinished"></translation>
    307306    </message>
    308307    <message>
    309         <location filename="../src/mainwindow.cpp" line="455"/>
     308        <location filename="../src/mainwindow.cpp" line="449"/>
    310309        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
    311310        <translation type="unfinished"></translation>
    312311    </message>
    313312    <message>
    314         <location filename="../src/mainwindow.cpp" line="458"/>
     313        <location filename="../src/mainwindow.cpp" line="452"/>
    315314        <source>&lt;b&gt;WARNING!!!&lt;/b&gt;&lt;br&gt;This result is a record, but it may not be optimal.&lt;br&gt;Iterations need to be continued to check whether this result is optimal or get an optimal one.</source>
    316315        <translation type="unfinished"></translation>
    317316    </message>
    318317    <message>
    319         <location filename="../src/mainwindow.cpp" line="733"/>
    320         <location filename="../src/mainwindow.cpp" line="735"/>
     318        <location filename="../src/mainwindow.cpp" line="727"/>
    321319        <source>Task Save</source>
    322320        <translation type="unfinished"></translation>
    323321    </message>
    324322    <message>
    325         <location filename="../src/mainwindow.cpp" line="273"/>
     323        <location filename="../src/mainwindow.cpp" line="267"/>
    326324        <source>Language will be autodetected on next application start.</source>
    327325        <translation type="unfinished"></translation>
    328326    </message>
    329327    <message>
    330         <location filename="../src/mainwindow.cpp" line="282"/>
     328        <location filename="../src/mainwindow.cpp" line="276"/>
    331329        <source>You have language autodetection turned on.
    332330It needs to be off.
     
    335333    </message>
    336334    <message>
    337         <location filename="../src/mainwindow.cpp" line="149"/>
    338         <location filename="../src/mainwindow.cpp" line="165"/>
    339         <location filename="../src/mainwindow.cpp" line="287"/>
     335        <location filename="../src/mainwindow.cpp" line="146"/>
     336        <location filename="../src/mainwindow.cpp" line="162"/>
     337        <location filename="../src/mainwindow.cpp" line="281"/>
    340338        <location filename="../src/mainwindow.h" line="100"/>
    341339        <source>Untitled</source>
     
    611609    </message>
    612610    <message>
    613         <location filename="../src/mainwindow.cpp" line="712"/>
     611        <location filename="../src/mainwindow.cpp" line="706"/>
    614612        <source>&amp;Print...</source>
    615613        <translation type="unfinished"></translation>
    616614    </message>
    617615    <message>
    618         <location filename="../src/mainwindow.cpp" line="719"/>
     616        <location filename="../src/mainwindow.cpp" line="713"/>
    619617        <source>Ctrl+P</source>
    620618        <translation type="unfinished"></translation>
     
    636634    </message>
    637635    <message>
    638         <location filename="../src/mainwindow.cpp" line="704"/>
     636        <location filename="../src/mainwindow.cpp" line="698"/>
    639637        <source>P&amp;rint Preview...</source>
    640638        <translation type="unfinished"></translation>
    641639    </message>
    642640    <message>
    643         <location filename="../src/mainwindow.cpp" line="706"/>
     641        <location filename="../src/mainwindow.cpp" line="700"/>
    644642        <source>Preview solution results</source>
    645643        <translation type="unfinished"></translation>
    646644    </message>
    647645    <message>
    648         <location filename="../src/mainwindow.cpp" line="709"/>
     646        <location filename="../src/mainwindow.cpp" line="703"/>
    649647        <source>Preview current solution results before printing</source>
    650648        <translation type="unfinished"></translation>
    651649    </message>
    652650    <message>
    653         <location filename="../src/mainwindow.cpp" line="714"/>
     651        <location filename="../src/mainwindow.cpp" line="708"/>
    654652        <source>Print solution</source>
    655653        <translation type="unfinished"></translation>
    656654    </message>
    657655    <message>
    658         <location filename="../src/mainwindow.cpp" line="717"/>
     656        <location filename="../src/mainwindow.cpp" line="711"/>
    659657        <source>Print current solution results</source>
    660658        <translation type="unfinished"></translation>
     
    739737    </message>
    740738    <message>
     739        <location filename="../ui/settingsdialog.ui" line="291"/>
     740        <source>Maximum number of cities to show solution steps&apos; matrices</source>
     741        <translation type="unfinished"></translation>
     742    </message>
     743    <message>
    741744        <location filename="../ui/settingsdialog.ui" line="305"/>
    742745        <source>Generate fractional random values with the accuracy of 2 decimal places</source>
     
    756759        <location filename="../ui/settingsdialog.ui" line="319"/>
    757760        <source>Scroll to solution end</source>
     761        <translation type="unfinished"></translation>
     762    </message>
     763    <message>
     764        <location filename="../ui/settingsdialog.ui" line="327"/>
     765        <source>Use native File Open and File Save dialogs (uncheck to use Qt&apos;s File Dialogs)</source>
     766        <translation type="unfinished"></translation>
     767    </message>
     768    <message>
     769        <location filename="../ui/settingsdialog.ui" line="330"/>
     770        <source>Use native file dialogs</source>
    758771        <translation type="unfinished"></translation>
    759772    </message>
     
    764777    </message>
    765778    <message>
    766         <location filename="../ui/settingsdialog.ui" line="291"/>
    767         <source>Maximum number of cities for showing solution steps&apos; matrices</source>
    768         <translation type="unfinished"></translation>
    769     </message>
    770     <message>
    771779        <location filename="../ui/settingsdialog.ui" line="294"/>
    772780        <source> cities</source>
     
    806814    </message>
    807815    <message>
    808         <location filename="../src/settingsdialog.cpp" line="99"/>
     816        <location filename="../src/settingsdialog.cpp" line="100"/>
    809817        <source>Restore main window state and position on application restart</source>
    810818        <translation type="unfinished"></translation>
    811819    </message>
    812820    <message>
    813         <location filename="../src/settingsdialog.cpp" line="101"/>
     821        <location filename="../src/settingsdialog.cpp" line="102"/>
    814822        <source>Save main window state and position</source>
    815823        <translation type="unfinished"></translation>
    816824    </message>
    817825    <message>
    818         <location filename="../src/settingsdialog.cpp" line="124"/>
     826        <location filename="../src/settingsdialog.cpp" line="125"/>
    819827        <source>Hover mouse pointer over dialog elements to get additional help</source>
    820828        <translation type="unfinished"></translation>
  • i18n/ru.ts

    rf1fb54b9f7 r946f442ab0  
    155155    <name>MainWindow</name>
    156156    <message>
    157         <location filename="../src/mainwindow.cpp" line="273"/>
    158         <location filename="../src/mainwindow.cpp" line="282"/>
     157        <location filename="../src/mainwindow.cpp" line="267"/>
     158        <location filename="../src/mainwindow.cpp" line="276"/>
    159159        <source>Language change</source>
    160160        <translation>Смена языка</translation>
    161161    </message>
    162162    <message>
    163         <location filename="../src/mainwindow.cpp" line="632"/>
     163        <location filename="../src/mainwindow.cpp" line="626"/>
    164164        <source>Unable to load translation language.</source>
    165165        <translation>Невозможно загрузить перевод.</translation>
     
    167167    <message>
    168168        <location filename="../ui/mainwindow.ui" line="15"/>
    169         <location filename="../src/mainwindow.cpp" line="751"/>
     169        <location filename="../src/mainwindow.cpp" line="742"/>
    170170        <source>Travelling Salesman Problem</source>
    171171        <translation>Задача коммивояжера</translation>
    172172    </message>
    173173    <message>
    174         <location filename="../src/mainwindow.cpp" line="642"/>
     174        <location filename="../src/mainwindow.cpp" line="636"/>
    175175        <source>Unsaved Changes</source>
    176176        <translation>Несохраненные изменения</translation>
     
    183183    <message>
    184184        <location filename="../src/mainwindow.cpp" line="129"/>
    185         <location filename="../src/mainwindow.cpp" line="188"/>
    186         <location filename="../src/mainwindow.cpp" line="725"/>
     185        <location filename="../src/mainwindow.cpp" line="185"/>
     186        <location filename="../src/mainwindow.cpp" line="719"/>
    187187        <source>All Files</source>
    188188        <translation>Все файлы</translation>
     
    195195    </message>
    196196    <message>
    197         <location filename="../src/mainwindow.cpp" line="632"/>
     197        <location filename="../src/mainwindow.cpp" line="626"/>
    198198        <source>Language Change</source>
    199199        <translation>Смена языка</translation>
    200200    </message>
    201201    <message>
    202         <location filename="../src/mainwindow.cpp" line="642"/>
     202        <location filename="../src/mainwindow.cpp" line="636"/>
    203203        <source>Would you like to save changes in current task?</source>
    204204        <translation>Желаете сохранить изменения в текущей задаче?</translation>
    205205    </message>
    206206    <message>
    207         <location filename="../src/mainwindow.cpp" line="182"/>
     207        <location filename="../src/mainwindow.cpp" line="179"/>
    208208        <source>PDF Files</source>
    209209        <translation>Файли PDF</translation>
    210210    </message>
    211211    <message>
    212         <location filename="../src/mainwindow.cpp" line="184"/>
     212        <location filename="../src/mainwindow.cpp" line="181"/>
    213213        <source>HTML Files</source>
    214214        <translation>Файлы HTML</translation>
    215215    </message>
    216216    <message>
    217         <location filename="../src/mainwindow.cpp" line="186"/>
     217        <location filename="../src/mainwindow.cpp" line="183"/>
    218218        <source>OpenDocument Files</source>
    219219        <translation>Файлы OpenDocument</translation>
    220220    </message>
    221221    <message>
    222         <location filename="../src/mainwindow.cpp" line="426"/>
     222        <location filename="../src/mainwindow.cpp" line="420"/>
    223223        <source>Selected candidate for branching: %1.</source>
    224224        <translation>Выбранный кандидат для ветвления: %1.</translation>
    225225    </message>
    226226    <message>
    227         <location filename="../src/mainwindow.cpp" line="426"/>
    228         <location filename="../src/mainwindow.cpp" line="433"/>
     227        <location filename="../src/mainwindow.cpp" line="420"/>
     228        <location filename="../src/mainwindow.cpp" line="427"/>
    229229        <source>(%1;%2)</source>
    230230        <translation></translation>
    231231    </message>
    232232    <message numerus="yes">
    233         <location filename="../src/mainwindow.cpp" line="435"/>
     233        <location filename="../src/mainwindow.cpp" line="429"/>
    234234        <source>%n alternate candidate(s) for branching: %1.</source>
    235235        <translation>
     
    240240    </message>
    241241    <message numerus="yes">
    242         <location filename="../src/mainwindow.cpp" line="453"/>
     242        <location filename="../src/mainwindow.cpp" line="447"/>
    243243        <source>The price is &lt;b&gt;%n&lt;/b&gt; unit(s).</source>
    244244        <translation>
     
    249249    </message>
    250250    <message>
    251         <location filename="../src/mainwindow.cpp" line="724"/>
     251        <location filename="../src/mainwindow.cpp" line="718"/>
    252252        <source>%1 Task File</source>
    253253        <translation>Файл условия %1</translation>
    254254    </message>
    255255    <message>
    256         <location filename="../src/mainwindow.cpp" line="260"/>
     256        <location filename="../src/mainwindow.cpp" line="254"/>
    257257        <source>Settings Changed</source>
    258258        <translation>Параметры изменены</translation>
     
    260260    <message>
    261261        <location filename="../src/mainwindow.cpp" line="132"/>
    262         <location filename="../src/mainwindow.cpp" line="134"/>
    263262        <source>Task Load</source>
    264263        <translation>Загрузка условия</translation>
    265264    </message>
    266265    <message>
    267         <location filename="../src/mainwindow.cpp" line="260"/>
     266        <location filename="../src/mainwindow.cpp" line="254"/>
    268267        <source>You have changed color settings.
    269268Do you wish to apply them to current solution text?</source>
     
    272271    </message>
    273272    <message>
    274         <location filename="../src/mainwindow.cpp" line="365"/>
     273        <location filename="../src/mainwindow.cpp" line="359"/>
    275274        <source>About TSPSG</source>
    276275        <translation>Про TSPSG</translation>
    277276    </message>
    278277    <message>
    279         <location filename="../src/mainwindow.cpp" line="399"/>
     278        <location filename="../src/mainwindow.cpp" line="393"/>
    280279        <source>Data error</source>
    281280        <translation>Ошибка в данных</translation>
    282281    </message>
    283282    <message>
    284         <location filename="../src/mainwindow.cpp" line="399"/>
     283        <location filename="../src/mainwindow.cpp" line="393"/>
    285284        <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
    286285        <translation>Ошибка в ячейке [Строка %1; Колонка %2]: Неверный формат данных.</translation>
    287286    </message>
    288287    <message>
    289         <location filename="../src/mainwindow.cpp" line="412"/>
     288        <location filename="../src/mainwindow.cpp" line="406"/>
    290289        <source>Variant #%1</source>
    291290        <translation>Вариант №%1</translation>
    292291    </message>
    293292    <message>
    294         <location filename="../src/mainwindow.cpp" line="413"/>
     293        <location filename="../src/mainwindow.cpp" line="407"/>
    295294        <source>Task:</source>
    296295        <translation>Условие:</translation>
    297296    </message>
    298297    <message>
    299         <location filename="../src/mainwindow.cpp" line="416"/>
    300         <location filename="../src/mainwindow.cpp" line="463"/>
     298        <location filename="../src/mainwindow.cpp" line="410"/>
     299        <location filename="../src/mainwindow.cpp" line="457"/>
    301300        <source>Solution of Variant #%1 task</source>
    302301        <translation>Решение варианта №%1</translation>
    303302    </message>
    304303    <message>
    305         <location filename="../src/mainwindow.cpp" line="422"/>
     304        <location filename="../src/mainwindow.cpp" line="416"/>
    306305        <source>Step #%1</source>
    307306        <translation>Шаг №%1</translation>
    308307    </message>
    309308    <message>
    310         <location filename="../src/mainwindow.cpp" line="448"/>
     309        <location filename="../src/mainwindow.cpp" line="442"/>
    311310        <source>Optimal path:</source>
    312311        <translation>Оптимальный путь:</translation>
    313312    </message>
    314313    <message>
    315         <location filename="../src/mainwindow.cpp" line="450"/>
     314        <location filename="../src/mainwindow.cpp" line="444"/>
    316315        <source>Resulting path:</source>
    317316        <translation>Найденный путь:</translation>
    318317    </message>
    319318    <message>
    320         <location filename="../src/mainwindow.cpp" line="455"/>
     319        <location filename="../src/mainwindow.cpp" line="449"/>
    321320        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
    322321        <translation>Стоимость - &lt;b&gt;%1&lt;/b&gt; единиц.</translation>
    323322    </message>
    324323    <message>
    325         <location filename="../src/mainwindow.cpp" line="458"/>
     324        <location filename="../src/mainwindow.cpp" line="452"/>
    326325        <source>&lt;b&gt;WARNING!!!&lt;/b&gt;&lt;br&gt;This result is a record, but it may not be optimal.&lt;br&gt;Iterations need to be continued to check whether this result is optimal or get an optimal one.</source>
    327326        <translation>&lt;b&gt;ВНИМАНИЕ!!!&lt;/b&gt;&lt;br&gt;Найденное решение является рекордом, но может оказаться не оптимальным.&lt;br&gt;Для получения оптимального решения, или проверки текущего на оптимальность, требуется продолжить итерации.</translation>
    328327    </message>
    329328    <message>
    330         <location filename="../src/mainwindow.cpp" line="733"/>
    331         <location filename="../src/mainwindow.cpp" line="735"/>
     329        <location filename="../src/mainwindow.cpp" line="727"/>
    332330        <source>Task Save</source>
    333331        <translation>Сохранение условия</translation>
    334332    </message>
    335333    <message>
    336         <location filename="../src/mainwindow.cpp" line="273"/>
     334        <location filename="../src/mainwindow.cpp" line="267"/>
    337335        <source>Language will be autodetected on next application start.</source>
    338336        <translation>Язык будет автоматически определен при следующем запуске приложения.</translation>
    339337    </message>
    340338    <message>
    341         <location filename="../src/mainwindow.cpp" line="282"/>
     339        <location filename="../src/mainwindow.cpp" line="276"/>
    342340        <source>You have language autodetection turned on.
    343341It needs to be off.
     
    348346    </message>
    349347    <message>
    350         <location filename="../src/mainwindow.cpp" line="149"/>
    351         <location filename="../src/mainwindow.cpp" line="165"/>
    352         <location filename="../src/mainwindow.cpp" line="287"/>
     348        <location filename="../src/mainwindow.cpp" line="146"/>
     349        <location filename="../src/mainwindow.cpp" line="162"/>
     350        <location filename="../src/mainwindow.cpp" line="281"/>
    353351        <location filename="../src/mainwindow.h" line="100"/>
    354352        <source>Untitled</source>
     
    629627    </message>
    630628    <message>
    631         <location filename="../src/mainwindow.cpp" line="704"/>
     629        <location filename="../src/mainwindow.cpp" line="698"/>
    632630        <source>P&amp;rint Preview...</source>
    633631        <translation>П&amp;редварительный просмотр...</translation>
    634632    </message>
    635633    <message>
    636         <location filename="../src/mainwindow.cpp" line="706"/>
     634        <location filename="../src/mainwindow.cpp" line="700"/>
    637635        <source>Preview solution results</source>
    638636        <translation>Предварительный просмотр результатов решения</translation>
    639637    </message>
    640638    <message>
    641         <location filename="../src/mainwindow.cpp" line="709"/>
     639        <location filename="../src/mainwindow.cpp" line="703"/>
    642640        <source>Preview current solution results before printing</source>
    643641        <translation>Предварительный просмотр результатов решения перед печатью</translation>
    644642    </message>
    645643    <message>
    646         <location filename="../src/mainwindow.cpp" line="712"/>
     644        <location filename="../src/mainwindow.cpp" line="706"/>
    647645        <source>&amp;Print...</source>
    648646        <translation>&amp;Печать...</translation>
    649647    </message>
    650648    <message>
    651         <location filename="../src/mainwindow.cpp" line="714"/>
     649        <location filename="../src/mainwindow.cpp" line="708"/>
    652650        <source>Print solution</source>
    653651        <translation>Печать решения</translation>
    654652    </message>
    655653    <message>
    656         <location filename="../src/mainwindow.cpp" line="717"/>
     654        <location filename="../src/mainwindow.cpp" line="711"/>
    657655        <source>Print current solution results</source>
    658656        <translation>Распечатать текущие результаты решения</translation>
    659657    </message>
    660658    <message>
    661         <location filename="../src/mainwindow.cpp" line="719"/>
     659        <location filename="../src/mainwindow.cpp" line="713"/>
    662660        <source>Ctrl+P</source>
    663661        <translation></translation>
     
    752750    </message>
    753751    <message>
     752        <location filename="../ui/settingsdialog.ui" line="291"/>
     753        <source>Maximum number of cities to show solution steps&apos; matrices</source>
     754        <translation>Максимальное количество городов для показа матриц шагов решения</translation>
     755    </message>
     756    <message>
    754757        <location filename="../ui/settingsdialog.ui" line="305"/>
    755758        <source>Generate fractional random values with the accuracy of 2 decimal places</source>
     
    769772        <location filename="../ui/settingsdialog.ui" line="319"/>
    770773        <source>Scroll to solution end</source>
    771         <translation>Прокручивать в конец</translation>
     774        <translation>Прокручивать в конец решения</translation>
     775    </message>
     776    <message>
     777        <location filename="../ui/settingsdialog.ui" line="327"/>
     778        <source>Use native File Open and File Save dialogs (uncheck to use Qt&apos;s File Dialogs)</source>
     779        <translation>Использовать системные диалоги открытия и сохранения файла</translation>
     780    </message>
     781    <message>
     782        <location filename="../ui/settingsdialog.ui" line="330"/>
     783        <source>Use native file dialogs</source>
     784        <translation>Системные файловые диалоги</translation>
    772785    </message>
    773786    <message>
     
    775788        <source>Only when &lt;=</source>
    776789        <translation>Только когда ≤</translation>
    777     </message>
    778     <message>
    779         <location filename="../ui/settingsdialog.ui" line="291"/>
    780         <source>Maximum number of cities for showing solution steps&apos; matrices</source>
    781         <translation>Максимальное количество городов для показа матриц шагов решения</translation>
    782790    </message>
    783791    <message>
     
    819827    </message>
    820828    <message>
    821         <location filename="../src/settingsdialog.cpp" line="99"/>
     829        <location filename="../src/settingsdialog.cpp" line="100"/>
    822830        <source>Restore main window state and position on application restart</source>
    823831        <translation>Восстанавливать состояние и размеры главного окна после перезапуска приложения</translation>
    824832    </message>
    825833    <message>
    826         <location filename="../src/settingsdialog.cpp" line="101"/>
     834        <location filename="../src/settingsdialog.cpp" line="102"/>
    827835        <source>Save main window state and position</source>
    828836        <translation>Сохранять состояние и положение главного окна</translation>
    829837    </message>
    830838    <message>
    831         <location filename="../src/settingsdialog.cpp" line="124"/>
     839        <location filename="../src/settingsdialog.cpp" line="125"/>
    832840        <source>Hover mouse pointer over dialog elements to get additional help</source>
    833841        <translation>Наведите указатель мыши на элемент диалога, чтоб получить подсказку</translation>
  • i18n/uk.ts

    rf1fb54b9f7 r946f442ab0  
    185185    </message>
    186186    <message>
    187         <location filename="../src/mainwindow.cpp" line="704"/>
     187        <location filename="../src/mainwindow.cpp" line="698"/>
    188188        <source>P&amp;rint Preview...</source>
    189189        <translation>&amp;Попередній перегляд...</translation>
    190190    </message>
    191191    <message>
    192         <location filename="../src/mainwindow.cpp" line="706"/>
     192        <location filename="../src/mainwindow.cpp" line="700"/>
    193193        <source>Preview solution results</source>
    194194        <translation>Попередній перегляд результатів розв&apos;язку</translation>
    195195    </message>
    196196    <message>
    197         <location filename="../src/mainwindow.cpp" line="709"/>
     197        <location filename="../src/mainwindow.cpp" line="703"/>
    198198        <source>Preview current solution results before printing</source>
    199199        <translation>Попередній перегляд результатів розв&apos;язку перед друком</translation>
    200200    </message>
    201201    <message>
    202         <location filename="../src/mainwindow.cpp" line="712"/>
     202        <location filename="../src/mainwindow.cpp" line="706"/>
    203203        <source>&amp;Print...</source>
    204204        <translation>&amp;Друк...</translation>
    205205    </message>
    206206    <message>
    207         <location filename="../src/mainwindow.cpp" line="714"/>
     207        <location filename="../src/mainwindow.cpp" line="708"/>
    208208        <source>Print solution</source>
    209209        <translation>Друк розв&apos;зку</translation>
    210210    </message>
    211211    <message>
    212         <location filename="../src/mainwindow.cpp" line="717"/>
     212        <location filename="../src/mainwindow.cpp" line="711"/>
    213213        <source>Print current solution results</source>
    214214        <translation>Роздрукувати поточний результат розв&apos;язку</translation>
    215215    </message>
    216216    <message>
    217         <location filename="../src/mainwindow.cpp" line="719"/>
     217        <location filename="../src/mainwindow.cpp" line="713"/>
    218218        <source>Ctrl+P</source>
    219219        <translation></translation>
     
    478478    </message>
    479479    <message>
    480         <location filename="../src/mainwindow.cpp" line="273"/>
    481         <location filename="../src/mainwindow.cpp" line="282"/>
     480        <location filename="../src/mainwindow.cpp" line="267"/>
     481        <location filename="../src/mainwindow.cpp" line="276"/>
    482482        <source>Language change</source>
    483483        <translation>Зміна мови</translation>
    484484    </message>
    485485    <message>
    486         <location filename="../src/mainwindow.cpp" line="632"/>
     486        <location filename="../src/mainwindow.cpp" line="626"/>
    487487        <source>Unable to load translation language.</source>
    488488        <translation>Неможливо завантажити переклад.</translation>
     
    490490    <message>
    491491        <location filename="../ui/mainwindow.ui" line="15"/>
    492         <location filename="../src/mainwindow.cpp" line="751"/>
     492        <location filename="../src/mainwindow.cpp" line="742"/>
    493493        <source>Travelling Salesman Problem</source>
    494494        <translation>Задача комівояжера</translation>
    495495    </message>
    496496    <message>
    497         <location filename="../src/mainwindow.cpp" line="642"/>
     497        <location filename="../src/mainwindow.cpp" line="636"/>
    498498        <source>Unsaved Changes</source>
    499499        <translation>Незбережені зміни</translation>
     
    506506    <message>
    507507        <location filename="../src/mainwindow.cpp" line="129"/>
    508         <location filename="../src/mainwindow.cpp" line="188"/>
    509         <location filename="../src/mainwindow.cpp" line="725"/>
     508        <location filename="../src/mainwindow.cpp" line="185"/>
     509        <location filename="../src/mainwindow.cpp" line="719"/>
    510510        <source>All Files</source>
    511511        <translation>Усі файли</translation>
     
    518518    </message>
    519519    <message>
    520         <location filename="../src/mainwindow.cpp" line="632"/>
     520        <location filename="../src/mainwindow.cpp" line="626"/>
    521521        <source>Language Change</source>
    522522        <translation>Зміна мови</translation>
    523523    </message>
    524524    <message>
    525         <location filename="../src/mainwindow.cpp" line="642"/>
     525        <location filename="../src/mainwindow.cpp" line="636"/>
    526526        <source>Would you like to save changes in current task?</source>
    527527        <translation>Бажаете зберегти зміни у поточній задачі?</translation>
    528528    </message>
    529529    <message>
    530         <location filename="../src/mainwindow.cpp" line="182"/>
     530        <location filename="../src/mainwindow.cpp" line="179"/>
    531531        <source>PDF Files</source>
    532532        <translation>Файлы PDF</translation>
    533533    </message>
    534534    <message>
    535         <location filename="../src/mainwindow.cpp" line="184"/>
     535        <location filename="../src/mainwindow.cpp" line="181"/>
    536536        <source>HTML Files</source>
    537537        <translation>Файли HTML</translation>
    538538    </message>
    539539    <message>
    540         <location filename="../src/mainwindow.cpp" line="186"/>
     540        <location filename="../src/mainwindow.cpp" line="183"/>
    541541        <source>OpenDocument Files</source>
    542542        <translation>Файли OpenDocument</translation>
    543543    </message>
    544544    <message>
    545         <location filename="../src/mainwindow.cpp" line="426"/>
     545        <location filename="../src/mainwindow.cpp" line="420"/>
    546546        <source>Selected candidate for branching: %1.</source>
    547547        <translation>Обраний кандидат на розгалудження: %1.</translation>
    548548    </message>
    549549    <message>
    550         <location filename="../src/mainwindow.cpp" line="426"/>
    551         <location filename="../src/mainwindow.cpp" line="433"/>
     550        <location filename="../src/mainwindow.cpp" line="420"/>
     551        <location filename="../src/mainwindow.cpp" line="427"/>
    552552        <source>(%1;%2)</source>
    553553        <translation></translation>
    554554    </message>
    555555    <message numerus="yes">
    556         <location filename="../src/mainwindow.cpp" line="435"/>
     556        <location filename="../src/mainwindow.cpp" line="429"/>
    557557        <source>%n alternate candidate(s) for branching: %1.</source>
    558558        <translation>
     
    563563    </message>
    564564    <message numerus="yes">
    565         <location filename="../src/mainwindow.cpp" line="453"/>
     565        <location filename="../src/mainwindow.cpp" line="447"/>
    566566        <source>The price is &lt;b&gt;%n&lt;/b&gt; unit(s).</source>
    567567        <translation>
     
    572572    </message>
    573573    <message>
    574         <location filename="../src/mainwindow.cpp" line="724"/>
     574        <location filename="../src/mainwindow.cpp" line="718"/>
    575575        <source>%1 Task File</source>
    576576        <translation>Файл умови %1</translation>
    577577    </message>
    578578    <message>
    579         <location filename="../src/mainwindow.cpp" line="260"/>
     579        <location filename="../src/mainwindow.cpp" line="254"/>
    580580        <source>Settings Changed</source>
    581581        <translation>Параметри змінено</translation>
     
    583583    <message>
    584584        <location filename="../src/mainwindow.cpp" line="132"/>
    585         <location filename="../src/mainwindow.cpp" line="134"/>
    586585        <source>Task Load</source>
    587586        <translation>Завантаження умови</translation>
    588587    </message>
    589588    <message>
    590         <location filename="../src/mainwindow.cpp" line="260"/>
     589        <location filename="../src/mainwindow.cpp" line="254"/>
    591590        <source>You have changed color settings.
    592591Do you wish to apply them to current solution text?</source>
     
    595594    </message>
    596595    <message>
    597         <location filename="../src/mainwindow.cpp" line="365"/>
     596        <location filename="../src/mainwindow.cpp" line="359"/>
    598597        <source>About TSPSG</source>
    599598        <translation>Про TSPSG</translation>
    600599    </message>
    601600    <message>
    602         <location filename="../src/mainwindow.cpp" line="399"/>
     601        <location filename="../src/mainwindow.cpp" line="393"/>
    603602        <source>Data error</source>
    604603        <translation>Помилка у даних</translation>
    605604    </message>
    606605    <message>
    607         <location filename="../src/mainwindow.cpp" line="399"/>
     606        <location filename="../src/mainwindow.cpp" line="393"/>
    608607        <source>Error in cell [Row %1; Column %2]: Invalid data format.</source>
    609608        <translation>Помилка у комірці  [Рядок %1; Колонка %2]: Невірний формат даних.</translation>
    610609    </message>
    611610    <message>
    612         <location filename="../src/mainwindow.cpp" line="412"/>
     611        <location filename="../src/mainwindow.cpp" line="406"/>
    613612        <source>Variant #%1</source>
    614613        <translation>Варіант №%1</translation>
    615614    </message>
    616615    <message>
    617         <location filename="../src/mainwindow.cpp" line="413"/>
     616        <location filename="../src/mainwindow.cpp" line="407"/>
    618617        <source>Task:</source>
    619618        <translation>Умова:</translation>
    620619    </message>
    621620    <message>
    622         <location filename="../src/mainwindow.cpp" line="416"/>
    623         <location filename="../src/mainwindow.cpp" line="463"/>
     621        <location filename="../src/mainwindow.cpp" line="410"/>
     622        <location filename="../src/mainwindow.cpp" line="457"/>
    624623        <source>Solution of Variant #%1 task</source>
    625624        <translation>Розв&apos;язок варіанту №%1</translation>
    626625    </message>
    627626    <message>
    628         <location filename="../src/mainwindow.cpp" line="422"/>
     627        <location filename="../src/mainwindow.cpp" line="416"/>
    629628        <source>Step #%1</source>
    630629        <translation>Крок №%1</translation>
    631630    </message>
    632631    <message>
    633         <location filename="../src/mainwindow.cpp" line="448"/>
     632        <location filename="../src/mainwindow.cpp" line="442"/>
    634633        <source>Optimal path:</source>
    635634        <translation>Оптимальний шлях:</translation>
    636635    </message>
    637636    <message>
    638         <location filename="../src/mainwindow.cpp" line="450"/>
     637        <location filename="../src/mainwindow.cpp" line="444"/>
    639638        <source>Resulting path:</source>
    640639        <translation>Знайдений шлях:</translation>
    641640    </message>
    642641    <message>
    643         <location filename="../src/mainwindow.cpp" line="455"/>
     642        <location filename="../src/mainwindow.cpp" line="449"/>
    644643        <source>The price is &lt;b&gt;%1&lt;/b&gt; units.</source>
    645644        <translation>Вартість - &lt;b&gt;%1&lt;/b&gt; одиниць.</translation>
    646645    </message>
    647646    <message>
    648         <location filename="../src/mainwindow.cpp" line="458"/>
     647        <location filename="../src/mainwindow.cpp" line="452"/>
    649648        <source>&lt;b&gt;WARNING!!!&lt;/b&gt;&lt;br&gt;This result is a record, but it may not be optimal.&lt;br&gt;Iterations need to be continued to check whether this result is optimal or get an optimal one.</source>
    650649        <translation>&lt;b&gt;Увага!!!&lt;/b&gt;&lt;br&gt;Знайдений розв&apos;язок є рекордом, але може бути неоптимальним.&lt;br&gt;Для отримання оптимального розв&apos;зку, або перевірки поточного на оптимальність, потрібно продовжити ітерації.</translation>
    651650    </message>
    652651    <message>
    653         <location filename="../src/mainwindow.cpp" line="733"/>
    654         <location filename="../src/mainwindow.cpp" line="735"/>
     652        <location filename="../src/mainwindow.cpp" line="727"/>
    655653        <source>Task Save</source>
    656654        <translation>Збереження умови</translation>
    657655    </message>
    658656    <message>
    659         <location filename="../src/mainwindow.cpp" line="273"/>
     657        <location filename="../src/mainwindow.cpp" line="267"/>
    660658        <source>Language will be autodetected on next application start.</source>
    661659        <translation>Мову буде автоматично визначено при наступному запуску додатку.</translation>
    662660    </message>
    663661    <message>
    664         <location filename="../src/mainwindow.cpp" line="282"/>
     662        <location filename="../src/mainwindow.cpp" line="276"/>
    665663        <source>You have language autodetection turned on.
    666664It needs to be off.
     
    671669    </message>
    672670    <message>
    673         <location filename="../src/mainwindow.cpp" line="149"/>
    674         <location filename="../src/mainwindow.cpp" line="165"/>
    675         <location filename="../src/mainwindow.cpp" line="287"/>
     671        <location filename="../src/mainwindow.cpp" line="146"/>
     672        <location filename="../src/mainwindow.cpp" line="162"/>
     673        <location filename="../src/mainwindow.cpp" line="281"/>
    676674        <location filename="../src/mainwindow.h" line="100"/>
    677675        <source>Untitled</source>
     
    682680    <name>SettingsDialog</name>
    683681    <message>
    684         <location filename="../src/settingsdialog.cpp" line="99"/>
     682        <location filename="../src/settingsdialog.cpp" line="100"/>
    685683        <source>Restore main window state and position on application restart</source>
    686684        <translation>Відновлювати стан та розмір головного вікна після перезапуску додатку</translation>
    687685    </message>
    688686    <message>
    689         <location filename="../src/settingsdialog.cpp" line="101"/>
     687        <location filename="../src/settingsdialog.cpp" line="102"/>
    690688        <source>Save main window state and position</source>
    691         <translation>Зберегти стан та розміщення головного вікна</translation>
    692     </message>
    693     <message>
    694         <location filename="../src/settingsdialog.cpp" line="124"/>
     689        <translation>Зберігати стан та розміщення головного вікна</translation>
     690    </message>
     691    <message>
     692        <location filename="../src/settingsdialog.cpp" line="125"/>
    695693        <source>Hover mouse pointer over dialog elements to get additional help</source>
    696694        <translation>Наведіть покажчик миші на елемент ділогу, щоб отримати підказку</translation>
     
    767765    </message>
    768766    <message>
     767        <location filename="../ui/settingsdialog.ui" line="291"/>
     768        <source>Maximum number of cities to show solution steps&apos; matrices</source>
     769        <translation>Максимальна кількість міст для показу матриць кроків розв&apos;язку</translation>
     770    </message>
     771    <message>
    769772        <location filename="../ui/settingsdialog.ui" line="305"/>
    770773        <source>Generate fractional random values with the accuracy of 2 decimal places</source>
     
    784787        <location filename="../ui/settingsdialog.ui" line="319"/>
    785788        <source>Scroll to solution end</source>
    786         <translation>Прокручувати в кінець</translation>
     789        <translation>Прокручувати в кінець розв&apos;язку</translation>
     790    </message>
     791    <message>
     792        <location filename="../ui/settingsdialog.ui" line="327"/>
     793        <source>Use native File Open and File Save dialogs (uncheck to use Qt&apos;s File Dialogs)</source>
     794        <translation>Використовувати системні діалоги відкриття та збереження файлу</translation>
     795    </message>
     796    <message>
     797        <location filename="../ui/settingsdialog.ui" line="330"/>
     798        <source>Use native file dialogs</source>
     799        <translation>Системні файлові діалоги</translation>
    787800    </message>
    788801    <message>
     
    790803        <source>Only when &lt;=</source>
    791804        <translation>Лише коли ≤</translation>
    792     </message>
    793     <message>
    794         <location filename="../ui/settingsdialog.ui" line="291"/>
    795         <source>Maximum number of cities for showing solution steps&apos; matrices</source>
    796         <translation>Максимальна кількість міст для показу матриць кроків розв&apos;язку</translation>
    797805    </message>
    798806    <message>
  • src/globals.h

    rf1fb54b9f7 r946f442ab0  
    4646//! Default number of cities
    4747#define DEF_NUM_CITIES 5
    48 //! Default value for generating fractional random values
     48/*!
     49 * \def DEF_USE_NATIVE_DIALOGS
     50 * \brief Default for "Use native file dialog".
     51 */
     52#ifdef Q_OS_WINCE
     53        #define DEF_USE_NATIVE_DIALOGS false
     54#else
     55        #define DEF_USE_NATIVE_DIALOGS true
     56#endif // Q_OS_WINCE
     57//! Default for "Automatically resize rows and columns to their contents"
     58#define DEF_AUTOSIZE true
     59//! Default for "Save main window state and position"
     60#define DEF_SAVEPOS false
     61//! Default for "Fractional random values"
    4962#define DEF_FRACTIONAL_RANDOM false
    50 //! Default value for showing or not solution step matrices
     63//! Default for "Show solution steps' matrices for every solution step"
    5164#define DEF_SHOW_MATRIX true
    52 //! Default value for using or not city limit for showing solution steps matrices
     65//! Default for "Show or hide solution steps' matrices based on number of cities in the task"
    5366#define DEF_USE_SHOW_MATRIX_LIMIT true
    54 //! Default maximum number of cities to show solution step matrices
    55 #define DEF_SHOW_MATRIX_CITY_LIMIT 15
    56 //! Default for scrolling to the end of output after solving
     67//! Default for "Maximum number of cities to show solution steps' matrices"
     68#define DEF_SHOW_MATRIX_LIMIT 15
     69//! Default for "Scroll to the end of output after solving"
    5770#define DEF_SCROLL_TO_END true
    5871//! Default font name
     
    114127// FUNCTIONS
    115128/*!
    116  * \brief Checks whether \a x contains an integer value
    117  * \param x A value to check
    118  * \return \c true if \a x countains an integer, oherwise \c false
     129 * \brief Checks whether \a x contains an integer value.
     130 * \param x A value to check.
     131 * \return \c true if \a x countains an integer, oherwise \c false.
    119132 */
    120133inline bool isInteger(double x)
  • src/mainwindow.cpp

    rf1fb54b9f7 r946f442ab0  
    6464        connect(spinCities,SIGNAL(valueChanged(int)),this,SLOT(spinCitiesValueChanged(int)));
    6565
    66         if (settings->value("SavePos", false).toBool()) {
     66        if (settings->value("SavePos", DEF_SAVEPOS).toBool()) {
    6767                // Loading of saved window state
    6868                settings->beginGroup("MainWindow");
     
    129129        filters.append(trUtf8("All Files") + " (*)");
    130130
    131 #ifdef Q_OS_WINCE
    132         QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
    133 #else
    134 QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"));
    135 #endif // Q_OS_WINCE
     131QFileDialog::Options opts = settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool() ? QFileDialog::Options() : QFileDialog::DontUseNativeDialog;
     132QString file = QFileDialog::getOpenFileName(this, trUtf8("Task Load"), QString(), filters.join(";;"), NULL, opts);
    136133        if (file.isEmpty() || !QFileInfo(file).isFile())
    137134                return;
     
    188185        filters.append(trUtf8("All Files") + " (*)");
    189186
    190 #ifdef Q_OS_WINCE
    191 QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
    192 #else
    193 QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"));
    194 #endif
     187QFileDialog::Options opts = settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool() ? QFileDialog::Options() : QFileDialog::DontUseNativeDialog;
     188QString file = QFileDialog::getSaveFileName(this, QString(), selectedFile, filters.join(";;"), NULL, opts);
    195189        if (file.isEmpty())
    196190                return;
     
    421415                        if (n != spinCities->value()) {
    422416                                output.append("<p>" + trUtf8("Step #%1").arg(n++) + "</p>");
    423                                 if (settings->value("Output/ShowMatrix", DEF_SHOW_MATRIX).toBool() && settings->value("Output/UseShowMatrixLimit", DEF_USE_SHOW_MATRIX_LIMIT).toBool() && (spinCities->value() <= settings->value("Output/ShowMatrixCitiesLimit", DEF_SHOW_MATRIX_CITY_LIMIT).toInt())) {
     417                                if (settings->value("Output/ShowMatrix", DEF_SHOW_MATRIX).toBool() && settings->value("Output/UseShowMatrixLimit", DEF_USE_SHOW_MATRIX_LIMIT).toBool() && (spinCities->value() <= settings->value("Output/ShowMatrixLimit", DEF_SHOW_MATRIX_LIMIT).toInt())) {
    424418                                        outputMatrix(*step, output);
    425419                                }
     
    481475{
    482476        setWindowModified(true);
    483         if (settings->value("Autosize",true).toBool()) {
     477        if (settings->value("Autosize", DEF_AUTOSIZE).toBool()) {
    484478                for (int k = tl.row(); k <= br.row(); k++)
    485479                        taskView->resizeRowToContents(k);
     
    508502int count = tspmodel->numCities();
    509503        tspmodel->setNumCities(n);
    510         if ((n > count) && settings->value("Autosize",true).toBool())
     504        if ((n > count) && settings->value("Autosize", DEF_AUTOSIZE).toBool())
    511505                for (int k = count; k < n; k++) {
    512506                        taskView->resizeColumnToContents(k);
     
    525519
    526520        // Saving Main Window state
    527         if (settings->value("SavePos", false).toBool()) {
     521        if (settings->value("SavePos", DEF_SAVEPOS).toBool()) {
    528522                settings->beginGroup("MainWindow");
    529523#ifndef Q_OS_WINCE
     
    730724                file = QFileInfo(fileName).canonicalPath() + "/" + QFileInfo(fileName).completeBaseName() + ".tspt";
    731725
    732 #ifdef Q_OS_WINCE
    733         file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"), NULL, QFileDialog::DontUseNativeDialog);
    734 #else
    735         file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"));
    736 #endif // Q_OS_WINCE
     726QFileDialog::Options opts = settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool() ? QFileDialog::Options() : QFileDialog::DontUseNativeDialog;
     727        file = QFileDialog::getSaveFileName(this, trUtf8("Task Save"), file, filters.join(";;"), NULL, opts);
    737728
    738729        if (file.isEmpty())
  • src/settingsdialog.cpp

    rf1fb54b9f7 r946f442ab0  
    6868        vbox2->addWidget(cbScrollToEnd);
    6969        vbox2->addWidget(cbAutosize);
     70        vbox2->addWidget(cbUseNativeDialogs);
    7071
    7172        // Output settings group
     
    108109        imgIcon->setLineWidth(0);
    109110        imgIcon->setPixmap(QPixmap(":/images/icons/preferences_system.png"));
    110         imgIcon->setStyleSheet("background-color: #0080C0;");
    111         imgIcon->setAlignment(Qt::AlignCenter);
     111        imgIcon->setStyleSheet("background-color: #0080C0; padding-top: 11px;");
     112        imgIcon->setAlignment(Qt::AlignTop | Qt::AlignHCenter);
    112113        imgIcon->setMinimumWidth(150);
    113114
     
    150151        // Top right part (with white bg)
    151152        vbox2 = new QVBoxLayout(bgWhite);
    152         vbox2->addStretch();
     153//      vbox2->addStretch();
    153154        vbox2->addLayout(hbox2);
    154155        vbox2->addWidget(cbFractionalRandom);
     
    157158        vbox2->addWidget(cbScrollToEnd);
    158159        vbox2->addWidget(cbAutosize);
     160        vbox2->addWidget(cbUseNativeDialogs);
    159161        vbox2->addWidget(cbSaveState);
    160162        vbox2->addStretch();
     
    193195        spinRandMax->setValue(settings->value("MaxCost",DEF_RAND_MAX).toInt());
    194196        cbFractionalRandom->setChecked(settings->value("FractionalRandom", DEF_FRACTIONAL_RANDOM).toBool());
    195         cbAutosize->setChecked(settings->value("Autosize",true).toBool());
     197        cbAutosize->setChecked(settings->value("Autosize", DEF_AUTOSIZE).toBool());
     198        cbUseNativeDialogs->setChecked(settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool());
    196199#ifndef Q_OS_WINCE
    197         cbSaveState->setChecked(settings->value("SavePos",false).toBool());
     200        cbSaveState->setChecked(settings->value("SavePos", DEF_SAVEPOS).toBool());
    198201#endif // Q_OS_WINCE
    199202
     
    203206        cbCitiesLimit->setChecked(settings->value("UseShowMatrixLimit", DEF_USE_SHOW_MATRIX_LIMIT && cbShowMatrix->isChecked()).toBool());
    204207        spinCitiesLimit->setEnabled(cbShowMatrix->isChecked());
    205         spinCitiesLimit->setValue(settings->value("ShowMatrixCitiesLimit", DEF_SHOW_MATRIX_CITY_LIMIT).toInt());
     208        spinCitiesLimit->setValue(settings->value("ShowMatrixLimit", DEF_SHOW_MATRIX_LIMIT).toInt());
    206209        spinCitiesLimit->setMaximum(MAX_NUM_CITIES);
    207210        cbScrollToEnd->setChecked(settings->value("ScrollToEnd", DEF_SCROLL_TO_END).toBool());
     
    239242        settings->setValue("SavePos", cbSaveState->isChecked());
    240243#endif // Q_OS_WINCE
     244        settings->setValue("UseNativeDialogs", cbUseNativeDialogs->isChecked());
    241245        settings->setValue("Autosize", cbAutosize->isChecked());
    242246        settings->setValue("MinCost", spinRandMin->value());
     
    248252        settings->setValue("UseShowMatrixLimit", cbShowMatrix->isChecked() && cbCitiesLimit->isChecked());
    249253        if (cbCitiesLimit->isChecked())
    250                 settings->setValue("ShowMatrixCitiesLimit", spinCitiesLimit->value());
     254                settings->setValue("ShowMatrixLimit", spinCitiesLimit->value());
    251255        settings->setValue("ScrollToEnd", cbScrollToEnd->isChecked());
    252256        if (newFont)
  • ui/settingsdialog.ui

    rf1fb54b9f7 r946f442ab0  
    289289   <widget class="QSpinBox" name="spinCitiesLimit">
    290290    <property name="statusTip">
    291      <string>Maximum number of cities for showing solution steps' matrices</string>
     291     <string>Maximum number of cities to show solution steps' matrices</string>
    292292    </property>
    293293    <property name="suffix">
     
    318318    <property name="text">
    319319     <string>Scroll to solution end</string>
     320    </property>
     321   </widget>
     322   <widget class="QCheckBox" name="cbUseNativeDialogs">
     323    <property name="cursor">
     324     <cursorShape>PointingHandCursor</cursorShape>
     325    </property>
     326    <property name="statusTip">
     327     <string>Use native File Open and File Save dialogs (uncheck to use Qt's File Dialogs)</string>
     328    </property>
     329    <property name="text">
     330     <string>Use native file dialogs</string>
    320331    </property>
    321332   </widget>
Note: See TracChangeset for help on using the changeset viewer.