From: hama Date: Sat, 30 May 2015 07:07:26 +0000 (+0200) Subject: reimgconvert: dynamic layout, icons, menu X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=c2ffff2e571a122bec940980affd7e401cfadc48;p=reqt reimgconvert: dynamic layout, icons, menu --- diff --git a/appl/reimgconvert/converter.cpp b/appl/reimgconvert/converter.cpp index 380f84c..a871baf 100644 --- a/appl/reimgconvert/converter.cpp +++ b/appl/reimgconvert/converter.cpp @@ -262,6 +262,19 @@ void Converter::run() changeState(Converter::STATE_READY, msg); } +/** + * Reads the image properties from an image file. + * + * @param name filename with path + * @param width OUT: the width of the image + * @param height OUT: the height of the image + * @param info OUT: information of the image + */ +void Converter::readProperties(const QString& name, int& width, int& height, QString& info) +{ + +} + /** * @brief Search for the Perl script which make the conversion itself. * diff --git a/appl/reimgconvert/converter.hpp b/appl/reimgconvert/converter.hpp index a2f874f..e4e7140 100644 --- a/appl/reimgconvert/converter.hpp +++ b/appl/reimgconvert/converter.hpp @@ -59,6 +59,7 @@ public: m_shouldStop = true; } protected: + void readProperties(const QString& name, int &width, int &height, QString &info); void convertOneFile(const QString& name, qint64 size); bool buildArgs(); void changeState(State state, const QString& info); diff --git a/appl/reimgconvert/icons/action_go.png b/appl/reimgconvert/icons/action_go.png new file mode 100755 index 0000000..ef5bfc3 Binary files /dev/null and b/appl/reimgconvert/icons/action_go.png differ diff --git a/appl/reimgconvert/icons/cancel.png b/appl/reimgconvert/icons/cancel.png new file mode 100644 index 0000000..c149c2b Binary files /dev/null and b/appl/reimgconvert/icons/cancel.png differ diff --git a/appl/reimgconvert/icons/cog_edit.png b/appl/reimgconvert/icons/cog_edit.png new file mode 100644 index 0000000..47b75a4 Binary files /dev/null and b/appl/reimgconvert/icons/cog_edit.png differ diff --git a/appl/reimgconvert/icons/disk.png b/appl/reimgconvert/icons/disk.png new file mode 100644 index 0000000..99d532e Binary files /dev/null and b/appl/reimgconvert/icons/disk.png differ diff --git a/appl/reimgconvert/icons/door_in.png b/appl/reimgconvert/icons/door_in.png new file mode 100644 index 0000000..41676a0 Binary files /dev/null and b/appl/reimgconvert/icons/door_in.png differ diff --git a/appl/reimgconvert/icons/folder_find.png b/appl/reimgconvert/icons/folder_find.png new file mode 100644 index 0000000..c64e2ee Binary files /dev/null and b/appl/reimgconvert/icons/folder_find.png differ diff --git a/appl/reimgconvert/icons/folder_go.png b/appl/reimgconvert/icons/folder_go.png new file mode 100644 index 0000000..34a736f Binary files /dev/null and b/appl/reimgconvert/icons/folder_go.png differ diff --git a/appl/reimgconvert/icons/help.png b/appl/reimgconvert/icons/help.png new file mode 100644 index 0000000..5c87017 Binary files /dev/null and b/appl/reimgconvert/icons/help.png differ diff --git a/appl/reimgconvert/icons/wrench.png b/appl/reimgconvert/icons/wrench.png new file mode 100644 index 0000000..5c8213f Binary files /dev/null and b/appl/reimgconvert/icons/wrench.png differ diff --git a/appl/reimgconvert/mainwindow.ui b/appl/reimgconvert/mainwindow.ui index 6bc19ad..ccfc44e 100644 --- a/appl/reimgconvert/mainwindow.ui +++ b/appl/reimgconvert/mainwindow.ui @@ -6,14 +6,14 @@ 0 0 - 620 - 620 + 735 + 532 - 620 - 620 + 735 + 500 @@ -23,321 +23,645 @@ - - - - 10 - 10 - 591 - 541 - - - - - 1 - 0 - - - - Qt::Vertical - - - - - - - Hochformat - - - - - 20 - 40 - 227 - 61 - - - - - - - Max. Breite - - - - - - - Max. Höhe - - - - - - - true - - - - - - - true - - - - - - - - - - - Breitformat - - - - - 20 - 40 - 228 - 61 - - - - - - - Max. Breite - - - - - - - Max. Höhe - - - - - - - true - - - - - - - true - - - - - - - - - - - Quadrat - - - - - 20 - 30 - 237 - 28 - - - - - - - Max. Breite/Höhe - - - - - - - true - - - - - - - - - - - Sonstiges - - - - - 20 - 30 - 231 - 61 - - - - - - - Qualität (%) - - - - - - - true - - - - - - - Zielverz. - - - - - - - true - - - - - - - - - - - - - - - - 10 - - - 10 - - - 10 - - - 10 - - - 10 - + + + - + - - - - - Verzeichnis mit den Bildern (Quellen) - - - - - - - + + + + 230 + 100 + + + + + 230 + 100 + + + + Portrait: + + + + + 2 + 30 + 221 + 61 + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Max. Width: + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + true - - /tmp/img + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Max. Height: - - + + + + + 100 + 0 + + - 30 + 100 16777215 - - Auswahldialog + + true + + + + + + + + + + + + 230 + 100 + + + + + 230 + 100 + + + + Landscape: + + + + + 3 + 31 + 221 + 61 + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + - ... + Max. Width: + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + true + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Max. Height: + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + true - - + + - - - Qt::Horizontal + + + + 150 + 100 + - + - 40 - 20 + 150 + 100 - + + Square: + + + + + 0 + 60 + 100 + 26 + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + true + + + + + + 0 + 40 + 141 + 18 + + + + Max. Width/Height: + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 0 + 150 + + + + + 16777215 + 999999 + + + + Others: + + + + + 640 + 70 + 51 + 27 + + + + ... + + + + + + 0 + 30 + 221 + 28 + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Quality (%) + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + true + + + + + + + + + 0 + 70 + 631 + 28 + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Destination: + + + + + + + true + + + + + + + + + + + + 0 + 110 + 631 + 28 + + + - + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Template: + + + + + - - - - 150 - 0 - - - - - 150 - 16777215 - - - - Alle Bilder aus dem Quellverzeichnis konvertieren und im Zielverzeichnis ablegen + + Website: 1024x768 + + + + + Website II: 800x600 + + + + + Photo: 2048x1536 + + + + + Photo II: 3072x2304 + + + + + Midi: 600x400 + + + + + Mini: 150x100 + + + + + + + + + + 240 + 30 + 209 + 28 + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Source Type: + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + true + + + + jpg + + + + + png + + + + + gif + + + + + + + + + + 480 + 30 + 211 + 28 + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + Dest. Type: + + + + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + + jpg + + + + + png + + + + + + + + + + + + + + + + Source Directory (Images): + + + + + + + + + true - - Konvertieren + + /tmp/img - - - - 150 - 0 - - + - 150 + 30 16777215 - Alle Bilder aus dem Quellverzeichnis konvertieren und im Zielverzeichnis ablegen + Auswahldialog - Beenden + ... @@ -346,11 +670,82 @@ - + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 150 + 0 + + + + + 150 + 16777215 + + + + Alle Bilder aus dem Quellverzeichnis konvertieren und im Zielverzeichnis ablegen + + + &Convert + + + + :/main/icons/action_go.png:/main/icons/action_go.png + + + + + + + + 150 + 0 + + + + + 150 + 16777215 + + + + Alle Bilder aus dem Quellverzeichnis konvertieren und im Zielverzeichnis ablegen + + + &Stop + + + + :/main/icons/cancel.png:/main/icons/cancel.png + + + + - - + + + + + + listWidget + groupBox_4 @@ -360,10 +755,31 @@ 0 0 - 620 + 735 23 + + + &File + + + + + + + + + + + + + &Help + + + + + @@ -372,21 +788,138 @@ false + + + + + toolBar + + + TopToolBarArea + + + false + + + + + + + + + + + :/main/icons/action_go.png:/main/icons/action_go.png + + + Convert + + + Converts all images from the source directory into the target directory + + + Ctrl+R + + + + + + :/main/icons/folder_find.png:/main/icons/folder_find.png + + + SelectSource + + + Select the source directory + + + Ctrl+O + + + + + + :/main/icons/folder_go.png:/main/icons/folder_go.png + + + Select Destination + + + Select the destination directory + + + Ctrl+S + + + + + + :/main/icons/cancel.png:/main/icons/cancel.png + + + Sto&p + + + Stopps the conversion + + + Ctrl+X + + + + + + :/main/icons/door_in.png:/main/icons/door_in.png + + + &Exit + + + Terminates the program + + + Ctrl+E + + + + + + :/main/icons/help.png:/main/icons/help.png + - Konvertieren + &About - Alle Bilder in dem Verzeichnis gemäß den Vorgaben konvertieren. Ergebis im Unterverzeichnis "mini" + Info about the program - Ctrl+K + Ctrl+Shift+A - - + + + + + + action_Exit + triggered() + MainWindow + close() + + + 367 + 265 + + + 367 + 265 + + + + diff --git a/appl/reimgconvert/reimgconvert.pro b/appl/reimgconvert/reimgconvert.pro index 70457ce..03d6873 100644 --- a/appl/reimgconvert/reimgconvert.pro +++ b/appl/reimgconvert/reimgconvert.pro @@ -20,3 +20,8 @@ HEADERS += mainwindow.hpp \ converter.hpp FORMS += mainwindow.ui + +RESOURCES += \ + reimgconvert.qrc + +OTHER_FILES += diff --git a/appl/reimgconvert/reimgconvert.qrc b/appl/reimgconvert/reimgconvert.qrc new file mode 100644 index 0000000..6cacef5 --- /dev/null +++ b/appl/reimgconvert/reimgconvert.qrc @@ -0,0 +1,13 @@ + + + icons/action_go.png + icons/disk.png + icons/door_in.png + icons/cancel.png + icons/cog_edit.png + icons/folder_find.png + icons/wrench.png + icons/folder_go.png + icons/help.png + +