diff --git a/.idea/QtSettings.xml b/.idea/QtSettings.xml index 938fead2..7f73f077 100644 --- a/.idea/QtSettings.xml +++ b/.idea/QtSettings.xml @@ -12,11 +12,11 @@ - + - diff --git a/.idea/editor.xml b/.idea/editor.xml index c160c9da..97dc55fe 100644 --- a/.idea/editor.xml +++ b/.idea/editor.xml @@ -3,6 +3,6 @@ \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..89b4ec66 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/README.md b/README.md index ee9d95b4..71f3ba26 100644 --- a/README.md +++ b/README.md @@ -9,95 +9,129 @@ Try it directly on browser at [caesium.app](https://caesium.app) ![caesium_screenshot_20240413](https://github.com/Lymphatus/caesium-image-compressor/assets/12133996/c09f06ab-abe2-4fa6-8c43-29b7073cb6df) ### Special Thanks + 7eventech77 ClearRabbit ---------- + ### What is it for -Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG and WebP formats. + +Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG and +WebP formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image. ### Supported Platforms -- **Windows**: 10 (build 1809 or later) (use old version v1.x for Windows 7 or 8 - [link](https://www.fosshub.com/Caesium-Image-Compressor-old.html)) + +- **Windows**: 10 (build 1809 or later) (use old version v1.x for Windows 7 or + 8 - [link](https://www.fosshub.com/Caesium-Image-Compressor-old.html)) - **MacOS**: 10.15+ - **Linux**: tested on Ubuntu 22.04 and Manjaro Note: only 64bit versions are supported ### Installation -Head to the [releases' page](https://github.com/Lymphatus/caesium-image-compressor/releases) for the available downloads. + +Head to the [releases' page](https://github.com/Lymphatus/caesium-image-compressor/releases) for the available +downloads. + - **Windows**: installer and portable versions are available - **MacOS**: DMG package -- **Linux**: compile the source code yourself, or download binary from [third-party build](https://github.com/larygwil/caesium-image-compressor/releases) +- **Linux**: compile the source code yourself, or download binary + from [third-party build](https://github.com/larygwil/caesium-image-compressor/releases) Note that the main branch can contain unstable code. If you want to build on a stable version, use a tagged version. ### Troubleshooting and/or feature request + Please open an [issue](https://github.com/Lymphatus/caesium-image-compressor/issues). ### Build from source + ##### Requirements -- [Rust](https://www.rust-lang.org/tools/install): required to compile [libcaesium](https://github.com/Lymphatus/libcaesium). Make sure you have `cargo` executable on you `$PATH` + +- [Rust](https://www.rust-lang.org/tools/install): required to + compile [libcaesium](https://github.com/Lymphatus/libcaesium). Make sure you have `cargo` executable on you `$PATH` - [Qt6 SDK](https://www.qt.io/download/): binaries are built on 6.5.3 (open source) - [libssh](https://www.libssh.org/): macOS only - [Sparkle](https://sparkle-project.org/): macOS only. Only version 1.27.1 is supported. #### Build + ##### Step 0 (macOS Only) + You need to set up Sparkle in order to compile the project + ``` brew install --cask https://raw.githubusercontent.com/Homebrew/homebrew-cask/c6dfe6baf1639998ba1707f68668cf8fa97bac9d/Casks/sparkle.rb sudo cp -R /usr/local/Caskroom/sparkle/1.27.1/Sparkle.framework /Library/Frameworks/Sparkle.framework ``` + ##### Step 1 + You need to configure CMake first and the command is slightly different for all the platforms: Change the path in variables with the correct directories of the requirements. + ###### Windows + ``` cmake -B build_dir -DCMAKE_PREFIX_PATH=/path/to/Qt/version -G "MinGW Makefiles" ``` + ###### MacOS + ``` cmake -B build_dir -DCMAKE_PREFIX_PATH=/path/to/Qt/version/macos -DLIBSSH_INCLUDE_DIR=/libssh/dir/include -DSPARKLE_INCLUDE_DIR=/usr/local/Caskroom/sparkle/1.27.1/Sparkle.framework/Versions/Current/Headers ``` + ###### Linux + Make sure you have all the requirements installed with you own package manager + ``` cmake -B build_dir -DCMAKE_PREFIX_PATH=/path/to/Qt/version/gcc_64 ``` + ##### Step 2 + Then you can build with + ``` cmake --build build_dir --config Release --target caesium_image_compressor ``` ### Languages and translations -The 1.0 version of Caesium had a lot of community made translations, but this 2.0 release has a whole new set of strings and no old translations can be used anymore. + +The 1.0 version of Caesium had a lot of community made translations, but this 2.0 release has a whole new set of strings +and no old translations can be used anymore. Caesium 2.0 is currently available in: | Language | Progress | |------------------------------------------------------------------------------------|----------| -| EG ar_EG | 80% | -| DE de_DE | 76% | -| GR el_GR | 73% | -| US en_US | 99% | -| ES es_ES | 71% | +| EG ar_EG | 79% | +| DE de_DE | 74% | +| GR el_GR | 71% | +| US en_US | 100% | +| ES es_ES | 69% | | IR fa_IR | 98% | -| FI fi_FI | 76% | -| FR fr_FR | 71% | -| IN hi_IN | 75% | -| ID id_ID | 73% | +| FI fi_FI | 74% | +| FR fr_FR | 69% | +| IN hi_IN | 74% | +| ID id_ID | 70% | | IT it_IT | 100% | -| JP ja_JP | 94% | -| PL pl_PL | 72% | +| JP ja_JP | 93% | +| PL pl_PL | 70% | | BR pt_BR | 98% | | RU ru_RU | 100% | -| SK sk_SK | 72% | +| SK sk_SK | 69% | | TR tr_TR | 100% | | CN zh_CN | 99% | -| TW zh_TW | 76% | +| TW zh_TW | 74% | #### How to contribute with your translation -You can help translate by opening the `resources/i18n/caesium_en_US.ts` with QtLinguist or any XML editor. Rename it to your language (e.g. `caesium_it_IT.ts`) and translate all the sentences. Then you can start a pull request with your translated file. + +You can help translate by opening the `resources/i18n/caesium_en_US.ts` with QtLinguist or any XML editor. Rename it to +your language (e.g. `caesium_it_IT.ts`) and translate all the sentences. Then you can start a pull request with your +translated file. See [this pull request](https://github.com/Lymphatus/caesium-image-compressor/pull/106) as an example. Thanks to all the people who contributed. diff --git a/libcaesium.conf b/libcaesium.conf index 3b7660ac..806935b8 100644 --- a/libcaesium.conf +++ b/libcaesium.conf @@ -1 +1 @@ -0.16.2 \ No newline at end of file +0.16.4 \ No newline at end of file diff --git a/resources/i18n/caesium_ar_EG.ts b/resources/i18n/caesium_ar_EG.ts index 6cfa0949..c393019c 100644 --- a/resources/i18n/caesium_ar_EG.ts +++ b/resources/i18n/caesium_ar_EG.ts @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... استيراد ملفات... - + Import folder... استيراد المجلد... - + Importing files... جاري استيراد ملفات... - - - + + + Cancel إلغاء - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? هل تريد حقًا الاستمرار؟ - + No لا - - + + File not found الملف غير موجود - + Finishing... جاري الإنهاء... - - + + Compressing... جاري الضغط... - + Do you really want to quit? هل حقا تريد الخروج؟ - - + + Yes نعم - + Please select an output folder first - - + + Ok - + Select output folder... حدد مجلد المخرجات... - + Compression finished! انتهى الضغط! - + You just saved %1! لقد وفرت لتو %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Saved: %4 (%5%) الحجم المضغوط: %3 تم توفير: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Saved: %4 (%5%) - + Remove حذف - - + + Compress ضغط - + Compression عملية الضغط - + JPEG JPEG - - - - + + + + Quality الجودة - + PNG PNG @@ -337,406 +342,406 @@ Saved: %4 (%5%) مستوى - + WebP WebP - + Lossless ضغط بدون فقد - + Maximum output size - + Mode - + Keep Metadata احتفظ بالبيانات الوصفية - + Resize إعادة تحجيم - + Resize to fit تغيير حجم لتناسب - + No resize احتفظ بالحجم الأصلي - + Dimensions أبعاد - + Percentage نسبة مئوية - + Short edge الحافة القصيرة - + Long edge الحافة الطويلة - - + + Width العرض - - - - - - - + + + + + + + px px - - + + Size حجم - - + + Height الطول - + Do not enlarge لا تكبير - + Keep aspect ratio الحفاظ على نسبة العرض إلى الارتفاع - + Output المخرج - + Folder المجلد - + Select... حدد... - + Same folder as input نفس المجلد كإدخال - + Keep folder structure الحفاظ علي ترتيب الملف - + Skip if output size is bigger than the original تخطي اذا كان الحجم اكبر من الاصل - + Keep file dates احتفظ بتواريخ الملفات - + Creation وقت إنشاء - + Last modified آخر تعديل - + Last access آخر ولوج - + Format صيغه - + Suffix لاحقة - - + + Preview لمحه - + bytes مجموعه من البايت - + Optimization level مستوي التحسين - + TIFF TIFF - + Method عملية - + Deflate level مستوي الانكماش - + Best افضل - + Balanced متوازن - + Fast سريع - + Uncompressed غير مضغوط - + Chroma subsampling اخذ عينات فرعيه من الكروما - + KB ك ب - + MB م ب - + Move the original file تحريك الملف الرئيسي - + To Trash الي المهملات - + Delete Permanently خذف بشكل دائم - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected التحويل الي شكل جديد او التغيير في الحكم يمكن ان يقلل الجودة حتي اذا تم اخيار خيار بدون فقد باينات - + Compressed مضغوط - + Original الاصل - + Help مساعدة - + File ملف - + Edit تعديل - + View عرض - - + + Toolbar شريط الأدوات - + About Caesium Image Compressor حول ضاغط صور Caesium - + Add files... إضافة ملفات... - + Ctrl+O Ctrl+O - + Add folder... أضف المجلد... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit خروج - + Del - + Select All اختيار الكل - + Ctrl+A Ctrl+A - + Clear محو - + Show previews إظهار المعاينات - + Preferences... الإعدادات... - + Show original in file manager إظهار الأصل في مدير الملفات - + Show compressed in file manager إظهار مضغوط في مدير الملفات - + Donate تبرع - + Icons الايقونات - + Icons and Text الايقونات والنص - + Hide إخفاء - + Show عرض - + Auto preview - + Ctrl+P - + Advanced import... - - - + + + % % - + images in list الصور في القائمة @@ -749,17 +754,17 @@ Saved: %4 (%5%) الإعدادات - + Threads priority - + Restart - + Close إغلاق @@ -774,42 +779,42 @@ Saved: %4 (%5%) حث قبل الإغلاق - + threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Changes will apply after restart سيتم تطبيق التغييرات بعد إعادة التشغيل @@ -819,7 +824,7 @@ Saved: %4 (%5%) القالب (التجريبي) - + This option applies when using command line or by dropping files to the application icon @@ -848,7 +853,7 @@ Saved: %4 (%5%) الوضع المتقدم - + Multithreading المتعدد @@ -867,17 +872,17 @@ Saved: %4 (%5%) - + Import only - + Import and compress - + When importing files directly @@ -916,7 +921,7 @@ Saved: %4 (%5%) QIODevice - + Image Files ملفات الصور diff --git a/resources/i18n/caesium_de_DE.ts b/resources/i18n/caesium_de_DE.ts index 49ca7792..8d91b464 100644 --- a/resources/i18n/caesium_de_DE.ts +++ b/resources/i18n/caesium_de_DE.ts @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... Dateien importieren... - + Import folder... Ordner importieren ... - + Importing files... Importiere Dateien ... - - - + + + Cancel Abbruch - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Wollen Sie trotzdem fortfahren? - + No Nein - - + + File not found Datei nicht vorhanden - + Finishing... Beende... - - + + Compressing... Komprimiere... - + Do you really want to quit? Wollen Sie wirklich beenden? - - + + Yes Ja - + Please select an output folder first - - + + Ok - + Select output folder... Ausgabeordner wählen... - + Compression finished! Kompression fertiggestellt ! - + You just saved %1! Sie haben %1 gespart! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Originalgröße: %2 Komprimierte Größe: %3 Ersparnis: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Ersparnis: %4 (%5%) - + Remove Entfernen - - + + Compress Komprimieren - + Compression Komprimierung - + JPEG JPEG - - - - + + + + Quality Qualität - + PNG PNG @@ -337,191 +342,191 @@ Ersparnis: %4 (%5%) Level - + WebP WebP - + Lossless verlustfrei - + Maximum output size Maximale Ausgabegröße - + bytes Bytes - + Mode Modus - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + Keep Metadata Metadaten behalten - + KB KB - + MB MB - + Resize Größe ändern - + Resize to fit Einpassen - + No resize Keine Größenänderung - + Dimensions Abmessungen - + Percentage Prozent - + Short edge Kurze Kante - + Long edge Lange Kante - - + + Width Breite - - - - - - - + + + + + + + px px - - + + Size Größe - - + + Height Höhe - + Do not enlarge Nicht vergrößern - + Keep aspect ratio Seitenverhältnis beibehalten - + Output Ausgabe - + Folder Ordner - + Select... Auswahl... - + Same folder as input Eingabeordner - + Keep folder structure Ordnerstruktur behalten - + Skip if output size is bigger than the original Überspringen, wenn die Ausgabegröße größer als das Original ist @@ -530,217 +535,217 @@ Ersparnis: %4 (%5%) Verschiebe Originaldatei in den Papierkorb - + Move the original file - + To Trash - + Delete Permanently - + Keep file dates Dateidatum behalten - + Creation erstellt - + Last modified Letzte Änderung - + Last access Letzter Zugriff - + Format Format - + Suffix Suffix - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected Eine Konvertierung in ein anderes Format oder eine Größenänderung kann die Qualität reduzieren, selbst wenn die Option 'verlustfrei' ausgewählt ist - + Compressed Komprimiert - + Original Original - + Help Hilfe - + File Datei - + Edit Ändern - + View Ansicht - - + + Toolbar Toolbar - + About Caesium Image Compressor Über Caesium Image Compressor - + Add files... Dateien hinzufügen... - + Ctrl+O STRG+O - + Add folder... Ordner hinzufügen... - + Ctrl+Shift+O STRG+Shift+O - - + + Exit Beenden - + Del Entf - + Select All Alle auswählen - + Ctrl+A STRG+A - + Clear Liste leeren - + Show previews Zeige Vorschau - + Preferences... Einstellungen... - + Show original in file manager Zeige Original im Explorer - + Show compressed in file manager Zeige komprimierte Datei im Explorer - + Donate Spenden - + Icons Icons - + Icons and Text Icons und Text - + Hide Verbergen - + Show Zeige - + Auto preview Auto Vorschau - - + + Preview Vorschau - + Ctrl+P Strg+P - + Advanced import... - - - + + + % % - + images in list Bilder in Liste @@ -753,17 +758,17 @@ Ersparnis: %4 (%5%) Einstellungen - + Threads priority - + Restart - + Close Schließen @@ -798,42 +803,42 @@ Ersparnis: %4 (%5%) Bytes - + threads Threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Changes will apply after restart Änderungen werden nach Neustart wirksam @@ -843,7 +848,7 @@ Ersparnis: %4 (%5%) Theme (experimentell) - + This option applies when using command line or by dropping files to the application icon Diese Option gilt, wenn die Befehlszeile verwendet wird oder Dateien auf das Anwendungssymbol gezogen werden @@ -872,7 +877,7 @@ Ersparnis: %4 (%5%) Fortgeschritten - + Multithreading Multithreading @@ -899,17 +904,17 @@ Ersparnis: %4 (%5%) MB - + Import only Nur importieren - + Import and compress Importieren und komprimieren - + When importing files directly Beim direkten Importieren von Dateien @@ -948,7 +953,7 @@ Ersparnis: %4 (%5%) QIODevice - + Image Files Bilddateien diff --git a/resources/i18n/caesium_el_GR.ts b/resources/i18n/caesium_el_GR.ts index 46702714..8e7b518a 100644 --- a/resources/i18n/caesium_el_GR.ts +++ b/resources/i18n/caesium_el_GR.ts @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... Εισαγωγή αρχείων... - + Import folder... Εισαγωγή φακέλου... - + Importing files... Εισάγωνται αρχεία... - - - + + + Cancel Ακύρωση - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Θέλετε πραγματικά να συνεχίσετε; - + No Όχι - - + + File not found Το αρχείο δε βρέθηκε - + Finishing... Ολοκληρώνεται... - - + + Compressing... Συμπίεση... - + Do you really want to quit? Θέλετε πραγματικά να σταματήσετε; - - + + Yes Ναι - + Please select an output folder first - - + + Ok - + Select output folder... Επιλέξτε φάκελο εξόδου... - + Compression finished! Η συμπίεση ολοκληρώθηκε! - + You just saved %1! Μόλις έσωσες %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Saved: %4 (%5%) Συμπιεσμένο μέγεθος: %3 Σώθηκαν: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Saved: %4 (%5%) - + Remove Απομάκρυνση - - + + Compress Συμπίεση - + Compression Συμπίεση - + JPEG JPEG - - - - + + + + Quality Ποιότητα - + PNG PNG @@ -337,407 +342,407 @@ Saved: %4 (%5%) Επίπεδο - + WebP WebP - + Lossless Χωρίς απώλειες - + Maximum output size - + bytes bytes - + Mode - + Keep Metadata Διατήρηση Μεταδεδομένων - + KB KB - + MB MB - + Resize Αλλαγή μεγέθους - + Resize to fit Αλλαγή μεγέθους για να ταιριάζει - + No resize Χωρίς αλλαγή μεγέθους - + Dimensions Διαστάσεις - + Percentage Ποσοστιαία - + Short edge Οριζόντια - + Long edge Κάθετα - - + + Width Πλάτος - - - - - - - + + + + + + + px px - - + + Size Μέγεθος - - + + Height Ύψος - + Do not enlarge Χωρίς μεγένθυση - + Keep aspect ratio Διατηρήστε την αναλογία απεικόνισης - + Output Εξαγωγή - + Folder Φάκελος - + Select... Επιλογή... - + Same folder as input Ίδιος φάκελος με την εισαγωγή - + Keep folder structure Διατήρηση της δομής του φακέλου - + Skip if output size is bigger than the original Παράλειψη εάν το μέγεθος εξαγωγής είναι μεγαλύτερο από το πρωτότυπο - + Keep file dates Διατήρηση ημερομηνιών αρχείων - + Creation Δημιουργία - + Last modified Τελευταία τροποποίηση - + Last access Τελευταία πρόσβαση - + Format Μορφή - + Suffix Κατάληξη - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected - + Original Πρωτότυπο - - + + Preview Προεπισκόπηση - + Compressed Συμπιεσμένο - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + Move the original file - + To Trash - + Delete Permanently - + Help Βοήθεια - + File Αρχείο - + Edit Επεξεργασία - + View Επισκόπηση - - + + Toolbar Γραμμή εργαλείων - + About Caesium Image Compressor Σχετικά με τον Συμπιεστή Εικόνας Caesium - + Add files... Προσθήκη αρχείων... - + Ctrl+O Ctrl+O - + Add folder... Προσθήκη φακέλου... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Έξοδος - + Del Πλήκτρο Διαγραφής στο πληκτρολόγιο Del - + Select All Επιλογή όλων - + Ctrl+A Ctrl+A - + Clear Εκκαθάριση - + Show previews Εμφάνιση προεπισκοπήσεων - + Preferences... Προτιμήσεις... - + Show original in file manager Εμφάνιση πρωτοτύπου στη διαχείριση αρχείων - + Show compressed in file manager Εμφάνιση συμπιεσμένων στη διαχείριση αρχείων - + Donate Δωρεά - + Icons Εικονίδια - + Icons and Text Εικονίδια και Κείμενο - + Hide Απόκρυψη - + Show Προβολή - + Auto preview Αυτόματη Προεπισκόπηση - + Ctrl+P Ctrl+P - + Advanced import... - - - + + + % % - + images in list εικόνες στη λίστα @@ -750,52 +755,52 @@ Saved: %4 (%5%) Προτιμήσεις - + threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Threads priority - + Restart - + Close Κλείσιμο @@ -838,7 +843,7 @@ Saved: %4 (%5%) Mb - + Changes will apply after restart Οι αλλαγές θα εφαρμοστούν μετά την επανεκκίνηση @@ -848,7 +853,7 @@ Saved: %4 (%5%) Θέμα (πειραματικό) - + This option applies when using command line or by dropping files to the application icon Αυτή η επιλογή ισχύει κατά τη χρήση της γραμμής εντολών ή με την απόθεση αρχείων στο εικονίδιο της εφαρμογής @@ -877,7 +882,7 @@ Saved: %4 (%5%) Προχωρημένο - + Multithreading Πολυνηματική @@ -904,17 +909,17 @@ Saved: %4 (%5%) MB - + Import only Μόνο εισαγωγή - + Import and compress Εισαγωγή και συμπίεση - + When importing files directly Κατά την απευθείας εισαγωγή αρχείων @@ -953,7 +958,7 @@ Saved: %4 (%5%) QIODevice - + Image Files Αρχεία εικόνας diff --git a/resources/i18n/caesium_en_US.ts b/resources/i18n/caesium_en_US.ts index 5c8b727f..99133a42 100644 --- a/resources/i18n/caesium_en_US.ts +++ b/resources/i18n/caesium_en_US.ts @@ -145,7 +145,7 @@ All rights reserved. Import file... - + Import file... @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... Import files... - + Import folder... Import folder... - + Importing files... Importing files... - - - + + + Cancel Cancel - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Do you really want to continue? - + No No - - + + File not found File not found - + Finishing... Finishing... - - + + Compressing... Compressing... - + Do you really want to quit? Do you really want to quit? - - + + Yes Yes - + Please select an output folder first Please select an output folder first - - + + Ok Ok - + Select output folder... Select output folder... - + Compression finished! Compression finished! - + You just saved %1! You just saved %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Original size: %2 Compressed size: %3 Saved: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Saved: %4 (%5%) - + Remove Remove - - + + Compress Compress - + Compression Compression - + JPEG JPEG - - - - + + + + Quality Quality - + PNG PNG @@ -337,146 +342,146 @@ Saved: %4 (%5%) Level - + WebP WebP - + Lossless Lossless - + Maximum output size Maximum output size - + bytes bytes - + Mode Mode - + Keep Metadata Keep Metadata - + KB KB - + MB MB - + Resize Resize - + Resize to fit Resize to fit - + No resize No resize - + Dimensions Dimensions - + Percentage Percentage - + Short edge Short edge - + Long edge Long edge - - + + Width Width - - - - - - - + + + + + + + px px - - + + Size Size - - + + Height Height - + Do not enlarge Do not enlarge - + Keep aspect ratio Keep aspect ratio - + Output Output - + Folder Folder - + Select... Select... - + Same folder as input Same folder as input - + Keep folder structure Keep folder structure - + Skip if output size is bigger than the original Skip if output size is bigger than the original @@ -485,264 +490,264 @@ Saved: %4 (%5%) Move the original file to trash - + Keep file dates Keep file dates - + Creation Creation - + Last modified Last modified - + Last access Last access - + Format Format - + Suffix Suffix - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected Converting to a new format or resizing can degrade quality even if "lossless" option is selected - + Original Original - - + + Preview Preview - + Compressed Compressed - + Optimization level Optimization level - + TIFF TIFF - + Method Method - + Deflate level Deflate level - + Best Best - + Balanced Balanced - + Fast Fast - + Uncompressed Uncompressed - + Chroma subsampling Refers to: https://en.wikipedia.org/wiki/Chroma_subsampling Chroma subsampling - + Move the original file Move the original file - + To Trash To Trash - + Delete Permanently Delete Permanently - + Help Help - + File File - + Edit Edit - + View View - - + + Toolbar Toolbar - + About Caesium Image Compressor About Caesium Image Compressor - + Add files... Add files... - + Ctrl+O Ctrl+O - + Add folder... Add folder... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Exit - + Del Delete key on keyboard Del - + Select All Select All - + Ctrl+A Ctrl+A - + Clear Clear - + Show previews Show previews - + Preferences... Preferences... - + Show original in file manager Show original in file manager - + Show compressed in file manager Show compressed in file manager - + Donate Donate - + Icons Icons - + Icons and Text Icons and Text - + Hide Hide - + Show Show - + Auto preview Auto Preview - + Ctrl+P Ctrl+P - + Advanced import... Advanced import... - - - + + + % % - + images in list images in list @@ -755,52 +760,52 @@ Saved: %4 (%5%) Preferences - + threads threads - + No action No action - + Close the application Close the application - + Sleep Sleep - + Shutdown Shutdown - + Open output folder Open output folder - + Perform an action after successful compression Perform an action after successful compression - + Threads priority Threads priority - + Restart Restart - + Close Close @@ -843,7 +848,7 @@ Saved: %4 (%5%) Mb - + Changes will apply after restart Changes will apply after restart @@ -853,7 +858,7 @@ Saved: %4 (%5%) Theme (experimental) - + This option applies when using command line or by dropping files to the application icon This option applies when using command line or by dropping files to the application icon @@ -882,7 +887,7 @@ Saved: %4 (%5%) Advanced - + Multithreading Multithreading @@ -909,17 +914,17 @@ Saved: %4 (%5%) MB - + Import only Import only - + Import and compress Import and compress - + When importing files directly When importing files directly @@ -958,7 +963,7 @@ Saved: %4 (%5%) QIODevice - + Image Files Image Files diff --git a/resources/i18n/caesium_es_ES.ts b/resources/i18n/caesium_es_ES.ts index 1409c4d9..7c46f778 100644 --- a/resources/i18n/caesium_es_ES.ts +++ b/resources/i18n/caesium_es_ES.ts @@ -186,29 +186,29 @@ Todos los derechos reservados. MainWindow - + Import files... Importar archivos... - + Import folder... Importar carpeta... - + Importing files... Importando archivos... - - - + + + Cancel Cancelar - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Desea continuar? - + No No - - + + File not found Archivo no encontrado - + Finishing... Finalizando... - - + + Compressing... Comprimiendo... - + Do you really want to quit? ¿Realmente quieres salir? - - + + Yes - + Please select an output folder first - - + + Ok - + Select output folder... Seleccione carpeta de salida... - + Compression finished! Compresión finalizada! - + You just saved %1! ¡Se guardó %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Tamaño original: %2 Tamaño comprimido: %3 Ahorrado: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Ahorrado: %4 (%5%) - + Remove Quitar - - + + Compress Comprimir - + Compression Compresión - + JPEG JPEG - - - - + + + + Quality Calidad - + PNG PNG @@ -337,146 +342,146 @@ Ahorrado: %4 (%5%) Nivel - + WebP WebP - + Lossless Sin pérdidas - + Maximum output size - + bytes bytes - + Mode - + Keep Metadata Mantener Metadatos - + KB KB - + MB MB - + Resize Redimensionar - + Resize to fit Redimensionar para encajar - + No resize No redimensionar - + Dimensions Dimensiones - + Percentage Porcentaje - + Short edge Lado corto - + Long edge Lado largo - - + + Width Ancho - - - - - - - + + + + + + + px px - - + + Size Tamaño - - + + Height Alto - + Do not enlarge No agrandar - + Keep aspect ratio Mantener relación de aspecto - + Output Salida - + Folder Carpeta - + Select... Seleccionar... - + Same folder as input Misma carpeta de entrada - + Keep folder structure Mantener estrucutra de carpeta - + Skip if output size is bigger than the original Omitir si el tamaño de salida es mayor que el original @@ -485,262 +490,262 @@ Ahorrado: %4 (%5%) Mover el archivo original a la papelera - + Keep file dates Mantener fecha de archivos - + Creation Creación - + Last modified Última modificación - + Last access Último acceso - + Format Formato - + Suffix Sufijo - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected - + Original Original - - + + Preview Vista previa - + Compressed Comprimido - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + Move the original file - + To Trash - + Delete Permanently - + Help Ayuda - + File Archivo - + Edit Editar - + View Ver - - + + Toolbar Barra de herramientas - + About Caesium Image Compressor Acerca del Compresor de Imagenes Caesium - + Add files... Agregar archivos... - + Ctrl+O Ctrl+O - + Add folder... Agregar carpeta... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Salir - + Del Del - + Select All Seleccionar todos - + Ctrl+A Ctrl+A - + Clear Limpiar - + Show previews Mostrar vista previa - + Preferences... Preferencias... - + Show original in file manager Mostrar original en administrador de archivos - + Show compressed in file manager Mostrar comprimido en administrador de archivos - + Donate Donar - + Icons Íconos - + Icons and Text Íconos y Textos - + Hide Ocultar - + Show Mostrar - + Auto preview Vista previa auto - + Ctrl+P - + Advanced import... - - - + + + % % - + images in list imágenes en la lista @@ -753,47 +758,47 @@ Ahorrado: %4 (%5%) Preferencias - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Threads priority - + Restart - + Close Cerrar @@ -828,17 +833,17 @@ Ahorrado: %4 (%5%) bytes - + This option applies when using command line or by dropping files to the application icon - + threads - + Changes will apply after restart Los cambios se aplicarán después de reiniciar @@ -872,7 +877,7 @@ Ahorrado: %4 (%5%) Avanzado - + Multithreading Multihilo @@ -899,17 +904,17 @@ Ahorrado: %4 (%5%) MB - + Import only Importar sólo - + Import and compress Importar y comprimir - + When importing files directly Cuando se importan archivos directamente @@ -948,7 +953,7 @@ Ahorrado: %4 (%5%) QIODevice - + Image Files Archivos de Imagen diff --git a/resources/i18n/caesium_fi_FI.ts b/resources/i18n/caesium_fi_FI.ts index 7344e6d0..ee1776d9 100644 --- a/resources/i18n/caesium_fi_FI.ts +++ b/resources/i18n/caesium_fi_FI.ts @@ -186,29 +186,29 @@ Kaikki oikeudet pidätetään. MainWindow - + Import files... Tuo tiedostoja... - + Import folder... Tuo kansio... - + Importing files... Tuodaan tiedostoja... - - - + + + Cancel Peruuta - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Haluatko varmasti jatkaa? - + No En - - + + File not found Tiedostoa ei löytynyt - + Finishing... Viimeistellään... - - + + Compressing... Pakataan... - + Do you really want to quit? Haluatko varmasti sulkea? - - + + Yes Kyllä - + Please select an output folder first - - + + Ok - + Select output folder... Valitse tulostuskansio... - + Compression finished! Pakkaus valmis! - + You just saved %1! Tallensit juuri %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Alkuperäinen koko: %2 Pakattu koko: %3 Säästö: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Säästö: %4 (%5%) - + Remove Poista - - + + Compress Pakkaa - + Compression Pakkaus - + JPEG JPEG - - - - + + + + Quality Laatu - + PNG PNG @@ -337,146 +342,146 @@ Säästö: %4 (%5%) Taso - + WebP WebP - + Lossless Häviötön - + Maximum output size Maksimi ulostulo koko - + bytes tavua - + Mode Tila - + Keep Metadata Pidä metatiedot - + KB KT - + MB MT - + Resize Muuta kokoa - + Resize to fit Muuta koko istumaan - + No resize Ei koon muutosta - + Dimensions Mitat - + Percentage Prosentti - + Short edge Lyhyt reuna - + Long edge Pitkä reuna - - + + Width Leveys - - - - - - - + + + + + + + px px - - + + Size Koko - - + + Height Korkeus - + Do not enlarge Älä suurenna - + Keep aspect ratio Pidä kuvasuhde - + Output Tulos - + Folder Kansio - + Select... Valitse... - + Same folder as input Sama kansio kuin alkuperäisellä - + Keep folder structure Pidä kansion rakenne - + Skip if output size is bigger than the original Jätä väliin, jos tuloksen koko on isompi kuin alkuperäisen. @@ -485,263 +490,263 @@ Säästö: %4 (%5%) Siirrä alkuperäinen tiedosto roskakoriin. - + Keep file dates Pidä tiedostopäivämäärät - + Creation Luonti - + Last modified Viimeksi muokattu - + Last access Viimeksi käytetty - + Format Formaatti - + Suffix Jatke - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected Uuteen formaattiin muuntaminen tai koon muuttaminen voi heikentää kuvan laatua, vaikka häviötön valinta olisi valittuna - + Original Alkuperäinen - - + + Preview Esikatselu - + Compressed Pakattu - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + Move the original file - + To Trash - + Delete Permanently - + Help Apua - + File Tiedosto - + Edit Muokkaa - + View Näytä - - + + Toolbar Työkalupalkki - + About Caesium Image Compressor Tietoa Caesium Kuvanpakkausohjelmasta - + Add files... Lisää tiedostoja... - + Ctrl+O Ctrl+O - + Add folder... Lisää kansio... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Poistu - + Del Poisto näppäippäin näppäimistöllä Del - + Select All Valitse Kaikki - + Ctrl+A Ctrl+A - + Clear Tyhjennä - + Show previews Näytä esikatselut - + Preferences... Asetukset... - + Show original in file manager Näytä alkuperäiset tiedostojenhallinnassa - + Show compressed in file manager Näytä pakatut tiedostojenhallinnassa - + Donate Lahjoita - + Icons Kuvakkeet - + Icons and Text Kuvakkeet ja Teksti - + Hide Piilota - + Show Näytä - + Auto preview Automaattinen esikatselu - + Ctrl+P Ctrl+P - + Advanced import... - - - + + + % % - + images in list kuvaa listassa @@ -754,52 +759,52 @@ Säästö: %4 (%5%) Asetukset - + threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Threads priority - + Restart - + Close Sulje @@ -842,7 +847,7 @@ Säästö: %4 (%5%) Mt - + Changes will apply after restart Muutokset astuvat voimaan uudelleenkäynnistyksen jälkeen @@ -852,7 +857,7 @@ Säästö: %4 (%5%) Teema (kokeellinen) - + This option applies when using command line or by dropping files to the application icon Tämä vaihtoehto koskee käyttöä komentorivin kautta tai tiedostojen pudottamista sovelluksen kuvakkeen päälle @@ -881,7 +886,7 @@ Säästö: %4 (%5%) Lisäasetukset - + Multithreading Monisäikeinen suoritus @@ -908,17 +913,17 @@ Säästö: %4 (%5%) MT - + Import only Pelkästään tuonti - + Import and compress Tuo ja pakkaa - + When importing files directly Kun tuot tiedostoja suoraan @@ -957,7 +962,7 @@ Säästö: %4 (%5%) QIODevice - + Image Files Kuvatiedostot diff --git a/resources/i18n/caesium_fr_FR.ts b/resources/i18n/caesium_fr_FR.ts index 38aafe33..91cce406 100644 --- a/resources/i18n/caesium_fr_FR.ts +++ b/resources/i18n/caesium_fr_FR.ts @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... Importer les fichiers... - + Import folder... Importer le répertoire... - + Importing files... Importation des fichiers... - - - + + + Cancel Annuler - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Voulez vous vraiment continuer? - + No Non - - + + File not found Fichier non trouvé - + Finishing... Finalisation... - - + + Compressing... Compression... - + Do you really want to quit? Voulez vous vraiment quitter? - - + + Yes Oui - + Please select an output folder first - - + + Ok - + Select output folder... Selection le répertoire de destination... - + Compression finished! Compression fini! - + You just saved %1! Vous avez gagné %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Taille d'origine: %2 Taille compressé: %3 Econominé: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Econominé: %4 (%5%) - + Remove Enlever - - + + Compress Compresser - + Compression Compression - + JPEG JPEG - - - - + + + + Quality Qualité - + PNG PNG @@ -337,131 +342,131 @@ Econominé: %4 (%5%) Niveau - + WebP WebP - + Lossless Sans perte - + Maximum output size - + Mode Mode - + Keep Metadata Conserver Metadata - + Resize Redimensionner - + Resize to fit Redimensionner pour s'ajuster - + No resize Pas de redimensionnement - + Dimensions Dimensions - + Percentage Pourcentage - + Short edge Bord court - + Long edge Bord long - - + + Width Largeur - - - - - - - + + + + + + + px px - - + + Size Taille - - + + Height Hauteur - + Do not enlarge Ne pas élargir - + Keep aspect ratio Conserver les proportions - + Output Sortie - + Folder Répertoire - + Select... Sélectionner... - + Same folder as input Même répertoire que l'entrée - + Keep folder structure Conserver la structure du répertoire - + Skip if output size is bigger than the original Ignorer si la taille de sortie est plus grand que l'original @@ -470,277 +475,277 @@ Econominé: %4 (%5%) Déplacer l'original dans la corbeille - + Keep file dates Conserver les dates du fichier - + Creation Création - + Last modified Dernier modifié - + Last access Dernier accès - + Format Format - + Suffix Suffixe - - + + Preview Aperçu - + Compressed Compressé - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + bytes octets - + KB KO - + MB MO - + Move the original file - + To Trash - + Delete Permanently - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected La conversion vers un nouveau format ou le redimensionnement peu dégradé la qualité même si l'option "sans perte" est séléctionnée - + Original - + Help Aide - + File Fichier - + Edit Editer - + View Vue - - + + Toolbar Barre d'outils - + About Caesium Image Compressor A propos de Caesium Image Compressor - + Add files... Ajouter les fichiers... - + Ctrl+O Ctrl+O - + Add folder... Ajouter le répertoire... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Quitter - + Del Suppr - + Select All Tout sélectionner - + Ctrl+A Ctrl+A - + Clear Effacer - + Show previews Afficher les aperçus - + Preferences... Options... - + Show original in file manager Montrer l'original dans le file manager - + Show compressed in file manager Montrer le comprimé dans le file manager - + Donate Faire un don - + Icons Icones - + Icons and Text Icones et Texte - + Hide Masquer - + Show Afficher - + Auto preview Aperçu automatique - + Ctrl+P Ctrl+P - + Advanced import... - - - + + + % % - + images in list images in list @@ -753,17 +758,17 @@ Econominé: %4 (%5%) Options - + Threads priority - + Restart - + Close Fermer @@ -798,42 +803,42 @@ Econominé: %4 (%5%) octets - + threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Changes will apply after restart Les changement seront appliqués après le redémarrage @@ -843,7 +848,7 @@ Econominé: %4 (%5%) Thème (expérimental) - + This option applies when using command line or by dropping files to the application icon @@ -872,7 +877,7 @@ Econominé: %4 (%5%) Avancé - + Multithreading Multithreading @@ -899,17 +904,17 @@ Econominé: %4 (%5%) MO - + Import only - + Import and compress Importer et compresser> - + When importing files directly @@ -948,7 +953,7 @@ Econominé: %4 (%5%) QIODevice - + Image Files Image Files diff --git a/resources/i18n/caesium_hi_IN.ts b/resources/i18n/caesium_hi_IN.ts index 6d30c862..21b81287 100644 --- a/resources/i18n/caesium_hi_IN.ts +++ b/resources/i18n/caesium_hi_IN.ts @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... फ़ाइलें आयात करें... - + Import folder... फ़ोल्डर आयात करें... - + Importing files... फ़ाइलें आयात की जा रही हैं... - - - + + + Cancel रद्द करें - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? क्या आप सच में जारी रखना चाहते हैं? - + No नहीं - - + + File not found फाइल नहीं मिली - + Finishing... पूर्ण हो रहा है... - - + + Compressing... संकुचन हो रहा है... - + Do you really want to quit? क्या आप सच में बंद करना चाहते हैं? - - + + Yes हां - + Please select an output folder first - - + + Ok - + Select output folder... उत्पादन फ़ोल्डर चुनें... - + Compression finished! संकुचन समाप्त हुआ! - + You just saved %1! आपने अभी बचाया %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Saved: %4 (%5%) संकुचित आकार: %3 सहेजा गया: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Saved: %4 (%5%) - + Remove हटाऐं - - + + Compress संकुचित करें - + Compression संकुचीकरण - + JPEG जे पी ई जी - - - - + + + + Quality गुणवत्ता - + PNG पी एन जी @@ -337,146 +342,146 @@ Saved: %4 (%5%) स्तर - + WebP वेब पी - + Lossless दोषरहित - + Maximum output size अधिकतम उत्पादन आकार - + bytes बाइट - + Mode तरीका - + Keep Metadata मेटाडेटा रखें - + KB किलोबाइट - + MB मेगाबाइट - + Resize आकार परिवर्तित करें - + Resize to fit फ़िट होने तक आकार परिवर्तित करें - + No resize आकार परिवर्तित न करें - + Dimensions लम्बाई चौड़ाई - + Percentage प्रतिशत - + Short edge छोटा किनारा - + Long edge लम्बा किनारा - - + + Width चौड़ाई - - - - - - - + + + + + + + px पिक्सल - - + + Size आकार - - + + Height लम्बाई - + Do not enlarge बड़ा न करें - + Keep aspect ratio अभिमुक्ता अनुपात बनाए रखें - + Output उत्पादन - + Folder फ़ोल्डर - + Select... चुनें... - + Same folder as input निविष्ट के समान फ़ोल्डर - + Keep folder structure फ़ोल्डर संरचना बनाए रखें - + Skip if output size is bigger than the original यदि उत्पादन का आकार मूल आकार से बड़ा हो तो छोड़ दें @@ -485,263 +490,263 @@ Saved: %4 (%5%) मूल फाइल को ट्रैश में स्थानांतरित करें - + Keep file dates फ़ाइल की दिनांक रखें - + Creation निर्माण - + Last modified अंतिम संशोधन - + Last access अंतिम अभिगम - + Format प्रारुप - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected किसी नए प्रारूप में परिवर्तित करने या आकार बदलने से गुणवत्ता ख़राब हो सकती है, भले ही "दोषरहित" विकल्प चुना गया हो - + Suffix प्रत्यय - + Original मूल - - + + Preview पूर्वावलोकन - + Compressed संकुचित - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + Move the original file - + To Trash - + Delete Permanently - + Help मदद - + File फ़ाइल - + Edit संपादन करें - + View देखें - - + + Toolbar उपकरण पट्टिका - + About Caesium Image Compressor सीजियम चित्र संकुचक के बारे में - + Add files... फ़ाइलें जोड़ें... - + Ctrl+O Ctrl+O - + Add folder... फ़ोल्डर जोड़ें... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit बंद करें - + Del Delete key on keyboard Del - + Select All सभी चुनें - + Ctrl+A Ctrl+A - + Clear सभी हटाऐं - + Show previews पूर्वावलोकन दिखाऐं - + Preferences... अधिमान... - + Show original in file manager फ़ाइल प्रबंधक में मूल फ़ाइल दिखाऐं - + Show compressed in file manager फ़ाइल प्रबंधक में संकुचित फ़ाइल दिखाऐं - + Donate दान करें - + Icons प्रतीक चित्र - + Icons and Text प्रतीक व लेख - + Hide छुपाऐं - + Show दिखाऐं - + Auto preview स्वतः पूर्वावलोकन - + Ctrl+P Ctrl+P - + Advanced import... - - - + + + % % - + images in list चित्र सूची में @@ -754,52 +759,52 @@ Saved: %4 (%5%) अधिमान - + threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Threads priority - + Restart - + Close बंद करें @@ -842,7 +847,7 @@ Saved: %4 (%5%) मेगाबाइट - + Changes will apply after restart पुनरारंभ के बाद परिवर्तन लागू होंगे @@ -852,7 +857,7 @@ Saved: %4 (%5%) थीम (प्रयोगात्मक) - + This option applies when using command line or by dropping files to the application icon यह विकल्प कमांड लाइन का उपयोग करते समय या एप्लिकेशन प्रतीक पर फ़ाइलें छोड़ते समय लागू होता है @@ -881,7 +886,7 @@ Saved: %4 (%5%) उच्च स्तर - + Multithreading बहुसूत्रण @@ -908,17 +913,17 @@ Saved: %4 (%5%) मेगाबाइट - + Import only केवल आयात करें - + Import and compress आयात करें और संकुचित करें - + When importing files directly फ़ाइलें सीधे आयात करते समय @@ -957,7 +962,7 @@ Saved: %4 (%5%) QIODevice - + Image Files चित्र फाइलें diff --git a/resources/i18n/caesium_id_ID.ts b/resources/i18n/caesium_id_ID.ts index 95071868..71381087 100644 --- a/resources/i18n/caesium_id_ID.ts +++ b/resources/i18n/caesium_id_ID.ts @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... Impor berkas... - + Import folder... Impor folder... - + Importing files... Mengimport berkas... - - - + + + Cancel Batal - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Apakah Anda benar-benar ingin melanjutkannya? - + No Tidak - - + + File not found File tidak ditemukan - + Finishing... Finishing... - - + + Compressing... Mengompres... - + Do you really want to quit? Apakah Anda benar-benar ingin keluar? - - + + Yes Ya - + Please select an output folder first - - + + Ok - + Select output folder... Pilih folder output... - + Compression finished! Kompresi selesai! - + You just saved %1! Kamu telah menghemat %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Original size: %2 Compressed size: %3 Saved: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Saved: %4 (%5%) - + Remove Hapus - - + + Compress Kompres - + Compression Kompresi - + JPEG JPEG - - - - + + + + Quality Kualitas - + PNG PNG @@ -337,407 +342,407 @@ Saved: %4 (%5%) Level - + WebP WebP - + Lossless Lossless - + Maximum output size - + bytes bytes - + Mode - + Keep Metadata Pertahankan metadata - + KB KB - + MB MB - + Resize Resize - + Resize to fit Resize to fit - + No resize No resize - + Dimensions Dimensi - + Percentage Percentage - + Short edge Short edge - + Long edge Long edge - - + + Width Lebar - - - - - - - + + + + + + + px px - - + + Size Ukuran - - + + Height Tinggi - + Do not enlarge Jangan diperbesar - + Keep aspect ratio Pertahankan rasio aspek - + Output Output - + Folder Folder - + Select... Pilih... - + Same folder as input Folder yang sama dengan input - + Keep folder structure Pertahankan struktur folder - + Skip if output size is bigger than the original Lewati jika ukuran output lebih besar dari aslinya - + Keep file dates Pertahankan tanggal-berkas - + Creation Dibuat - + Last modified Terakhir dimodifikasi - + Last access Terakhir diakses - + Format Format - + Suffix Sufiks - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected - + Original Original - - + + Preview Preview - + Compressed Terkompres - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + Move the original file - + To Trash - + Delete Permanently - + Help Bantuan - + File Berkas - + Edit Edit - + View Tampilan - - + + Toolbar Toolbar - + About Caesium Image Compressor Tentang Caesium Image Compressor - + Add files... Tambah berkas... - + Ctrl+O Ctrl+O - + Add folder... Tambah folder... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Keluar - + Del Delete key on keyboard Del - + Select All Pilih semua - + Ctrl+A Ctrl+A - + Clear Bersihkan - + Show previews Tampilkan pratinjau - + Preferences... Preferensi... - + Show original in file manager Tampilkan yang original di manajer file - + Show compressed in file manager Tampilkan yang terkompresi di manajer file - + Donate Donasi - + Icons Ikon - + Icons and Text Ikon dan Teks - + Hide Sembunyi - + Show Tampilkan - + Auto preview Pratinjau otomatis - + Ctrl+P - + Advanced import... - - - + + + % % - + images in list gambar dalam daftar @@ -750,52 +755,52 @@ Saved: %4 (%5%) Preferensi - + threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Threads priority - + Restart - + Close Tutup @@ -838,7 +843,7 @@ Saved: %4 (%5%) Mb - + Changes will apply after restart Perubahan akan berlaku setelah restart @@ -848,7 +853,7 @@ Saved: %4 (%5%) Tema (eksperimental) - + This option applies when using command line or by dropping files to the application icon Opsi ini berlaku saat menggunakan baris perintah atau dengan menjatuhkan file ke ikon aplikasi @@ -877,7 +882,7 @@ Saved: %4 (%5%) Tingkat Lanjut - + Multithreading Multithreading @@ -904,17 +909,17 @@ Saved: %4 (%5%) MB - + Import only Impor saja - + Import and compress Impor dan kompres - + When importing files directly Saat mengimpor file secara langsung @@ -953,7 +958,7 @@ Saved: %4 (%5%) QIODevice - + Image Files Berkas gambar diff --git a/resources/i18n/caesium_it_IT.ts b/resources/i18n/caesium_it_IT.ts index 10a30c75..99c9a23e 100644 --- a/resources/i18n/caesium_it_IT.ts +++ b/resources/i18n/caesium_it_IT.ts @@ -194,29 +194,29 @@ Tutti i diritti riservati. MainWindow - + Import files... Importa files... - + Import folder... Importa cartella... - + Importing files... Importazione... - - - + + + Cancel Cancella - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -225,24 +225,24 @@ Do you really want to continue? Vuoi veramente continuare? - + No No - - + + File not found File non trovato - + Finishing... Completamento... - - + + Compressing... Compressione... @@ -251,44 +251,44 @@ Vuoi veramente continuare? Sei sicuro? - + Do you really want to quit? Vuoi veramente uscire? - - + + Yes - + Please select an output folder first Seleziona una cartella di destinazione - - + + Ok Ok - + Select output folder... Selezione cartella di output... - + Compression finished! Compressione terminata! - + You just saved %1! Hai appena risparmiato %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -298,6 +298,11 @@ Dimensione originale: %2 Dimensione compressa: %3 Risparmiato: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -310,37 +315,37 @@ Risparmiato: %4 (%5%) - + Remove Rimuovi - - + + Compress Comprimi - + Compression Compressione - + JPEG JPEG - - - - + + + + Quality Qualità - + PNG PNG @@ -349,191 +354,191 @@ Risparmiato: %4 (%5%) Livello - + WebP WebP - + Lossless Senza perdita di qualità - + Maximum output size Dimensione massima - + bytes bytes - + Mode Modalità - + Optimization level Livello di ottimizzazione - + TIFF TIFF - + Method Metodo - + Deflate level Livello deflate - + Best Migliore - + Balanced Bilanciato - + Fast Veloce - + Uncompressed Non compresso - + Chroma subsampling Sottocampionamento della crominanza - + Keep Metadata Mantieni Metadata - + KB KB - + MB MB - + Resize Ridimensiona - + Resize to fit Ridimensiona per - + No resize Non ridimensionare - + Dimensions Dimensioni - + Percentage Percentuale - + Short edge Lato corto - + Long edge Lanto lungo - - + + Width Larghezza - - - - - - - + + + + + + + px px - - + + Size Dimensione - - + + Height Altezza - + Do not enlarge Non allargare - + Keep aspect ratio Mantieni proporzioni - + Output Destinazione - + Folder Cartella - + Select... Scegli... - + Same folder as input Stessa cartella di origine - + Keep folder structure Mantieni struttura cartelle - + Skip if output size is bigger than the original Salta se il risultato è più grande dell'originale @@ -542,123 +547,123 @@ Risparmiato: %4 (%5%) Sposta il file originale nel cestino - + Keep file dates Mantieni le date nel file - + Creation Creazione - + Last modified Ultima modifica - + Last access Ultimo accesso - + Format Formato - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected Convertire ad un altro formato o ridimensionare può degradare la qualità anche con l'opzione "Senza perdità di qualità" - + Ctrl+P Ctrl+P - + Advanced import... Importazione avanzata... - + Suffix Suffisso - + Original Originale - - + + Preview Anteprima - + Compressed Compressa - + Move the original file Sposta il file originale - + To Trash Nel cestino - + Delete Permanently Cancella permanentemente - + Del Canc - + Show original in file manager Mostra originale nel file manager - + Show compressed in file manager Mostra compresso nel file manager - + Donate Dona - + Icons Icone - + Icons and Text Icone e Testo - + Hide Nascondi - + Show Mostra - + Auto preview Anteprima automatica @@ -671,96 +676,96 @@ Risparmiato: %4 (%5%) Riavvia per aggiornare - + Help Aiuto - + File File - + Edit Modifica - + View Visualizza - - + + Toolbar Barra degli strumenti - + About Caesium Image Compressor Informazioni su Caesium Image Compressor - + Add files... Importa files... - + Ctrl+O Ctrl+O - + Add folder... Importa cartella... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Esci - + Select All Seleziona tutto - + Ctrl+A Ctrl+A - + Clear Pulisci - + Show previews Mostra anteprime - + Preferences... Preferenze... - - - + + + % % - + images in list immagini in lista @@ -773,52 +778,52 @@ Risparmiato: %4 (%5%) Preferenze - + threads threads - + No action Nessuna azione - + Close the application Chiudi l'applicazione - + Sleep Sospendi - + Shutdown Spegni - + Open output folder Apri la cartella di destinazione - + Perform an action after successful compression Esegui un'azione dopo una compressione - + Threads priority Priorità dei threads - + Restart Riavvia - + Close Chiudi @@ -861,7 +866,7 @@ Risparmiato: %4 (%5%) Mb - + Changes will apply after restart Le modifiche verranno applicate al riavvio @@ -871,7 +876,7 @@ Risparmiato: %4 (%5%) Tema (sperimentale) - + This option applies when using command line or by dropping files to the application icon Questa opzione si applica usando la riga di comando o trascinando i file sull'icona dell'applicazione @@ -900,7 +905,7 @@ Risparmiato: %4 (%5%) Avanzate - + Multithreading Multithreading @@ -927,17 +932,17 @@ Risparmiato: %4 (%5%) MB - + Import only Solo importa - + Import and compress Importa e comprimi - + When importing files directly Quando importi file direttamente @@ -976,7 +981,7 @@ Risparmiato: %4 (%5%) QIODevice - + Image Files File immagine diff --git a/resources/i18n/caesium_ja_JP.ts b/resources/i18n/caesium_ja_JP.ts index cb7247e0..24452f05 100644 --- a/resources/i18n/caesium_ja_JP.ts +++ b/resources/i18n/caesium_ja_JP.ts @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... ファイルをインポート... - + Import folder... フォルダーをインポート... - + Importing files... ファイルをインポート中... - - - + + + Cancel キャンセル - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? 本当に続行しますか? - + No いいえ - - + + File not found ファイルが見つかりません - + Finishing... 終了中... - - + + Compressing... 圧縮中... - + Do you really want to quit? 終了しますか? - - + + Yes はい - + Please select an output folder first 先に出力先のフォルダーを選択してください - - + + Ok OK - + Select output folder... 出力先フォルダーを選択... - + Compression finished! 圧縮が完了しました! - + You just saved %1! %1 を保存しました! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Saved: %4 (%5%) 圧縮後のサイズ: %3 削減したサイズ: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Saved: %4 (%5%) - + Remove 除去 - - + + Compress 圧縮開始 - + Compression 圧縮 - + JPEG JPEG - - - - + + + + Quality 品質 - + PNG PNG @@ -337,131 +342,131 @@ Saved: %4 (%5%) レベル - + WebP WebP - + Lossless 可逆圧縮 - + Maximum output size 出力するサイズの上限 - + Mode 動作モード - + Keep Metadata メタデータを保持 - + Resize サイズ変更 - + Resize to fit 自動サイズ変更 - + No resize 変更しない - + Dimensions サイズ指定 - + Percentage 倍率指定 - + Short edge 短辺合わせ - + Long edge 長辺合わせ - - + + Width - - - - - - - + + + + + + + px ピクセル - - + + Size サイズ - - + + Height 高さ - + Do not enlarge 拡大しない - + Keep aspect ratio 縦横比を維持 - + Output 出力 - + Folder フォルダー - + Select... 選択... - + Same folder as input 入力と同じフォルダー - + Keep folder structure フォルダーの構造を維持 - + Skip if output size is bigger than the original 出力サイズが元よりも大きい場合はスキップ @@ -470,277 +475,277 @@ Saved: %4 (%5%) 入力ファイルをごみ箱へ移動 - + Keep file dates ファイルの日時を維持 - + Creation 作成日時 - + Last modified 更新日時 - + Last access アクセス日時 - + Format 画像形式 - + Suffix ファイル名末尾に追加する文字列 - + Original 圧縮前 - - + + Preview プレビュー - + Compressed 圧縮後 - + Optimization level 圧縮レベル - + TIFF - + Method 方式 - + Deflate level Deflate の品質 - + Best 最高 - + Balanced 均衡 - + Fast 高速 - + Uncompressed 未圧縮 - + Chroma subsampling クロマ・サブサンプリング - + bytes バイト - + KB - + MB - + Move the original file 入力ファイルを削除 - + To Trash ごみ箱へ - + Delete Permanently 完全に削除 - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected 新たな画像形式への変換やリサイズは、「可逆圧縮」を選択しても画質を劣化させる可能性あり - + Help ヘルプ - + File ファイル - + Edit 編集 - + View 表示 - - + + Toolbar ツールバー - + About Caesium Image Compressor バージョン情報 - + Add files... ファイルの追加... - + Ctrl+O Ctrl+O - + Add folder... フォルダーの追加... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit 終了 - + Del Del - + Select All すべて選択 - + Ctrl+A Ctrl+A - + Clear 一覧を消去 - + Show previews プレビューを表示 - + Preferences... 設定... - + Show original in file manager ファイル マネージャーで圧縮前を表示 - + Show compressed in file manager ファイル マネージャーで圧縮後を表示 - + Donate 寄付 - + Icons アイコンのみ - + Icons and Text アイコンとテキスト - + Hide 非表示 - + Show 表示 - + Auto preview 自動プレビュー - + Ctrl+P - + Advanced import... 高度なインポート... - - - + + + % % - + images in list リスト内の画像 @@ -753,17 +758,17 @@ Saved: %4 (%5%) 設定 - + Threads priority - + Restart 再起動 - + Close 閉じる @@ -798,42 +803,42 @@ Saved: %4 (%5%) バイト - + threads スレッド - + No action 何もしない - + Close the application アプリを閉じる - + Sleep スリープ - + Shutdown シャットダウン - + Open output folder 出力先のフォルダーを開く - + Perform an action after successful compression 圧縮成功後に実行する動作 - + Changes will apply after restart 再起動後に変更が適用されます @@ -843,7 +848,7 @@ Saved: %4 (%5%) テーマ (試験段階) - + This option applies when using command line or by dropping files to the application icon これはアプリのアイコンにファイルをドロップしたりコマンドラインでの使用時に適用されます @@ -872,7 +877,7 @@ Saved: %4 (%5%) 高度 - + Multithreading マルチスレッド処理を使用する @@ -891,17 +896,17 @@ Saved: %4 (%5%) インポート - + Import only インポートのみ - + Import and compress インポートと圧縮 - + When importing files directly ファイルを直接インポートしたときの動作 @@ -940,7 +945,7 @@ Saved: %4 (%5%) QIODevice - + Image Files 画像ファイル diff --git a/resources/i18n/caesium_pl_PL.ts b/resources/i18n/caesium_pl_PL.ts index 2dcd63a8..136911ec 100644 --- a/resources/i18n/caesium_pl_PL.ts +++ b/resources/i18n/caesium_pl_PL.ts @@ -186,29 +186,29 @@ Wszelkie prawa zastrzeżone. MainWindow - + Import files... Importuj pliki... - + Import folder... Importuj folder... - + Importing files... Importowanie plików... - - - + + + Cancel Anuluj - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Czy na pewno chcesz kontynuować? - + No Nie - - + + File not found Plik nie został znaleziony - + Finishing... Kończę... - - + + Compressing... Kompresowanie... - + Do you really want to quit? Czy na pewno chcesz wyjść? - - + + Yes Tak - + Please select an output folder first - - + + Ok - + Select output folder... Wybierz folder wyjściowy... - + Compression finished! Kompresja zakończona! - + You just saved %1! Właśnie zaoszczędziłeś %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Rozmiar oryginalny: %2 Skompresowany rozmiar: %3 Zaoszczędzono: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Zaoszczędzono: %4 (%5%) - + Remove Usuń - - + + Compress Kompresuj - + Compression Kompresja - + JPEG JPEG - - - - + + + + Quality Jakość - + PNG PNG @@ -337,407 +342,407 @@ Zaoszczędzono: %4 (%5%) Poziom - + WebP WebP - + Lossless Bezstratna - + Maximum output size - + bytes bajtów - + Mode - + Keep Metadata Zachowaj metadane - + Resize Rozmiar - + Resize to fit Dopasuj rozmiar - + No resize Nie zmieniaj - + Dimensions Wymiary - + Percentage Procentowo - + Short edge Krótszy bok - + Long edge Dłuższy bok - - + + Width Szerokość - - - - - - - + + + + + + + px px - - + + Size Wymiar - - + + Height Wysokość - + Do not enlarge Nie powiększaj - + Keep aspect ratio Zachowaj proporcje - + Output Wynik - + Folder Folder - + Select... Wybierz... - + Same folder as input Zapisz w tym samym folderze - + Keep folder structure Zachowaj strukturę folderów - + Skip if output size is bigger than the original Pomiń, jeśli rozmiar pliku wyjściowego jest większy niż oryginału - + Keep file dates Zachowaj oryginalne daty - + Creation Utworzenia - + Last modified Ostatniej modyfikacji - + Last access Ostatniego otwarcia - + Format Format - + Suffix Suffix - + Original Oryginalne - - + + Preview Podgląd - + Compressed Skompresowane - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + KB Kb - + MB - + Move the original file - + To Trash - + Delete Permanently - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected - + Help Pomoc - + File Plik - + Edit Edycja - + View Widok - - + + Toolbar Pasek narzędzi - + About Caesium Image Compressor O Caesium Image Compressor - + Add files... Dodaj pliki... - + Ctrl+O Ctrl+O - + Add folder... Dodaj folder... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Wyjdź - + Del Klawisz Del z klawiatury Usuń - + Select All Zaznacz wszystko - + Ctrl+A Ctrl+A - + Clear Wyczyść - + Show previews Pokaż podglądy - + Preferences... Ustawienia... - + Show original in file manager Otwórz folder z oryginałem - + Show compressed in file manager Otwórz folder ze skompresowanym - + Donate Dotacje - + Icons Ikony - + Icons and Text Ikony i Tekst - + Hide Ukryj - + Show Pokaż - + Auto preview Podgląd automatyczny - + Ctrl+P Ctrl+P - + Advanced import... - - - + + + % % - + images in list zdjęć na liście @@ -750,52 +755,52 @@ Zaoszczędzono: %4 (%5%) Ustawienia - + threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Threads priority - + Restart - + Close Zamknij @@ -843,7 +848,7 @@ Zaoszczędzono: %4 (%5%) Mb - + Changes will apply after restart Zmiany zostaną wprowadzone po ponownym uruchomieniu @@ -853,7 +858,7 @@ Zaoszczędzono: %4 (%5%) Motyw (eksperymentalne) - + This option applies when using command line or by dropping files to the application icon Ta opcja działa w przypadku korzystania z terminala lub przeciągania plików na ikonę aplikacji @@ -882,7 +887,7 @@ Zaoszczędzono: %4 (%5%) Zaawansowane - + Multithreading Wielowątkowość @@ -900,17 +905,17 @@ Zaoszczędzono: %4 (%5%) Kb - + Import only Tylko importuj - + Import and compress Importuj i kompresuj - + When importing files directly Podczas bezpośredniego importu plików @@ -949,7 +954,7 @@ Zaoszczędzono: %4 (%5%) QIODevice - + Image Files Pliki zdjęciowe diff --git a/resources/i18n/caesium_pt_BR.ts b/resources/i18n/caesium_pt_BR.ts index 3e4f7b82..88700bc7 100644 --- a/resources/i18n/caesium_pt_BR.ts +++ b/resources/i18n/caesium_pt_BR.ts @@ -186,29 +186,29 @@ Todos os direitos reservados. MainWindow - + Import files... Importar arquivos... - + Import folder... Importar pasta... - + Importing files... Importando arquivos... - - - + + + Cancel Cancelar - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? Deseja realmente continuar? - + No Não - - + + File not found Arquivo não encontrado - + Finishing... Finalizando... - - + + Compressing... Comprimindo... - + Do you really want to quit? Deseja realmente sair? - - + + Yes Sim - + Please select an output folder first - - + + Ok - + Select output folder... Selecione a pasta de saída... - + Compression finished! Compressão finalizada! - + You just saved %1! Você economizou %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Tamanho original: %2 Tamanho comprimido: %3 Economizado: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Economizado: %4 (%5%) - + Remove Remover - - + + Compress Comprimir - + Compression Compressão - + JPEG JPEG - - - - + + + + Quality Qualidade - + PNG PNG @@ -337,131 +342,131 @@ Economizado: %4 (%5%) Nível - + WebP WebP - + Lossless Sem perdas - + Maximum output size Tamanho máximo de saida - + Mode Modo - + Keep Metadata Manter metadados - + Resize Redimensionar - + Resize to fit Redimensionar para caber - + No resize Não redimensionar - + Dimensions Dimensões - + Percentage Porcentagem - + Short edge Borda mais curta - + Long edge Borda mais longa - - + + Width Largura - - - - - - - + + + + + + + px px - - + + Size Tamanho - - + + Height Altura - + Do not enlarge Não aumentar - + Keep aspect ratio Manter relação de aspecto - + Output Saída - + Folder Pasta - + Select... Selecionar... - + Same folder as input Mesma pasta de origem - + Keep folder structure Manter estrutura de pastas - + Skip if output size is bigger than the original Ignorar se o tamanho de saída for maior que o original @@ -470,278 +475,278 @@ Economizado: %4 (%5%) Mover o arquivo original para a lixeira - + Keep file dates Manter as datas do arquivo - + Creation Criação - + Last modified Ùltima modificação - + Last access Último acesso - + Format Formato - + Suffix Sufixo - + Original Original - - + + Preview Previsão - + Compressed Comprimido - + Optimization level Nível de otimização - + TIFF TIFF - + Method Método - + Deflate level Nível de compressão - + Best Melhor - + Balanced Equilibrado - + Fast Rápido - + Uncompressed Sem compressão - + Chroma subsampling Subamostragem de croma - + bytes bytes - + KB KB - + MB MB - + Move the original file Mover o arquivo original - + To Trash Para a Lixeira - + Delete Permanently Excluir definitivamente - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected Converter para um novo formato ou redimensionar pode degradar a qualidade, mesmo se a opção "sem perdas" estiver selecionada - + Help Ajuda - + File Arquivo - + Edit Editar - + View Exibir - - + + Toolbar Barra de Ferramentas - + About Caesium Image Compressor Sobre o Caesium Compressor de Imagens - + Add files... Adicionar arquivos... - + Ctrl+O Ctrl+O - + Add folder... Adicionar pasta... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Sair - + Del Delete key on keyboard Del - + Select All Selecionar tudo - + Ctrl+A Ctrl+A - + Clear Limpar - + Show previews Mostrar previsões - + Preferences... Preferências... - + Show original in file manager Mostrar o original no gerenciador de arquivos - + Show compressed in file manager Mostrar o compactado no gerenciador de arquivos - + Donate Doar - + Icons Ícones - + Icons and Text Ícones e Texto - + Hide Ocultar - + Show Exibir - + Auto preview Previsão automática - + Ctrl+P Ctrl+P - + Advanced import... Importação avançada... - - - + + + % % - + images in list imagens na lista @@ -754,17 +759,17 @@ Economizado: %4 (%5%) Preferências - + Threads priority - + Restart Reiniciar - + Close Fechar @@ -804,62 +809,62 @@ Economizado: %4 (%5%) bytes - + When importing files directly Ao importar arquivos diretamente - + Import only Apenas importe - + Import and compress Importe e comprima - + This option applies when using command line or by dropping files to the application icon Essa opção é aplicada ao utilizar a linha de comando ou soltar arquivos sobre o ícone da aplicação - + threads threads - + No action Nenhuma ação - + Close the application Fechar a aplicação - + Sleep Hibernar - + Shutdown Desligar - + Open output folder Abrir pasta de saída - + Perform an action after successful compression Executar uma ação após compressão bem sucedida - + Changes will apply after restart Alterações serão aplicadas após reiniciar @@ -906,7 +911,7 @@ Economizado: %4 (%5%) Avançado - + Multithreading Multiprocessamento @@ -949,7 +954,7 @@ Economizado: %4 (%5%) QIODevice - + Image Files Arquivos de imagem diff --git a/resources/i18n/caesium_ru_RU.ts b/resources/i18n/caesium_ru_RU.ts index 8384d61a..39d66797 100644 --- a/resources/i18n/caesium_ru_RU.ts +++ b/resources/i18n/caesium_ru_RU.ts @@ -174,29 +174,29 @@ All rights reserved. MainWindow - + Import files... Импортировать файлы... - + Import folder... Импортировать папку... - + Importing files... Импортировать файлы... - - - + + + Cancel Отмена - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -205,66 +205,66 @@ Do you really want to continue? Вы действительно хотите продолжить? - + No Нет - - + + File not found Файл не найден - + Finishing... Завершение... - - + + Compressing... Сжатие... - + Do you really want to quit? Вы действительно хотите выйти? - - + + Yes Да - + Please select an output folder first Сначала выберите папку для сохранения изображений - - + + Ok Ок - + Select output folder... Выберите папку для сохранения изображений... - + Compression finished! Сжатие завершено! - + You just saved %1! Вы сжали %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -274,6 +274,11 @@ Saved: %4 (%5%) Размер со сжатием: %3 Удалось сжать: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -286,37 +291,37 @@ Saved: %4 (%5%) - + Remove Удалить - - + + Compress Сжать - + Compression Сжатие - + JPEG JPEG - - - - + + + + Quality Качество - + PNG PNG @@ -325,146 +330,146 @@ Saved: %4 (%5%) Уровень - + WebP WebP - + Lossless Без потерь - + Maximum output size Максимальный выходной размер - + bytes байтов - + Mode Режим - + Keep Metadata Сохранять метаданные - + KB КБ - + MB МБ - + Resize Разрешение - + Resize to fit Изменить размер, ориентируясь на - + No resize Не изменять - + Dimensions Размеры - + Percentage Процент - + Short edge Короткую сторону - + Long edge Длинную сторону - - + + Width Ширина - - - - - - - + + + + + + + px px - - + + Size Размер - - + + Height Высота - + Do not enlarge Не увеличивать - + Keep aspect ratio Сохранять пропорции - + Output Экспорт - + Folder Папка - + Select... Выбрать... - + Same folder as input Сохранять в исходную папку - + Keep folder structure Сохранять структуру папок - + Skip if output size is bigger than the original Пропускать, если сжатое изображение больше оригинала @@ -473,263 +478,263 @@ Saved: %4 (%5%) Перемещать исходный файл в корзину - + Keep file dates Сохранять даты файлов - + Creation Создание - + Last modified Последнее изменение - + Last access Последний доступ - + Format Формат - + Suffix Суффикс - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected Преобразование в новый формат или изменение размера может ухудшить качество, даже если выбран вариант "без потерь" - + Original Исходный - - + + Preview Предварительный просмотр - + Compressed Сжатый - + Chroma subsampling Цветовая субдискретизация - + Optimization level Уровень оптимизации - + TIFF TIFF - + Uncompressed Без сжатия - + Method Метод - + Best Лучший - + Deflate level Уровень сжатия Deflate - + Balanced Сбалансированный - + Fast Быстрый - + Move the original file Переместить исходный файл - + To Trash В корзину - + Delete Permanently Удалить навсегда - + Help Помощь - + File Файл - + Edit Правка - + View Вид - - + + Toolbar Панель инструментов - + About Caesium Image Compressor О Caesium Image Compressor - + Add files... Добавить файлы... - + Ctrl+O Ctrl+O - + Add folder... Добавить папку... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Выйти - + Del Delete key on keyboard Del - + Select All Выбрать все - + Ctrl+A Ctrl+A - + Clear Очистить - + Show previews Показать предпросмотр - + Preferences... Настройки... - + Show original in file manager Показать исходное изображение в проводнике - + Show compressed in file manager Показать сжатое изображение в проводнике - + Donate Поддержать разработчика - + Icons Иконки - + Icons and Text Иконки и текст - + Hide Скрыть - + Show Показать - + Auto preview Автопредпросмотр - + Ctrl+P Ctrl+P - + Advanced import... Расширенный импорт... - - - + + + % % - + images in list изображения в списке @@ -742,17 +747,17 @@ Saved: %4 (%5%) Настройки - + Threads priority Приоритет потоков - + Restart Перезапустить - + Close Закрыть @@ -787,42 +792,42 @@ Saved: %4 (%5%) байтов - + threads потока(ов) - + No action Нет действия - + Close the application Закрыть приложение - + Sleep Спящий режим - + Shutdown Выключить - + Open output folder Открыть папку экспорта - + Perform an action after successful compression Действие после успешного сжатия - + Changes will apply after restart Изменения вступят в силу после перезапуска @@ -832,7 +837,7 @@ Saved: %4 (%5%) Тема (экспериментально) - + This option applies when using command line or by dropping files to the application icon Эта настройка применяется при вызове программы из командной строки или при перетаскивании файлов на ярлык программы @@ -861,7 +866,7 @@ Saved: %4 (%5%) Расширенные - + Multithreading Многопоточность @@ -888,17 +893,17 @@ Saved: %4 (%5%) МБ - + Import only Только импортировать - + Import and compress Импортировать и сжать - + When importing files directly При импорте файлов @@ -937,7 +942,7 @@ Saved: %4 (%5%) QIODevice - + Image Files Изображения diff --git a/resources/i18n/caesium_sk_SK.ts b/resources/i18n/caesium_sk_SK.ts index b80bf864..0e7c1164 100644 --- a/resources/i18n/caesium_sk_SK.ts +++ b/resources/i18n/caesium_sk_SK.ts @@ -185,24 +185,24 @@ All rights reserved. MainWindow - + Import files... Importovať súbory... - + Import folder... Importovať adresár... - + Importing files... Importovanie súborov... - - - + + + Cancel Zrušiť @@ -215,28 +215,28 @@ All rights reserved. Naozaj chcete pokračovať? - + No Nie - - + + Compressing... Komprimovanie... - + Do you really want to quit? Naozaj chcete skončiť? - + You just saved %1! Práve ste uložili %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -244,47 +244,52 @@ Saved: %4 (%5%) - - + + File not found Súbor nenájdený - + Finishing... Dokončovanie... - - + + Recompress failed + + + + + Yes Áno - + Please select an output folder first - - + + Ok - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? - + Select output folder... Vyberte cieľový priečinok... - + Compression finished! Kompresia dokončená! @@ -310,37 +315,37 @@ Do you really want to continue? - + Remove Odstrániť - - + + Compress Komprimovať - + Compression Kompresia - + JPEG JPEG - - - - + + + + Quality Kvalita - + PNG PNG @@ -349,406 +354,406 @@ Do you really want to continue? Úroveň - + WebP WebP - + Lossless Bezstratový - + Maximum output size - + bytes bytes - + Mode - + Keep Metadata Uchovať metadáta - + KB kB - + MB MB - + Resize Zmeniť veľkosť - + Resize to fit Prispôsobiť veľkosť - + No resize Žiadna zmena veľkosti - + Dimensions Rozmery - + Percentage Percento - + Short edge Krátky okraj - + Long edge Dlhý okraj - - + + Width Šírka - - - - - - - + + + + + + + px px - - + + Size Veľkosť - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - - + + Height Výška - + Do not enlarge Nezväčšovať - + Keep aspect ratio Zachovať pomer strán - + Output Výkon - + Folder Adresár - + Select... Výber... - + Same folder as input Rovnaký priečinok ako vstup - + Keep folder structure Udržujte štruktúru priečinkov - + Skip if output size is bigger than the original Preskočte, ak je výstupná veľkosť väčšia ako originál - + Move the original file - + To Trash - + Delete Permanently - + Keep file dates Zachovať dátumy súborov - + Creation Tvorba - + Last modified Naposledy zmenené - + Last access Posledný prístup - + Format Formát - + Suffix Prípona - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected - + Compressed Skomprimované - + Original Originál - + Help Pomoc - + File Súbor - + Edit Editovať - + View Zobrazenie - - + + Toolbar Panel s nástrojmi - + About Caesium Image Compressor O programe Caesium Image Compressor - + Add files... Pridať súbory... - + Ctrl+O Ctrl+O - + Add folder... Pridať adresár... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Koniec - + Del Del - + Select All Vybrať všetko - + Ctrl+A Ctrl+A - + Clear Zmazať - + Show previews Zobraziť ukážky - + Preferences... Predvoľby... - + Show original in file manager Zobraziť originál v správcovi súborov - + Show compressed in file manager Zobraziť komprimované v správcovi súborov - + Donate Darovať - + Icons Ikony - + Icons and Text Ikony and Text - + Hide Skryť - + Show Zobraziť - + Auto preview Automatický náhľad - - + + Preview Náhľad - + Ctrl+P Ctrl+P - + Advanced import... - - - + + + % % - + images in list obrázky v zozname @@ -761,17 +766,17 @@ Do you really want to continue? Predvoľby - + Threads priority - + Restart - + Close Zatvoriť @@ -819,62 +824,62 @@ Do you really want to continue? MB - + When importing files directly Pri priamom importe súborov - + Import only Importovať iba - + Import and compress Import a kompresia - + This option applies when using command line or by dropping files to the application icon Táto možnosť platí pri použití príkazového riadka alebo presunutím súborov na ikonu aplikácie - + threads - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Changes will apply after restart Zmeny sa prejavia po reštarte @@ -913,7 +918,7 @@ Do you really want to continue? Rozšírené - + Multithreading Multithreading @@ -956,7 +961,7 @@ Do you really want to continue? QIODevice - + Image Files Súbory obrázkov diff --git a/resources/i18n/caesium_tr_TR.ts b/resources/i18n/caesium_tr_TR.ts index 2b5edfec..1e8daad2 100644 --- a/resources/i18n/caesium_tr_TR.ts +++ b/resources/i18n/caesium_tr_TR.ts @@ -191,467 +191,467 @@ Tüm hakları saklıdır. - + Remove Kaldır - - + + Compress Sıkıştır - + Compression Sıkıştırma - + JPEG JPEG - - - - + + + + Quality Kalite - + PNG PNG - + WebP WebP - + Lossless Kayıpsız - + Maximum output size Maksimum çıktı boyutu - + bytes bytes - + Mode Mod - + Keep Metadata Meta Verileri Sakla - + KB KB - + MB MB - + Resize Boyutlandır - + Resize to fit Sığacak şekilde yeniden boyutlandır - + No resize Yeniden boyutlandırma - + Dimensions Boyutlar - + Percentage Yüzde - + Short edge Kısa kenar - + Long edge Uzun kenar - - + + Width Genişlik - - - - - - - + + + + + + + px px - - + + Size Boyut - + Optimization level Optimizasyon seviyesi - + TIFF TIFF - + Method Metot - + Deflate level Deflate seviyesi - + Best En iyi - + Balanced Dengeli - + Fast Hızlı - + Uncompressed Sıkıştırılmamış - + Chroma subsampling Kroma alt örnekleme - - + + Height Yükseklik - + Do not enlarge Büyütme - + Keep aspect ratio En-boy oranını koru - + Output Çıktı - + Folder Dosya - + Select... Seç... - + Same folder as input Giriş klasörü ile aynı klasör - + Keep folder structure Klasör yapısını koru - + Skip if output size is bigger than the original Çıktı boyutu orijinalden büyükse atla - + Move the original file Orijinal dosyayı taşı - + To Trash Çöp Kutusuna - + Delete Permanently Kalıcı Olarak Sil - + Keep file dates Dosya tarihlerini sakla - + Creation Oluşturma - + Last modified Son değişiklik - + Last access Son erişim - + Format Biçim - + Suffix Son ek - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected Yeni bir formata dönüştürmek veya yeniden boyutlandırmak, "kayıpsız" seçeneği seçili olsa bile kaliteyi düşürebilir - - - + + + Cancel İptal Et - + Compressed Sıkıştırılmış - + Original Orijinal - + Help Yardım - + File Dosya - + Edit Düzenle - + View Göster - - + + Toolbar Araç çubuğu - + About Caesium Image Compressor Caesium Image Compressor Hakkında - + Add files... Dosyaları ekle... - + Ctrl+O Ctrl+O - + Add folder... Klasör ekle... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit Çıkış - + Del Sil - + Select All Hepsini Seç - + Ctrl+A Ctrl+A - + Clear Temizle - + Show previews Önizlemeleri göster - + Preferences... Tercihler... - + Show original in file manager Dosya yöneticisinde orijinali göster - + Show compressed in file manager Dosya yöneticisinde sıkıştırılmışı göster - + Donate Bağış - + Icons Simgeler - + Icons and Text Simgeler ve Metin - + Hide Gizle - + Show Göster - + Auto preview Otomatik önizle - - + + Preview Önizle - + Ctrl+P Ctrl+P - + Advanced import... Gelişmiş içe aktar... - + Import files... Dosyaları içe aktar... - + Import folder... Klasörü içe aktar... - + Importing files... Dosyalar içe aktarılıyor... - + Please select an output folder first Lütfen önce bir çıktı klasörü seç - - + + Ok Tamam - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -660,44 +660,44 @@ Do you really want to continue? Gerçekten devam etmek istiyor musun? - - + + Yes Evet - + No Hayır - - + + Compressing... Sıkıştırılıyor... - + Do you really want to quit? Gerçekten çıkmak istiyor musun? - + Select output folder... Çıktı klasörünü seç... - + Compression finished! Sıkıştırma bitti! - + You just saved %1! Az önce kaydedilen %1! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -708,25 +708,30 @@ Sıkıştırılmış boyut: %3 Kaydedildi: %4 (%5%) - - - + + Recompress failed + + + + + + % % - + images in list listedeki resimler - - + + File not found Dosya bulunamadı - + Finishing... Bitiriliyor... @@ -739,47 +744,47 @@ Kaydedildi: %4 (%5%) Tercihler - + No action Eylem yok - + Close the application Uygulamayı kapat - + Sleep Uyku - + Shutdown Kapat - + Open output folder Çıktı klasörünü aç - + Perform an action after successful compression Başarılı sıkıştırmadan sonra bir eylem gerçekleştir - + Threads priority İş parçacığı önceliği - + Restart Yeniden başlat - + Close Kapat @@ -811,17 +816,17 @@ Kaydedildi: %4 (%5%) MB - + This option applies when using command line or by dropping files to the application icon Bu seçenek, komut satırı kullanıldığında veya dosyalar uygulama simgesine bırakıldığında geçerlidir - + threads İş parçacığı - + Changes will apply after restart Değişiklikler yeniden başlatıldıktan sonra uygulanacak @@ -836,7 +841,7 @@ Kaydedildi: %4 (%5%) Gelişmiş - + Multithreading Çoklu iş parçacığı @@ -881,17 +886,17 @@ Kaydedildi: %4 (%5%) Bir dizini açarken dosyaları alt klasörlere aktar - + Import only Sadece aktar - + Import and compress İçe aktar ve sıkıştır - + When importing files directly Dosyaları doğrudan içe aktarırken @@ -926,7 +931,7 @@ Kaydedildi: %4 (%5%) QIODevice - + Image Files Resim Dosyaları diff --git a/resources/i18n/caesium_zh_CN.ts b/resources/i18n/caesium_zh_CN.ts index d940a65b..65202138 100644 --- a/resources/i18n/caesium_zh_CN.ts +++ b/resources/i18n/caesium_zh_CN.ts @@ -186,29 +186,29 @@ All rights reserved. MainWindow - + Import files... 导入文件... - + Import folder... 导入文件夹... - + Importing files... 正在导入文件... - - - + + + Cancel 取消 - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -217,66 +217,66 @@ Do you really want to continue? 确定继续吗? - + No 取消 - - + + File not found 文件未找到 - + Finishing... 正在取消... - - + + Compressing... 正在压缩... - + Do you really want to quit? 确定退出吗? - - + + Yes 确定 - + Please select an output folder first 请首先选择一个输出文件夹 - - + + Ok 确定 - + Select output folder... 选择输出文件夹... - + Compression finished! 压缩完成! - + You just saved %1! 你节省了 %1 存储空间! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -286,6 +286,11 @@ Saved: %4 (%5%) 压缩大小: %3 节省了: %4 (%5%) + + + Recompress failed + + Caesium Image Compressor @@ -298,37 +303,37 @@ Saved: %4 (%5%) - + Remove 移除 - - + + Compress 压缩 - + Compression 压缩选项 - + JPEG JPEG - - - - + + + + Quality 图片质量 - + PNG PNG @@ -337,146 +342,146 @@ Saved: %4 (%5%) 压缩等级 - + WebP WebP - + Lossless 无损压缩 - + Maximum output size 文件最大输出大小 - + bytes B - + Mode 模式 - + Keep Metadata 保留元数据 - + KB KB - + MB MB - + Resize 图片尺寸 - + Resize to fit 调整方式 - + No resize 保持原始尺寸 - + Dimensions 指定像素 - + Percentage 百分比 - + Short edge 短边 - + Long edge 长边 - - + + Width 宽度 - - - - - - - + + + + + + + px px - - + + Size 大小 - - + + Height 高度 - + Do not enlarge 不要放大 - + Keep aspect ratio 保持长宽比 - + Output 输出 - + Folder 文件夹 - + Select... 选择... - + Same folder as input 输出到原目录 - + Keep folder structure 保留目录结构 - + Skip if output size is bigger than the original 如果输出文件大于源文件就跳过 @@ -485,262 +490,262 @@ Saved: %4 (%5%) 删除源文件 - + Keep file dates 保留文件时间 - + Creation 创建时间 - + Last modified 修改时间 - + Last access 访问时间 - + Format 格式 - + Suffix 后缀 - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected 图片转换格式或图片调整大小后可能会降低图像质量,即使勾选了“无损” - + Original 原始 - - + + Preview 预览 - + Compressed 压缩 - + Optimization level 优化级别 - + TIFF TIFF - + Method 方法 - + Deflate level 默认级别 - + Best 最佳 - + Balanced 平衡 - + Fast 最快 - + Uncompressed 不压缩 - + Chroma subsampling 色度二次采样 - + Move the original file 移动原始文件 - + To Trash 删除到回收站 - + Delete Permanently 永久删除 - + Help 帮助 - + File 文件 - + Edit 编辑 - + View 视图 - - + + Toolbar 工具栏 - + About Caesium Image Compressor 关于 Caesium Image Compressor - + Add files... 打开文件... - + Ctrl+O Ctrl+O - + Add folder... 打开文件夹... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit 退出 - + Del 删除 - + Select All 全选 - + Ctrl+A Ctrl+A - + Clear 清空 - + Show previews 展示预览 - + Preferences... 选项... - + Show original in file manager 在文件管理器中查看原图 - + Show compressed in file manager 在文件管理器中查看压缩图 - + Donate 捐赠 - + Icons 图标 - + Icons and Text 图标和文本 - + Hide 隐藏 - + Show 显示 - + Auto preview 自动预览 - + Ctrl+P Ctrl+P - + Advanced import... 高级导入 - - - + + + % % - + images in list 张图片 @@ -753,17 +758,17 @@ Saved: %4 (%5%) 选项 - + Threads priority - + Restart 重启 - + Close 关闭 @@ -798,42 +803,42 @@ Saved: %4 (%5%) B - + threads 线程 - + No action 无动作 - + Close the application 关闭应用程序 - + Sleep 休眠 - + Shutdown 关机 - + Open output folder 打开输出文件夹 - + Perform an action after successful compression 图像压缩成功后执行操作 - + Changes will apply after restart 更改将在重启后生效 @@ -843,7 +848,7 @@ Saved: %4 (%5%) 主题(实验性) - + This option applies when using command line or by dropping files to the application icon 该选项对使用命令行和拖动文件到应用图标上有效 @@ -872,7 +877,7 @@ Saved: %4 (%5%) 高级 - + Multithreading 多线程 @@ -899,17 +904,17 @@ Saved: %4 (%5%) MB - + Import only 只导入 - + Import and compress 导入并压缩 - + When importing files directly 导入文件后 @@ -948,7 +953,7 @@ Saved: %4 (%5%) QIODevice - + Image Files 图片文件 diff --git a/resources/i18n/caesium_zh_TW.ts b/resources/i18n/caesium_zh_TW.ts index 5d31c774..f7c88d5b 100644 --- a/resources/i18n/caesium_zh_TW.ts +++ b/resources/i18n/caesium_zh_TW.ts @@ -179,29 +179,29 @@ All rights reserved. MainWindow - + Import files... 載入檔案... - + Import folder... 載入檔案夾... - + Importing files... 正在載入檔案... - - - + + + Cancel 取消 - + You are about to overwrite your original images and this action can't be undone. Do you really want to continue? @@ -210,55 +210,55 @@ Do you really want to continue? 確定繼續嗎? - + No 取消 - - + + Compressing... 正在壓縮... - + Do you really want to quit? 確定退出嗎? - - + + Yes 確定 - + Please select an output folder first - - + + Ok - + Select output folder... 選擇輸出檔案夾... - + Compression finished! 壓縮完成! - + You just saved %1! 你已節省 %1 的儲存空間! - + Total files: %1 Original size: %2 Compressed size: %3 @@ -269,16 +269,21 @@ Saved: %4 (%5%) 節省比例: %4 (%5%) - - + + File not found 未找到文件 - + Finishing... 壓縮中... + + + Recompress failed + + Caesium Image Compressor @@ -291,37 +296,37 @@ Saved: %4 (%5%) - + Remove 刪除 - - + + Compress 壓縮 - + Compression 壓縮選項 - + JPEG JPEG - - - - + + + + Quality 圖片品質 - + PNG PNG @@ -330,131 +335,131 @@ Saved: %4 (%5%) 壓縮等級 - + WebP WebP - + Lossless 無損壓縮 - + Maximum output size 最大圖片體積 - + Mode 模式 - + Keep Metadata 保留元數據 - + Resize 圖片尺寸 - + Resize to fit 調整方式 - + No resize 保持原始尺寸 - + Dimensions 像素值 - + Percentage 百分比 - + Short edge 短邊固定 - + Long edge 長邊固定 - - + + Width 寬度 - - - - - - - + + + + + + + px px - - + + Size 大小 - - + + Height 高度 - + Do not enlarge 不要放大 - + Keep aspect ratio 保持長寬比 - + Output 輸出 - + Folder 檔案夾 - + Select... 選擇... - + Same folder as input 輸出到原目錄 - + Keep folder structure 保留目錄結構 - + Skip if output size is bigger than the original 若輸出體積大於源文件則跳過 @@ -463,277 +468,277 @@ Saved: %4 (%5%) 刪除源文件 - + Keep file dates 保留檔案時間 - + Creation 建立日期 - + Last modified 修改日期 - + Last access 存取日期 - + Format 格式 - + bytes bytes - + Optimization level - + TIFF - + Method - + Deflate level - + Best - + Balanced - + Fast - + Uncompressed - + Chroma subsampling - + KB KB - + MB MB - + Move the original file - + To Trash - + Delete Permanently - + Suffix 後綴 - + Converting to a new format or resizing can degrade quality even if "lossless" option is selected 圖片轉換格式或圖片調整大小後可能會降低圖像質量,即使勾選了“無損”; - + Compressed 壓縮 - + Original 源文件 - + Help 幫助 - + File 檔案 - + Edit 編輯 - + View 視圖 - - + + Toolbar 工具欄 - + About Caesium Image Compressor 關於 Caesium Image Compressor - + Add files... 打開檔案... - + Ctrl+O Ctrl+O - + Add folder... 打開檔案夾... - + Ctrl+Shift+O Ctrl+Shift+O - - + + Exit 退出 - + Del 刪除 - + Select All 全選 - + Ctrl+A Ctrl+A - + Clear 清空 - + Show previews 預覽 - + Preferences... 選項... - + Show original in file manager 在文件管理器中查看原圖 - + Show compressed in file manager 在文件管理器中查看壓縮圖 - + Donate 捐贈 - + Icons 圖標 - + Icons and Text 圖標和文本 - + Hide 隱藏 - + Show 顯示 - + Auto preview 自動預覽 - - + + Preview 預覽 - + Ctrl+P Ctrl+P - + Advanced import... - - - + + + % % - + images in list 張已選圖片 @@ -746,52 +751,52 @@ Saved: %4 (%5%) 選項 - + threads 線程 - + No action - + Close the application - + Sleep - + Shutdown - + Open output folder - + Perform an action after successful compression - + Threads priority - + Restart - + Close 關閉 @@ -869,32 +874,32 @@ Saved: %4 (%5%) 進階 - + When importing files directly 導入文件後 - + Import only 僅導入 - + Import and compress 導入並壓縮 - + This option applies when using command line or by dropping files to the application icon 該選項對使用命令行和拖動文件到應用圖標上有效 - + Multithreading 多線程 - + Changes will apply after restart 設定將在重啟後生效 @@ -921,7 +926,7 @@ Saved: %4 (%5%) QIODevice - + Image Files 圖片檔案 diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 7389eb58..42af0996 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -70,6 +70,7 @@ MainWindow::MainWindow(QWidget* parent) this->initListContextMenu(); this->initTrayIconContextMenu(); this->initTrayIcon(); + this->setupCompressButton(); ui->format_ComboBox->addItems(getOutputSupportedFormats()); this->setupChromaSubsamplingComboBox(); @@ -130,7 +131,7 @@ MainWindow::MainWindow(QWidget* parent) this->on_keepAspectRatio_CheckBox_toggled(ui->keepAspectRatio_CheckBox->isChecked()); this->on_doNotEnlarge_CheckBox_toggled(ui->doNotEnlarge_CheckBox->isChecked()); this->on_keepAspectRatio_CheckBox_toggled(ui->keepAspectRatio_CheckBox->isChecked()); - this->on_sameOutputFolderAsInput_CheckBox_toggled(ui->sameOutputFolderAsInput_CheckBox->isChecked()); + MainWindow::on_sameOutputFolderAsInput_CheckBox_toggled(ui->sameOutputFolderAsInput_CheckBox->isChecked()); this->moveOriginalFileToggled(ui->moveOriginalFile_CheckBox->isChecked()); this->on_fitTo_ComboBox_currentIndexChanged(ui->fitTo_ComboBox->currentIndex()); this->toggleLosslessWarningVisible(); @@ -139,9 +140,8 @@ MainWindow::MainWindow(QWidget* parent) ui->actionToolbarIcons_and_Text->setChecked(ui->toolBar->toolButtonStyle() == Qt::ToolButtonTextUnderIcon && !ui->toolBar->isHidden()); ui->actionToolbarHide->setChecked(ui->toolBar->isHidden()); - QSettings settings; - if (settings.value("preferences/general/send_usage_reports", true).toBool()) { - if (!settings.contains("access_token")) { + if (QSettings().value("preferences/general/send_usage_reports", true).toBool()) { + if (!QSettings().contains("access_token")) { this->networkOperations->requestToken(); } else { this->networkOperations->updateSystemInfo(); @@ -150,8 +150,7 @@ MainWindow::MainWindow(QWidget* parent) QCommandLineParser commandLineParser; commandLineParser.process(QApplication::arguments()); - const QStringList args = commandLineParser.positionalArguments(); - if (!args.isEmpty()) { + if (const QStringList args = commandLineParser.positionalArguments(); !args.isEmpty()) { this->importFromArgs(args); } @@ -180,10 +179,10 @@ void MainWindow::showEvent(QShowEvent* event) { QMainWindow::showEvent(event); - this->initUpdater(); + MainWindow::initUpdater(); } -void MainWindow::initStatusBar() +void MainWindow::initStatusBar() const { ui->statusbar->addPermanentWidget(ui->losslessWarning_Button); ui->statusbar->addPermanentWidget(ui->compressionProgress_Label); @@ -218,22 +217,21 @@ void MainWindow::initTrayIconContextMenu() connect(exitAction, &QAction::triggered, ui->actionExit, &QAction::triggered); } -void MainWindow::initListWidget() +void MainWindow::initListWidget() const { - QSettings settings; int defaultSectionSize = ui->imageList_TreeView->header()->defaultSectionSize(); this->proxyModel->setSourceModel(this->cImageModel); ui->imageList_TreeView->setModel(this->proxyModel); ui->imageList_TreeView->setIconSize(QSize(10, 10)); - ui->imageList_TreeView->header()->resizeSection(CImageColumns::NAME_COLUMN, settings.value("mainwindow/list_view/header_column_size/name", 250).toInt()); - ui->imageList_TreeView->header()->resizeSection(CImageColumns::SIZE_COLUMN, settings.value("mainwindow/list_view/header_column_size/size", defaultSectionSize).toInt()); - ui->imageList_TreeView->header()->resizeSection(CImageColumns::RESOLUTION_COLUMN, settings.value("mainwindow/list_view/header_column_size/resolution", defaultSectionSize).toInt()); - ui->imageList_TreeView->header()->resizeSection(CImageColumns::RATIO_COLUMN, settings.value("mainwindow/list_view/header_column_size/ratio", defaultSectionSize).toInt()); + ui->imageList_TreeView->header()->resizeSection(CImageColumns::NAME_COLUMN, QSettings().value("mainwindow/list_view/header_column_size/name", 250).toInt()); + ui->imageList_TreeView->header()->resizeSection(CImageColumns::SIZE_COLUMN, QSettings().value("mainwindow/list_view/header_column_size/size", defaultSectionSize).toInt()); + ui->imageList_TreeView->header()->resizeSection(CImageColumns::RESOLUTION_COLUMN, QSettings().value("mainwindow/list_view/header_column_size/resolution", defaultSectionSize).toInt()); + ui->imageList_TreeView->header()->resizeSection(CImageColumns::RATIO_COLUMN, QSettings().value("mainwindow/list_view/header_column_size/ratio", defaultSectionSize).toInt()); - ui->imageList_TreeView->header()->setSortIndicator(settings.value("mainwindow/list_view/sort_column_index", 0).toInt(), settings.value("mainwindow/list_view/sort_column_order", Qt::AscendingOrder).value()); + ui->imageList_TreeView->header()->setSortIndicator(QSettings().value("mainwindow/list_view/sort_column_index", 0).toInt(), QSettings().value("mainwindow/list_view/sort_column_order", Qt::AscendingOrder).value()); - ui->imageList_TreeView->header()->resizeSection(CImageColumns::RATIO_COLUMN, settings.value("mainwindow/list_view/header_column_size/ratio", defaultSectionSize).toInt()); - ui->imageList_TreeView->header()->resizeSection(CImageColumns::RATIO_COLUMN, settings.value("mainwindow/list_view/header_column_size/ratio", defaultSectionSize).toInt()); + ui->imageList_TreeView->header()->resizeSection(CImageColumns::RATIO_COLUMN, QSettings().value("mainwindow/list_view/header_column_size/ratio", defaultSectionSize).toInt()); + ui->imageList_TreeView->header()->resizeSection(CImageColumns::RATIO_COLUMN, QSettings().value("mainwindow/list_view/header_column_size/ratio", defaultSectionSize).toInt()); ui->imageList_TreeView->setItemDelegate(new HtmlDelegate()); } @@ -252,7 +250,7 @@ void MainWindow::initTrayIcon() this->trayIcon->show(); } -void MainWindow::on_actionAbout_Caesium_Image_Compressor_triggered() +void MainWindow::on_actionAbout_Caesium_Image_Compressor_triggered() const { aboutDialog->setWindowModality(Qt::NonModal); aboutDialog->show(); @@ -296,8 +294,7 @@ void MainWindow::triggerImportFolder() return; } - QSettings settings; - bool scanSubfolders = settings.value("preferences/general/import_subfolders", true).toBool(); + bool scanSubfolders = QSettings().value("preferences/general/import_subfolders", true).toBool(); QStringList fileList = Importer::scanDirectory(directoryPath, scanSubfolders); if (fileList.isEmpty()) { @@ -308,134 +305,126 @@ void MainWindow::triggerImportFolder() return this->importFiles(fileList, directoryPath); } -void MainWindow::writeSettings() +void MainWindow::writeSettings() const { - QSettings settings; - settings.setValue("mainwindow/geometry", this->saveGeometry()); - settings.setValue("mainwindow/window_state", this->saveState()); - settings.setValue("mainwindow/left_splitter_sizes", QVariant::fromValue>(ui->sidebar_HSplitter->sizes())); - settings.setValue("mainwindow/previews_visible", ui->actionShow_previews->isChecked()); - settings.setValue("mainwindow/auto_preview", ui->actionAuto_preview->isChecked()); + QSettings().setValue("mainwindow/geometry", this->saveGeometry()); + QSettings().setValue("mainwindow/window_state", this->saveState()); + QSettings().setValue("mainwindow/left_splitter_sizes", QVariant::fromValue>(ui->sidebar_HSplitter->sizes())); + QSettings().setValue("mainwindow/previews_visible", ui->actionShow_previews->isChecked()); + QSettings().setValue("mainwindow/auto_preview", ui->actionAuto_preview->isChecked()); if (ui->actionShow_previews->isChecked()) { - settings.setValue("mainwindow/main_splitter_sizes", QVariant::fromValue>(ui->main_VSplitter->sizes())); - } - settings.setValue("mainwindow/list_view/header_column_size/name", ui->imageList_TreeView->header()->sectionSize(CImageColumns::NAME_COLUMN)); - settings.setValue("mainwindow/list_view/header_column_size/size", ui->imageList_TreeView->header()->sectionSize(CImageColumns::SIZE_COLUMN)); - settings.setValue("mainwindow/list_view/header_column_size/resolution", ui->imageList_TreeView->header()->sectionSize(CImageColumns::RESOLUTION_COLUMN)); - settings.setValue("mainwindow/list_view/header_column_size/ratio", ui->imageList_TreeView->header()->sectionSize(CImageColumns::RATIO_COLUMN)); - settings.setValue("mainwindow/list_view/sort_column_index", ui->imageList_TreeView->header()->sortIndicatorSection()); - settings.setValue("mainwindow/list_view/sort_column_order", ui->imageList_TreeView->header()->sortIndicatorOrder()); - settings.setValue("mainwindow/toolbar/visible", ui->toolBar->isVisible()); - settings.setValue("mainwindow/toolbar/button_style", ui->toolBar->toolButtonStyle()); - settings.setValue("mainwindow/compression/jpeg_options_visible", ui->JPEGToggle_ToolButton->contentVisible()); - settings.setValue("mainwindow/compression/png_options_visible", ui->PNGToggle_ToolButton->contentVisible()); - settings.setValue("mainwindow/compression/webp_options_visible", ui->WebPToggle_ToolButton->contentVisible()); - settings.setValue("mainwindow/compression/tiff_options_visible", ui->TIFFToggle_ToolButton->contentVisible()); - - settings.setValue("compression_options/compression/mode", ui->compressionMode_ComboBox->currentIndex()); - settings.setValue("compression_options/compression/lossless", ui->lossless_CheckBox->isChecked()); - settings.setValue("compression_options/compression/keep_metadata", ui->keepMetadata_CheckBox->isChecked()); - settings.setValue("compression_options/compression/keep_structure", ui->keepStructure_CheckBox->isChecked()); - settings.setValue("compression_options/compression/jpeg_quality", ui->JPEGQuality_Slider->value()); - settings.setValue("compression_options/compression/jpeg_chroma_subsampling", ui->JPEGChromaSubsampling_ComboBox->currentData(Qt::UserRole)); - settings.setValue("compression_options/compression/png_quality", ui->PNGQuality_Slider->value()); - settings.setValue("compression_options/compression/png_optimization_level", ui->PNGOptimizationLevel_Slider->value()); - settings.setValue("compression_options/compression/webp_quality", ui->WebPQuality_Slider->value()); - settings.setValue("compression_options/compression/tiff_method", ui->TIFFCompressionMethod_ComboBox->currentIndex()); - settings.setValue("compression_options/compression/tiff_deflate_level", ui->TIFFDeflateLevel_Slider->value()); - settings.setValue("compression_options/compression/max_output_size", ui->maxOutputSize_SpinBox->value()); - settings.setValue("compression_options/compression/max_output_size_unit", ui->maxOutputSizeUnit_ComboBox->currentIndex()); - - settings.setValue("compression_options/resize/resize", ui->fitTo_ComboBox->currentIndex() != ResizeMode::NO_RESIZE); - settings.setValue("compression_options/resize/fit_to", ui->fitTo_ComboBox->currentIndex()); - settings.setValue("compression_options/resize/width", ui->width_SpinBox->value()); - settings.setValue("compression_options/resize/height", ui->height_SpinBox->value()); - settings.setValue("compression_options/resize/size", ui->edge_SpinBox->value()); - settings.setValue("compression_options/resize/keep_aspect_ratio", ui->keepAspectRatio_CheckBox->isChecked()); - settings.setValue("compression_options/resize/do_not_enlarge", ui->doNotEnlarge_CheckBox->isChecked()); - - settings.setValue("compression_options/output/output_folder", ui->outputFolder_LineEdit->text()); - settings.setValue("compression_options/output/output_suffix", ui->outputSuffix_LineEdit->text()); - settings.setValue("compression_options/output/same_folder_as_input", ui->sameOutputFolderAsInput_CheckBox->isChecked()); - settings.setValue("compression_options/output/skip_if_bigger", ui->skipIfBigger_CheckBox->isChecked()); - settings.setValue("compression_options/output/keep_dates", ui->keepDates_CheckBox->checkState()); - settings.setValue("compression_options/output/keep_creation_date", ui->keepCreationDate_CheckBox->isChecked()); - settings.setValue("compression_options/output/keep_last_modified_date", ui->keepLastModifiedDate_CheckBox->isChecked()); - settings.setValue("compression_options/output/keep_last_access_date", ui->keepLastAccessDate_CheckBox->isChecked()); - settings.setValue("compression_options/output/format", ui->format_ComboBox->currentIndex()); - settings.setValue("compression_options/output/move_original_file", ui->moveOriginalFile_CheckBox->isChecked()); - settings.setValue("compression_options/output/move_original_file_destination", ui->moveOriginalFile_ComboBox->currentIndex()); - - settings.setValue("extra/last_opened_directory", this->lastOpenedDirectory); -} - -void MainWindow::writeSetting(const QString& key, const QVariant& value) -{ - QSettings().setValue(key, value); + QSettings().setValue("mainwindow/main_splitter_sizes", QVariant::fromValue>(ui->main_VSplitter->sizes())); + } + QSettings().setValue("mainwindow/list_view/header_column_size/name", ui->imageList_TreeView->header()->sectionSize(CImageColumns::NAME_COLUMN)); + QSettings().setValue("mainwindow/list_view/header_column_size/size", ui->imageList_TreeView->header()->sectionSize(CImageColumns::SIZE_COLUMN)); + QSettings().setValue("mainwindow/list_view/header_column_size/resolution", ui->imageList_TreeView->header()->sectionSize(CImageColumns::RESOLUTION_COLUMN)); + QSettings().setValue("mainwindow/list_view/header_column_size/ratio", ui->imageList_TreeView->header()->sectionSize(CImageColumns::RATIO_COLUMN)); + QSettings().setValue("mainwindow/list_view/sort_column_index", ui->imageList_TreeView->header()->sortIndicatorSection()); + QSettings().setValue("mainwindow/list_view/sort_column_order", ui->imageList_TreeView->header()->sortIndicatorOrder()); + QSettings().setValue("mainwindow/toolbar/visible", ui->toolBar->isVisible()); + QSettings().setValue("mainwindow/toolbar/button_style", ui->toolBar->toolButtonStyle()); + QSettings().setValue("mainwindow/compression/jpeg_options_visible", ui->JPEGToggle_ToolButton->contentVisible()); + QSettings().setValue("mainwindow/compression/png_options_visible", ui->PNGToggle_ToolButton->contentVisible()); + QSettings().setValue("mainwindow/compression/webp_options_visible", ui->WebPToggle_ToolButton->contentVisible()); + QSettings().setValue("mainwindow/compression/tiff_options_visible", ui->TIFFToggle_ToolButton->contentVisible()); + + QSettings().setValue("compression_options/compression/mode", ui->compressionMode_ComboBox->currentIndex()); + QSettings().setValue("compression_options/compression/lossless", ui->lossless_CheckBox->isChecked()); + QSettings().setValue("compression_options/compression/keep_metadata", ui->keepMetadata_CheckBox->isChecked()); + QSettings().setValue("compression_options/compression/keep_structure", ui->keepStructure_CheckBox->isChecked()); + QSettings().setValue("compression_options/compression/jpeg_quality", ui->JPEGQuality_Slider->value()); + QSettings().setValue("compression_options/compression/jpeg_chroma_subsampling", ui->JPEGChromaSubsampling_ComboBox->currentData(Qt::UserRole)); + QSettings().setValue("compression_options/compression/png_quality", ui->PNGQuality_Slider->value()); + QSettings().setValue("compression_options/compression/png_optimization_level", ui->PNGOptimizationLevel_Slider->value()); + QSettings().setValue("compression_options/compression/webp_quality", ui->WebPQuality_Slider->value()); + QSettings().setValue("compression_options/compression/tiff_method", ui->TIFFCompressionMethod_ComboBox->currentIndex()); + QSettings().setValue("compression_options/compression/tiff_deflate_level", ui->TIFFDeflateLevel_Slider->value()); + QSettings().setValue("compression_options/compression/max_output_size", ui->maxOutputSize_SpinBox->value()); + QSettings().setValue("compression_options/compression/max_output_size_unit", ui->maxOutputSizeUnit_ComboBox->currentIndex()); + + QSettings().setValue("compression_options/resize/resize", ui->fitTo_ComboBox->currentIndex() != ResizeMode::NO_RESIZE); + QSettings().setValue("compression_options/resize/fit_to", ui->fitTo_ComboBox->currentIndex()); + QSettings().setValue("compression_options/resize/width", ui->width_SpinBox->value()); + QSettings().setValue("compression_options/resize/height", ui->height_SpinBox->value()); + QSettings().setValue("compression_options/resize/size", ui->edge_SpinBox->value()); + QSettings().setValue("compression_options/resize/keep_aspect_ratio", ui->keepAspectRatio_CheckBox->isChecked()); + QSettings().setValue("compression_options/resize/do_not_enlarge", ui->doNotEnlarge_CheckBox->isChecked()); + + QSettings().setValue("compression_options/output/output_folder", ui->outputFolder_LineEdit->text()); + QSettings().setValue("compression_options/output/output_suffix", ui->outputSuffix_LineEdit->text()); + QSettings().setValue("compression_options/output/same_folder_as_input", ui->sameOutputFolderAsInput_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/skip_if_bigger", ui->skipIfBigger_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_dates", ui->keepDates_CheckBox->checkState()); + QSettings().setValue("compression_options/output/keep_creation_date", ui->keepCreationDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_last_modified_date", ui->keepLastModifiedDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_last_access_date", ui->keepLastAccessDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/format", ui->format_ComboBox->currentIndex()); + QSettings().setValue("compression_options/output/move_original_file", ui->moveOriginalFile_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/move_original_file_destination", ui->moveOriginalFile_ComboBox->currentIndex()); + + QSettings().setValue("extra/last_opened_directory", this->lastOpenedDirectory); } void MainWindow::readSettings() { - QSettings settings; - this->restoreGeometry(settings.value("mainwindow/geometry").toByteArray()); - this->restoreState(settings.value("mainwindow/window_state").toByteArray()); - ui->sidebar_HSplitter->setSizes(settings.value("mainwindow/left_splitter_sizes", QVariant::fromValue>({ 600, 1 })).value>()); - ui->main_VSplitter->setSizes(settings.value("mainwindow/main_splitter_sizes", QVariant::fromValue>({ 500, 250 })).value>()); - ui->actionShow_previews->setChecked(settings.value("mainwindow/previews_visible", true).toBool()); - ui->actionAuto_preview->setChecked(settings.value("mainwindow/auto_preview", false).toBool()); - ui->toolBar->setVisible(settings.value("mainwindow/toolbar/visible", true).toBool()); - ui->toolBar->setToolButtonStyle(settings.value("mainwindow/toolbar/button_style", Qt::ToolButtonIconOnly).value()); - ui->JPEGToggle_ToolButton->setContentVisible(settings.value("mainwindow/compression/jpeg_options_visible", true).toBool()); - ui->PNGToggle_ToolButton->setContentVisible(settings.value("mainwindow/compression/png_options_visible", true).toBool()); - ui->WebPToggle_ToolButton->setContentVisible(settings.value("mainwindow/compression/webp_options_visible", true).toBool()); - ui->TIFFToggle_ToolButton->setContentVisible(settings.value("mainwindow/compression/tiff_options_visible", true).toBool()); - - ui->compressionMode_ComboBox->setCurrentIndex(settings.value("compression_options/compression/mode", 0).toInt()); - ui->lossless_CheckBox->setChecked(settings.value("compression_options/compression/lossless", false).toBool()); - ui->keepMetadata_CheckBox->setChecked(settings.value("compression_options/compression/keep_metadata", true).toBool()); - ui->keepStructure_CheckBox->setChecked(settings.value("compression_options/compression/keep_structure", false).toBool()); - ui->JPEGQuality_Slider->setValue(settings.value("compression_options/compression/jpeg_quality", 80).toInt()); - ui->JPEGChromaSubsampling_ComboBox->setCurrentIndex(static_cast(getChromaSubsamplingOptions().keys().indexOf(settings.value("compression_options/compression/jpeg_chroma_subsampling", 0).toInt()))); - ui->PNGQuality_SpinBox->setValue(settings.value("compression_options/compression/png_quality", 80).toInt()); - ui->PNGOptimizationLevel_Slider->setValue(settings.value("compression_options/compression/png_optimization_level", 3).toInt()); - ui->JPEGQuality_SpinBox->setValue(settings.value("compression_options/compression/jpeg_quality", 80).toInt()); - ui->WebPQuality_SpinBox->setValue(settings.value("compression_options/compression/webp_quality", 60).toInt()); - ui->TIFFCompressionMethod_ComboBox->setCurrentIndex(settings.value("compression_options/compression/tiff_method", 1).toInt()); - ui->TIFFDeflateLevel_Slider->setValue(settings.value("compression_options/compression/tiff_deflate_level", 2).toInt()); - ui->maxOutputSize_SpinBox->setValue(settings.value("compression_options/compression/max_output_size", 500).toInt()); - ui->maxOutputSizeUnit_ComboBox->setCurrentIndex(settings.value("compression_options/compression/max_output_size_unit", 0).toInt()); - - ui->fitTo_ComboBox->setCurrentIndex(settings.value("compression_options/resize/fit_to", 0).toInt()); - ui->width_SpinBox->setValue(settings.value("compression_options/resize/width", 1000).toInt()); - ui->height_SpinBox->setValue(settings.value("compression_options/resize/height", 1000).toInt()); - ui->edge_SpinBox->setValue(settings.value("compression_options/resize/size", 1000).toInt()); - ui->keepAspectRatio_CheckBox->setChecked(settings.value("compression_options/resize/keep_aspect_ratio", false).toBool()); - ui->doNotEnlarge_CheckBox->setChecked(settings.value("compression_options/resize/do_not_enlarge", false).toBool()); - - ui->outputFolder_LineEdit->setText(settings.value("compression_options/output/output_folder", "").toString()); - ui->outputSuffix_LineEdit->setText(settings.value("compression_options/output/output_suffix", "").toString()); - ui->sameOutputFolderAsInput_CheckBox->setChecked(settings.value("compression_options/output/same_folder_as_input", false).toBool()); - ui->skipIfBigger_CheckBox->setChecked(settings.value("compression_options/output/skip_if_bigger", true).toBool()); - ui->keepDates_CheckBox->setCheckState(settings.value("compression_options/output/keep_dates", Qt::Unchecked).value()); - ui->keepCreationDate_CheckBox->setChecked(settings.value("compression_options/output/keep_creation_date", false).toBool()); - ui->keepLastModifiedDate_CheckBox->setChecked(settings.value("compression_options/output/keep_last_modified_date", false).toBool()); - ui->keepLastAccessDate_CheckBox->setChecked(settings.value("compression_options/output/keep_last_access_date", false).toBool()); - ui->format_ComboBox->setCurrentIndex(settings.value("compression_options/output/format", 0).toInt()); - ui->moveOriginalFile_CheckBox->setChecked(settings.value("compression_options/output/move_original_file", settings.value("compression_options/output/move_original_to_trash", false).toBool()).toBool()); // Trying to get legacy value - ui->moveOriginalFile_ComboBox->setCurrentIndex(settings.value("compression_options/output/move_original_file_destination", 0).toInt()); - - this->lastOpenedDirectory = settings.value("extra/last_opened_directory", QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).at(0)).toString(); -} - -void MainWindow::previewImage(const QModelIndex& imageIndex, bool forceRuntimePreview) + this->restoreGeometry(QSettings().value("mainwindow/geometry").toByteArray()); + this->restoreState(QSettings().value("mainwindow/window_state").toByteArray()); + ui->sidebar_HSplitter->setSizes(QSettings().value("mainwindow/left_splitter_sizes", QVariant::fromValue>({ 600, 1 })).value>()); + ui->main_VSplitter->setSizes(QSettings().value("mainwindow/main_splitter_sizes", QVariant::fromValue>({ 500, 250 })).value>()); + ui->actionShow_previews->setChecked(QSettings().value("mainwindow/previews_visible", true).toBool()); + ui->actionAuto_preview->setChecked(QSettings().value("mainwindow/auto_preview", false).toBool()); + ui->toolBar->setVisible(QSettings().value("mainwindow/toolbar/visible", true).toBool()); + ui->toolBar->setToolButtonStyle(QSettings().value("mainwindow/toolbar/button_style", Qt::ToolButtonIconOnly).value()); + ui->JPEGToggle_ToolButton->setContentVisible(QSettings().value("mainwindow/compression/jpeg_options_visible", true).toBool()); + ui->PNGToggle_ToolButton->setContentVisible(QSettings().value("mainwindow/compression/png_options_visible", true).toBool()); + ui->WebPToggle_ToolButton->setContentVisible(QSettings().value("mainwindow/compression/webp_options_visible", true).toBool()); + ui->TIFFToggle_ToolButton->setContentVisible(QSettings().value("mainwindow/compression/tiff_options_visible", true).toBool()); + + ui->compressionMode_ComboBox->setCurrentIndex(QSettings().value("compression_options/compression/mode", 0).toInt()); + ui->lossless_CheckBox->setChecked(QSettings().value("compression_options/compression/lossless", false).toBool()); + ui->keepMetadata_CheckBox->setChecked(QSettings().value("compression_options/compression/keep_metadata", true).toBool()); + ui->keepStructure_CheckBox->setChecked(QSettings().value("compression_options/compression/keep_structure", false).toBool()); + ui->JPEGQuality_Slider->setValue(QSettings().value("compression_options/compression/jpeg_quality", 80).toInt()); + ui->JPEGChromaSubsampling_ComboBox->setCurrentIndex(static_cast(getChromaSubsamplingOptions().keys().indexOf(QSettings().value("compression_options/compression/jpeg_chroma_subsampling", 0).toInt()))); + ui->PNGQuality_SpinBox->setValue(QSettings().value("compression_options/compression/png_quality", 80).toInt()); + ui->PNGOptimizationLevel_Slider->setValue(QSettings().value("compression_options/compression/png_optimization_level", 3).toInt()); + ui->JPEGQuality_SpinBox->setValue(QSettings().value("compression_options/compression/jpeg_quality", 80).toInt()); + ui->WebPQuality_SpinBox->setValue(QSettings().value("compression_options/compression/webp_quality", 60).toInt()); + ui->TIFFCompressionMethod_ComboBox->setCurrentIndex(QSettings().value("compression_options/compression/tiff_method", 1).toInt()); + ui->TIFFDeflateLevel_Slider->setValue(QSettings().value("compression_options/compression/tiff_deflate_level", 2).toInt()); + ui->maxOutputSize_SpinBox->setValue(QSettings().value("compression_options/compression/max_output_size", 500).toInt()); + ui->maxOutputSizeUnit_ComboBox->setCurrentIndex(QSettings().value("compression_options/compression/max_output_size_unit", 0).toInt()); + + ui->fitTo_ComboBox->setCurrentIndex(QSettings().value("compression_options/resize/fit_to", 0).toInt()); + ui->width_SpinBox->setValue(QSettings().value("compression_options/resize/width", 1000).toInt()); + ui->height_SpinBox->setValue(QSettings().value("compression_options/resize/height", 1000).toInt()); + ui->edge_SpinBox->setValue(QSettings().value("compression_options/resize/size", 1000).toInt()); + ui->keepAspectRatio_CheckBox->setChecked(QSettings().value("compression_options/resize/keep_aspect_ratio", false).toBool()); + ui->doNotEnlarge_CheckBox->setChecked(QSettings().value("compression_options/resize/do_not_enlarge", false).toBool()); + + ui->outputFolder_LineEdit->setText(QSettings().value("compression_options/output/output_folder", "").toString()); + ui->outputSuffix_LineEdit->setText(QSettings().value("compression_options/output/output_suffix", "").toString()); + ui->sameOutputFolderAsInput_CheckBox->setChecked(QSettings().value("compression_options/output/same_folder_as_input", false).toBool()); + ui->skipIfBigger_CheckBox->setChecked(QSettings().value("compression_options/output/skip_if_bigger", true).toBool()); + ui->keepDates_CheckBox->setCheckState(QSettings().value("compression_options/output/keep_dates", Qt::Unchecked).value()); + ui->keepCreationDate_CheckBox->setChecked(QSettings().value("compression_options/output/keep_creation_date", false).toBool()); + ui->keepLastModifiedDate_CheckBox->setChecked(QSettings().value("compression_options/output/keep_last_modified_date", false).toBool()); + ui->keepLastAccessDate_CheckBox->setChecked(QSettings().value("compression_options/output/keep_last_access_date", false).toBool()); + ui->format_ComboBox->setCurrentIndex(QSettings().value("compression_options/output/format", 0).toInt()); + ui->moveOriginalFile_CheckBox->setChecked(QSettings().value("compression_options/output/move_original_file", QSettings().value("compression_options/output/move_original_to_trash", false).toBool()).toBool()); // Trying to get legacy value + ui->moveOriginalFile_ComboBox->setCurrentIndex(QSettings().value("compression_options/output/move_original_file_destination", 0).toInt()); + + this->lastOpenedDirectory = QSettings().value("extra/last_opened_directory", QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).at(0)).toString(); +} + +void MainWindow::previewImage(const QModelIndex& imageIndex, bool forceRuntimePreview) const { if (this->previewWatcher->isRunning()) { this->previewWatcher->cancel(); this->previewWatcher->waitForFinished(); } - QSettings settings; - if (!settings.value("mainwindow/previews_visible", false).toBool()) { + if (!QSettings().value("mainwindow/previews_visible", false).toBool()) { return; } ui->preview_GraphicsView->removePixmap(); @@ -454,7 +443,7 @@ void MainWindow::previewImage(const QModelIndex& imageIndex, bool forceRuntimePr images.append(std::pair(cImage->getFullPath(), false)); // TODO Manage failure better - std::function)> loadPixmap = [this, forceRuntimePreview, cImage](std::pair pair) { + std::function)> loadPixmap = [this, forceRuntimePreview, cImage](const std::pair& pair) { QString previewFullPath = pair.first; ImagePreview imagePreview; bool isOnFlyPreview = false; @@ -519,7 +508,7 @@ void MainWindow::updateFolderMap(QString baseFolder, int count) void MainWindow::importFiles(const QStringList& fileList, QString baseFolder) { - int listLength = (int)fileList.count(); + int listLength = static_cast(fileList.count()); QProgressDialog progressDialog(tr("Importing files..."), tr("Cancel"), 0, listLength, this); progressDialog.setWindowModality(Qt::WindowModal); @@ -545,7 +534,7 @@ void MainWindow::importFiles(const QStringList& fileList, QString baseFolder) } if (!list.isEmpty() && listLength > 0) { - this->updateFolderMap(std::move(baseFolder), (int)list.count()); + this->updateFolderMap(std::move(baseFolder), static_cast(list.count())); QString rootFolder = Importer::getRootFolder(this->folderMap.keys()); this->cImageModel->appendItems(list, rootFolder); this->importedFilesRootFolder = rootFolder; @@ -587,9 +576,8 @@ void MainWindow::on_compress_Button_clicked() this->startCompression(); } -void MainWindow::startCompression() +void MainWindow::startCompression(bool onlyFailed) { - QSettings settings; if (ui->outputFolder_LineEdit->text().isEmpty() && !ui->sameOutputFolderAsInput_CheckBox->isChecked()) { QCaesiumMessageBox msgBox; @@ -603,7 +591,7 @@ void MainWindow::startCompression() QString rootFolder = Importer::getRootFolder(this->folderMap.keys()); - bool skipDialogs = settings.value("preferences/general/skip_compression_dialogs").toBool(); + bool skipDialogs = QSettings().value("preferences/general/skip_compression_dialogs").toBool(); bool overwriteWarningFlag = (ui->sameOutputFolderAsInput_CheckBox->isChecked() && ui->outputSuffix_LineEdit->text().isEmpty()) || rootFolder == ui->outputFolder_LineEdit->text(); @@ -627,14 +615,14 @@ void MainWindow::startCompression() return; } - if (!settings.value("preferences/general/multithreading", true).toBool()) { + if (!QSettings().value("preferences/general/multithreading", true).toBool()) { QThreadPool::globalInstance()->setMaxThreadCount(1); } else { - int maxThreads = settings.value("preferences/general/multithreading_max_threads", QThread::idealThreadCount()).toInt(); + int maxThreads = QSettings().value("preferences/general/multithreading_max_threads", QThread::idealThreadCount()).toInt(); QThreadPool::globalInstance()->setMaxThreadCount(maxThreads); } - qDebug() << settings.value("preferences/general/threads_priority", QThread::NormalPriority).value(); - QThreadPool::globalInstance()->setThreadPriority(settings.value("preferences/general/threads_priority", QThread::NormalPriority).value()); + qDebug() << QSettings().value("preferences/general/threads_priority", QThread::NormalPriority).value(); + QThreadPool::globalInstance()->setThreadPriority(QSettings().value("preferences/general/threads_priority", QThread::NormalPriority).value()); this->compressionWatcher = new QFutureWatcher(); connect(this->compressionWatcher, &QFutureWatcherBase::finished, this, &MainWindow::compressionFinished); @@ -654,7 +642,12 @@ void MainWindow::startCompression() CompressionOptions compressionOptions = this->getCompressionOptions(rootFolder); - this->compressionWatcher->setFuture(this->cImageModel->getRootItem()->compress(compressionOptions)); + if (onlyFailed) { + this->compressionWatcher->setFuture(this->cImageModel->getRootItem()->compressOnlyFailed(compressionOptions)); + } else { + this->compressionWatcher->setFuture(this->cImageModel->getRootItem()->compress(compressionOptions)); + } + compressionSummary.totalImages = this->cImageModel->rowCount(); compressionSummary.totalUncompressedSize = this->cImageModel->originalItemsSize(); compressionSummary.totalCompressedSize = 0; @@ -665,7 +658,7 @@ void MainWindow::startCompression() compressionTimer.start(); } -CompressionOptions MainWindow::getCompressionOptions(QString rootFolder) +CompressionOptions MainWindow::getCompressionOptions(const QString& rootFolder) const { FileDatesOutputOption datesMap = { ui->keepCreationDate_CheckBox->isChecked(), @@ -724,8 +717,7 @@ void MainWindow::on_removeFiles_Button_clicked() void MainWindow::closeEvent(QCloseEvent* event) { - QSettings settings; - if (settings.value("preferences/general/prompt_before_exit", false).toBool()) { + if (QSettings().value("preferences/general/prompt_before_exit", false).toBool()) { QCaesiumMessageBox exitPrompt; exitPrompt.setText(tr("Do you really want to quit?")); exitPrompt.setStandardButtons(QMessageBox::Yes | QMessageBox::No); @@ -742,7 +734,7 @@ void MainWindow::closeEvent(QCloseEvent* event) } this->writeSettings(); - this->clearCache(); + MainWindow::clearCache(); this->previewWatcher->waitForFinished(); qInfo() << "---- Closing application ----"; Logger::closeLogFile(); @@ -759,13 +751,13 @@ void MainWindow::on_outputFolderBrowse_Button_clicked() if (!directoryPath.isEmpty()) { ui->outputFolder_LineEdit->setText(directoryPath); - this->writeSetting("compression_options/output/output_folder", directoryPath); + QSettings().setValue("compression_options/output/output_folder", directoryPath); } } void MainWindow::on_outputSuffix_LineEdit_textChanged(const QString& arg1) { - this->writeSetting("compression_options/output/output_suffix", arg1); + QSettings().setValue("compression_options/output/output_suffix", arg1); } void MainWindow::imageList_selectionChanged() @@ -802,7 +794,6 @@ void MainWindow::imageList_selectionChanged() void MainWindow::compressionFinished() { this->cImageModel->getRootItem()->setCompressionCanceled(false); - QSettings settings; if (ui->imageList_TreeView->selectionModel()->selectedRows().count() > 0) { this->previewImage(this->proxyModel->mapToSource(ui->imageList_TreeView->selectionModel()->selectedRows().at(0))); } @@ -810,7 +801,7 @@ void MainWindow::compressionFinished() compressionSummary.totalCompressedSize = this->cImageModel->compressedItemsSize(); compressionSummary.elapsedTime = compressionTimer.isValid() ? compressionTimer.elapsed() : 0; - if (settings.value("preferences/general/send_usage_reports", true).toBool()) { + if (QSettings().value("preferences/general/send_usage_reports", true).toBool()) { this->networkOperations->sendUsageReport(compressionSummary); } @@ -828,14 +819,14 @@ void MainWindow::compressionFinished() ui->compressionProgress_Label->hide(); this->toggleUIEnabled(true); - PostCompressionAction postCompressionAction = static_cast(settings.value("preferences/general/post_compression_action", 0).toInt()); + PostCompressionAction postCompressionAction = static_cast(QSettings().value("preferences/general/post_compression_action", 0).toInt()); if (postCompressionAction != PostCompressionAction::NO_ACTION) { PostCompressionActions::runAction(postCompressionAction, ui->outputFolder_LineEdit->text()); return; } this->trayIcon->showMessage(title, tr("You just saved %1!").arg(saved), QSystemTrayIcon::NoIcon); - if (!settings.value("preferences/general/skip_compression_dialogs").toBool()) { + if (!QSettings().value("preferences/general/skip_compression_dialogs").toBool()) { QCaesiumMessageBox compressionSummaryDialog; compressionSummaryDialog.setText(title); compressionSummaryDialog.setInformativeText(tr("Total files: %1\nOriginal size: %2\nCompressed size: %3\nSaved: %4 (%5%)") @@ -860,15 +851,14 @@ void MainWindow::on_actionClear_triggered() this->removeFiles(true); } -void MainWindow::dropFinished(QStringList filePaths) +void MainWindow::dropFinished(const QStringList& filePaths) { QString baseFolder = Importer::getRootFolder(filePaths); this->importFiles(filePaths, baseFolder); } -void MainWindow::on_fitTo_ComboBox_currentIndexChanged(int index) +void MainWindow::on_fitTo_ComboBox_currentIndexChanged(int index) const { - QSettings settings; switch (index) { default: case ResizeMode::NO_RESIZE: @@ -939,18 +929,18 @@ void MainWindow::on_fitTo_ComboBox_currentIndexChanged(int index) break; } - this->writeSetting("compression_options/resize/fit_to", index); + QSettings().setValue("compression_options/resize/fit_to", index); this->toggleLosslessWarningVisible(); } -void MainWindow::on_width_SpinBox_valueChanged(int value) +void MainWindow::on_width_SpinBox_valueChanged(int value) const { if (ui->fitTo_ComboBox->currentIndex() == ResizeMode::PERCENTAGE && ui->keepAspectRatio_CheckBox->isChecked()) { ui->height_SpinBox->setValue(value); } } -void MainWindow::on_height_SpinBox_valueChanged(int value) +void MainWindow::on_height_SpinBox_valueChanged(int value) const { if (ui->fitTo_ComboBox->currentIndex() == ResizeMode::PERCENTAGE && ui->keepAspectRatio_CheckBox->isChecked()) { ui->width_SpinBox->setValue(value); @@ -959,18 +949,18 @@ void MainWindow::on_height_SpinBox_valueChanged(int value) void MainWindow::on_edge_SpinBox_valueChanged(int value) { - this->writeSetting("compression_options/resize/size", value); + QSettings().setValue("compression_options/resize/size", value); } -void MainWindow::on_keepAspectRatio_CheckBox_toggled(bool checked) +void MainWindow::on_keepAspectRatio_CheckBox_toggled(bool checked) const { if (ui->fitTo_ComboBox->currentIndex() == ResizeMode::PERCENTAGE && checked) { ui->height_SpinBox->setValue(ui->width_SpinBox->value()); } - this->writeSetting("compression_options/resize/keep_aspect_ratio", checked); + QSettings().setValue("compression_options/resize/keep_aspect_ratio", checked); } -void MainWindow::on_doNotEnlarge_CheckBox_toggled(bool checked) +void MainWindow::on_doNotEnlarge_CheckBox_toggled(bool checked) const { if (ui->fitTo_ComboBox->currentIndex() == ResizeMode::PERCENTAGE && checked) { ui->width_SpinBox->setMaximum(100); @@ -980,27 +970,27 @@ void MainWindow::on_doNotEnlarge_CheckBox_toggled(bool checked) ui->width_SpinBox->setMaximum(maximum); ui->height_SpinBox->setMaximum(maximum); } - this->writeSetting("compression_options/resize/do_not_enlarge", checked); + QSettings().setValue("compression_options/resize/do_not_enlarge", checked); } -void MainWindow::on_actionSelect_All_triggered() +void MainWindow::on_actionSelect_All_triggered() const { ui->imageList_TreeView->selectAll(); } void MainWindow::on_sameOutputFolderAsInput_CheckBox_toggled(bool checked) { - this->writeSetting("compression_options/output/same_folder_as_input", checked); + QSettings().setValue("compression_options/output/same_folder_as_input", checked); } void MainWindow::on_keepStructure_CheckBox_toggled(bool checked) { - this->writeSetting("compression_options/compression/keep_structure", checked); + QSettings().setValue("compression_options/compression/keep_structure", checked); } -void MainWindow::on_lossless_CheckBox_toggled(bool checked) +void MainWindow::on_lossless_CheckBox_toggled(bool checked) const { - this->writeSetting("compression_options/compression/lossless", checked); + QSettings().setValue("compression_options/compression/lossless", checked); ui->JPEGOptions_Frame->setEnabled(!checked); ui->WebPOptions_Frame->setEnabled(!checked); @@ -1017,10 +1007,10 @@ void MainWindow::on_lossless_CheckBox_toggled(bool checked) void MainWindow::on_keepMetadata_CheckBox_toggled(bool checked) { - this->writeSetting("compression_options/compression/keep_metadata", checked); + QSettings().setValue("compression_options/compression/keep_metadata", checked); } -void MainWindow::onJPEGQualityValueChanged(int value) +void MainWindow::onJPEGQualityValueChanged(int value) const { if (ui->JPEGQuality_Slider->value() != value) { ui->JPEGQuality_Slider->setValue(value); @@ -1029,10 +1019,10 @@ void MainWindow::onJPEGQualityValueChanged(int value) if (ui->JPEGQuality_SpinBox->value() != value) { ui->JPEGQuality_SpinBox->setValue(value); } - this->writeSetting("compression_options/compression/jpeg_quality", value); + QSettings().setValue("compression_options/compression/jpeg_quality", value); } -void MainWindow::onPNGQualityValueChanged(int value) +void MainWindow::onPNGQualityValueChanged(int value) const { if (ui->PNGQuality_SpinBox->value() != value) { ui->PNGQuality_SpinBox->setValue(value); @@ -1040,10 +1030,10 @@ void MainWindow::onPNGQualityValueChanged(int value) if (ui->PNGQuality_Slider->value() != value) { ui->PNGQuality_Slider->setValue(value); } - this->writeSetting("compression_options/compression/png_quality", value); + QSettings().setValue("compression_options/compression/png_quality", value); } -void MainWindow::onWebPQualityValueChanged(int value) +void MainWindow::onWebPQualityValueChanged(int value) const { if (ui->WebPQuality_SpinBox->value() != value) { ui->WebPQuality_SpinBox->setValue(value); @@ -1051,10 +1041,10 @@ void MainWindow::onWebPQualityValueChanged(int value) if (ui->WebPQuality_Slider->value() != value) { ui->WebPQuality_Slider->setValue(value); } - this->writeSetting("compression_options/compression/webp_quality", value); + QSettings().setValue("compression_options/compression/webp_quality", value); } -void MainWindow::cModelItemsChanged() +void MainWindow::cModelItemsChanged() const { int itemsCount = this->cImageModel->rowCount(); QString humanItemsCount = QString::number(itemsCount); @@ -1074,51 +1064,42 @@ void MainWindow::cModelItemsChanged() void MainWindow::initUpdater() { - QSettings settings; - bool isPortable = false; -#ifdef IS_PORTABLE - isPortable = true; -#endif + #ifdef Q_OS_MAC CocoaInitializer initializer; auto updater = new SparkleAutoUpdater("https://saerasoft.com/repository/com.saerasoft.caesium/osx/appcast.xml"); - updater->setCheckForUpdatesAutomatically(settings.value("preferences/general/check_updates_at_startup", true).toBool()); - if (settings.value("preferences/general/check_updates_at_startup", true).toBool()) { + updater->setCheckForUpdatesAutomatically(QSettings().value("preferences/general/check_updates_at_startup", true).toBool()); + if (QSettings().value("preferences/general/check_updates_at_startup", true).toBool()) { updater->checkForUpdates(); } #endif -#ifdef Q_OS_WIN - if (isPortable) { - return; - } - - QString locale = LanguageManager::getLocaleFromPreferences(settings.value("preferences/language/locale", "default")); +#if defined(Q_OS_WIN) && !defined(IS_PORTABLE) + QString locale = LanguageManager::getLocaleFromPreferences(QSettings().value("preferences/language/locale", "default")); if (locale != "default") { win_sparkle_set_lang(locale.replace('_', '-').toUtf8().constData()); } win_sparkle_set_appcast_url("https://saerasoft.com/repository/com.saerasoft.caesium/win/appcast.xml"); win_sparkle_init(); - if (settings.value("preferences/general/check_updates_at_startup", true).toBool()) { + if (QSettings().value("preferences/general/check_updates_at_startup", true).toBool()) { win_sparkle_check_update_without_ui(); } #endif } -void MainWindow::on_actionShow_previews_toggled(bool toggled) +void MainWindow::on_actionShow_previews_toggled(bool toggled) const { ui->main_VSplitter->setChildrenCollapsible(!toggled); ui->main_VSplitter->handle(1)->setEnabled(toggled); - this->writeSetting("mainwindow/previews_visible", toggled); + QSettings().setValue("mainwindow/previews_visible", toggled); if (!toggled) { - this->writeSetting("mainwindow/main_splitter_sizes", QVariant::fromValue>(ui->main_VSplitter->sizes())); + QSettings().setValue("mainwindow/main_splitter_sizes", QVariant::fromValue>(ui->main_VSplitter->sizes())); ui->main_VSplitter->setSizes(QList({ 500, 0 })); } else { - QSettings settings; - ui->main_VSplitter->setSizes(settings.value("mainwindow/main_splitter_sizes", QVariant::fromValue>({ 500, 250 })).value>()); + ui->main_VSplitter->setSizes(QSettings().value("mainwindow/main_splitter_sizes", QVariant::fromValue>({ 500, 250 })).value>()); if (this->selectedCount == 1) { bool autoPreview = QSettings().value("mainwindow/auto_preview", false).toBool(); this->previewImage(this->proxyModel->mapToSource(this->selectedIndexes.at(0)), autoPreview); @@ -1126,7 +1107,7 @@ void MainWindow::on_actionShow_previews_toggled(bool toggled) } } -void MainWindow::showListContextMenu(const QPoint& pos) +void MainWindow::showListContextMenu(const QPoint& pos) const { this->listContextMenu->exec(ui->imageList_TreeView->viewport()->mapToGlobal(pos)); } @@ -1139,10 +1120,10 @@ void MainWindow::on_actionPreferences_triggered() preferencesDialog->show(); } -void MainWindow::keepDatesButtonGroupClicked() +void MainWindow::keepDatesButtonGroupClicked() const { int checkedCount = 0; - int totalButtons = (int)this->keepDatesButtonGroup->buttons().count(); + int totalButtons = static_cast(this->keepDatesButtonGroup->buttons().count()); Qt::CheckState mainCheckboxState = Qt::PartiallyChecked; foreach (QAbstractButton* button, this->keepDatesButtonGroup->buttons()) { checkedCount += button->isChecked() ? 1 : 0; @@ -1156,12 +1137,12 @@ void MainWindow::keepDatesButtonGroupClicked() ui->keepDates_CheckBox->setCheckState(mainCheckboxState); - this->writeSetting("compression_options/output/keep_creation_date", ui->keepCreationDate_CheckBox->isChecked()); - this->writeSetting("compression_options/output/keep_last_modified_date", ui->keepLastModifiedDate_CheckBox->isChecked()); - this->writeSetting("compression_options/output/keep_last_access_date", ui->keepLastAccessDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_creation_date", ui->keepCreationDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_last_modified_date", ui->keepLastModifiedDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_last_access_date", ui->keepLastAccessDate_CheckBox->isChecked()); } -void MainWindow::on_keepDates_CheckBox_clicked() +void MainWindow::on_keepDates_CheckBox_clicked() const { if (ui->keepDates_CheckBox->checkState() == Qt::PartiallyChecked) { return; @@ -1172,17 +1153,17 @@ void MainWindow::on_keepDates_CheckBox_clicked() button->setChecked(mainChecked); } - this->writeSetting("compression_options/output/keep_creation_date", ui->keepCreationDate_CheckBox->isChecked()); - this->writeSetting("compression_options/output/keep_last_modified_date", ui->keepLastModifiedDate_CheckBox->isChecked()); - this->writeSetting("compression_options/output/keep_last_access_date", ui->keepLastAccessDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_creation_date", ui->keepCreationDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_last_modified_date", ui->keepLastModifiedDate_CheckBox->isChecked()); + QSettings().setValue("compression_options/output/keep_last_access_date", ui->keepLastAccessDate_CheckBox->isChecked()); } void MainWindow::on_keepDates_CheckBox_stateChanged(int state) { - this->writeSetting("compression_options/output/keep_dates", state); + QSettings().setValue("compression_options/output/keep_dates", state); } -void MainWindow::on_actionShow_original_in_file_manager_triggered() +void MainWindow::on_actionShow_original_in_file_manager_triggered() const { if (this->selectedCount != 1) { return; @@ -1193,7 +1174,7 @@ void MainWindow::on_actionShow_original_in_file_manager_triggered() showFileInNativeFileManager(cImage->getFullPath(), cImage->getDirectory()); } -void MainWindow::on_actionShow_compressed_in_file_manager_triggered() +void MainWindow::on_actionShow_compressed_in_file_manager_triggered() const { if (this->selectedCount != 1) { return; @@ -1207,7 +1188,7 @@ void MainWindow::on_actionShow_compressed_in_file_manager_triggered() showFileInNativeFileManager(cImage->getCompressedFullPath(), cImage->getCompressedDirectory()); } -void MainWindow::listContextMenuAboutToShow() +void MainWindow::listContextMenuAboutToShow() const { if (this->selectedCount < 1) { return; @@ -1218,7 +1199,7 @@ void MainWindow::listContextMenuAboutToShow() ui->actionShow_compressed_in_file_manager->setDisabled(cImage->getCompressedFullPath().isEmpty()); } -void MainWindow::showPreview(int index) +void MainWindow::showPreview(int index) const { ImagePreview imagePreview = previewWatcher->resultAt(index); if (index == 0) { @@ -1228,7 +1209,7 @@ void MainWindow::showPreview(int index) ui->preview_GraphicsView->fitInView(ui->preview_GraphicsView->scene()->itemsBoundingRect(), Qt::KeepAspectRatio); ui->preview_GraphicsView->show(); if (imagePreview.fileInfo.exists()) { - ui->originalImageSize_Label->setText(QString("%1 %2").arg(toHumanSize((double)imagePreview.fileInfo.size()), imagePreview.format)); + ui->originalImageSize_Label->setText(QString("%1 %2").arg(toHumanSize(static_cast(imagePreview.fileInfo.size())), imagePreview.format)); } else { ui->originalImageSize_Label->setText(tr("File not found")); } @@ -1237,8 +1218,8 @@ void MainWindow::showPreview(int index) if (index == 1) { QString labelTextPrefix = tr("File not found"); if (imagePreview.fileInfo.exists()) { - auto originalSize = (double)imagePreview.originalSize; - auto currentSize = (double)imagePreview.fileInfo.size(); + auto originalSize = static_cast(imagePreview.originalSize); + auto currentSize = static_cast(imagePreview.fileInfo.size()); QString icon = "="; QString color = "#14b8a6"; if (currentSize < originalSize) { @@ -1262,7 +1243,7 @@ void MainWindow::showPreview(int index) ui->previewCompressed_GraphicsView->show(); } } -void MainWindow::compressionCanceled() +void MainWindow::compressionCanceled() const { qInfo() << "Compression canceled by user."; ui->cancelCompression_Button->setEnabled(false); @@ -1276,8 +1257,8 @@ void MainWindow::compressionCanceled() void MainWindow::listSortChanged(int logicalIndex, Qt::SortOrder order) { - this->writeSetting("mainwindow/list_view/sort_column_index", logicalIndex); - this->writeSetting("mainwindow/list_view/sort_column_order", order); + QSettings().setValue("mainwindow/list_view/sort_column_index", logicalIndex); + QSettings().setValue("mainwindow/list_view/sort_column_order", order); } void MainWindow::on_actionCompress_triggered() @@ -1290,7 +1271,7 @@ void MainWindow::on_actionDonate_triggered() QDesktopServices::openUrl(QUrl("https://saerasoft.com/caesium/donate", QUrl::TolerantMode)); } -void MainWindow::on_actionToolbarIcons_only_triggered() +void MainWindow::on_actionToolbarIcons_only_triggered() const { ui->actionToolbarIcons_and_Text->setChecked(false); ui->actionToolbarHide->setChecked(false); @@ -1298,31 +1279,31 @@ void MainWindow::on_actionToolbarIcons_only_triggered() ui->toolBar->setVisible(true); ui->toolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); - this->writeSetting("mainwindow/toolbar/visible", true); - this->writeSetting("mainwindow/toolbar/button_style", Qt::ToolButtonIconOnly); + QSettings().setValue("mainwindow/toolbar/visible", true); + QSettings().setValue("mainwindow/toolbar/button_style", Qt::ToolButtonIconOnly); } -void MainWindow::on_actionToolbarIcons_and_Text_triggered() +void MainWindow::on_actionToolbarIcons_and_Text_triggered() const { ui->actionToolbarIcons_only->setChecked(false); ui->actionToolbarHide->setChecked(false); ui->actionToolbarIcons_and_Text->setChecked(true); ui->toolBar->setVisible(true); ui->toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); - this->writeSetting("mainwindow/toolbar/visible", true); - this->writeSetting("mainwindow/toolbar/button_style", Qt::ToolButtonTextUnderIcon); + QSettings().setValue("mainwindow/toolbar/visible", true); + QSettings().setValue("mainwindow/toolbar/button_style", Qt::ToolButtonTextUnderIcon); } -void MainWindow::on_actionToolbarHide_triggered() +void MainWindow::on_actionToolbarHide_triggered() const { ui->actionToolbarIcons_only->setChecked(false); ui->actionToolbarIcons_and_Text->setChecked(false); ui->actionToolbarHide->setChecked(true); ui->toolBar->setVisible(false); - this->writeSetting("mainwindow/toolbar/visible", false); + QSettings().setValue("mainwindow/toolbar/visible", false); } -void MainWindow::toggleUIEnabled(bool enabled) +void MainWindow::toggleUIEnabled(bool enabled) const { ui->toolBar->setEnabled(enabled); ui->parameters_TabWidget->setEnabled(enabled); @@ -1331,17 +1312,17 @@ void MainWindow::toggleUIEnabled(bool enabled) ui->menuBar->setEnabled(enabled); } -void MainWindow::updateCompressionProgressLabel(int value) +void MainWindow::updateCompressionProgressLabel(int value) const { ui->compressionProgress_Label->setText(tr("Compressing...") + QString(" (%1/%2)").arg(QString::number(value), QString::number(ui->compression_ProgressBar->maximum()))); } void MainWindow::on_actionAuto_preview_toggled(bool toggled) { - this->writeSetting("mainwindow/auto_preview", toggled); + QSettings().setValue("mainwindow/auto_preview", toggled); } -void MainWindow::previewFinished() +void MainWindow::previewFinished() const { ui->preview_GraphicsView->setZoomEnabled(true); ui->previewCompressed_GraphicsView->setZoomEnabled(true); @@ -1360,7 +1341,7 @@ void MainWindow::clearCache() } } -void MainWindow::previewCanceled() +void MainWindow::previewCanceled() const { ui->preview_GraphicsView->setLoading(false); ui->originalImageSize_Label->setLoading(false); @@ -1368,7 +1349,7 @@ void MainWindow::previewCanceled() ui->compressedImageSize_Label->setLoading(false); } -void MainWindow::on_actionPreview_triggered() +void MainWindow::on_actionPreview_triggered() const { if (this->selectedCount != 1) { return; @@ -1385,12 +1366,12 @@ void MainWindow::on_actionPreview_triggered() void MainWindow::on_skipIfBigger_CheckBox_toggled(bool checked) { - this->writeSetting("compression_options/output/skip_if_bigger", checked); + QSettings().setValue("compression_options/output/skip_if_bigger", checked); } -void MainWindow::outputFormatIndexChanged(int index) +void MainWindow::outputFormatIndexChanged(int index) const { - this->writeSetting("compression_options/output/format", index); + QSettings().setValue("compression_options/output/format", index); this->toggleLosslessWarningVisible(); } @@ -1410,15 +1391,15 @@ void MainWindow::importFromArgs(const QStringList& args) } } -void MainWindow::moveOriginalFileToggled(bool checked) +void MainWindow::moveOriginalFileToggled(bool checked) const { ui->moveOriginalFile_ComboBox->setEnabled(checked); - this->writeSetting("compression_options/output/move_original_file", checked); + QSettings().setValue("compression_options/output/move_original_file", checked); } void MainWindow::moveOriginalFileDestinationChanged(int index) { - this->writeSetting("compression_options/output/move_original_file_destination", index); + QSettings().setValue("compression_options/output/move_original_file_destination", index); } void MainWindow::changeEvent(QEvent* event) @@ -1433,20 +1414,20 @@ QTranslator* MainWindow::getTranslator() const return translator; } -void MainWindow::onMaxOutputSizeChanged(int value) +void MainWindow::onMaxOutputSizeChanged(int value) const { - this->writeSetting("compression_options/compression/max_output_size", ui->maxOutputSize_SpinBox->value()); + QSettings().setValue("compression_options/compression/max_output_size", ui->maxOutputSize_SpinBox->value()); } -void MainWindow::onMaxOutputSizeUnitChanged(int value) +void MainWindow::onMaxOutputSizeUnitChanged(int value) const { if (value == MaxOutputSizeUnit::MAX_OUTPUT_PERCENTAGE && ui->maxOutputSize_SpinBox->value() > 100) { ui->maxOutputSize_SpinBox->setValue(100); } - this->writeSetting("compression_options/compression/max_output_size_unit", ui->maxOutputSizeUnit_ComboBox->currentIndex()); + QSettings().setValue("compression_options/compression/max_output_size_unit", ui->maxOutputSizeUnit_ComboBox->currentIndex()); } -void MainWindow::toggleLosslessWarningVisible() +void MainWindow::toggleLosslessWarningVisible() const { bool showLosslessWarning = ui->lossless_CheckBox->isChecked() && (ui->format_ComboBox->currentIndex() != 0 || ui->fitTo_ComboBox->currentIndex() != ResizeMode::NO_RESIZE) @@ -1455,9 +1436,9 @@ void MainWindow::toggleLosslessWarningVisible() ui->losslessWarning_Button->setVisible(showLosslessWarning); } -void MainWindow::onCompressionModeChanged(int value) +void MainWindow::onCompressionModeChanged(int value) const { - this->writeSetting("compression_options/compression/mode", ui->compressionMode_ComboBox->currentIndex()); + QSettings().setValue("compression_options/compression/mode", ui->compressionMode_ComboBox->currentIndex()); this->toggleLosslessWarningVisible(); } @@ -1476,7 +1457,7 @@ void MainWindow::onAdvancedImportTriggered() advancedImportDialog->exec(); } -void MainWindow::onPNGOptimizationLevelChanged(int value) +void MainWindow::onPNGOptimizationLevelChanged(int value) const { if (ui->PNGOptimizationLevel_SpinBox->value() != value) { ui->PNGOptimizationLevel_SpinBox->setValue(value); @@ -1485,26 +1466,26 @@ void MainWindow::onPNGOptimizationLevelChanged(int value) ui->PNGOptimizationLevel_Slider->setValue(value); } - this->writeSetting("compression_options/compression/png_optimization_level", value); + QSettings().setValue("compression_options/compression/png_optimization_level", value); } -void MainWindow::onTIFFCompressionMethodChanged(int index) +void MainWindow::onTIFFCompressionMethodChanged(int index) const { ui->TIFFDeflateLevelContainer_Widget->setEnabled(index == 2); - this->writeSetting("compression_options/compression/tiff_method", index); + QSettings().setValue("compression_options/compression/tiff_method", index); } void MainWindow::onTIFFDeflateLevelChanged(int value) { - this->writeSetting("compression_options/compression/tiff_deflate_level", value); + QSettings().setValue("compression_options/compression/tiff_deflate_level", value); } -void MainWindow::onJPEGChromaSubsamplingChanged() +void MainWindow::onJPEGChromaSubsamplingChanged() const { - this->writeSetting("compression_options/compression/jpeg_chroma_subsampling", ui->JPEGChromaSubsampling_ComboBox->currentData(Qt::UserRole)); + QSettings().setValue("compression_options/compression/jpeg_chroma_subsampling", ui->JPEGChromaSubsampling_ComboBox->currentData(Qt::UserRole)); } -void MainWindow::setupChromaSubsamplingComboBox() +void MainWindow::setupChromaSubsamplingComboBox() const { auto chromaSubsamplings = getChromaSubsamplingOptions(); auto iterator = QMapIterator(chromaSubsamplings); @@ -1514,19 +1495,31 @@ void MainWindow::setupChromaSubsamplingComboBox() } } +void MainWindow::setupCompressButton() +{ + auto recompressAction = new QAction(tr("Recompress failed")); + connect(recompressAction, &QAction::triggered, this, &MainWindow::recompressFailed); + this->ui->compress_Button->addAction(recompressAction); +} + void MainWindow::onJPEGOptionsVisibilityChanged(bool visible) { - this->writeSetting("mainwindow/compression/jpeg_options_visible", visible); + QSettings().setValue("mainwindow/compression/jpeg_options_visible", visible); } void MainWindow::onPNGOptionsVisibilityChanged(bool visible) { - this->writeSetting("mainwindow/compression/png_options_visible", visible); + QSettings().setValue("mainwindow/compression/png_options_visible", visible); } void MainWindow::onWebPOptionsVisibilityChanged(bool visible) { - this->writeSetting("mainwindow/compression/webp_options_visible", visible); + QSettings().setValue("mainwindow/compression/webp_options_visible", visible); } void MainWindow::onTIFFOptionsVisibilityChanged(bool visible) { - this->writeSetting("mainwindow/compression/tiff_options_visible", visible); + QSettings().setValue("mainwindow/compression/tiff_options_visible", visible); +} + +void MainWindow::recompressFailed() +{ + this->startCompression(true); } diff --git a/src/MainWindow.h b/src/MainWindow.h index 3cdfffab..fbdd40a3 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -35,74 +35,75 @@ class MainWindow : public QMainWindow { void showEvent(QShowEvent* event) override; private slots: - void on_actionAbout_Caesium_Image_Compressor_triggered(); + void on_actionAbout_Caesium_Image_Compressor_triggered() const; void on_addFiles_Button_clicked(); void on_actionAdd_files_triggered(); void on_compress_Button_clicked(); void on_actionAdd_folder_triggered(); void on_removeFiles_Button_clicked(); void on_outputFolderBrowse_Button_clicked(); - void on_outputSuffix_LineEdit_textChanged(const QString& arg1); + static void on_outputSuffix_LineEdit_textChanged(const QString& arg1); void on_actionRemove_triggered(); void on_actionClear_triggered(); - void on_width_SpinBox_valueChanged(int arg1); - void on_height_SpinBox_valueChanged(int arg1); - void on_edge_SpinBox_valueChanged(int arg1); - void on_keepAspectRatio_CheckBox_toggled(bool checked); - void on_doNotEnlarge_CheckBox_toggled(bool checked); - void on_actionSelect_All_triggered(); - void on_sameOutputFolderAsInput_CheckBox_toggled(bool checked); - void on_keepStructure_CheckBox_toggled(bool checked); + void on_width_SpinBox_valueChanged(int arg1) const; + void on_height_SpinBox_valueChanged(int arg1) const; + static void on_edge_SpinBox_valueChanged(int arg1); + void on_keepAspectRatio_CheckBox_toggled(bool checked) const; + void on_doNotEnlarge_CheckBox_toggled(bool checked) const; + void on_actionSelect_All_triggered() const; + static void on_sameOutputFolderAsInput_CheckBox_toggled(bool checked); + static void on_keepStructure_CheckBox_toggled(bool checked); void imageList_selectionChanged(); void compressionFinished(); - void dropFinished(QStringList filePaths); - void on_fitTo_ComboBox_currentIndexChanged(int index); - void on_lossless_CheckBox_toggled(bool checked); - void on_keepMetadata_CheckBox_toggled(bool checked); - void onJPEGQualityValueChanged(int value); - void onPNGQualityValueChanged(int value); - void onWebPQualityValueChanged(int value); - void cModelItemsChanged(); - void showListContextMenu(const QPoint& pos); - void on_actionShow_previews_toggled(bool arg1); + void dropFinished(const QStringList& filePaths); + void on_fitTo_ComboBox_currentIndexChanged(int index) const; + void on_lossless_CheckBox_toggled(bool checked) const; + static void on_keepMetadata_CheckBox_toggled(bool checked); + void onJPEGQualityValueChanged(int value) const; + void onPNGQualityValueChanged(int value) const; + void onWebPQualityValueChanged(int value) const; + void cModelItemsChanged() const; + void showListContextMenu(const QPoint& pos) const; + void on_actionShow_previews_toggled(bool arg1) const; void on_actionPreferences_triggered(); - void keepDatesButtonGroupClicked(); - void on_keepDates_CheckBox_clicked(); - void on_keepDates_CheckBox_stateChanged(int arg1); - void on_actionShow_original_in_file_manager_triggered(); - void on_actionShow_compressed_in_file_manager_triggered(); - void listContextMenuAboutToShow(); - void showPreview(int index); - void previewFinished(); - void previewCanceled(); - void compressionCanceled(); - void listSortChanged(int logicalIndex, Qt::SortOrder order); + void keepDatesButtonGroupClicked() const; + void on_keepDates_CheckBox_clicked() const; + static void on_keepDates_CheckBox_stateChanged(int arg1); + void on_actionShow_original_in_file_manager_triggered() const; + void on_actionShow_compressed_in_file_manager_triggered() const; + void listContextMenuAboutToShow() const; + void showPreview(int index) const; + void previewFinished() const; + void previewCanceled() const; + void compressionCanceled() const; + static void listSortChanged(int logicalIndex, Qt::SortOrder order); void on_actionCompress_triggered(); - void on_actionDonate_triggered(); - void startCompression(); - void on_actionToolbarIcons_only_triggered(); - void on_actionToolbarIcons_and_Text_triggered(); - void on_actionToolbarHide_triggered(); - void updateCompressionProgressLabel(int value); - void on_actionAuto_preview_toggled(bool toggled); - void on_actionPreview_triggered(); - void on_skipIfBigger_CheckBox_toggled(bool checked); - void outputFormatIndexChanged(int index); - void moveOriginalFileToggled(bool checked); - void moveOriginalFileDestinationChanged(int index); + static void on_actionDonate_triggered(); + void startCompression(bool onlyfailed = false); + void on_actionToolbarIcons_only_triggered() const; + void on_actionToolbarIcons_and_Text_triggered() const; + void on_actionToolbarHide_triggered() const; + void updateCompressionProgressLabel(int value) const; + static void on_actionAuto_preview_toggled(bool toggled); + void on_actionPreview_triggered() const; + static void on_skipIfBigger_CheckBox_toggled(bool checked); + void outputFormatIndexChanged(int index) const; + void moveOriginalFileToggled(bool checked) const; + static void moveOriginalFileDestinationChanged(int index); void importFromArgs(const QStringList&); - void onMaxOutputSizeChanged(int value); - void onMaxOutputSizeUnitChanged(int value); - void onCompressionModeChanged(int value); + void onMaxOutputSizeChanged(int value) const; + void onMaxOutputSizeUnitChanged(int value) const; + void onCompressionModeChanged(int value) const; void onAdvancedImportTriggered(); - void onPNGOptimizationLevelChanged(int value); - void onTIFFCompressionMethodChanged(int index); - void onTIFFDeflateLevelChanged(int value); - void onJPEGChromaSubsamplingChanged(); - void onJPEGOptionsVisibilityChanged(bool visible); - void onPNGOptionsVisibilityChanged(bool visible); - void onWebPOptionsVisibilityChanged(bool visible); - void onTIFFOptionsVisibilityChanged(bool visible); + void onPNGOptimizationLevelChanged(int value) const; + void onTIFFCompressionMethodChanged(int index) const; + static void onTIFFDeflateLevelChanged(int value); + void onJPEGChromaSubsamplingChanged() const; + static void onJPEGOptionsVisibilityChanged(bool visible); + static void onPNGOptionsVisibilityChanged(bool visible); + static void onWebPOptionsVisibilityChanged(bool visible); + static void onTIFFOptionsVisibilityChanged(bool visible); + void recompressFailed(); private: Ui::MainWindow* ui; @@ -127,28 +128,28 @@ private slots: QSystemTrayIcon* trayIcon; QTranslator* translator; - void initStatusBar(); - void initUpdater(); + void initStatusBar() const; + static void initUpdater(); void initListContextMenu(); void initTrayIconContextMenu(); - void initListWidget(); + void initListWidget() const; void initTrayIcon(); - void toggleUIEnabled(bool enabled); + void toggleUIEnabled(bool enabled) const; void importFiles(const QStringList& fileList, QString baseFolder); void removeFiles(bool all = false); void triggerImportFiles(); void triggerImportFolder(); - void writeSettings(); - void writeSetting(const QString& key, const QVariant& value); + void writeSettings() const; void readSettings(); - void previewImage(const QModelIndex& imageIndex, bool forceRuntimePreview = false); + void previewImage(const QModelIndex& imageIndex, bool forceRuntimePreview = false) const; void updateFolderMap(QString baseFolder, int count); - void toggleLosslessWarningVisible(); - CompressionOptions getCompressionOptions(QString rootFolder); - void clearCache(); + void toggleLosslessWarningVisible() const; + CompressionOptions getCompressionOptions(const QString& rootFolder) const; + static void clearCache(); void changeEvent(QEvent* event) override; - void setupChromaSubsamplingComboBox(); + void setupChromaSubsamplingComboBox() const; + void setupCompressButton(); }; #endif // MAINWINDOW_H diff --git a/src/models/CImageTreeItem.cpp b/src/models/CImageTreeItem.cpp index 33a50a52..01d69635 100644 --- a/src/models/CImageTreeItem.cpp +++ b/src/models/CImageTreeItem.cpp @@ -96,19 +96,31 @@ CImage* CImageTreeItem::getCImage() const return cImage; } -QFuture CImageTreeItem::compress(CompressionOptions compressionOptions) +QFuture CImageTreeItem::compress(const CompressionOptions& compressionOptions) { - return QtConcurrent::map(m_childItems, [compressionOptions, this](CImageTreeItem* item) { + return this->performCompression(compressionOptions, false); +} + +QFuture CImageTreeItem::compressOnlyFailed(const CompressionOptions& compressionOptions) +{ + return this->performCompression(compressionOptions, true); +} + +QFuture CImageTreeItem::performCompression(const CompressionOptions& compressionOptions, bool onlyFailed) +{ + return QtConcurrent::map(m_childItems, [compressionOptions, onlyFailed, this](const CImageTreeItem* item) { if (item->compressionCanceled || this->compressionCanceled) { return; } CImage* image = item->getCImage(); - image->setStatus(CImageStatus::COMPRESSING); - bool compressionResult = image->compress(compressionOptions); - if (!compressionResult) { - image->setStatus(CImageStatus::ERROR); - } else if (image->getStatus() == CImageStatus::COMPRESSING) { - image->setStatus(CImageStatus::COMPRESSED); + if (!onlyFailed || (onlyFailed && image->getStatus() == CImageStatus::ERROR)) { + image->setStatus(CImageStatus::COMPRESSING); + bool compressionResult = image->compress(compressionOptions); + if (!compressionResult) { + image->setStatus(CImageStatus::ERROR); + } else if (image->getStatus() == CImageStatus::COMPRESSING) { + image->setStatus(CImageStatus::COMPRESSED); + } } }); } diff --git a/src/models/CImageTreeItem.h b/src/models/CImageTreeItem.h index adb03d40..e70632bb 100644 --- a/src/models/CImageTreeItem.h +++ b/src/models/CImageTreeItem.h @@ -28,7 +28,10 @@ class CImageTreeItem { QVector children(); CImage* getCImage() const; - QFuture compress(CompressionOptions compressionOptions); + QFuture compress(const CompressionOptions& compressionOptions); + QFuture compressOnlyFailed(const CompressionOptions& compressionOptions); + void setCompressionCanceled(bool canceled); + void setData(QStringList data); private: @@ -38,8 +41,7 @@ class CImageTreeItem { CImageTreeItem* m_parentItem; bool compressionCanceled = false; -public: - void setCompressionCanceled(bool canceled); + QFuture performCompression(const CompressionOptions& compressionOptions, bool onlyFailed = false); }; #endif // CIMAGETREEITEM_H diff --git a/views/MainWindow.ui b/views/MainWindow.ui index 8e7fea4d..50cc3b7a 100644 --- a/views/MainWindow.ui +++ b/views/MainWindow.ui @@ -186,7 +186,7 @@ - + false @@ -197,6 +197,12 @@ :/icons/ui/compress.svg:/icons/ui/compress.svg + + QToolButton::MenuButtonPopup + + + Qt::ToolButtonTextBesideIcon + diff --git a/views/PreferencesDialog.ui b/views/PreferencesDialog.ui index b784e8ee..abd683f6 100644 --- a/views/PreferencesDialog.ui +++ b/views/PreferencesDialog.ui @@ -204,6 +204,18 @@ true + + + + + false + + + + Perform an action after successful compression + + + @@ -234,19 +246,20 @@ - - - - - false - + + + + Qt::Horizontal - - Perform an action after successful compression + + + 0 + 0 + - + - + @@ -265,6 +278,33 @@ + + + + + false + + + + When importing files directly + + + + + + + + false + + + + threads + + + 2 + + + @@ -280,7 +320,19 @@ - + + + + + false + + + + Threads priority + + + + @@ -314,76 +366,58 @@ - - - - - false - - - - When importing files directly - - - - - - - Qt::Horizontal - - - - 0 - 0 - - - - - - - - - false - - - - threads - - - 2 - - - - - - - - false - - - - Threads priority - - - - - - - 6 - - - 1 - - - 3 - - - Qt::Horizontal - - - QSlider::TicksBelow - - + + + + + + + false + + + + - + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + 6 + + + 1 + + + 3 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + + + + + + false + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + +