From c2ffff2e571a122bec940980affd7e401cfadc48 Mon Sep 17 00:00:00 2001 From: hama Date: Sat, 30 May 2015 09:07:26 +0200 Subject: [PATCH] reimgconvert: dynamic layout, icons, menu --- appl/reimgconvert/converter.cpp | 13 + appl/reimgconvert/converter.hpp | 1 + appl/reimgconvert/icons/action_go.png | Bin 0 -> 979 bytes appl/reimgconvert/icons/cancel.png | Bin 0 -> 587 bytes appl/reimgconvert/icons/cog_edit.png | Bin 0 -> 865 bytes appl/reimgconvert/icons/disk.png | Bin 0 -> 620 bytes appl/reimgconvert/icons/door_in.png | Bin 0 -> 693 bytes appl/reimgconvert/icons/folder_find.png | Bin 0 -> 795 bytes appl/reimgconvert/icons/folder_go.png | Bin 0 -> 694 bytes appl/reimgconvert/icons/help.png | Bin 0 -> 786 bytes appl/reimgconvert/icons/wrench.png | Bin 0 -> 610 bytes appl/reimgconvert/mainwindow.ui | 1107 +++++++++++++++++------ appl/reimgconvert/reimgconvert.pro | 5 + appl/reimgconvert/reimgconvert.qrc | 13 + 14 files changed, 852 insertions(+), 287 deletions(-) create mode 100755 appl/reimgconvert/icons/action_go.png create mode 100644 appl/reimgconvert/icons/cancel.png create mode 100644 appl/reimgconvert/icons/cog_edit.png create mode 100644 appl/reimgconvert/icons/disk.png create mode 100644 appl/reimgconvert/icons/door_in.png create mode 100644 appl/reimgconvert/icons/folder_find.png create mode 100644 appl/reimgconvert/icons/folder_go.png create mode 100644 appl/reimgconvert/icons/help.png create mode 100644 appl/reimgconvert/icons/wrench.png create mode 100644 appl/reimgconvert/reimgconvert.qrc 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 0000000000000000000000000000000000000000..ef5bfc39bfd8cf47a0112efa8056414d2e2388d1 GIT binary patch literal 979 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GXl4m>B|mLR?*@Xv80~YrPp(do@TS zTq55Dwy6o?{P$%=GOYUiR zRe!OP^WJ79ihG}}@7vO_>CwWYFLx;Wh`#yp;y)Mwts4cSAuwn|U`}Ae383TpJY5_^ zD(0m2zvXLI;9+R&T)?;eqao{(+W*_P+)(x2_PhN05?@xO8b_B#gSZO)BTlXdX80!i z++4uEd0qeVqV3mfXRW`mOZ!u~ti^<839m?5tIp)+{=XqLzUN?*RIh?&-Cj8R>fB#FVdQ&MBb@02s}M{{R30 literal 0 HcmV?d00001 diff --git a/appl/reimgconvert/icons/cancel.png b/appl/reimgconvert/icons/cancel.png new file mode 100644 index 0000000000000000000000000000000000000000..c149c2bc017d5ce5a8ae9330dd7dbd012482e0f4 GIT binary patch literal 587 zcmV-R0<`^!P)FS^-G}e*;M)Q6>s#cP zI`Y#S($G6W`W@NI5g|L-MKl0Zmu$m^(0~^Lwo5OO~d#(vPfzGR@vSHz5C(pPxHny(nM!6aSI^7R#-{J~?A^0H*YCdW>wX><0M=1!YHEsWHk&65 z2EzpTxW}DK*f^ce)R~!?WFk%?;`Pu5C{Y@ z9*YwPJjH96dcf=xJG z*kl}##L?N=83%;ar!Pg^cVqOf0lN#g5Vlp~vzQCln=Feu@%+Ain zAxsXvy}hQ%p)0kKIRWUX89RYeM1w`x^47xBl|kR;=6}n}%d;PbNXFDkg2d$HB$&Tm z{utC0|DU)7(XWO0;TB^4`9-wVaC#H&fkYyy8yXslc|4xD*f81w?^q4!T|J^pT>J`N z!zOX^g^2B+#!yvN6)P_<|3AiofdL_tJahBjw(;Om)xxQMf{?WUJ4;0fJMO^QaUmuX zzldkm(9nR~++1P8J!ouf?5?h^rbixT09(uOy~>BS_9Toi+4ykpEG-e7Pv>wrR8CF~ z&1SQ^k9~H+MJzd|s z^YP1Hc07G_>)Lgir!F1{Qn4GcTg%?koHo<=1qRN{}nPDolOeI^o4N5I>! zU$N=L=sg~ zDx#dOA*B0N~cqPsWI(^rbbkh)DS0_H_UN0C4l_kvWIm2#Kyy6%BCh z(yIUf003&1xdx>t$*eR2ZvXxT0001Z_R$y3Iju92q*wg58};}zm(OaAH=p|y0002M zh5O5#fxp|~jc?yi@+7$`d4Q6Hl%z;WiWG??NXR{Hx%)pMd~SE0000OQI literal 0 HcmV?d00001 diff --git a/appl/reimgconvert/icons/door_in.png b/appl/reimgconvert/icons/door_in.png new file mode 100644 index 0000000000000000000000000000000000000000..41676a0a5be0f026fb136315fafb6c4566522d7a GIT binary patch literal 693 zcmV;m0!safP)vaG^ z2pyX9GZt*w3IyWpBqouZ9TBDUCjj71ahpsggwSp?!_6p~6Ug^zToTz0k=O|cA@C)B z=4SI+2S7F9CYUB%6Rwf$PD%xpU1zsvH^-J3qhIec&_95xadrGMyZiUG;F`#)xFk#y zurJ!PJ?Af*(aYIc}SHy&e#bYkLxyZiN`;lMHCXuWKOBa9QbyiY}R8)+l!c;Lu zGC@p$z~K6Ij22J0)wsbx511;JB7MDISvY@^uJR9Nq@bi~L`zglHEQK03t2do(0Qs6*PW_{1G!HjEs!rv9U46 z$HzPJ|EKO<)u6Ypk6L#x)$Sg;sx@Y2o4k8D`Z@f|JD)qaVu_iqHj_a!UF&Z3Ql+}r bBu@VX$p^JhV-$eD00000NkvXXu0mjfw@)|D literal 0 HcmV?d00001 diff --git a/appl/reimgconvert/icons/folder_find.png b/appl/reimgconvert/icons/folder_find.png new file mode 100644 index 0000000000000000000000000000000000000000..c64e2ee679dbcff0440e6fe3194a971152b38d51 GIT binary patch literal 795 zcmV+$1LXXPP)8hoRQY~32;;v|2 z6e-B2B zCE(hxS3dK-rRD4TH?wNZx>((BtjuOJ_pgyBGdA>1yDCbtXz88 ZdJfaffI=X}!C?RZ002ovPDHLkV1kN7cwztm literal 0 HcmV?d00001 diff --git a/appl/reimgconvert/icons/folder_go.png b/appl/reimgconvert/icons/folder_go.png new file mode 100644 index 0000000000000000000000000000000000000000..34a736f70261338c9bca98c38b78193740fa83a0 GIT binary patch literal 694 zcmV;n0!jUeP)N@Zw27r|iugjyK_i?%mf=ZN1k*q&Uedp~2B7g_+fS`hk+Nr1A{hI)z0`VHB6Nndl zX$Di6C%-U4JXr@~z-vS-U`e(1B@n-FV+JTmdRsylL39C=TOrljOR~Cct>JYCvg#mK z1ulqf0!%<`#~!NMu5Ba=9u&fmP-Zhc6E?!yaAE01t20W#1|(JmqlC- zu^GHsMqCzbhR}vI*0gbTWQ<2wA~0LlNQ8*Dc(aJuEaI~Cy?zX0(B7i0rEb>&+G>xJ z3k&o-xX8WohAjXsqHu`)jo1ugGgz-V-_eT`kMj#kXL{&TC&D=t zDS)urCatsVt!&16hZE0Sc81**wR}pC@@4w{a?#MB{`E|khgw{yHQH-JtJz=E5u9kb zz}U$XgYMs^AIOw1Qr{*Wn)N-{9ma}x2(<~`9Go1=*>YR!KZvrBS zCd!u}@M0og%Ev@_;Z?Kk>Wwv=%h_57zmt2<_1msz_niYE=YRNPpd%02TK9oK1z z>ooPno}v^sikz_|1XHFx_L%~;ljh7i(jiay5F0x*+(9aXXFCl?AdQj5XlQ65%sEv+ ztfe?|YcjPN*@yYtE~ImQh{l|#A6Z8iu>pf43Rj52CzU_dMQm|S2xR62YjQOn+z8WH zaK=!}ggOZi{4pB7SQ=xC0n|vXP_Bkx_a)FeNd}w8U97BNbSWxa^QW-li9BZ#M1!_xE*?wzt^GcoeoL*JGLSe_+l-JT2#2tz!z&^ z_s5anq&^nBklIMwRvcoP3%qs%%Ea?1c{_*V*Xj&~uLu-2Dp1fUN4<0zMo$EH>*U83 zm_9;Vt%-bE{_J_!If!1y=c+`QVZ>0_BPy z+%^pgnv`f8H)Z%0&Tp8&u*MCIC4igNW5MeWM_DHpDNi)Zxz|9XboOnitwFq$ETN=X zj-tkCJnz**Y4k#6_Ty^B=hWo~L!47r`HoP=x&3T1)JLr2t2+#fH^jb z4`0v}DG1te)wmeb(>p90leRz?_mO+^JKy=v&2<29Od6?F%9%(c8los#f*@G`-%W&* z$)uBj2i@u-@SgX}gtyWPe6d*|w6h%R? zScK2#Yn%$sum0cy>90DmY*i{1XqpClEtktsRTZ)lCUe z<FogV^*tm>8*AlX za4oiR!&85LrobG57qUHUX#{>Vz(RHpB5|@>9O6N$jqB8>%($0wxE5R3)b>Y~xtCo$ zCgEk&A?_#IxHdN)9tqre^o{ho4{?hmPuf@^@I3-wncaRd%|~O3xbrKY=&TiwPYkJroM{;WUQTuMY8vp 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 + + -- 2.39.5