From 732cda4b461428a0841681e1e9b748f76e6e5707 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 16 Feb 2020 18:17:50 +0200 Subject: [PATCH 001/321] Dummy base for Puzzle application. --- dist/Puzzle.icns | Bin 0 -> 48576 bytes dist/macx/puzzle/Info.plist | 30 ++ src/app/app.pro | 6 +- src/app/puzzle/main.cpp | 38 ++ src/app/puzzle/puzzle.pri | 15 + src/app/puzzle/puzzle.pro | 335 ++++++++++++++++++ src/app/puzzle/puzzlemainwindow.cpp | 41 +++ src/app/puzzle/puzzlemainwindow.h | 50 +++ src/app/puzzle/puzzlemainwindow.ui | 24 ++ src/app/puzzle/share/resources/puzzle.rc | 80 +++++ src/app/puzzle/share/resources/puzzleicon.qrc | 5 + .../share/resources/puzzleicon/64x64/logo.ico | Bin 0 -> 16958 bytes .../share/resources/puzzleicon/64x64/logo.png | Bin 0 -> 1504 bytes src/app/puzzle/warnings.pri | 85 +++++ 14 files changed, 707 insertions(+), 2 deletions(-) create mode 100644 dist/Puzzle.icns create mode 100755 dist/macx/puzzle/Info.plist create mode 100644 src/app/puzzle/main.cpp create mode 100644 src/app/puzzle/puzzle.pri create mode 100644 src/app/puzzle/puzzle.pro create mode 100644 src/app/puzzle/puzzlemainwindow.cpp create mode 100644 src/app/puzzle/puzzlemainwindow.h create mode 100644 src/app/puzzle/puzzlemainwindow.ui create mode 100644 src/app/puzzle/share/resources/puzzle.rc create mode 100644 src/app/puzzle/share/resources/puzzleicon.qrc create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/logo.ico create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/logo.png create mode 100644 src/app/puzzle/warnings.pri diff --git a/dist/Puzzle.icns b/dist/Puzzle.icns new file mode 100644 index 0000000000000000000000000000000000000000..a8c2190d6a20bd94c83396992a1680300c853414 GIT binary patch literal 48576 zcmeEv2|SeB|Nog8TeL_Ep)i&qYg!eRwNj#_EN#l33Q@G!_kEYj&X7SWyDV8}P)eb! zEq0N83-doSmMGoZ{rd|31a}ocCuvpXWU1InO!I4E>8&t^tsfuYYZ;C;&)i zPhi)9Xyvx$LU97nZrg!qN856u(2%z2K-B2l&Cx*4evU+5M$gIEb}avd=G5`v=7bvE z9i7%444s_Z1cCu48vqzgWJd=-rmW1GKv#wbfCsayGy=n0VoN}gYW5hQZ8J|w&62hl zB=7m``3m5*BZ~;xVi4ST+j3Cs2|NKPwk=2Cv9__uBmnI3c35N#0JeB!!P6MqSsKLK z&!JCaXHk1REjGqTIT8z{@dRr;1A%~z=0IP;J_O)lLJppgkicP!riGzD#3dEx;&42+ zXcVbti$lia%xz{W_Bh}>OWNTOw}j?tJ2F4XE*@;Mro8=Fxj#o zm>X>yP>qnbVL=Mqt)H)eO#68}pz%AtoSD6`A>it}29ge|HOpF7)`s_jLVgV&05CBU zV_~^!A}l0qEkq{_z!hUX{@o_VLV`9zC=pn-HwJ3oN$pwE));A|x_!1{XAA^w$J;b0llB9YN@k>}n#+yOnds1DVSQ;BLP#w`vGB9V4 zIMfres7@qe7uD;7N*C3?$NOV@erT`0A?XUCP=}drcWy(pb2)PYv>mC^0Xkhc0oRYT zV+XRcqkWF!(1GeSL8HG{LB0E|l0ye@{!Sx`(QdO0#}3qXPEIs*L^kf!foQ0;;iN!| zp5)`QUf>a8kMRV;<%O6vCxQ=eO#t{=u+s)!!Pf1d6V`=o2#7MYHK!dw@$vBR+I9dj zYaT$bF1Lk0pv(?fV*oF_-aAFDF|GtVV1uCu?(FEOwjtMSF{tf!2Y78T$n0Fa6J)z$ zP`o_b@s5!6z<{LL(qguJPAZ`Y55}-;hC~qX&SZ>a+m&q71%u!zbuI(=4*=#D?@|il zTw-8COP%ouLaZ|u{9JLwqe}6m^E^j9NO7B$bHIZl_wRK20=i(1hVt=q@=kbUacQhI zmLfLTDl*1;p*L$R&2|nn`ce!QI~xK8Ar^~`vPI8|5$y4x)CP~j#>U>aK~r$RGRh86 z;1UyYWj1(%7nJ z6o_+%np`jxc5?2STv%M{K_kpPvoi}|b!h0yBvT&7V7J2@r8rNC%urBHbw>7#?D3vV_|1OAo2kil1EsIpGVjqMxg&fRo>zIp|Ag)c7Wq2>2M~Ejk8C3 z`WyvI=fBGDO>zDs{T9=#tk-{F-?L!>a|!=$i`hTL=g_-Y;K%r1Tef#JFA({WPkim7 zO^W}OgPT_?EPvt?iKP6zzSB!=F#GyTzHn0{9mP4o>mhSF}iJBySmQ7-! z?o56SQc@hVAk=X&CB@e_B_*X1R$ju=U_SpTnGkAso$(LJnd5tWy=L{q9?Pm<@`KLg+O=PVMNJ38*n3oOBhf;|p%(o6G+^QUQPex27J=)ca+G$o~;d@P}# z?wke_KYJ|2|D*l~)t2htieBFjW8?3%m*PzR|JL97dZZZ!l{^vj0WWy>MSF2M0q+ig z_JlKyr74dNRC`CqtbkhwWoM@?=g!%xdj|!Y3r-(qv|XV=E#*fQ?8n;?5Sg6TaPI5`ryvO4 zYWogw91?uxwq^DNyD}#LXDJvsdkVFI^A&HxOdUAGCz#Hy-yvHJ=!8bQVL2;gi=pD} zXz%F!%mW`Ic=29jO$Yd-f#J2oQ1Cv!m|N;j#=M}4HD-qP!vH}yGU`WCa-Ap3W=MYw zSOCtFUeFwdhqr7-(G%8oVs7AP40=L`_%ctj9nbmLmY{e%p+kZv9uP=9gY*MRNHy;m z*eUQ{aJuqy>4`^_&ayo4$W(0NjF>APNx;YWl2zRB{^ZgXk0^`rnjg7&=XDU)0&{=6I-WE#}6U)iLiROxlwISo)5CgIH z=ou+;Ez}N;4y`gQab{OwT?l=`r4xr+p*R$Al3=M ziBS>34i6G-a3H}8&aPkwf%7VR*t*AdARq_A9rHJs|f++4FZK^XDd zvj8m{6JTs7XfI?d2!vsGfKxkW2uqR(K~HE6b_ru3V+TXAT?j!jh?y)BqcSpPWnp1v zg^$A~USw5!V+uG&G%>O>rZm~3vPDqPl?;0uQy3W;n+VU;{EZPtf-Yo60DO@CnVJ{7 zDm=sVg62$&jf`i_k*b%Cj|tCLQ6@q{g6?FCUf+ZM6-f?OnADl{$TP}iG=J;u>i<^b ze#t)`*495F$$sCXC(Wl8A6W8|!6Gd4pOgR65ce12`5GXo#QOX4|vi!XL=P6)m!SqVXUU9P_;Ud-4-9 z?@5BhF5w>d`_Jw7>=-7?6BS91VhiN$qDjX)GV=|YHa3PuJZl{p>fVTjHMnLlcaY?< zo4U!&I@WktBg;oezac~KAh1ZDbUijGl6l0TouucuKffM(1iNO8$$k4Rd19bDsUHs* zJtC?7xqaf-n-`y!BpnMN_kL_b@61^xDbE}W@-s7@OceOo1eQ;cxme~M(n+IpqU7=? z`Gwr7y5aXmelxnW_#euXWCoPV7Ml1|d18|PUz0Df{cG}1eEyRBxOU-h%hz@jyWDRt zIt72&UM#DkaB%-Z^9%d)661ed1L+!Bc>J;bnd|)@lK-psySeM~|ASKBl=MWs`X#BU z#9#jFhl}_L9msY7k~o7wQU~JiCgM7%J3HZnbLWhs80fpB!-4D_+p!Gpg>j*|xOirm z(H+Ph03WvzT->DSqB@Xm0G$D;$PQ#T;3n-2B*Iz*+-v|`Su<423>6Ny902DW2sqIs zb~t=E2G7WHfLw+_scL}EhENy`WQMsw3OTQcYMZx)Xagh#vR7`BSr|>*_h_Ozpe!2g z0D~h19o>QG1&*A6om7c|3kjqqTBDJy00h8YL{3gFU&z41&Bjg#;LEv;i-UbDI|mmR z8tnz~xDK06xXb{6Cnplk$?FJ^Fh8Dy1-=+E`awS zP~h=^18(cghU3bK0581>$YQ{?2*Z055O^@JP7*8gA|T5M-!T_>jsa9%h>_$-s%5ic zNI_ zjHKG>4!cMsIUIKk0u5YY=&(mYdIt2sP;LcX zogHvthZ1hGb%L!Pb1YA|)dWDNJ*o2pZn$(Zqd{72!EnLO!-e7X#K4QJoKTJ@;0a|| z*kmt^4G#@B-&Q_u9$p?EFN^~~m6Q_7q9H2)19$>3%SqeSJQxhLj4vyTf_M@Jv6;MD z#1AUw0A3zD3>6PAH^{@6ML?NM=o3^#k|`8~OG#ihjOgVI0lD~a2xXCW$3Pj0dOi6%Rw+^mPCN)Y>0)E z1hKJMkPL$)RGL8%#o*ZtR$4uSMZf?_P&ghrD-{M~nNyB{X(Fpe;87LO;1B*_JSDIl zGx1QuV6ic=Y0y|So}vOoVd3f?60QwCf=Cp8IXM?txP2NE4}d?J;}1D;cn9EvT^19A zjSr5;#>BuCMiNL3^Fh||z@lPeu@Ugv#bRSUA&-3OJh3a|0D$Y;a5Wm_#d`yh%9PCPp1bCp~@az5^L&X3zhdUa{fd=yi zTu3M9XV?{s09@W^1Sgoc=|Xzjgu@5knC2mp6hvS;UFN*FU=cCE7eX=f5LwC#u8hJ# z4~mg`EDH8mxX+D@h3nU(nJGb6DTx2B?naV@LBqRa{DOce5|ThE!Id0AlG|KZZg3Yn z9+VNB@RV@e0r3e7IFt$TPsuFU$DhW-t?!w(dBC0Y1ONynrPg?=(h>pyaq%8=Oivs# z0T&NDQG7yzCkeEHZ$QMtjQHZH6XFwt6Cv({a{zG=^21TaC*W}L@xC}(c$t!Dc$sp< zKvoitmdwG$Lp~rOX;2uF?3|IXk_Z>1o#9?RVCRT{)htqONq8m>m4E|WBrKbRk%(t7 z3Xbquf@_XopCOQdpCgPcjf@9uBrKa`mWz`F&TB$jiDX-ln6VB$CXqePN5V#qBm;+f z2w2H6CgBiqaFrZJO$s|2+DpRG0T7Q%z`-*C8!`hqz!sD81I0tpu;~J%KwN5m=jn~%mCCUz?TVNs4S%Z(eQT?@o=@Bg_UK-O$-Z?m31Q==%LFf zmgTH0aGv|VzOlak{R}^v1<3#!ts5xo8|v#D>qugeEELRe>Ax|Ztbzb_q<13{VI=}C zse}3~vIt^^2q(3zfsD7u&lnRxuUrVHo4IY3SwE7vBI3qq|LJd+1OC)2v9IjjUJFoK4+c{ zE8%-?BJdRuK_Ouw_zqi>=N!u&?mV;s_+kZ07_`;9&%ti+t+{#t*W;1Gpm70;Yy!gW zB(UCXPSgd8HUbe(A*2YXcm0kc>+6BH5E3-OcUorSaBV<)54bG>w^(2avkfr>;Pnzh3i3k|-sCpH z4U`Qbz*7hzER+uShCJYDVur)~7B8VV-~wOZ1I#|Kj~l@kOyE-z++%?o4KOx1*c&4O z3#%u5MTZrbkhw_^b%C$A0A>gyVUKks>5$MFS?_r}-!YOP>q0>UVD*9BZC=#{Zi5&D zW@dMC?=V_`qfCqd$Mkc@$I=bRE=iJR0WpV>-aD(6t_c_qrn94{8urRa0 z-5+ZBn+52Y7|pAA8YAJGtJW;m%+@S$z%cThQzLDUTy_NDvbQk`0Ab+-*f<|!S`!l^ zBON0n(l(BlF&x_jV%cpcNw^Na8+&DrDv}D8?@wMpl3) zV~&Jpa_g)WlNrG*vTZ@Z8Byds3L}|ulS$4dDW)uFT!2K7Vzr04Gd2cdLV~0aNQj*= zl?iN(h@kL{3~Vsmc``A9FL#QN8k_`^g5nnx5}au+H7RvMLc)S^WZrBiNt#RY-$ne< zux?7;)!I+<|G~o5zfJr%1OH~=-wgblfqygbCmA4Z0{@j`5P<(c<<~*{72jl8xE1qP zk6(NLkBt3Q_r!nw|2hNzK{EdXm4E&JDg*yPGXDdWUwQxc`uh)(`5&nK7xF(o)RN{O zlw0^8owEP2|LM^XfjJ}pK>J7Q1OZs9Vq|<`?LX1}5&TNPojuw=KG8px$@jnB{;6hK zaAA0I#_#0pdtHAain$ZFRQWq*hIxSA0STM(`!A37rl8-vNq3Lg7}5EU&BA; zf24s2fIYqq15*R_K6~I7#WarmpuL3KdFThxKd=7if1E%Iwp0$z+#)9jUv2@kgdfhq zyt5^UKX>?p#1HQ(~Xq3^@v^oSlE!tFftgY`eJF7`jf53+xp9ZhBfp+zZ~ zceVua=MI06SnU5ZSV#U$$s(b#^^}{hSp3Ndl8Jt0kg?Fz zyt5^Ug>t_|FZS;Xu8sesHf{|37J^H-orf06{T990e;_dV+5ea^2wG@s-q{kwLb>0f z7yHjyGXKXx?m}BjxSfZ7x??Tw&5LW$=nw1vMPSVm{f_|@E$|Oje*55Gbm2fFLwtXx zoAG0elkg>%|MbZG$ymmpncDp0_%nq0GnEDWh50W8Yk#z#rzHY+&}+(w#~9$Ii4+<+tbs&Hag7Xdn=n{uDfM+~miLX`#w*(LXs|04y}% z2aK1vn2kW-LZQXi-$KqW=>_h7A{Q#9FL^O5gGC=P`y2hY0EVA0=Fv5vZDEjqqyIrc zkoD8`mjy%?jR}9F|M3vO_2b1n%n8C4b;`fdKXF(XoL|&f;_x{jusEc@)BjY%Dxke+ zGN}tzHGZF5lKR2l>7O`OMhiqL<|oq?!hp8yhc5ZI`X`Pw@d6;`UDrR^U*|0b0AKUs zsqEj}ej;&d*lXSVAhFJSsfVe;+@OH;*1?~Ls)d*7LVDib62wBe8G3XiOIu_Ey~YgceVuaTaJDqG+hDK{geKQgJK~27qKmb zmuU7pv{3FZ)01BCcJb$0^Ujta{#^TyBf4 z_y?!U-b>6-eu{U#u}cs?3I7SO`2NTD8@>O(JpO#Y|DOZP8Wu0~{v!4znmrHwLgm*m zU;0=d+=m&3^B?-M-?{t!m)j2j!*OFHfBi4c$8Xf;&h=8|Z>TR8`8WTI z^YI(CrSd+9{f7Etk$>~QI3K@Jo6Gf5;Qzf0=wB4s1;8=*ooryaff76W3R)-lWd>laj;V!_fsrUX zsl~IUA}sY_b-lixmI?eTR*-~06x8tB4dAir;#ETv5(WT0{6SyT($)bK~4@Y2kmO z7T^X5X%lTtQ*ABw3l{8(M%q{8m1GaFU)MIdrhoMcyQt7sArYcCAT<{#(Lp8)1p(%ERV{EOz$Lbwj@Z<<%XZ2;^NBx+^T32zi%bK1a4#4M+|41tiF1s zq4`lCd}04~lk8L+} zxyRH(E_%sJKi}}JveHFYb=bU2jVdQ`mxQX8mJC+0%U`d*KZhxNmvnIMnPFMpNt9nu zv#k6?;qZ7woz^#?8{3XG~mxv@_6+*>H7W3{7;tDug6%esT7Se8@?1YDxcm~7Jtv* zP5Gf+$(I`z`xq1Y3Y_=592F_B^Q%zU&qlMk0D%p&~ zUgaKgu4Y(Mx~6HPsq%<#=;cBIRNAV-0rhFKh%Zjh*ZNDG)oL|7a4@7dQfsAgkkI;D z=O#o8=+=I{_|i5gqUZD*ir&Vr%^n6J=fgV7Xuz@-*D!60ia?i)lM?5nFNiljO03dl z++d*Cym!5o=J4xN)GJUGR<+L>0yq@hS{NmSD7RwMai<3!Wd~9pzdFGoFb5VkyEvw6DTL+p(IP3D0=txtPgxf4+$Hg5 zIsLKIOwxBkT!we3R*l*)KX_l~F&bJLbV~zco-nXlt@cb0&-6r;e(#G>By}+x$m5(; zyUTr+t<4%Oxn}PRUBg=mj0MhaYDz_74nvp=Q5W8CGvs&f98^5=C{RoWALm!M)iZh9 z(dPvr*Yh4vtarPWW$&maPjO9(g}&8=Q|i?_o>8LokrOeVmXE2j4oj&W;w)=$SK9I7 zX!arD!{{u_vx7XzhQ#ISp`XQfvAZMuG+BJ7Re;bH=j;gMk&M@eCJN86jL|t8?LAc= zDZbyezxk8O$)Q)Fdz4mOQ(#Wy5Zk7B#OG2?mQ0nF&mj&4@%u5)vv<1)l$5M`w!67@ zyA$?M#KS3~)m9gYP1mU7WJZ-O#9d+~(=CpUHk|R6$cRsyntpxjvi>=%UD4Jo55+dU z690s_Iey?N{gazJ9Mu6gwrWiA(@}*ER_2sV+!QBXy#Ew2(EH|{Yast%p=axnr)U=Z z!LDNpDlZ*IrH{zpQY8wG+DJGJM}Ar9(p*{K7v{jtX7|qUk$t$UYSq^PU9XP{aWX#C zAK)8C-C zF50AEvNxkth1CulK2G8FGND9$ zWcn1PwsUstX3CchR%pRKOU+uj{-pe4Vj|^7wrnfkpvJ75pL!wh;uC5Ew$K}+C~v2@ zozk~&Kf278cGLS}1ZvbEu+TJ|;~_tl_#SyPt(E2jzWj10<#mX{_m4bVZm}DFv0nMr zFSpGiPK0Q$n2;CiT5CSKFUXrg>W;yUDj-xT&|4N=#rc_`t*nJ*q9m_|$6;j4DQkA4 zekFsO;|~Q`s1#UpSM_HD0k4TL*B9+uUBt(81Bd)jgG4s#ouM>3=c1pheb^Cj7j zir?1_;yt&dgI7oeHxZA1O1-3H-S+X`J?Z7wA6)IYDyJl8QuEP&xI=CH-C?E50>?0i zWo&lN5-C<(Te)>*)Ob2w^b7a$CtS|oZTwY|h4s-_nFm*Hx#>$VzVEE1{Wy7Hd&vin z_xCl^D>vpF?!tt=2rmEdwR|(Sk7vW)+ml|5cPJDL4z}&{=CE=M{+P!}6Ygs_;*S#8 zdx(Pe8(mgAKK|3m$$V`1x35Ld#-yBm9;!*?4y={;DdpO$t&z8Pv}CFhNLN++suxW@ z`BYc;)^#sWHGfURtpNLkq|}tR;f@=OPg`m~=r8+r?xVj(MYfzxHOWo?N=6)OO_?Cy*cb zcIG-rBAZ5 zdn0n6@O+N7KP;{G((c5SI<^ZfR|!t)F_QQx%h0^ag7`28#eKWknXc*&8r4w0!!Z#N z_sy$3RtSC!)aO5aS!O5wN~3c7`zx^Ka$)K_KHVRRcbIt05-TVExLQ|QQY0L&7{iD< z?G*ax+k=}aP9kMn&veUDa%@tFM=B%hScXh3r*!-RHtKO`Xl+OhYcaWR*ze^&y)7b- zzFN|8bbVRvG4K5pyIw`5);eievZ+4d5$Eug-z{9Q?(?xJj$ZxGV_P=wDA^Y+r~0n< z)+xS>^WVZ)=$i&r)klK)^IjIW*{dDE_tV$3R7amE5OJirR+Y7GDAvF6D1BgZ#D2{Z z|BaF8a4(;|*^E|wlKkft#~5yLE*GM)I>;<^&9^U=Uvbq7l%~YVYUbO+(cG_sFB-JI zuB^6uzbVksF~7Clr)A_@UiZdxZY#{KiP9!fwPp8sf*%%pG27ff?C`R9ZE^3L;KD1a zu18)>hVTe)SWnn}S97O?&o1vLmKus%UG@yNJ=wCFsZ7RU)wCX)s_(5;3KdP~Q_(Cg zug^Q&dVop_Ij9q)|K@#g4)s=y#tq@Sw-RZd=k9kYThE<6ZuwYmz1AfadMAtF4XP&Y z<+fttq8dIzlILeoizW^R_z)aK|?Tx}w>3EwT27ea*Jk-Y9m zj9~D974bl2p)BTOV}mh?uVS$Sz1h1rdoT zSxAnehPI(UZuKzDH#sh$5f|01|LOf^t3JDScmr~mcruWB;M>#{276tbOZo3Bbko9Q zS3c{esmw9F6=$Qc&6@TVW0|`#_sZpu9PKdn{XHjBlO8xJpKh%%7}E(1srTRU}XCLV7<0}~qQ4i3tOP=2MfVJECu`PI2dOt;H#3tP0*^OZ8 z=Wi0P0CaAc6#K2d+``9Qp?0E2F~SEDR({A|mmoFy{Jiq518vu8+IIWDe!K@Qf052F z(CF}Xp<`^TCr=6xhAsC5O6ReesY%|BIy=Q@*_R#j$y`W1;dCo|!}ZtCD5_6(wa^rQ znfU1ZIEbrjWv1l)+fGMZZ53Lg8(s~I`ffddT3R``l&P5io?q^*vg$ZaaQc-GGA(xuFR@#T|yk%NlcD{ji3i{E5* zGU{big$Vb%M(2>QWdTyh0I#F3&kZ`(D^wn{8!mfiHaRNh zlfG}|UM|t#N=9XS=e4_f&NIFJa@6f<4y#R?=k$Fw{!J%z>sq4kdH{8p-Uz*>6>3?R8&)9XeG#Ma-<9DE9Wtdd?cV-I zkz+IuCcN$*xFa!^YyF%OfxmB5{;g}X8f!+djbCZ7ruIPd%Xaz6Ck5B>J2>t-R!XO} zB!)Ls?KwZFx!R8Z>`F|;WOvp0>6PUhHV}NMUo*ac(z^G&@pRHL{vi9Cs<*}&wu{M5 z=4ON*`-B^Bez)sPl&heH#ojNn&To3xb)6D*^EK^lb9H%AgyjjRkMrj-!34V(6t_)s zt~p@Vpq+8%F^fREL?A;(&}aKpH`ZfDOdKaWT6klhKPZ#Zif0vXl~BXceWMa}yejos z{z#QQ|HUTroud2CiF2Nye6gk})~kN^jW|aBT3hM;m#_0=Uv7V+x$z+5JJDeVRsW*>$A4_!J%jDNthAI}>%Tg#e@Wwbs@n1E7xC8Aa~J$L z%+J!l%i~B+DAPHSdhMbZun<(Z*QP4E-L3fRG{p{yfUl0>GQBd-yOzH?FvXbc=zqpK zm#-p&`W9a?yRg|;?iC!BJ*V9Kv%|Hzl(v}QRVZ84uWfvGP#PMF% z7Tri2xp5Wx@}V90_HwuN7e8rl(ylC&)cqK~W$fgK5HrQH~OHqGe@o=KCM(Puwq!@N_9w}c*_chlQb_Y^6BiF0!$oDoq07e zdHAO?)0LgRd{bs@TmjO!N5j=;P%0pXH#ktMd)GZ{R!oH3qq6MazNpAEQ!ldJTbQ2i zx^wD5Anx>D3yzmeQP*^}9G0y*yYg(qHP_u8)Tfw^JlLkYeB+^0Lk>YNHaoDFne^Yx z=uBU0E4As1z+Tn(WqLXI)*`Jdeb&cnT$O{LT^H2uG?Rb7qyL3#-zq$NM9L5<=j8x{ zuhqM+8wccG=bvjm5UWsi(ED-b&e~;ZSMhouuVFi%@L7mRj6OqfM$o#-o?exhcrX76 zMJCl0iyh;cAgWD!ZzJwy+WTp~9Sicm|2p~pSoN)kX3L}>e}#V;X+Qlo?IT5L-~7*T zKMI=I*?TFb$G%WrxBFwh_hxx+%GT99&b2ZRxXMCB`^M69-@i?`bTXVUNa=f4q^T+Dm=I8xZ>Mj}0&YW(C0(KawaTnqrv{^(~TFMev9GgCYGYcOR z6Dni4X{Ba2x}8=-Md1u_l?soh@grJ>5w+y*^&VYG3ZrPVtJw6TbkS_j%f;^*uwHw0 zB=Ee(x;^}-S{d<=8VZ<0WkthEbeRepmmA74xhL2;?z^YcrnFM^qy(?(waVC$C&s-` zoxg-x?vQI3G;hWXDoi*}vIgk;e0^@%<+YZI&qZ5!ePc0K`D&c$j>=25AEiWNAC(U6 zc{9*z9p`qqj4GMxMa2P(M{dJL<^+ml%Bwc=37lmdB7E1DVT*6GGz8S$^zs(DsJpF5 zUuQZun}vd???I#alx>Gz+hv6`>2;ZsSkC6q=yRcAl`ng<@+40+dZ`t?;B~ex-q84F zu+!w!>5f&ZZJL+(!b%v_t0JTC*;Q;jcJsuVtz*T^J@(A%Q`U-2ep3y4^c%fQH|;Pj z_^`T8KHg`;rt@g)OzSKy#$7b_j7R9IGU{R#Bkd1AaHgf5k`2<;9k^rnHQ%@hrEq-Y zVpvU|mgWPCoAo#OEQ-tzO5ubfZn+m{^z5&xr{JET-p;DyA#P!%t;!a?PJHl}NQE#Umf zX7%nX4fyuTFMJ<8KjDsjWBa5eb!UJ%#;4BhhLi7sf)&~4P~C_knacHjku9N3nVjhOHAmIZ%G@@*%I~;rF?CWLIM_d{H%Docq+=_kOeXTBh!F8OhF` z(pdHg+k0xe^fxN%k}V%Yp9nGT?vCp`?p8%1_5^#{iprmv8z*+U>)cA;Pxjf$deW7M zFQ}gO;~IUHRa;t4s9BCHOBu31x^ZdZQetrNMTVgM;ykRD1$*}&uwF5%PGiRYAd zO!B()?HMSRZ2A-y<5x+aS1PkI#p<2`hwpaFBO&c|Z-sDSYC?Nn%3##Zy`R2V&wgxO zp^>NnCNcjE>g)Aqd}H*jiKs#e&G#&O>>ly8&Od(;ZvQ4T48)k`kvJG_x!iE#8iZ@>!!fcdueXD z^PcW>gHU0UpU&{WnyAw|?*v5N>pSwL@lrz+b;oPX5uU^OpAOy~yk9~Teu zYc|_us#Dk$?U`OcvFY-|a~CA=ER>ar-mCU$=Wtey(;mJSeOnA$o6^~n~8F6`KC<>&C?7fZbC6u1iuUpgn@5p+v&{{Pgt*KX0Lrr+q&+w zQK%C3^hV+RXU&E=$K-8JfKE!3`ZT!>8Epr3=x;R#IjmipsptHG9O`Of;<#`{Jto9)WA z^`|CSrA?l?yl<`v=@LJoyMu*Em%6r@aRpAv!x99buAJYkj+`#% z)u9`G4b-AF6E=kj$-Qc|$2I8hsi&NvR`1z05O6?gL_X}b?V5@K#tmmPZpuCq@4c&* z7M4zl(G5&{^_ogDVZFclr@IM;7|8^!T}dh)&vFjBk5AmP=E#(KznA6$lN6oU-8!YT zWLxvBv_~>d8-n?HzR?rP<9m*THAwltI=Qk>VWZq`=0pYtg)ahQhbC2TZPGV?{9e{O zpi42>p6B%~p2@EM%DX!x&M>5C-Pl&~Ic|8OfArQ7WsMW!z4hyJ&#swdTQ^|3y2$1^ zfjYCL3foYn)~URf`K{!-JhRPDooi!m#U3>cQ##>voOj6RehZ%W9=P-XlRv_#WNI+f zbK|62yX{3yCf&oCo~<`!aK)(M?WPxUqL0$6Ub&=th${Wg<*TRH%bJPWJY@PZ@FZ~5 zL`iGYv2af(8}}*hmj};;y{&UO5P8R5yZre}8`K%@&qI5;_rp!MRgqFx1OklKSs(G7 z;PW)QmePg$@Uiysp@AoQY_hLy`d3XEV+>oE$R2ufo ze`j#_Lw$?As*gp{cRONEFdB+al!Yes-S|dayEV=$dBwJqUr*K5nI8WfXM5aLS8nxG zuKlWwSG2`Tgm@+Qp4_>bqpyoliJeA$QoM-1G<@$F!3i`$$rysvk?K`~wPEQiT za1xjW?Kzcxt3f}{O>}*ZUS9k5{p`)3A0HU*|3KN0sY6(c%67}4bGKDFkxRdmcI>66 zbX2CrsWE5n=bwiUU?0WvS29IjLv}bNn&}Fpo|8;7Pkks-@WHj-Y;Sz0`VMcgVfLd@ z3P&+C z-!jgv5m>i7PRcm1vM_wZ*p;`I%)XrlJ?9@W*E(M^C_gKbUlyZ$sFL!~F~gfa9u_N- zU;8yBfSR2Z9)9IQTG@z|{`9&U+S0C>QPDCagL@c?ONSo0Ahb6w5G+oI#Nce0JC8B{msB+R? zqkH8gF8;d?b(=)5G~Te{Og4 zO2tbYr`+%7Y?WM;rY2K;ci!jEP8`0SuyHa}OsR{dDp^B^lI_uor-bOCNbP~$S9;`W zi1zHkHXEGWys!-`0#kCfp6Ydtx?5%vMjKS-tUQUo{34nC)y>_$qWYRC7Plpdr`_uK z9~kC3$NSQ!>uFw3Y^$5OilFdr&U)u#zHZA6T| zKcL6mWo60TcaO+|UCFS6Ij)4Rh*=<8JR}Z(Uz$qvgV2Y~F{WWeRos_|f>b4G30vip zI+N#YmTPU~K@qiMr1%f+brM`{o77mBa!{(~UV562r_z(2&&%J5I$hnZyCYn$y%Qaa z=04luo5CC1d+}cU^yv0<^@q{hj+yWA9Fg;;*WNCN{rEWVX5aM>9b2V$T#e$h(_+ec z+!WH=vcp~=;+9vhsOHLs@C(JgD?g<4CyEtr*~Jn<8$51M=Zjd57P*M$!?2YF5u9%y zoxqyvgy!^wMjaoD6LWouX3gh{yhhEIcDM3uk!#uR)GC_I^g9{VF-Tt&duRFe>epQ@ z^=I;L*|l(XthA@9_73*)i+-bA8iOi+S4GE_Y?r54vD)EExIuer!NaaLQ%$xyZ&UV= zFHK(!%z9d=cc>sxD(0?J8qu1*;Z$Gk-g-_HB}pgjk91!llbxwv5VS8S4f*P&+PL`i z{q!yIvf;Mua0h+^IEkg*nkiznas6A0$5AULUa&PG+(Ok?Q)y1_r-TCN{QV9!k^2#y z_J$X;Z%c@-%=~(*^0rS+&uXI05w5P}FVY;hrZC?Asi%l*rg(iLN2kBSQL@n*eUstP?@%K)FDj(doWnbL>NP$60DMR%HaJ*Dae-k z=wQNzv4Z@JTodghYc2)LGCzyZdaZCO54WP<@geQTOGD`HK+fWKQu?fFcTQd6>zRCJ z$dPNS&Z@CHo>yYsgxMrpoW*DMCNnln-8v~HMt!UPHA=KDcvDj2frZRrhe zd}3Tql54}pd``E@|3&V64@F(AF>mgOfWW zZ>$DSqQrSd{KI5YHLWT-MaOzd)$P5_DJHH3-mNCA-QR1;h&4l>q~Aev(pzv9tKsPR zqnK0QB&id3co{1Xh&5LhnqfYs_mAm^_hp+6JKriQ7zxj@JDPWzQFy=#6J38PO4YUH z!>fibkJEM}iie!g>3i7ySo#?InHy)HHXBf3d_EkF>1Iwb&o|sHVY-dR%gH)jFTS!4 zwM#Zn|Jhztxq;=euPJStz6tb3sDEaP92V(Cg`A7H#76{On@&GDq|ayi!i=X?bAP+} z`jNMe)y+pgB(>)Xf3C1&xSg?;kf_$t?}KE74-!P)S3X*WQSnXB$5u7beY($EhSI)r zCY{pq>#6CdT5GP3$iseS?yV(7QixdKFGcGLQAE-^<|=;&#DO*uaL;{GFD3wq|k z8lPxCb({h=uT+ID>@r_p-WI*ht5sHAuVNPG;b9!kqCD#NiQb1}?ENYaA+y!uek-r@ z)Zft?ovb~Od{}LlicCV!>d7uns%I5<<35b#KP#f%Gpr^x)ftk>9($Ow!XRWhDVd{?adU5-j4p~x}A%^{TDuUn!IzuZ@3Ga0b+DrfF!Hv&8O zjcEF8onVlH?T!ilZ@yW!4knL}bvhp|C(w;dPZSf1#WJgW8&7gEZR5tBjJQ5P8!l$# zZZ+xa&ns+fs`1WmzhQXQI-cE<4RJZ8pSCa@v9XV$+jW#Vv@NJZ=$mJ(jqWlP-}r}3 zvWm&-JMB+YG1{FMd(4`px>u-ut8<=9yy`0C&Tpp^83{MUV=kRPOkErywLAxH$8pidO^EF_?bGZ^PSWmR;!1 zlYr0nR2zzK_th!C^RP{wwBj|Ix)OTwuHW@l{2Yu{neGJCYU}GUaymmM{Ruqmy_*tm z8r4?Z+sw%J^fuKvZp1#DAgD3!r}3I2J1`*sV#(nbVXq2bzG!~1|LMzE0ZxWyl~REs z-7Pn|>x>;E;oW!l<~_FSwIiFEH7cz~Z^|Ay^zAt~VNcU@9Ail3Lg_@086A@vwpXfR zyZcowH}4q5Q@)O)yT+SFXpcmmd(?xy)vZW?yQ_RuJwMeN1NmYv-95GLv z`DJ>PlfzlmYzi4Rw$z;s^-(-$bt4&is%?rb}Tq4UC)`gnzI>6?K^ zf}LK-;(|VPS@_>skEJWMq|_+3ZwQXgaJnugCZ^XKTk?5tFyhTYrP~4nHJ8=bHTEj` ztd{TLLpcXMRw7!Gw94`__{3(3$|XmXe7n2}SRtx}_9X z*;i?8KW%p1+)C+s1Wh7=8!OkBU~;I#W`(wE?mTQ1+&uAIo#J&=EA z-@{@y+jZ(xwz>U9H#})>J!!qWO2_ihGPS*dRFPwO8%`jGb@b_JT?%ZyI^{mrAKv)X z*hx3m#PCRdOXP#iZ*yPm0n3x=vp?-!{pmRm{}yV^2`*o*42gS*xA%<1&@>i@36Y zJ{ys=x(ByxSVDBr>TByd+Q6=ngNn)9x>5~=mZ{!)n=`f3!y1<5xin^FtS)?U^UvpW>B(QaD3FLydy(FENxmh}lPz#mHM-4DY66A)8cXRJb(kZfvML2*!q@i?N>Vt~p8F)dZ@{mMLMkm@60f`J zUPBnweYreT%=z7|7=%Kw61z>27cC>dVZIUFnKARunAe0g#T?XzJ5d$*xLOUR{VzVW z4^ioPSh3PR95M{we{7$zox^M91JdhEbre!Id$nz78T7rlbF=otLZ&Gp`N^CuLUn;B zHoa}|+W(&UXvEI-VaB16#5G}DFR0m%Z$Dgat!8919g4HK9EF+=Sq2+SxjK8QHyn6lpz=Kcbb)}c7=mjSEE8L>%ZzUZ5 z^68AS{=HSL?I`IQ{|8ibNDtvaxpQkmRy~X4Qt%JG$-=ojfYISZIDB<<3XjQa%p7>n z^x(eq!>V}R0jzdRZ1C_h7HL*GhBR-q_$)~E$PO?9*dTVR_NP=zaL{oRLI%Ct` zvySU??lIlAV4v#FsxjYLoKcF4+OR|38ZeblIYZN13C?%6S$y*>8dOrvVDhPTyWY%Z z`1F|ovfq?=II=?6oXTo5zC$omL1SI~78d?JxsE(+rj;LgeM2t>rBA_$0%0WkHBW+5 zHybmmTt3%CBhtfT{q>x8TU@&W7~h6FJM0R*aKy!i{@kZ;8(YdJRyHLwb=;m*!m6h= zn^h=Yk~(0^a)-O*s|`)r>2I7x`hG8`T+NBg*aR-}=TSsw#Eq=hstH$`erJ^t$w{lX z`Pr3?@JgVKcSHo8W)0x6>Wc03J>h#rCQ+fC82ddN(R5oM(PXMeW zQ`@D993rIQ^jhKXfwK|zrXF2AlAyI=`Bzl$kRRkU&(jUnEQSnvL^WJWbCXkV#|aG;)hr{Ju1gm0Pz7 z{{UIH4*FW2%(7Aw0D6AXZiwM33bmS@nlm2^=$vDneCf;$X)n-LUGG9@5NXdlDFsJA6wLgVz{43Al zVrTHSe}!HAD%B36=0R(OPj^69X7%-uy$6#sh|q~N@dz}ESxBDszuYZ*^ZwE+ajye6)E4xF zm;-pg!Xg<%;^}3KPDjVu(JK#jKNDRQm-7$`i=y4rG0uS=T-G?O#MST0}wJX9`n5nOFY$^QK z>uia|ag$%P2N~hyWX_w1?0(ZMnViQ2;c%MGA)F>2%gOZSyeec;^c!$APkDzGxCa~T z+WUwQAIBG%GiQ!efP{9N=Xr=VX_9hoK8D5=zXFjo3ta?Sbf43GxIS-L5nJSa8C%c; zx_$is*8%@Pky(~5nNLI!kzGEpHTzs&lF*mxYW`g^pKva3l>=G`Uxdh{ghunqfK`-Y zXh@&$H$i#GMvnH9aeb{AwPUzr*Fcitx(P$hQQC8oY$_8E@#7IQFIGDFiWP=fM%MNV zSv{!GotS%{yj%F|ajh!kOIHz}3;yp2M5-nqawZ2(+s^>GipTg7+Qy`^BnMo`9Vck3w3`K8lv0=R2J*+KHiwn^FN42Q7s5ZxA zp>U$HGmR#d_4~lBgi0FCCvu6wTY2Mkn~9l4j`j|R_K*SEJWJ;uD5i1iUahXKqyhhR zC`1d`<>v$0j{->pq7WRFwYt?$-SKfX2?$J^jDg{)GoWJ}EvVP#9F!C+aR3Y?8D6?r zf~=B#jX707LKB67KpFAhzI2&a)`lj&H<0XTuw~uy z0z}s(GkA8eqaDyQxBYV~xb)K-eE_;FwhRd^-Tw#&|8|{c^#FrP4O;&fU;|_E>P5Yq zQN6x7^xr9Z2%f-NlLJxd|8Q~+^9=w*(Lm&;cZ)cDrgR}3rCDtTZ=zQ)_kSBb6~xB= z+k?HKJjnR;uzloX2v9BIc0H%9@X62`Zor2Qn!6D(*C0ak8lo1!E*XY=QbLvB-_=3i zIc5J_-Ttk-ZV^n!2UEOr&SJ@f1XD`EOhO%{&y7D}ir1H5+i`dZSKN%bnSUogdfUEp zhF}R0;1B*(5HGtGjo(^gk>t0MJ^msq?V5eOpWwbLGt!B~D;{C;r^%IwoR5%x+}Q%% z2@UCdB`&K{aoSGmO-ELKM_Rs7PSb7)A;0uQf!}VS++K%XyF!yHJIeJZKsE92%_RIO zq#7&+`?7JXwisBSb$=IinZ7nK5T0QhCWmfjx?}sq2LVV)h;zC?AJLF=2HFv_Wo=lgd{~5&v4;}%OR4!B?}Oh} z(Tz+%0qgFFH}VTGKI(zyz4OA_;=A?NZtpz9GH|)4>wnKi>_iF@o{Bn0+5*M{I_8&pf?Mxtdj(PYi z2u>T)HBH>cT*?9tS~N0zAOjUoJVm$ki|wkRoTmqxvsn?>LSbBZ*_8FaXnv;77+kyd=GZ*<5}UU>tX zqU!z|?0}tRF%CA1iVl*oF#Ah?)SVzH5HVPh0Wn?Zwi!up5QW&bIPENm1tyobEMOps zOh!hR|IRsI^QhaO;Ht?PK zNl*3Dibxmwv(EoHQ0u9@44N~8$&t@_XaJ;MFX!;J@3ynP+g|%>yuRB?`)l9fWPb{q zAHtXZ6gTjuKZE%46hN%rurw2VE@5F%Z5Y=vZ4a9)EK;A6zqwGLDY&~7!{~{%=e2kh ztF5{OH*GT}Of3CKD04QQyX6-XdNjld*eP6sQHNVox;Qfj!@XMqA4LJSF^R``0JJrj z!5KvKcD4r?FhOfY9>Z9Zql0$B*CUPmp9Ze5VErbu zuA3F&HPDa!#I|eZNV4A~PiNiJ>|H@KgyT06H$P8i>^$UcP6jIssS7kDb&cSH_-Js_ z&RpRGxfQ98goSeRJEmGMb%GXp;+ha=rl&-FeMFn&fk}U@*`iJL@m(V}o3D+6dmt;hxzyfJJ$x+)BtU~G zh!7Bx(Vm(=E<_kWTnO2NFC0%R%^`OsdF1z-Fl{BKtX+>sRjlN$kgoAb8$x5mUQuqf z=WbM9Yoj!R)?T1^+yn8#E@*MO%iapeSRhKJB=)?*6_VQ4`0-Jy3sV#0?nlh?R*t7wTEfx9A;QkKp@ z*GC)rC|S*`vI_+8c>D`8bs}Tap6D+q?S@)-z8c>4{&?BD`jsljORFSps3>H_UW1Uk zSyF$SW6S1o4|Pa4IUN{ktx*B9X)`nbB}myzL-QOLUISe8O?|X?DdB)Xz%P+*k#i+E zEi>l^Zt#fKpJw0SS6D{nro?LKoVs`tme3>_`L*O((3ocITI3ekQir%(-~3f*F{0i> z8u&JjRSudv_(GHLLtq@WHZ7tc0{xSxB4dt!liV7DkcO7c%b2gJxbfiQHWpX#Ks~yZ z{~6C|8ru|0Cs3Y32Fs8M2c-mrXE3E>N@kyx zFE>P0HuFcuRM-%VM0&F3>d--Nhnew9u)Dc|nz_s0BxctpdRa1d^UG&p`wY;9Gz>#? zlgk=hokZ`i6nYI)pWWwS8m&IG>}dAnUi%jeG-Lw(JW1@c<|(RZ4T{IUSJcm7mE6$k0zuSDjX;lA zyt>YI$5186m^U|l=OpJ66`5ELQ!)5LP2b5C!SkoVdm%7p$^S4|9{*?yL>~?iY=V)r zz)dO{@7L3YO_PbFIpn58JHrGyYnPhg8ynleHLbPp}*m&mE?g3 zI7=c51rz^$5l2`{u5wIF8uTXWC@Ip>!BvI;|9^bpw4Mpggzv2pcT<%3FLtXh{elRjJ@;#F zJ%)ZB@$S_&1YGa$04wUt4L|tX_4kbJy*Zq1lbr@U`rFk2!`s~xX{3?9iv*bCwrCwE zWm>68ANfBf0wAPdkd|dC5O2vN_>Jm79Z%2hrL+F|0~<4A|9=! zvjea7-k>^&#}`Cm%Hcj_rSidK85$d)teW+@SCGBi=`D!=cWU)3pUxZs|5QcH1zgdg zo(8o5PLLrHQ_F?Iw9xZ;qHhNGcjPv)9~=YNe3fFzZ25!ybh@4Bl@nWK< zN)%JI(ee6D%wOrcgDZHcs5B4%LUqwY(<_f;!0cH@dq4!k12nGmtahA6w+flZ@cE6l zI{`93kKh)Vl-_~Uw~3o>tyk6O9tlH)6gq2Y>^_8ou(fJ58vwT3W1Cxo(3%;o=NP?} zAjeUiZ?68lQtD@;O$`$TT86nP5wa9xG#ZjL|7!RAC6JR!2lG?;z9i; z1&l_i?&>{|zr;w`-n(VHUH3}LBV`A0IJmB%r;Pt!g;g@-NZ~!E?K8}HlZcOT>=gEe3b>`C;BVvVqsWiDm#J{!wFq3V(p2-m{*|iem4bO}5j_WC0 zxX*xSoiLFNvzdqRf?xCKGsH;U&(wjj5{dk-)Lwa({Vsk~vriwX18pH(u*Je-m^6OS zNe6*(827@Q4Y!SB1xM%fLiP={O39aqwSp20akYC-CnriN_8iq^bahJQUscNA zJ#6}2O|Q=~O(wD-HW5t_VI}3eMOLo`Lrf%NpIj#yz-E>}Z-epM#Zi%E3mA*G1?k=v z<5l$|VzKUyRx-d8Ey@z;zvM3;HM4N5b$@b<3ECcv$m5dD{tdupk;Us0}x8;J0uy=uQo^ZA)pCc*yE z&;|`t{n`!s;w&c{GuR+o48OONdIc*(&1Ig6)BbyR9E(pmUe#`2=kTrnLcqS-_WNrb z{uPJtudlYTzS_4R!jS$HJ@(L-+d=^H9c^0@>4xRF3-Y>Cp?%9Dv=kE;><>mzIL~jd zddKvHy`{UUWze@nk79g$a#>9sZ9&SM^Qp7^Nf8A*=ufFri$-be-Fx{>BfuH(o^u^h zqjs!=ROI>6Sp+?}5Zn?EBSEnff4*E-n^`t(IT^<5=+S9Q%fkAN6yB8P&Ri@m&vQA8 z$3-@c5O2Kt9g9?xv%y%_XkO4Ji8C3v4MaDE6D= z*qdT&VB%Z6(|9B^H3H~qwE&L2Dmo{G24H;Hv=WdnR9OZ_Zvv!b?73o^K`evX%5CtWh=;>L^S5f@NwSb-T!a6MCd_2!M&VmFv#Kf z1X~Z37l{$0-7L_6VIZyM4SW}t<$*?DeF2zi)*=Y6Feh%4Rkq^8xut2KmHY7J9yYXD z#Iub09sSZXNG(;XoPlBFS0_%j@GoC-Wi`avBpK7^j$d8#(lAheOV{*4;pWVDU%e28 zLVZT(gT>Ny#-C4aa{L!}IFN!qO?UpRrK25_C)o9B`2P2x#8ib{21B1C6GFp(uKW4F zAplloDv9mT5Hnb^PnER6|5ai{wdjD57^e^=*jOpKv(k6X@*^OK+0Pm;VIt0-VBC z!NHH^_94+c%Ewb+5v6`z0X6skeG8l{bU>4D1`EPN1oPMO73x^8QHy1#(%O{6W#Hi_ zR$L;xcF_Fd!`3ykMFW z`Kb0AmSnSeoF-zzboOigY>ekHDoA*#j8# zvTBr%`gk@-v6ut@4lVSApP+_b*KoOy!N%SXru@cA7>Uy39#VH~J7FMN^5KsOWAEbM z)V-9e2rUcUwUx#QQ34<;a;FTC(TgIq9E$rs#2H;z*cFgd&JfR|k{GKeSqSC;`W|h( z4deIPmZho*Qzo6OZE9%id4z+6+?}JNX<1Rv2bHit7uzMRjLq zlu-6Z{6Kgu=(&&*C=5$V+r|??xFR>)$+7XZ$V0UUW848CX6RAfBw%IjU6UXO`c83b zfA%Y+R)^_^#7Ls5_7Rd~xqW*_NVU5Cx6+e$T+)_%wVQ{MYqis&zLf6iYj1*SF4odNx%DtGS4aM*7Ksl+goVPW?ec3~mHSF5P={ zvdencuJ=9A%-?F-P5}%s^QEWcF54R5#rj>QLg33T?C<$SIQ>n=Ujo5IWuTnmM~fzk z-%+cl>F$5`VJb3eE8Xx0AUhVGfEA#_G{`X{TSK@FeN zQU-x$j=2>Td->2=@eQYzb;e?o>*N5+=1mW13(aWz{wM+9?8KRZ&yaNR$zm38`$3)E5+WquD>BCGX zf*vf)&aI(z5h&>-rP<+AZLsv32EhrbbJ2FtRulP)W@S$kGN9zl#!WKx5cJ zsj*N9mJPO?Xfg3Nu#AvvKs7gd7g+)f??_9e254dj zFd5pc%Tc$z`No zh_Pq?LI7Afgk-iRUg~UbJ9@8Q&FD}uouG>J5B)}SAKl-T)N3hj%u$f^MkS(P5f%gj zf^dr+h}C_Te0ILP0J8wDc2HzLTId2^3e)adBw=7cKeulR6ZJcqJnt=a7)&*A zNVD9dME(7xL%VNxW9pj@IfX(p8zM&?Bgja#9+PMV`j@P6R&siy4w$C3nYKDNbDOFw zC;+7@%8SkPiLTDv^)W`IZbNUyg!r9LP@`zDUmXWbEclxPvk~276SC>H8hA=Khj*A# z%z1U&obJ)ofo`m%c^6M%;mn^;^Jc{+ArV$uhs$g@<$TLa!&Fx0YYGpSZGsZeGxupW zXC8B{zg9rDgb05XxZ5gEbadd3*XRbY3AQ89g8Uf=^upVa7g;mlI74^O-QkDonr^=X7?GtjH zW!;L_G+T5D6~ZIT;4YgO8y(wjk#=UAVt3wZCggRMYHF<32XBgi3#}MlETf zs|nz+b^2$1xb|Nf98WADL(`mi4lvx#q`6ro#i2vQJ4wRT_V9yBMYZAeO`PI{JjqiT z&25X~+$FAbyMiQ7cr$)ep{UjXcOj4BwW8cT!$|B{PS=U^?%;qB6~p`0H~AwT{yI>0;x*^I#J^J{FLmfY~MN6OZuManilCe(he85p7(_N(`@0u_AN z*w#d?gVU6VB(Y<0JFixDSJ8TE+t#A9K1b3pI6jw%qb~bnV+$%XO@SrUKIvZJI_+(GS2x2FadIAFivXd%E%lZo}zN4@H*PX5?D*q3Ho%t2xX zlZT>Mg$%vQ7S`fdqkeJdOki^N&S&Y;Brn*1NeoiR4H(tNh)T zh;G$+_%jK9dG^(|JwvI*DO_Cv!>$4^U2H)+6kPQ+YkbH=|9@jEZ@gixu5)`)R-dqh zDR1pQrIQ(=N+K5?hx}>0A`fx)V4bAQngmVD!D;5k4|LJlI1epSL}28hQmcB{ne6_o zG_lc?gUWn+-`Q&y0pUjNxI{{JA!sXE34~yH7WdvPZnr5>C)d3)l+YicwlCWx`zOIU z-?;>km=n$hkenufm=ao8G72h7UxP1COY=U-QDR{KJwPy!bU7qfdbtNHVzN+1}h>_`u?AHaXa+Ic52@+oO!lvwz@S%o$4CMVyocqcl*Y9TXzZ zp)&Ss`9`c=BfW^zCQ>z$Wiy?R9*&urAB4x2RNM>nD^rRY2_XyM2JotD0~iFlGb;C5 zIvOX>28V=vNLc|_j9@x`vocVj5POgh74sk#Yt`z)3mx!u7LJ9y7EvUD(D5x6pARNL z?864-Ao8CDp~;zJJ^Dv}P4K%;=!q7Vsp>?qeqUcJJ65^l)WvamLhj55M^d*nKsT1V zSv94ljG)DC1|}8JG_zn++I`vvJL+)$MhmYXcab0f0b@(fx5!scIpPz=nmIbo@(uO~RABV@VeNw zUz%ytV?rGu9;9S+L%QqtqznYNk;C#*BsU^Z00CgLTEe4v<3IFA_Nb-&)d=C4*AxrJ zmMn;XU(|9_oLuLyc!*U?b9$cfRwAG~*YxVy?DlJ7XkT98n)B!Eo60F zNKQ^RM99B%$s~QEo=iC!RY+cs0vH7Ifox@_Y{l?)fk|{P^`nPOn7h$pvEa7Nn(GaO z0yZXRg)Yo)Q7a8jOMq%l(9Ngo7o<#a0f&>xI1DuLs>`8LPq;qS91#)Q>c!=`ucBdR za`U0HaY~us`o}KSwH{yVX2p7)3TU+PT6h1eiD1N|{)qV8S9?3z2<0g^7?=lgh91e@C{q> zHP%;Sh&fig-~SY;IWGQ$jGg6EQ{MJ6=#Sy*_gQot+ z&3=S+cq4_^7h#Z+Ts93CaO1zNgc&DsW~AT4YElg4jAxSikoIYY(tYe|TpWl;m{Q<| zm4G0){1Td!0UFD6r)jwTW=UGoLh5so4O*Cg$W*}t@O8AHz?QWLso`dbKLf_B9HQzT z*rr<5>EjE3_L?-SM}jt+%+Z8GeW-in_vwqzr_g)E`8bTrjCSae38k#|2z z15MfJWOUj()%P)}lj=CO)~2`nZB@ZK`cB>1je=~OwfFe}VxqYuKwLSyr|`$!q|;tg zZBa<71V^&*w{nb$-eSN)khrCd$W@r96v%m+LX-=fZQd-Io1&aVt|hC`*!{q=Ua=2Z z6IXPsm6U^b1OFj*Ds`<}%1nYDIR%dt?!AyKt3i#0Q4E3)c^(RW2&2$BAQw^Ke$ovS hiDTh|$ZK;xUK+61n8EWsj|}N*j|}}HUHZIV|JfEa&!YeU literal 0 HcmV?d00001 diff --git a/dist/macx/puzzle/Info.plist b/dist/macx/puzzle/Info.plist new file mode 100755 index 000000000..5eaa2370b --- /dev/null +++ b/dist/macx/puzzle/Info.plist @@ -0,0 +1,30 @@ + + + + + NSPrincipalClass + NSApplication + CFBundleIconFile + @ICON@ + CFBundlePackageType + APPL + LSMinimumSystemVersion + 10.6 + NSHumanReadableCopyright + © 2013-2020, Valentina project + CFBundleSignature + @TYPEINFO@ + CFBundleExecutable + @EXECUTABLE@ + CFBundleIdentifier + io.bitbucket.valentinaproject.@EXECUTABLE@ + CFBundleShortVersionString + 0.7.0 + CFBundleVersion + 0.7.0.0 + CFBundleInfoDictionaryVersion + 6.0 + NSRequiresAquaSystemAppearance + + + diff --git a/src/app/app.pro b/src/app/app.pro index 4a4eb35c8..6a02b9428 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -1,8 +1,10 @@ TEMPLATE = subdirs SUBDIRS = \ tape \ - valentina + valentina \ + puzzle -macx{# For making app bundle tape must exist before valentina.app will be created +macx{# For making app bundle tape and puzzle must exist before valentina.app will be created valentina.depends = tape + valentina.depends = puzzle } diff --git a/src/app/puzzle/main.cpp b/src/app/puzzle/main.cpp new file mode 100644 index 000000000..f214dd3a0 --- /dev/null +++ b/src/app/puzzle/main.cpp @@ -0,0 +1,38 @@ +/************************************************************************ + ** + ** @file main.cpp + ** @author Roman Telezhynskyi + ** @date 16 2, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#include "puzzlemainwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + PuzzleMainWindow w; + w.show(); + + return a.exec(); +} diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri new file mode 100644 index 000000000..863a4d1a2 --- /dev/null +++ b/src/app/puzzle/puzzle.pri @@ -0,0 +1,15 @@ +# ADD TO EACH PATH $$PWD VARIABLE!!!!!! +# This need for corect working file translations.pro + +SOURCES += \ + $$PWD/main.cpp \ + $$PWD/puzzlemainwindow.cpp + +*msvc*:SOURCES += $$PWD/stable.cpp + +HEADERS += \ + $$PWD/puzzlemainwindow.h \ + $$PWD/stable.h + +FORMS += \ + $$PWD/puzzlemainwindow.ui diff --git a/src/app/puzzle/puzzle.pro b/src/app/puzzle/puzzle.pro new file mode 100644 index 000000000..b0255b2c2 --- /dev/null +++ b/src/app/puzzle/puzzle.pro @@ -0,0 +1,335 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2020-02-16T17:16:07 +# +#------------------------------------------------- + +# File with common stuff for whole project +include(../../../common.pri) + +QT += core gui widgets + +# Name of binary file +TARGET = puzzle + +# We want create executable file +TEMPLATE = app + +# Use out-of-source builds (shadow builds) +CONFIG -= debug_and_release debug_and_release_target + +# Since Q5.12 available support for C++17 +equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 11) { + CONFIG += c++17 +} else { + CONFIG += c++14 +} + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +# Since Qt 5.4.0 the source code location is recorded only in debug builds. +# We need this information also in release builds. For this need define QT_MESSAGELOGCONTEXT. +DEFINES += QT_MESSAGELOGCONTEXT + +# Directory for executable file +DESTDIR = bin + +# Directory for files created moc +MOC_DIR = moc + +# Directory for objecs files +OBJECTS_DIR = obj + +# Directory for files created rcc +RCC_DIR = rcc + +# Directory for files created uic +UI_DIR = uic + + +# Suport subdirectories. Just better project code tree. +include(puzzle.pri) + +RESOURCES += \ + share/resources/puzzleicon.qrc + +include(../translations.pri) + +# Set "make install" command for Unix-like systems. +unix{ + # Prefix for binary file. + isEmpty(PREFIX){ + PREFIX = $$DEFAULT_PREFIX + } + + unix:!macx{ + DATADIR =$$PREFIX/share + DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" + + # Path to bin file after installation + target.path = $$PREFIX/bin + + INSTALLS += \ + target + } + macx{ + # Some macx stuff + QMAKE_MAC_SDK = macosx + + # QMAKE_MACOSX_DEPLOYMENT_TARGET defined in common.pri + + CONFIG(release, debug|release){ + QMAKE_RPATHDIR += @executable_path/../Frameworks + + # Path to resources in app bundle + #RESOURCES_DIR = "Contents/Resources" defined in translation.pri + FRAMEWORKS_DIR = "Contents/Frameworks" + MACOS_DIR = "Contents/MacOS" + # On macx we will use app bundle. Bundle doesn't need bin directory inside. + # See issue #166: Creating OSX Homebrew (Mac OS X package manager) formula. + target.path = $$MACOS_DIR + + #languages added inside translations.pri + + # Symlinks also good names for copying. Make will take origin file and copy them with using symlink name. + # For bundle this names more then enough. We don't need care much about libraries versions. + #libraries.path = $$FRAMEWORKS_DIR + #libraries.files += $${OUT_PWD}/../../libs/qmuparser/$${DESTDIR}/libqmuparser.2.dylib + #libraries.files += $${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR}/libvpropertyexplorer.1.dylib + + # logo on macx. + ICON = $$PWD/../../../dist/Puzzle.icns + + QMAKE_INFO_PLIST = $$PWD/../../../dist/macx/puzzle/Info.plist + + format.path = $$RESOURCES_DIR/ + format.files += $$PWD/../../../dist/macx/i-measurements.icns + format.files += $$PWD/../../../dist/macx/s-measurements.icns + + QMAKE_BUNDLE_DATA += \ + #libraries \ + format + } + } +} + +#win32 { +# for(DIR, INSTALL_OPENSSL) { +# #add these absolute paths to a variable which +# #ends up as 'mkcommands = path1 path2 path3 ...' +# openssl_path += $${PWD}/$$DIR +# } +# copyToDestdir($$openssl_path, $$shell_path($${OUT_PWD}/$$DESTDIR)) +#} + +# Compilation will fail without this files after we added them to this section. +OTHER_FILES += \ + share/resources/puzzleicon/64x64/logo.ico # Puzzle's logo. + +# Set using ccache. Function enable_ccache() defined in common.pri. +$$enable_ccache() + +include(warnings.pri) + +CONFIG(release, debug|release){ + # Release mode + !*msvc*:CONFIG += silent + DEFINES += V_NO_ASSERT + !unix:*g++*{ + QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll + } + + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols + DEFINES += V_NO_DEBUG + } else { + # Turn on debug symbols in release mode on Unix systems. + # On Mac OS X temporarily disabled. Need find way how to strip binary file. + !macx:!*msvc*{ + QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3 + QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 + QMAKE_LFLAGS_RELEASE = + } + } +} else { +# Breakpoints do not work if debug the app inside of bundle. In debug mode we turn off creating a bundle. +# Probably it will breake some dependencies. Version for Mac designed to work inside an app bundle. + CONFIG -= app_bundle +} + +DVCS_HESH=$$FindBuildRevision() +message("Build revision:" $${DVCS_HESH}) +DEFINES += "BUILD_REVISION=$${DVCS_HESH}" # Make available build revision number in sources. + +# Path to recource file. +win32:RC_FILE = share/resources/puzzle.rc + +noRunPath{ # For enable run qmake with CONFIG+=noRunPath + # do nothing +} else { + unix:!macx{ + # suppress the default RPATH + # helps to run the program without Qt Creator + # see problem with path to libqmuparser and libpropertybrowser + QMAKE_LFLAGS_RPATH = + QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\' -Wl,-rpath,$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -Wl,-rpath,$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR}" + } +} + +# When the GNU linker sees a library, it discards all symbols that it doesn't need. +# Dependent library go first. + +#VTools static library (depend on VWidgets, VMisc, VPatternDB) +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vtools/$${DESTDIR}/ -lvtools + +#INCLUDEPATH += $$PWD/../../libs/vtools +#INCLUDEPATH += $$OUT_PWD/../../libs/vtools/$${UI_DIR} # For UI files +#DEPENDPATH += $$PWD/../../libs/vtools + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtools/$${DESTDIR}/vtools.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtools/$${DESTDIR}/libvtools.a + +##VWidgets static library +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/ -lvwidgets + +#INCLUDEPATH += $$PWD/../../libs/vwidgets +#DEPENDPATH += $$PWD/../../libs/vwidgets + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/vwidgets.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/libvwidgets.a + +## VFormat static library (depend on VPatternDB, IFC) +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vformat/$${DESTDIR}/ -lvformat + +#INCLUDEPATH += $$PWD/../../libs/vformat +#DEPENDPATH += $$PWD/../../libs/vformat + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vformat/$${DESTDIR}/vformat.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vformat/$${DESTDIR}/libvformat.a + +##VPatternDB static library (depend on vgeometry, vmisc, VLayout) +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vpatterndb/$${DESTDIR} -lvpatterndb + +#INCLUDEPATH += $$PWD/../../libs/vpatterndb +#DEPENDPATH += $$PWD/../../libs/vpatterndb + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/vpatterndb.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/libvpatterndb.a + +## Fervor static library (depend on VMisc, IFC) +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/fervor/$${DESTDIR}/ -lfervor + +#INCLUDEPATH += $$PWD/../../libs/fervor +#DEPENDPATH += $$PWD/../../libs/fervor + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/fervor/$${DESTDIR}/fervor.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/fervor/$${DESTDIR}/libfervor.a + +## IFC static library (depend on QMuParser, VMisc) +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/ifc/$${DESTDIR}/ -lifc + +#INCLUDEPATH += $$PWD/../../libs/ifc +#DEPENDPATH += $$PWD/../../libs/ifc + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/ifc.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/libifc.a + +##VMisc static library +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vmisc/$${DESTDIR}/ -lvmisc + +#INCLUDEPATH += $$PWD/../../libs/vmisc +#DEPENDPATH += $$PWD/../../libs/vmisc + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/vmisc.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/libvmisc.a + +## VLayout static library (depend on VGeometry) +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vlayout/$${DESTDIR}/ -lvlayout + +#INCLUDEPATH += $$PWD/../../libs/vlayout +#DEPENDPATH += $$PWD/../../libs/vlayout + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vlayout/$${DESTDIR}/vlayout.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vlayout/$${DESTDIR}/libvlayout.a + +## VGeometry static library (depend on ifc) +#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/ -lvgeometry + +#INCLUDEPATH += $$PWD/../../libs/vgeometry +#DEPENDPATH += $$PWD/../../libs/vgeometry + +#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/vgeometry.lib +#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/libvgeometry.a + +## QMuParser library +#win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser2 +#else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser2 +#else:unix: LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser + +#INCLUDEPATH += $${PWD}/../../libs/qmuparser +#DEPENDPATH += $${PWD}/../../libs/qmuparser + +## VPropertyExplorer library +#win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer +#else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer +#else:unix: LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer + +#INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer +#DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer + +contains(DEFINES, APPIMAGE) { + unix:!macx: LIBS += -licudata -licui18n -licuuc +} + +CONFIG(release, debug|release){ + noStripDebugSymbols { + # do nothing + } else { + !macx:!*msvc*{ + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols + win32:!*msvc*{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} + } + + unix:!macx{ + # Strip after you link all libaries. + QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} + } + } else { + win32:!*msvc*{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && + QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} + + QMAKE_DISTCLEAN += bin/${TARGET}.dbg + } + + unix:!macx{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg && + QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} && + QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET} + + QMAKE_DISTCLEAN += ${TARGET}.dbg + } + } + } + } +} + +CONFIG(release, debug|release){ + macx{ + # run macdeployqt to include all qt libraries in packet + QMAKE_POST_LINK += $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET}.app + } +} diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp new file mode 100644 index 000000000..2c0321e4c --- /dev/null +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -0,0 +1,41 @@ +/************************************************************************ + ** + ** @file puzzlemainwindow.cpp + ** @author Roman Telezhynskyi + ** @date 16 2, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#include "puzzlemainwindow.h" +#include "ui_puzzlemainwindow.h" + +PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::PuzzleMainWindow) +{ + ui->setupUi(this); +} + +PuzzleMainWindow::~PuzzleMainWindow() +{ + delete ui; +} diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h new file mode 100644 index 000000000..bf1943946 --- /dev/null +++ b/src/app/puzzle/puzzlemainwindow.h @@ -0,0 +1,50 @@ +/************************************************************************ + ** + ** @file puzzlemainwindow.h + ** @author Roman Telezhynskyi + ** @date 16 2, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef PUZZLEMAINWINDOW_H +#define PUZZLEMAINWINDOW_H + +#include + +namespace Ui { +class PuzzleMainWindow; +} + +class PuzzleMainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit PuzzleMainWindow(QWidget *parent = nullptr); + virtual ~PuzzleMainWindow(); + +private: + Q_DISABLE_COPY(PuzzleMainWindow) + Ui::PuzzleMainWindow *ui; +}; + +#endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui new file mode 100644 index 000000000..9de7e2667 --- /dev/null +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -0,0 +1,24 @@ + + PuzzleMainWindow + + + + 0 + 0 + 400 + 300 + + + + PuzzleMainWindow + + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzle.rc b/src/app/puzzle/share/resources/puzzle.rc new file mode 100644 index 000000000..809de88e6 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzle.rc @@ -0,0 +1,80 @@ +IDI_ICON1 ICON DISCARDABLE "puzzleicon/64x64/logo.ico" + +#include +#include "../../version.h" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VER_FILEVERSION +PRODUCTVERSION VER_PRODUCTVERSION + +// normally found in included by +// FILEFLAGS +#define VS_FF_NORMAL 0x00000000L // ok I made this one up +#ifndef VS_FF_DEBUG +#define VS_FF_DEBUG 0x00000001L +#endif +#ifndef VS_FF_PRERELEASE +#define VS_FF_PRERELEASE 0x00000002L +#endif +// FILEOS +#ifndef VOS_NT +#define VOS_NT 0x00040000L +#endif +#ifndef VOS__WINDOWS32 +#define VOS__WINDOWS32 0x00000004L +#endif +#ifndef VOS_NT_WINDOWS32 +#define VOS_NT_WINDOWS32 0x00040004L +#endif +// FILETYPE +#ifndef VFT_APP +#define VFT_APP 0x00000001L +#endif +#ifndef VFT_DLL +#define VFT_DLL 0x00000002L +#endif + +#ifdef V_PRERELEASE + +#ifdef V_NO_DEBUG + FILEFLAGS (VS_FF_PRERELEASE) +#else + FILEFLAGS (VS_FF_DEBUG|VS_FF_PRERELEASE) +#endif + +#else + +#ifdef V_NO_DEBUG + FILEFLAGS (VS_FF_NORMAL) +#else + FILEFLAGS (VS_FF_DEBUG|VS_FF_NORMAL) +#endif + +#endif + +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", VER_COMPANYNAME_STR + VALUE "FileDescription", VER_FILEDESCRIPTION_STR + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "InternalName", VER_INTERNALNAME_STR + VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR + VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR + VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR + VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR + VALUE "ProductName", VER_PRODUCTNAME_STR + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04E4 //U.S. English + END +END diff --git a/src/app/puzzle/share/resources/puzzleicon.qrc b/src/app/puzzle/share/resources/puzzleicon.qrc new file mode 100644 index 000000000..871f678c4 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon.qrc @@ -0,0 +1,5 @@ + + + puzzleicon/64x64/logo.png + + diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/logo.ico b/src/app/puzzle/share/resources/puzzleicon/64x64/logo.ico new file mode 100644 index 0000000000000000000000000000000000000000..a98015678987ba65896d47a8b929fc9178de2451 GIT binary patch literal 16958 zcmeI1?@t?b9LEp;f-M^+qc=nE&g*T`Hgz~3sf`boY(DadQ%n|rKG2NNHf9NCBGEyX z_+*hdBbbc@`op#?84$Ne!dSB26*H%yA+9YAn5F2tfe$yz{ z*)6Pxp40DlHexRvhX$*AqC++F2RPB;H>EdtOa`^a{ZFsGbQJ4iYX9>q)E0j37c2AN z1@NbKtwB}iUy0we>=<U=!t>vC_*tJTXmUFO?0BAOV_lQtH=+3UUm7|JMDhv_!0i`34HJA&(V?ZVdi zz4q=-)tNkxKbNc7bMuU+0?J0MGKle@w;u0AaJLH}QIagQ~-R$$Zbx@o99e(yK$tQ1@V$buhG~N5#25%2-UiSqpYLnkN@_ZZC_}EVT zq>x%P2#;B(pRHB?E3OfCU~8Pe+0xp?r@Ej)x|9YaFU}B>)ZiE~eYN!-@@II%sTPJm z)k22{l)^%X|3EE}DX}Mr*e|asexKs6ly}-)d=-4XAK}|B;C%tGrxf{xWX8ZJ|J?4o zg)x%<>rC8Dor!sA-!}0LK}gSld!__C>Ki_7rui=t!RD8@xrZ<2q5F%;${PV&LXq#k z{cf}G|F7#q$-##ndJxYj6@`}$q5o&WzF3lfy~YWTLdSQD?vcB1#sB}%l0WLE?^&5? zn}y<6cIFpuBllPIto_*?_%o;-d!im@U_bH4y>vS6WxB1@uP&SiFDq$) zKJosy?d^?VkL)M@brv^0Kj$^RVx|T3!$K4qWD7dL8KOxl?VGU}$raDBG=`BQ1s z#c@L@$>&16r09QnPmDu@sF(Tt9lPf+=J`i0RQM{`FWV@gb$=y&;NgD!+Dv`uYCTe=YQ)wuJp4$|I0h> zF1iZ)_5yr5p;nL~u@Cit90}FJLoXD8=>xg~x&pcax&pcab*_L^;VYZd?MwZAT?ox} Is4$JvzghJNOaK4? literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/logo.png b/src/app/puzzle/share/resources/puzzleicon/64x64/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ea9aa050ea8f934743af8140e45da696fc11c335 GIT binary patch literal 1504 zcmV<61t0o}P)sZ-J?FeL0~IP%s8FH8A&c@ge!qHP8#tSodJJ!mX5*Yx4ixAOyO0<=#;GihMjjUY8nzDXGQlf0&uRS<;CcftpNlnMt&3Q zE!0)8*HJ~~vjT&>j2xF3Ng11Qz=?g16cN)Rygt|LJqoYd85DeYAI;xh@Xdyn&+13C z1GPCLG+76)iHC)jOn3H`-W}-3H5LjOFn-7NotAoK)_zrc=f7XK^a`wNa^+o_0P3zA z)qZ2c(wTEj7;s>p5Z$wQ&SZl5wT~%k*9<*#z93?vb9`DQcF7ERb=IV*(0iWf&^bEK zYb^A!nXKr+2R_-=Q{8OqeD)PIaw0Ks*JlGybyk;3?kkRJWdjzC1>(p@ozd;M?{`9` z6_}Z8a8Wrx*_gFd@Zb?0`#I~HP`;U_*d(ZnC9kFM6}N59PZL^gm9*@YkKzoF#yt7s zh$e{*dHVdK5T0)Sz3zT+p{=ZB6t@Im_|iQM&vp2SNx%wl$9`@5vcL7{gss|H?M%O|#7^-`pJ`X_^y9Fdi#*scZEuK8oYn-Barc7`*05piCfs%7y5u~;VSYn$^B)q-_X-r3wV`NJJA zAmyuL95hO5fJ}DbtPkFciY<VyaTO|5s8FFoiTM)-Rq%NhL>@>00000 Date: Sun, 16 Feb 2020 19:18:39 +0200 Subject: [PATCH 002/321] Puzzle application class. --- src/app/puzzle/main.cpp | 65 ++- src/app/puzzle/puzzle.pri | 6 +- src/app/puzzle/puzzle.pro | 38 +- src/app/puzzle/puzzleapplication.cpp | 635 +++++++++++++++++++++++++++ src/app/puzzle/puzzleapplication.h | 94 ++++ src/app/puzzle/puzzlemainwindow.cpp | 8 + src/app/puzzle/puzzlemainwindow.h | 2 + src/app/puzzle/stable.cpp | 30 ++ src/app/puzzle/stable.h | 72 +++ src/app/puzzle/version.h | 39 ++ src/app/tape/mapplication.cpp | 3 +- src/app/tape/mapplication.h | 2 +- src/libs/vmisc/vmisc.pri | 6 +- src/libs/vmisc/vpuzzlesettings.cpp | 37 ++ src/libs/vmisc/vpuzzlesettings.h | 46 ++ 15 files changed, 1052 insertions(+), 31 deletions(-) create mode 100644 src/app/puzzle/puzzleapplication.cpp create mode 100644 src/app/puzzle/puzzleapplication.h create mode 100644 src/app/puzzle/stable.cpp create mode 100644 src/app/puzzle/stable.h create mode 100644 src/app/puzzle/version.h create mode 100644 src/libs/vmisc/vpuzzlesettings.cpp create mode 100644 src/libs/vmisc/vpuzzlesettings.h diff --git a/src/app/puzzle/main.cpp b/src/app/puzzle/main.cpp index f214dd3a0..86d126b18 100644 --- a/src/app/puzzle/main.cpp +++ b/src/app/puzzle/main.cpp @@ -25,14 +25,67 @@ ** along with Valentina. If not, see . ** *************************************************************************/ -#include "puzzlemainwindow.h" -#include + +#include // For QT_REQUIRE_VERSION +#include + +#include "puzzleapplication.h" +#include "../fervor/fvupdater.h" +#include "../vmisc/vsysexits.h" +#include "../vmisc/def.h" + + +#if defined(APPIMAGE) && defined(Q_OS_LINUX) +#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0) +# include "../vmisc/backport/qscopeguard.h" +#else +# include +#endif +# include "../vmisc/appimage.h" +#endif // defined(APPIMAGE) && defined(Q_OS_LINUX) int main(int argc, char *argv[]) { - QApplication a(argc, argv); - PuzzleMainWindow w; - w.show(); +#if defined(APPIMAGE) && defined(Q_OS_LINUX) + /* Fix path to ICU_DATA when run AppImage.*/ + char *exe_dir = IcuDataPath("/../share/icu"); + auto FreeMemory = qScopeGuard([exe_dir] {free(exe_dir);}); +#endif // defined(APPIMAGE) && defined(Q_OS_LINUX) - return a.exec(); + Q_INIT_RESOURCE(puzzleicon); + + QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations + +#if defined(Q_OS_WIN) + VAbstractApplication::WinAttachConsole(); +#endif + +#ifndef Q_OS_MAC // supports natively + InitHighDpiScaling(argc, argv); +#endif //Q_OS_MAC + + PuzzleApplication app(argc, argv); + app.InitOptions(); + + if (FvUpdater::IsStaledTestBuild()) + { + qWarning() << QApplication::translate("Puzzle", + "This test build is older than %1 days. To provide you with better " + "quality service we restrict the lifetime you can use a test build. " + "To continue using Puzzle please update to newer test build. The " + "application will be shut down.") + .arg(FvUpdater::testBuildLifetime); + return V_EX_UNAVAILABLE; + } + + QTimer::singleShot(0, &app, &PuzzleApplication::ProcessCMD); + +#if defined(APPIMAGE) && defined(Q_OS_LINUX) + if (exe_dir) + { + qDebug() << "Path to ICU folder:" << exe_dir; + } +#endif // defined(APPIMAGE) && defined(Q_OS_LINUX) + + return app.exec(); } diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri index 863a4d1a2..101fff4e3 100644 --- a/src/app/puzzle/puzzle.pri +++ b/src/app/puzzle/puzzle.pri @@ -3,13 +3,15 @@ SOURCES += \ $$PWD/main.cpp \ - $$PWD/puzzlemainwindow.cpp + $$PWD/puzzlemainwindow.cpp \ + $$PWD/puzzleapplication.cpp *msvc*:SOURCES += $$PWD/stable.cpp HEADERS += \ $$PWD/puzzlemainwindow.h \ - $$PWD/stable.h + $$PWD/stable.h \ + $$PWD/puzzleapplication.h FORMS += \ $$PWD/puzzlemainwindow.ui diff --git a/src/app/puzzle/puzzle.pro b/src/app/puzzle/puzzle.pro index b0255b2c2..7463ba832 100644 --- a/src/app/puzzle/puzzle.pro +++ b/src/app/puzzle/puzzle.pro @@ -7,7 +7,7 @@ # File with common stuff for whole project include(../../../common.pri) -QT += core gui widgets +QT += core gui widgets network xml xmlpatterns printsupport # Name of binary file TARGET = puzzle @@ -224,32 +224,32 @@ noRunPath{ # For enable run qmake with CONFIG+=noRunPath #win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/vpatterndb.lib #else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/libvpatterndb.a -## Fervor static library (depend on VMisc, IFC) -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/fervor/$${DESTDIR}/ -lfervor +# Fervor static library (depend on VMisc, IFC) +unix|win32: LIBS += -L$$OUT_PWD/../../libs/fervor/$${DESTDIR}/ -lfervor -#INCLUDEPATH += $$PWD/../../libs/fervor -#DEPENDPATH += $$PWD/../../libs/fervor +INCLUDEPATH += $$PWD/../../libs/fervor +DEPENDPATH += $$PWD/../../libs/fervor -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/fervor/$${DESTDIR}/fervor.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/fervor/$${DESTDIR}/libfervor.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/fervor/$${DESTDIR}/fervor.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/fervor/$${DESTDIR}/libfervor.a -## IFC static library (depend on QMuParser, VMisc) -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/ifc/$${DESTDIR}/ -lifc +# IFC static library (depend on QMuParser, VMisc) +unix|win32: LIBS += -L$$OUT_PWD/../../libs/ifc/$${DESTDIR}/ -lifc -#INCLUDEPATH += $$PWD/../../libs/ifc -#DEPENDPATH += $$PWD/../../libs/ifc +INCLUDEPATH += $$PWD/../../libs/ifc +DEPENDPATH += $$PWD/../../libs/ifc -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/ifc.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/libifc.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/ifc.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/libifc.a -##VMisc static library -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vmisc/$${DESTDIR}/ -lvmisc +#VMisc static library +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vmisc/$${DESTDIR}/ -lvmisc -#INCLUDEPATH += $$PWD/../../libs/vmisc -#DEPENDPATH += $$PWD/../../libs/vmisc +INCLUDEPATH += $$PWD/../../libs/vmisc +DEPENDPATH += $$PWD/../../libs/vmisc -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/vmisc.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/libvmisc.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/vmisc.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/libvmisc.a ## VLayout static library (depend on VGeometry) #unix|win32: LIBS += -L$$OUT_PWD/../../libs/vlayout/$${DESTDIR}/ -lvlayout diff --git a/src/app/puzzle/puzzleapplication.cpp b/src/app/puzzle/puzzleapplication.cpp new file mode 100644 index 000000000..a0a749d85 --- /dev/null +++ b/src/app/puzzle/puzzleapplication.cpp @@ -0,0 +1,635 @@ +/************************************************************************ + ** + ** @file puzzleapplication.cpp + ** @author Roman Telezhynskyi + ** @date 16 2, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "puzzleapplication.h" +#include "version.h" +#include "puzzlemainwindow.h" +#include "../ifc/exception/vexceptionobjecterror.h" +#include "../ifc/exception/vexceptionbadid.h" +#include "../ifc/exception/vexceptionconversionerror.h" +#include "../ifc/exception/vexceptionemptyparameter.h" +#include "../ifc/exception/vexceptionwrongid.h" +#include "../vmisc/vsysexits.h" +#include "../vmisc/diagnostic.h" +#include "../vmisc/qt_dispatch/qt_dispatch.h" + +#include + +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes") +QT_WARNING_DISABLE_INTEL(1418) + +Q_LOGGING_CATEGORY(mApp, "m.application") + +QT_WARNING_POP + +#include +#include +#include + +//--------------------------------------------------------------------------------------------------------------------- +inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) +{ + // only the GUI thread should display message boxes. If you are + // writing a multithreaded application and the error happens on + // a non-GUI thread, you'll have to queue the message to the GUI + QCoreApplication *instance = QCoreApplication::instance(); + const bool isGuiThread = instance && (QThread::currentThread() == instance->thread()); + + if (not isGuiThread) + { + auto Handler = [](QtMsgType type, const QMessageLogContext &context, const QString &msg) + { + noisyFailureMsgHandler(type, context, msg); + }; + + q_dispatch_async_main(Handler, type, context, msg); + return; + } + + // Why on earth didn't Qt want to make failed signal/slot connections qWarning? + if ((type == QtDebugMsg) && msg.contains(QStringLiteral("::connect"))) + { + type = QtWarningMsg; + } + +#if defined(V_NO_ASSERT) + // I have decided to hide this annoing message for release builds. + if ((type == QtWarningMsg) && msg.contains(QStringLiteral("QSslSocket: cannot resolve"))) + { + type = QtDebugMsg; + } + + if ((type == QtWarningMsg) && msg.contains(QStringLiteral("setGeometry: Unable to set geometry"))) + { + type = QtDebugMsg; + } +#endif //defined(V_NO_ASSERT) + +#if defined(Q_OS_MAC) +# if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) && QT_VERSION < QT_VERSION_CHECK(5, 7, 0) + // Try hide very annoying, Qt related, warnings in Mac OS X + // QNSView mouseDragged: Internal mouse button tracking invalid (missing Qt::LeftButton) + // https://bugreports.qt.io/browse/QTBUG-42846 + if ((type == QtWarningMsg) && msg.contains(QStringLiteral("QNSView"))) + { + type = QtDebugMsg; + } +# endif + + // Hide Qt bug 'Assertion when reading an icns file' + // https://bugreports.qt.io/browse/QTBUG-45537 + // Remove after Qt fix will be released + if ((type == QtWarningMsg) && msg.contains(QStringLiteral("QICNSHandler::read()"))) + { + type = QtDebugMsg; + } + + // See issue #568 + if (msg.contains(QStringLiteral("Error receiving trust for a CA certificate"))) + { + type = QtDebugMsg; + } +#endif + + // this is another one that doesn't make sense as just a debug message. pretty serious + // sign of a problem + // http://www.developer.nokia.com/Community/Wiki/QPainter::begin:Paint_device_returned_engine_%3D%3D_0_(Known_Issue) + if ((type == QtDebugMsg) && msg.contains(QStringLiteral("QPainter::begin")) + && msg.contains(QStringLiteral("Paint device returned engine"))) + { + type = QtWarningMsg; + } + + // This qWarning about "Cowardly refusing to send clipboard message to hung application..." + // is something that can easily happen if you are debugging and the application is paused. + // As it is so common, not worth popping up a dialog. + if ((type == QtWarningMsg) && msg.contains(QStringLiteral("QClipboard::event")) + && msg.contains(QStringLiteral("Cowardly refusing"))) + { + type = QtDebugMsg; + } + + switch (type) + { + case QtDebugMsg: + vStdOut() << QApplication::translate("mNoisyHandler", "DEBUG:") << msg << "\n"; + return; + case QtWarningMsg: + vStdErr() << QApplication::translate("mNoisyHandler", "WARNING:") << msg << "\n"; + break; + case QtCriticalMsg: + vStdErr() << QApplication::translate("mNoisyHandler", "CRITICAL:") << msg << "\n"; + break; + case QtFatalMsg: + vStdErr() << QApplication::translate("mNoisyHandler", "FATAL:") << msg << "\n"; + break; + #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) + case QtInfoMsg: + vStdOut() << QApplication::translate("mNoisyHandler", "INFO:") << msg << "\n"; + break; + #endif + default: + break; + } + + vStdOut().flush(); + vStdErr().flush(); + + if (isGuiThread) + { + //fixme: trying to make sure there are no save/load dialogs are opened, because error message during them will + //lead to crash + const bool topWinAllowsPop = (QApplication::activeModalWidget() == nullptr) || + !QApplication::activeModalWidget()->inherits("QFileDialog"); + QMessageBox messageBox; + switch (type) + { + case QtWarningMsg: + messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Warning")); + messageBox.setIcon(QMessageBox::Warning); + break; + case QtCriticalMsg: + messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Critical error")); + messageBox.setIcon(QMessageBox::Critical); + break; + case QtFatalMsg: + messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Fatal error")); + messageBox.setIcon(QMessageBox::Critical); + break; + #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) + case QtInfoMsg: + messageBox.setWindowTitle(QApplication::translate("mNoisyHandler", "Information")); + messageBox.setIcon(QMessageBox::Information); + break; + #endif + case QtDebugMsg: + Q_UNREACHABLE(); //-V501 + break; + default: + break; + } + + if (type == QtWarningMsg || type == QtCriticalMsg || type == QtFatalMsg) + { + if (not qApp->IsTestMode()) + { + if (topWinAllowsPop) + { + messageBox.setText(VAbstractApplication::ClearMessage(msg)); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.setWindowModality(Qt::ApplicationModal); + messageBox.setModal(true); + #ifndef QT_NO_CURSOR + QGuiApplication::setOverrideCursor(Qt::ArrowCursor); + #endif + messageBox.exec(); + #ifndef QT_NO_CURSOR + QGuiApplication::restoreOverrideCursor(); + #endif + } + } + } + + if (QtFatalMsg == type) + { + abort(); + } + } + else + { + if (type != QtDebugMsg) + { + abort(); // be NOISY unless overridden! + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +PuzzleApplication::PuzzleApplication(int &argc, char **argv) + :VAbstractApplication(argc, argv), + mainWindows(), + localServer(nullptr), + testMode(false) +{ + setApplicationDisplayName(VER_PRODUCTNAME_STR); + setApplicationName(VER_INTERNALNAME_STR); + setOrganizationName(VER_COMPANYNAME_STR); + setOrganizationDomain(VER_COMPANYDOMAIN_STR); + // Setting the Application version + setApplicationVersion(APP_VERSION_STR); + // We have been running Puzzle in two different cases. + // The first inside own bundle where info.plist is works fine, but the second, + // when we run inside Valentina's bundle, require direct setting the icon. + setWindowIcon(QIcon(":/puzzleicon/64x64/logo.png")); +} + +//--------------------------------------------------------------------------------------------------------------------- +PuzzleApplication::~PuzzleApplication() +{ + qDeleteAll(mainWindows); +} + +//--------------------------------------------------------------------------------------------------------------------- +/** + * @brief notify Reimplemented from QApplication::notify(). + * @param receiver receiver. + * @param event event. + * @return value that is returned from the receiver's event handler. + */ +// reimplemented from QApplication so we can throw exceptions in slots +bool PuzzleApplication::notify(QObject *receiver, QEvent *event) +{ + try + { + return QApplication::notify(receiver, event); + } + catch (const VExceptionObjectError &e) + { + qCCritical(mApp, "%s\n\n%s\n\n%s", qUtf8Printable(tr("Error parsing file. Program will be terminated.")), //-V807 + qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); + exit(V_EX_DATAERR); + } + catch (const VExceptionBadId &e) + { + qCCritical(mApp, "%s\n\n%s\n\n%s", qUtf8Printable(tr("Error bad id. Program will be terminated.")), + qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); + exit(V_EX_DATAERR); + } + catch (const VExceptionConversionError &e) + { + qCCritical(mApp, "%s\n\n%s\n\n%s", qUtf8Printable(tr("Error can't convert value. Program will be terminated.")), + qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); + exit(V_EX_DATAERR); + } + catch (const VExceptionEmptyParameter &e) + { + qCCritical(mApp, "%s\n\n%s\n\n%s", qUtf8Printable(tr("Error empty parameter. Program will be terminated.")), + qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); + exit(V_EX_DATAERR); + } + catch (const VExceptionWrongId &e) + { + qCCritical(mApp, "%s\n\n%s\n\n%s", qUtf8Printable(tr("Error wrong id. Program will be terminated.")), + qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); + exit(V_EX_DATAERR); + } + catch (const VExceptionToolWasDeleted &e) + { + qCCritical(mApp, "%s\n\n%s\n\n%s", + qUtf8Printable("Unhadled deleting tool. Continue use object after deleting!"), + qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); + exit(V_EX_DATAERR); + } + catch (const VException &e) + { + qCCritical(mApp, "%s\n\n%s\n\n%s", qUtf8Printable(tr("Something's wrong!!")), + qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); + return true; + } + catch (std::exception &e) + { + qCCritical(mApp, "%s", qUtf8Printable(tr("Exception thrown: %1. Program will be terminated.").arg(e.what()))); + exit(V_EX_SOFTWARE); + } + return false; +} + +//--------------------------------------------------------------------------------------------------------------------- +bool PuzzleApplication::IsTestMode() const +{ + return testMode; +} + +//--------------------------------------------------------------------------------------------------------------------- +/** + * @brief IsAppInGUIMode little hack that allow to have access to application state from VAbstractApplication class. + */ +bool PuzzleApplication::IsAppInGUIMode() const +{ + return IsTestMode(); +} + +//--------------------------------------------------------------------------------------------------------------------- +PuzzleMainWindow *PuzzleApplication::MainWindow() +{ + Clean(); + if (mainWindows.isEmpty()) + { + NewMainWindow(); + } + return mainWindows[0]; +} + +//--------------------------------------------------------------------------------------------------------------------- +QList PuzzleApplication::MainWindows() +{ + Clean(); + QList list; + for (auto &w : mainWindows) + { + list.append(w); + } + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +PuzzleMainWindow *PuzzleApplication::NewMainWindow() +{ + PuzzleMainWindow *puzzle = new PuzzleMainWindow(); + mainWindows.prepend(puzzle); + if (not qApp->IsTestMode()) + { + puzzle->show(); + } + return puzzle; +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::InitOptions() +{ + qInstallMessageHandler(noisyFailureMsgHandler); + + OpenSettings(); + + qCDebug(mApp, "Version: %s", qUtf8Printable(APP_VERSION_STR)); + qCDebug(mApp, "Build revision: %s", BUILD_REVISION); + qCDebug(mApp, "%s", qUtf8Printable(buildCompatibilityString())); + qCDebug(mApp, "Built on %s at %s", __DATE__, __TIME__); + qCDebug(mApp, "Command-line arguments: %s", qUtf8Printable(arguments().join(", "))); + qCDebug(mApp, "Process ID: %s", qUtf8Printable(QString().setNum(applicationPid()))); + + LoadTranslation(QLocale().name());// By default the console version uses system locale + + static const char * GENERIC_ICON_TO_CHECK = "document-open"; + if (QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK) == false) + { + //If there is no default working icon theme then we should + //use an icon theme that we provide via a .qrc file + //This case happens under Windows and Mac OS X + //This does not happen under GNOME or KDE + QIcon::setThemeName("win.icon.theme"); + } + ActivateDarkMode(); +} + +//--------------------------------------------------------------------------------------------------------------------- +const VTranslateVars *PuzzleApplication::TrVars() +{ + return nullptr; +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::OpenSettings() +{ + settings = new VPuzzleSettings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(), + QCoreApplication::applicationName(), this); +} + +//--------------------------------------------------------------------------------------------------------------------- +VPuzzleSettings *PuzzleApplication::PuzzleSettings() +{ + SCASSERT(settings != nullptr) + return qobject_cast(settings); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::ActivateDarkMode() +{ + VPuzzleSettings *settings = qApp->PuzzleSettings(); + if (settings->GetDarkMode()) + { + QFile f(":qdarkstyle/style.qss"); + if (!f.exists()) + { + qDebug()<<"Unable to set stylesheet, file not found\n"; + } + else + { + f.open(QFile::ReadOnly | QFile::Text); + QTextStream ts(&f); + qApp->setStyleSheet(ts.readAll()); + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, const QStringList &arguments) +{ + QCommandLineParser parser; + parser.setApplicationDescription(tr("Valentina's manual layout editor.")); + parser.addHelpOption(); + parser.addVersionOption(); + parser.addPositionalArgument("filename", tr("The raw layout file.")); + //----- + QCommandLineOption testOption(QStringList() << "test", + tr("Use for unit testing. Run the program and open a file without showing the main window.")); + parser.addOption(testOption); + //----- + QCommandLineOption scalingOption(QStringList() << LONG_OPTION_NO_HDPI_SCALING, + tr("Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). " + "Alternatively you can use the %1 environment variable.").arg("QT_AUTO_SCREEN_SCALE_FACTOR=0")); + parser.addOption(scalingOption); + //----- + parser.process(arguments); + + testMode = parser.isSet(testOption); + + if (not testMode && connection == SocketConnection::Client) + { + const QString serverName = QCoreApplication::applicationName(); + QLocalSocket socket; + socket.connectToServer(serverName); + if (socket.waitForConnected(1000)) + { + qCDebug(mApp, "Connected to the server '%s'", qUtf8Printable(serverName)); + QTextStream stream(&socket); + stream << QCoreApplication::arguments().join(";;"); + stream.flush(); + socket.waitForBytesWritten(); + qApp->exit(V_EX_OK); + return; + } + + qCDebug(mApp, "Can't establish connection to the server '%s'", qUtf8Printable(serverName)); + + localServer = new QLocalServer(this); + connect(localServer, &QLocalServer::newConnection, this, &PuzzleApplication::NewLocalSocketConnection); + if (not localServer->listen(serverName)) + { + qCDebug(mApp, "Can't begin to listen for incoming connections on name '%s'", + qUtf8Printable(serverName)); + if (localServer->serverError() == QAbstractSocket::AddressInUseError) + { + QLocalServer::removeServer(serverName); + if (not localServer->listen(serverName)) + { + qCWarning(mApp, "%s", + qUtf8Printable(tr("Can't begin to listen for incoming connections on name '%1'").arg(serverName))); + } + } + } + + LoadTranslation(PuzzleSettings()->GetLocale()); + } + + const QStringList args = parser.positionalArguments(); + if (args.count() > 0) + { + if (testMode && args.count() > 1) + { + qCCritical(mApp, "%s\n", qPrintable(tr("Test mode doesn't support openning several files."))); + parser.showHelp(V_EX_USAGE); + } + + for (auto &arg : args) + { + NewMainWindow(); + if (not MainWindow()->LoadFile(arg)) + { + if (testMode) + { + return; // process only one input file + } + delete MainWindow(); + continue; + } + } + } + else + { + if (not testMode) + { + NewMainWindow(); + } + else + { + qCCritical(mApp, "%s\n", qPrintable(tr("Please, provide one input file."))); + parser.showHelp(V_EX_USAGE); + } + } + + if (testMode) + { + qApp->exit(V_EX_OK); // close program after processing in console mode + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::ProcessCMD() +{ + ParseCommandLine(SocketConnection::Client, arguments()); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool PuzzleApplication::event(QEvent *e) +{ + switch(e->type()) + { + // In Mac OS X the QFileOpenEvent event is generated when user perform "Open With" from Finder (this event is + // Mac specific). + case QEvent::FileOpen: + { + QFileOpenEvent *fileOpenEvent = static_cast(e); + const QString macFileOpen = fileOpenEvent->file(); + if(not macFileOpen.isEmpty()) + { + PuzzleMainWindow *mw = MainWindow(); + if (mw) + { + mw->LoadFile(macFileOpen); // open file in existing window + } + return true; + } + break; + } +#if defined(Q_OS_MAC) + case QEvent::ApplicationActivate: + { + Clean(); + PuzzleMainWindow *mw = PuzzleMainWindow(); + if (mw && not mw->isMinimized()) + { + mw->show(); + } + return true; + } +#endif //defined(Q_OS_MAC) + default: + return VAbstractApplication::event(e); + } + return VAbstractApplication::event(e); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::InitTrVars() +{ + // do nothing +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::AboutToQuit() +{ + // If try to use the method QApplication::exit program can't sync settings and show warning about QApplication + // instance. Solution is to call sync() before quit. + // Connect this slot with VApplication::aboutToQuit. + Settings()->sync(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::NewLocalSocketConnection() +{ + QLocalSocket *socket = localServer->nextPendingConnection(); + if (not socket) + { + return; + } + socket->waitForReadyRead(1000); + QTextStream stream(socket); + const QString arg = stream.readAll(); + if (not arg.isEmpty()) + { + ParseCommandLine(SocketConnection::Server, arg.split(";;")); + } + delete socket; + MainWindow()->raise(); + MainWindow()->activateWindow(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::Clean() +{ + // cleanup any deleted main windows first + for (int i = mainWindows.count() - 1; i >= 0; --i) + { + if (mainWindows.at(i).isNull()) + { + mainWindows.removeAt(i); + } + } +} diff --git a/src/app/puzzle/puzzleapplication.h b/src/app/puzzle/puzzleapplication.h new file mode 100644 index 000000000..9f2b15760 --- /dev/null +++ b/src/app/puzzle/puzzleapplication.h @@ -0,0 +1,94 @@ +/************************************************************************ + ** + ** @file puzzleapplication.h + ** @author Roman Telezhynskyi + ** @date 16 2, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef PUZZLEAPPLICATION_H +#define PUZZLEAPPLICATION_H + +#include "../vmisc/def.h" +#include "../vmisc/vpuzzlesettings.h" +#include "../vmisc/vabstractapplication.h" + +class PuzzleApplication;// use in define +class PuzzleMainWindow; +class QLocalServer; + +#if defined(qApp) +#undef qApp +#endif +#define qApp (static_cast(VAbstractApplication::instance())) + +enum class SocketConnection : bool {Client = false, Server = true}; + +class PuzzleApplication : public VAbstractApplication +{ + Q_OBJECT +public: + PuzzleApplication(int &argc, char **argv); + virtual ~PuzzleApplication() override; + + virtual bool notify(QObject * receiver, QEvent * event) override; + + bool IsTestMode() const; + virtual bool IsAppInGUIMode() const override; + PuzzleMainWindow *MainWindow(); + QList MainWindows(); + PuzzleMainWindow *NewMainWindow(); + + void InitOptions(); + + + virtual const VTranslateVars *TrVars() override; + + virtual void OpenSettings() override; + VPuzzleSettings *PuzzleSettings(); + void ActivateDarkMode(); + + void ParseCommandLine(const SocketConnection &connection, const QStringList &arguments); + +public slots: + void ProcessCMD(); + +protected: + virtual void InitTrVars() override; + virtual bool event(QEvent *e) override; + +protected slots: + virtual void AboutToQuit() override; + +private slots: + void NewLocalSocketConnection(); + +private: + Q_DISABLE_COPY(PuzzleApplication) + QList > mainWindows; + QLocalServer *localServer; + bool testMode; + + void Clean(); +}; + +#endif // PUZZLEAPPLICATION_H diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 2c0321e4c..d690f7918 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -28,6 +28,7 @@ #include "puzzlemainwindow.h" #include "ui_puzzlemainwindow.h" +//--------------------------------------------------------------------------------------------------------------------- PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::PuzzleMainWindow) @@ -35,7 +36,14 @@ PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : ui->setupUi(this); } +//--------------------------------------------------------------------------------------------------------------------- PuzzleMainWindow::~PuzzleMainWindow() { delete ui; } + +//--------------------------------------------------------------------------------------------------------------------- +bool PuzzleMainWindow::LoadFile(const QString &path) +{ + +} diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index bf1943946..8f489647d 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -42,6 +42,8 @@ public: explicit PuzzleMainWindow(QWidget *parent = nullptr); virtual ~PuzzleMainWindow(); + bool LoadFile(const QString &path); + private: Q_DISABLE_COPY(PuzzleMainWindow) Ui::PuzzleMainWindow *ui; diff --git a/src/app/puzzle/stable.cpp b/src/app/puzzle/stable.cpp new file mode 100644 index 000000000..460b5cb9c --- /dev/null +++ b/src/app/puzzle/stable.cpp @@ -0,0 +1,30 @@ +/************************************************************************ + ** + ** @file stable.cpp + ** @author Roman Telezhynskyi + ** @date November 15, 2013 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013-2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +// Build the precompiled headers. +#include "stable.h" diff --git a/src/app/puzzle/stable.h b/src/app/puzzle/stable.h new file mode 100644 index 000000000..4611a10a7 --- /dev/null +++ b/src/app/puzzle/stable.h @@ -0,0 +1,72 @@ +/************************************************************************ + ** + ** @file stable.h + ** @author Roman Telezhynskyi + ** @date November 15, 2013 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013-2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef STABLE_H +#define STABLE_H + +/* I like to include this pragma too, so the build log indicates if pre-compiled headers were in use. */ +#pragma message("Compiling precompiled headers for tape utility.\n") + +/* Add C includes here */ + +#if defined __cplusplus +/* Add C++ includes here */ +#include + +/*In all cases we need include core header for getting defined values*/ +#ifdef QT_CORE_LIB +# include +#endif + +#ifdef QT_GUI_LIB +# include +#endif + +#ifdef QT_XML_LIB +# include +#endif + +//In Windows you can't use same header in all modes. +#if !defined(Q_OS_WIN) +# ifdef QT_WIDGETS_LIB +# include +# endif + + //Build doesn't work, if include this headers on Windows. +# ifdef QT_XMLPATTERNS_LIB +# include +# endif + +# ifdef QT_NETWORK_LIB +# include +# endif +#endif/*Q_OS_WIN*/ + +#endif /*__cplusplus*/ + +#endif // STABLE_H diff --git a/src/app/puzzle/version.h b/src/app/puzzle/version.h new file mode 100644 index 000000000..76e256844 --- /dev/null +++ b/src/app/puzzle/version.h @@ -0,0 +1,39 @@ +/************************************************************************ + ** + ** @file version.h + ** @author Roman Telezhynskyi + ** @date November 15, 2013 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013-2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef VERSION_H +#define VERSION_H + +#include "../../libs/vmisc/projectversion.h" + +#define VER_INTERNALNAME_STR "Puzzle" +#define VER_ORIGINALFILENAME_STR "puzzle.exe" +#define VER_PRODUCTNAME_STR "Tape" +#define VER_FILEDESCRIPTION_STR "Valentina's manual layout creator." + +#endif // VERSION_H diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index 385ea06b8..2eb7d73e9 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -412,8 +412,9 @@ void MApplication::InitOptions() ActivateDarkMode(); QResource::registerResource(diagramsPath()); } -// Dark mode +//--------------------------------------------------------------------------------------------------------------------- +// Dark mode void MApplication::ActivateDarkMode() { VTapeSettings *settings = qApp->TapeSettings(); diff --git a/src/app/tape/mapplication.h b/src/app/tape/mapplication.h index dc8cea765..a121ced88 100644 --- a/src/app/tape/mapplication.h +++ b/src/app/tape/mapplication.h @@ -68,7 +68,7 @@ public: virtual void OpenSettings() override; VTapeSettings *TapeSettings(); - void ActivateDarkMode(); + void ActivateDarkMode(); QString diagramsPath() const; diff --git a/src/libs/vmisc/vmisc.pri b/src/libs/vmisc/vmisc.pri index e62231411..c91baa68f 100644 --- a/src/libs/vmisc/vmisc.pri +++ b/src/libs/vmisc/vmisc.pri @@ -13,7 +13,8 @@ SOURCES += \ $$PWD/vtablesearch.cpp \ $$PWD/dialogs/dialogexporttocsv.cpp \ $$PWD/literals.cpp \ - $$PWD/vmodifierkey.cpp + $$PWD/vmodifierkey.cpp \ + $$PWD/vpuzzlesettings.cpp *msvc*:SOURCES += $$PWD/stable.cpp @@ -50,7 +51,8 @@ HEADERS += \ $$PWD/vdatastreamenum.h \ $$PWD/vmodifierkey.h \ $$PWD/typedef.h \ - $$PWD/backport/qscopeguard.h + $$PWD/backport/qscopeguard.h \ + $$PWD/vpuzzlesettings.h contains(DEFINES, APPIMAGE) { SOURCES += \ diff --git a/src/libs/vmisc/vpuzzlesettings.cpp b/src/libs/vmisc/vpuzzlesettings.cpp new file mode 100644 index 000000000..337fcb69a --- /dev/null +++ b/src/libs/vmisc/vpuzzlesettings.cpp @@ -0,0 +1,37 @@ +/************************************************************************ + ** + ** @file vpuzzlesettings.cpp + ** @author Roman Telezhynskyi + ** @date 16 2, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#include "vpuzzlesettings.h" + + +//--------------------------------------------------------------------------------------------------------------------- +VPuzzleSettings::VPuzzleSettings(Format format, Scope scope, const QString &organization, const QString &application, + QObject *parent) + :VCommonSettings(format, scope, organization, application, parent) +{ + +} diff --git a/src/libs/vmisc/vpuzzlesettings.h b/src/libs/vmisc/vpuzzlesettings.h new file mode 100644 index 000000000..f4ab19b01 --- /dev/null +++ b/src/libs/vmisc/vpuzzlesettings.h @@ -0,0 +1,46 @@ +/************************************************************************ + ** + ** @file vpuzzlesettings.h + ** @author Roman Telezhynskyi + ** @date 16 2, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef VPUZZLESETTINGS_H +#define VPUZZLESETTINGS_H + +#include + +#include "vcommonsettings.h" + +class VPuzzleSettings : public VCommonSettings +{ + Q_OBJECT +public: + VPuzzleSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(), + QObject *parent = nullptr); + +private: + Q_DISABLE_COPY(VPuzzleSettings) +}; + +#endif // VPUZZLESETTINGS_H From 8e815bbb54d7f6e96038d5347f160d6ef2a97a50 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 16 Feb 2020 21:51:41 +0200 Subject: [PATCH 003/321] Suppress warnings. --- src/app/puzzle/puzzlemainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index d690f7918..8e1c556f9 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -45,5 +45,6 @@ PuzzleMainWindow::~PuzzleMainWindow() //--------------------------------------------------------------------------------------------------------------------- bool PuzzleMainWindow::LoadFile(const QString &path) { - + Q_UNUSED(path) + return true; } From 736d07a3047599841dbcac732112921a54e81abe Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 16 Feb 2020 23:07:44 +0200 Subject: [PATCH 004/321] error: unknown type name 'QFileOpenEvent'. --- src/app/puzzle/puzzleapplication.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/puzzle/puzzleapplication.cpp b/src/app/puzzle/puzzleapplication.cpp index a0a749d85..1cd2990de 100644 --- a/src/app/puzzle/puzzleapplication.cpp +++ b/src/app/puzzle/puzzleapplication.cpp @@ -51,6 +51,7 @@ QT_WARNING_POP #include #include #include +#include //--------------------------------------------------------------------------------------------------------------------- inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) From 3ce9de7181e08da2026ba7ba7db0c486eeec4f61 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 16 Feb 2020 23:36:50 +0200 Subject: [PATCH 005/321] error: no viable conversion from 'PuzzleMainWindow' to 'PuzzleMainWindow *'. --- src/app/puzzle/puzzleapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/puzzle/puzzleapplication.cpp b/src/app/puzzle/puzzleapplication.cpp index 1cd2990de..9cb624b52 100644 --- a/src/app/puzzle/puzzleapplication.cpp +++ b/src/app/puzzle/puzzleapplication.cpp @@ -573,7 +573,7 @@ bool PuzzleApplication::event(QEvent *e) case QEvent::ApplicationActivate: { Clean(); - PuzzleMainWindow *mw = PuzzleMainWindow(); + PuzzleMainWindow *mw = MainWindow(); if (mw && not mw->isMinimized()) { mw->show(); From c6c4edb893a3ffd9d1b14dce89e729ed20f633ca Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 25 Mar 2020 15:28:23 +0200 Subject: [PATCH 006/321] Merge branch 'develop' into feature/manual-layout --- .gitignore | 3 + .tx/config | 3 +- ChangeLog.txt | 9 + common.pri | 4 +- dist/OBS_debian/debian.valentina.1 | 41 +- dist/debian/valentina.1 | 39 +- share/translations/valentina.ts | 547 ++++++- share/translations/valentina_cs_CZ.ts | 551 +++++++- share/translations/valentina_de_DE.ts | 550 +++++++- share/translations/valentina_el_GR.ts | 556 +++++++- share/translations/valentina_en_CA.ts | 551 +++++++- share/translations/valentina_en_IN.ts | 551 +++++++- share/translations/valentina_en_US.ts | 551 +++++++- share/translations/valentina_es_ES.ts | 551 +++++++- share/translations/valentina_fi_FI.ts | 557 +++++++- share/translations/valentina_fr_FR.ts | 550 +++++++- share/translations/valentina_he_IL.ts | 560 +++++++- share/translations/valentina_id_ID.ts | 552 +++++++- share/translations/valentina_it_IT.ts | 557 +++++++- share/translations/valentina_nl_NL.ts | 551 +++++++- share/translations/valentina_pl_PL.ts | 558 +++++++- share/translations/valentina_pt_BR.ts | 553 +++++++- share/translations/valentina_ro_RO.ts | 560 +++++++- share/translations/valentina_ru_RU.ts | 551 +++++++- share/translations/valentina_uk_UA.ts | 550 +++++++- share/translations/valentina_zh_CN.ts | 552 +++++++- src/app/valentina/core/vapplication.cpp | 4 + src/app/valentina/core/vcmdexport.cpp | 31 + src/app/valentina/core/vcmdexport.h | 3 + src/app/valentina/dialogs/dialoghistory.cpp | 254 ++-- src/app/valentina/dialogs/dialoghistory.h | 12 +- .../valentina/dialogs/dialoglayoutscale.cpp | 214 +++ .../valentina/dialogs/dialoglayoutscale.h} | 61 +- .../valentina/dialogs/dialoglayoutscale.ui | 334 +++++ .../dialogs/dialoglayoutsettings.cpp | 16 + .../valentina/dialogs/dialoglayoutsettings.h | 3 + .../valentina/dialogs/dialoglayoutsettings.ui | 12 +- src/app/valentina/dialogs/dialogs.h | 1 + src/app/valentina/dialogs/dialogs.pri | 3 + .../valentina/dialogs/dialogsavelayout.cpp | 103 +- src/app/valentina/dialogs/dialogsavelayout.h | 10 + src/app/valentina/dialogs/dialogsavelayout.ui | 456 ++++-- src/app/valentina/dialogs/vwidgetdetails.cpp | 55 +- src/app/valentina/dialogs/vwidgetgroups.cpp | 68 +- src/app/valentina/dialogs/vwidgetgroups.h | 5 +- src/app/valentina/dialogs/vwidgetgroups.ui | 39 +- src/app/valentina/mainwindow.cpp | 15 +- src/app/valentina/mainwindowsnogui.cpp | 145 +- src/app/valentina/mainwindowsnogui.h | 5 + src/app/valentina/xml/vpattern.cpp | 16 + src/libs/ifc/schema.qrc | 1 + src/libs/ifc/schema/pattern/v0.8.7.xsd | 1254 +++++++++++++++++ src/libs/ifc/xml/vabstractpattern.cpp | 181 ++- src/libs/ifc/xml/vabstractpattern.h | 27 +- src/libs/ifc/xml/vdomdocument.cpp | 34 +- src/libs/ifc/xml/vdomdocument.h | 2 +- src/libs/ifc/xml/vpatternconverter.cpp | 23 +- src/libs/ifc/xml/vpatternconverter.h | 3 +- src/libs/vdxf/dxiface.cpp | 106 +- src/libs/vdxf/dxiface.h | 1 + src/libs/vdxf/libdxfrw/drw_entities.cpp | 12 + src/libs/vdxf/libdxfrw/drw_entities.h | 17 + src/libs/vdxf/libdxfrw/libdxfrw.cpp | 9 + src/libs/vdxf/libdxfrw/libdxfrw.h | 1 + src/libs/vdxf/vdxfengine.cpp | 327 ++++- src/libs/vdxf/vdxfengine.h | 21 +- src/libs/vdxf/vdxfpaintdevice.cpp | 45 +- src/libs/vdxf/vdxfpaintdevice.h | 7 + src/libs/vformat/vpatternrecipe.cpp | 45 +- src/libs/vformat/vpatternrecipe.h | 4 + src/libs/vlayout/vabstractpiece.cpp | 2 +- src/libs/vlayout/vbank.cpp | 12 +- src/libs/vlayout/vbank.h | 1 + src/libs/vlayout/vcontour.cpp | 8 +- src/libs/vlayout/vlayoutgenerator.cpp | 104 +- src/libs/vlayout/vlayoutgenerator.h | 9 +- src/libs/vlayout/vlayoutpiece.cpp | 14 +- src/libs/vlayout/vlayoutpiece.h | 1 + src/libs/vlayout/vposter.cpp | 8 +- src/libs/vlayout/vposter.h | 4 +- src/libs/vlayout/warnings.pri | 3 +- src/libs/vmisc/commandoptions.cpp | 8 +- src/libs/vmisc/commandoptions.h | 3 + src/libs/vmisc/compatibility.h | 23 + src/libs/vmisc/share/resources/icon.qrc | 4 + .../resources/icon/32x32/broken_link.png | Bin 0 -> 1561 bytes .../resources/icon/32x32/broken_link@2x.png | Bin 0 -> 4495 bytes .../vmisc/share/resources/icon/32x32/link.png | Bin 0 -> 1219 bytes .../share/resources/icon/32x32/link@2x.png | Bin 0 -> 3673 bytes src/libs/vmisc/vcommonsettings.cpp | 5 + src/libs/vmisc/vcommonsettings.h | 1 + src/libs/vmisc/vsettings.cpp | 27 + src/libs/vmisc/vsettings.h | 5 + src/libs/vpatterndb/vpassmark.cpp | 2 +- src/libs/vpatterndb/vtranslatevars.cpp | 114 +- src/libs/vpatterndb/vtranslatevars.h | 18 +- .../support/dialogeditwrongformula.cpp | 6 +- .../vtools/dialogs/tools/dialogendline.cpp | 2 +- .../dialogs/tools/dialogflippingbyaxis.cpp | 79 ++ .../dialogs/tools/dialogflippingbyaxis.h | 17 +- .../dialogs/tools/dialogflippingbyaxis.ui | 66 +- .../dialogs/tools/dialogflippingbyline.cpp | 79 ++ .../dialogs/tools/dialogflippingbyline.h | 17 +- .../dialogs/tools/dialogflippingbyline.ui | 66 +- src/libs/vtools/dialogs/tools/dialoggroup.cpp | 19 + src/libs/vtools/dialogs/tools/dialoggroup.h | 5 + src/libs/vtools/dialogs/tools/dialoggroup.ui | 42 +- src/libs/vtools/dialogs/tools/dialogmove.cpp | 81 +- src/libs/vtools/dialogs/tools/dialogmove.h | 17 +- src/libs/vtools/dialogs/tools/dialogmove.ui | 64 +- .../vtools/dialogs/tools/dialogrotation.cpp | 79 ++ .../vtools/dialogs/tools/dialogrotation.h | 17 +- .../vtools/dialogs/tools/dialogrotation.ui | 64 +- src/libs/vtools/dialogs/tools/dialogtool.cpp | 7 + src/libs/vtools/dialogs/tools/dialogtool.h | 2 + .../tools/piece/dialogseamallowance.cpp | 19 +- .../flipping/vtoolflippingbyaxis.cpp | 27 +- .../flipping/vtoolflippingbyline.cpp | 28 +- .../operation/vabstractoperation.cpp | 203 +++ .../drawTools/operation/vabstractoperation.h | 49 +- .../tools/drawTools/operation/vtoolmove.cpp | 27 +- .../drawTools/operation/vtoolrotation.cpp | 29 +- src/libs/vtools/tools/drawTools/vdrawtool.cpp | 22 +- src/libs/vtools/tools/drawTools/vdrawtool.h | 6 +- src/libs/vtools/tools/vabstracttool.cpp | 14 +- src/libs/vtools/tools/vabstracttool.h | 1 + src/libs/vtools/tools/vtoolseamallowance.h | 4 +- src/libs/vtools/undocommands/addgroup.cpp | 121 -- src/libs/vtools/undocommands/addgroup.h | 56 - .../vtools/undocommands/additemtogroup.cpp | 122 -- src/libs/vtools/undocommands/additemtogroup.h | 58 - .../undocommands/changegroupvisibility.cpp | 95 -- .../changemultiplegroupsvisibility.cpp | 131 -- .../changemultiplegroupsvisibility.h | 55 - src/libs/vtools/undocommands/delgroup.cpp | 124 -- src/libs/vtools/undocommands/delgroup.h | 55 - .../undocommands/removeitemfromgroup.cpp | 123 -- .../vtools/undocommands/removeitemfromgroup.h | 58 - src/libs/vtools/undocommands/undocommands.pri | 18 +- src/libs/vtools/undocommands/undogroup.cpp | 592 ++++++++ src/libs/vtools/undocommands/undogroup.h | 184 +++ src/libs/vwidgets/vlineedit.cpp | 116 ++ src/libs/vwidgets/vlineedit.h | 29 + .../share/Issue_298_case1/output.json | 9 +- .../share/Issue_548_case1/output.json | 9 +- src/test/ValentinaTest/tst_vposter.cpp | 4 +- 146 files changed, 16861 insertions(+), 1775 deletions(-) create mode 100644 src/app/valentina/dialogs/dialoglayoutscale.cpp rename src/{libs/vtools/undocommands/changegroupvisibility.h => app/valentina/dialogs/dialoglayoutscale.h} (53%) create mode 100644 src/app/valentina/dialogs/dialoglayoutscale.ui create mode 100644 src/libs/ifc/schema/pattern/v0.8.7.xsd create mode 100644 src/libs/vmisc/share/resources/icon/32x32/broken_link.png create mode 100644 src/libs/vmisc/share/resources/icon/32x32/broken_link@2x.png create mode 100644 src/libs/vmisc/share/resources/icon/32x32/link.png create mode 100644 src/libs/vmisc/share/resources/icon/32x32/link@2x.png delete mode 100644 src/libs/vtools/undocommands/addgroup.cpp delete mode 100644 src/libs/vtools/undocommands/addgroup.h delete mode 100644 src/libs/vtools/undocommands/additemtogroup.cpp delete mode 100644 src/libs/vtools/undocommands/additemtogroup.h delete mode 100644 src/libs/vtools/undocommands/changegroupvisibility.cpp delete mode 100644 src/libs/vtools/undocommands/changemultiplegroupsvisibility.cpp delete mode 100644 src/libs/vtools/undocommands/changemultiplegroupsvisibility.h delete mode 100644 src/libs/vtools/undocommands/delgroup.cpp delete mode 100644 src/libs/vtools/undocommands/delgroup.h delete mode 100644 src/libs/vtools/undocommands/removeitemfromgroup.cpp delete mode 100644 src/libs/vtools/undocommands/removeitemfromgroup.h create mode 100644 src/libs/vtools/undocommands/undogroup.cpp create mode 100644 src/libs/vtools/undocommands/undogroup.h diff --git a/.gitignore b/.gitignore index eed2f58cb..19aa9e681 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ *(v*).vit* *(v*).vst* +# Valentina's backup file +*.bak + # KDE directory preferences .directory diff --git a/.tx/config b/.tx/config index 0ca0025fd..de69aa30f 100644 --- a/.tx/config +++ b/.tx/config @@ -2,8 +2,9 @@ host = https://www.transifex.com lang_map = uk: uk_UA, cs : cs_CZ, nl : nl_NL, fi : fi_FI, es : es_ES, id : id_ID -[valentina-project.valentina_ts] +[valentina-project.valentina-ts] file_filter = share/translations/valentina_.ts +minimum_perc = 20 source_file = share/translations/valentina.ts source_lang = en type = QT diff --git a/ChangeLog.txt b/ChangeLog.txt index e33a1db31..74b331d2f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -38,6 +38,15 @@ - Export tiled PDF with watermark. - [#984] Issue with up to date list of unique names. - Tracking changes/prevent "OK" recalculation after "Apply". +- Change behavior for menu Pattern piece -> Show main path. Now it has an influence on export as well. +- Call Piece Options and Delete Piece from the piece list context menu. +- Change default values for grainline length and pattern label size to 10 cm. +- Tool Point at distance and angle now allows negative length. +- Export pattern to DXF-ASTM. +- [smart-pattern/valentina#18] Auto-created Visibility Group for group operation. +- Setting scale factor for export and print. +- New layout generator option: Prefer one sheet solution. +- [smart-pattern/valentina#15] Organization of groups - groups categories # Version 0.6.2 (unreleased) - [#903] Bug in tool Cut Spline path. diff --git a/common.pri b/common.pri index 8a9f35321..efdd80636 100644 --- a/common.pri +++ b/common.pri @@ -933,5 +933,7 @@ MSVC_DEBUG_CXXFLAGS += \ -wd5026 \ # move constructor was implicitly defined as deleted -wd5027 \ # move assignment operator was implicitly defined as deleted -wd5039 \ # pointer or reference to potentially throwing function passed to extern C function under -EHc. - -wd4774 # format string expected in argument 3 is not a string literal + -wd4774 \ # format string expected in argument 3 is not a string literal + -wd5204 # class has virtual functions, but its trivial destructor is not virtual; instances of objects derived + # from this class may not be destructed correctly } diff --git a/dist/OBS_debian/debian.valentina.1 b/dist/OBS_debian/debian.valentina.1 index 715019661..48c841dd1 100644 --- a/dist/OBS_debian/debian.valentina.1 +++ b/dist/OBS_debian/debian.valentina.1 @@ -1,6 +1,6 @@ .\" Manpage for valentina. .\" Contact dismine@gmail.com to correct errors. -.TH valentina 1 "21 July, 2019" "valentina man page" +.TH valentina 1 "22 March, 2020" "valentina man page" .SH NAME Valentina \- Pattern making program. .SH SYNOPSIS @@ -102,6 +102,33 @@ The path to output destination folder. By default the directory at which the app .BR "*" " AutoCAD DXF 2013 AAMA files (*.dxf) = 23," .RE .RS +.BR "*" " AutoCAD DXF R10 ASTM файли (*.dxf) = 24," +.RE +.RS +.BR "*" " AutoCAD DXF R11/12 ASTM файли (*.dxf) = 25," +.RE +.RS +.BR "*" " AutoCAD DXF R13 ASTM файли (*.dxf) = 26," +.RE +.RS +.BR "*" " AutoCAD DXF R14 ASTM файли (*.dxf) = 27," +.RE +.RS +.BR "*" " AutoCAD DXF 2000 ASTM файли (*.dxf) = 28," +.RE +.RS +.BR "*" " AutoCAD DXF 2004 ASTM файли (*.dxf) = 29," +.RE +.RS +.BR "*" " AutoCAD DXF 2007 ASTM файли (*.dxf) = 30," +.RE +.RS +.BR "*" " AutoCAD DXF 2010 ASTM файли (*.dxf) = 31," +.RE +.RS +.BR "*" " AutoCAD DXF 2013 ASTM файли (*.dxf) = 32," +.RE +.RS .BR "*" " PDF tiled files (*.pdf) = 33." .RE .IP "--bdxf" @@ -186,16 +213,24 @@ The path to output destination folder. By default the directory at which the app .RB "Page top margin in current units like 3.0 (" "export mode" "). If not set will be used value from default printer. Or 0 if none printers was found." .IP "-B, --bmargin " .RB "Page bottom margin in current units like 3.0 (" "export mode" "). If not set will be used value from default printer. Or 0 if none printers was found." +.IP "--xscale " +.RB "Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, " "export mode" ")." +.IP "--yscale " +.RB "Set vertical scale factor from 0.01 to 3.0 (default = 1.0, " "export mode" ")." .IP "--followGrainline" -.RB "Order detail to follow grainline direction (" "export mode" "). +.RB "Order detail to follow grainline direction (" "export mode" ")." .IP "--manualPriority" -.RB "Follow manual priority over priority by square (" "export mode" "). +.RB "Follow manual priority over priority by square (" "export mode" ")." .IP "--nestQuantity" .RB "Nest quantity copies of each piece (" "export mode" "). .IP "-c, --crop" .RB "Auto crop unused length (" "export mode" ")." +.IP "--cropWidth" +.RB "Auto crop unused width (" "export mode" ")." .IP "-u, --unite" .RB "Unite pages if possible (" "export mode" "). Maximum value limited by QImage that supports only a maximum of " "32768x32768 px" " images." +.IP "--preferOneSheetSolution" +.RB "Prefer one sheet layout solution (" "export mode" ")." .IP "-S, --savelen" .RB "Save length of the sheet if set (" "export mode" "). The option tells the program to use as much as possible width of sheet. Quality of a layout can be worse when this option was used." .IP "-l, --layounits " diff --git a/dist/debian/valentina.1 b/dist/debian/valentina.1 index 18664147b..48c841dd1 100644 --- a/dist/debian/valentina.1 +++ b/dist/debian/valentina.1 @@ -1,6 +1,6 @@ .\" Manpage for valentina. .\" Contact dismine@gmail.com to correct errors. -.TH valentina 1 "17 October, 2019" "valentina man page" +.TH valentina 1 "22 March, 2020" "valentina man page" .SH NAME Valentina \- Pattern making program. .SH SYNOPSIS @@ -102,6 +102,33 @@ The path to output destination folder. By default the directory at which the app .BR "*" " AutoCAD DXF 2013 AAMA files (*.dxf) = 23," .RE .RS +.BR "*" " AutoCAD DXF R10 ASTM файли (*.dxf) = 24," +.RE +.RS +.BR "*" " AutoCAD DXF R11/12 ASTM файли (*.dxf) = 25," +.RE +.RS +.BR "*" " AutoCAD DXF R13 ASTM файли (*.dxf) = 26," +.RE +.RS +.BR "*" " AutoCAD DXF R14 ASTM файли (*.dxf) = 27," +.RE +.RS +.BR "*" " AutoCAD DXF 2000 ASTM файли (*.dxf) = 28," +.RE +.RS +.BR "*" " AutoCAD DXF 2004 ASTM файли (*.dxf) = 29," +.RE +.RS +.BR "*" " AutoCAD DXF 2007 ASTM файли (*.dxf) = 30," +.RE +.RS +.BR "*" " AutoCAD DXF 2010 ASTM файли (*.dxf) = 31," +.RE +.RS +.BR "*" " AutoCAD DXF 2013 ASTM файли (*.dxf) = 32," +.RE +.RS .BR "*" " PDF tiled files (*.pdf) = 33." .RE .IP "--bdxf" @@ -186,10 +213,14 @@ The path to output destination folder. By default the directory at which the app .RB "Page top margin in current units like 3.0 (" "export mode" "). If not set will be used value from default printer. Or 0 if none printers was found." .IP "-B, --bmargin " .RB "Page bottom margin in current units like 3.0 (" "export mode" "). If not set will be used value from default printer. Or 0 if none printers was found." +.IP "--xscale " +.RB "Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, " "export mode" ")." +.IP "--yscale " +.RB "Set vertical scale factor from 0.01 to 3.0 (default = 1.0, " "export mode" ")." .IP "--followGrainline" -.RB "Order detail to follow grainline direction (" "export mode" "). +.RB "Order detail to follow grainline direction (" "export mode" ")." .IP "--manualPriority" -.RB "Follow manual priority over priority by square (" "export mode" "). +.RB "Follow manual priority over priority by square (" "export mode" ")." .IP "--nestQuantity" .RB "Nest quantity copies of each piece (" "export mode" "). .IP "-c, --crop" @@ -198,6 +229,8 @@ The path to output destination folder. By default the directory at which the app .RB "Auto crop unused width (" "export mode" ")." .IP "-u, --unite" .RB "Unite pages if possible (" "export mode" "). Maximum value limited by QImage that supports only a maximum of " "32768x32768 px" " images." +.IP "--preferOneSheetSolution" +.RB "Prefer one sheet layout solution (" "export mode" ")." .IP "-S, --savelen" .RB "Save length of the sheet if set (" "export mode" "). The option tells the program to use as much as possible width of sheet. Quality of a layout can be worse when this option was used." .IP "-l, --layounits " diff --git a/share/translations/valentina.ts b/share/translations/valentina.ts index bc8a8ad32..ddcd84322 100644 --- a/share/translations/valentina.ts +++ b/share/translations/valentina.ts @@ -50,6 +50,13 @@ add union details + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2463,6 +2470,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2502,6 +2537,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2515,7 +2578,7 @@ Unique pattern piece name - Unique pattern piece name + Unique pattern piece name Choose group name @@ -2525,6 +2588,18 @@ New group New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3064,6 +3139,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Left: + + + cm + cm + + + Right: + Right: + + + Top: + Top: + + + Bottom: + Bottom: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3363,6 +3497,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3775,6 +3917,34 @@ Apply settings anyway? Center point Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5460,6 +5630,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5567,6 +5761,34 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9780,6 +10002,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -11565,6 +11794,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Can't open file %1: +%2. + + + Can't open schema file %1: +%2. + Can't open schema file %1: +%2. + + + Could not load schema file '%1'. + Could not load schema file '%1'. + + + Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 + VAbstractCubicBezierPath @@ -11697,6 +11946,18 @@ Do you want to save your changes? Length Length + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11868,6 +12129,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -12370,6 +12646,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12463,7 +12759,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. @@ -12472,7 +12768,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 Parsing error file %3 in line %1 column %2 @@ -12500,7 +12796,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Fail to write Canonical XML. @@ -13104,6 +13400,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13428,6 +13732,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -13439,6 +13747,10 @@ Do you want to save your changes? Second line point Second line point + + flipping by line + + VToolHeight @@ -13533,6 +13845,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -14133,6 +14449,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15662,6 +15982,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15723,6 +16228,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15732,7 +16249,7 @@ Do you want to save your changes? Rename - Rename + Rename Delete @@ -15754,6 +16271,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_cs_CZ.ts b/share/translations/valentina_cs_CZ.ts index e0b6041bb..af9b1d3a2 100644 --- a/share/translations/valentina_cs_CZ.ts +++ b/share/translations/valentina_cs_CZ.ts @@ -50,6 +50,13 @@ Přidat spojení jednotlivostí (dílů střihu) + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Převrácení podle osy + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Název: + + + Rotation + Otáčení + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Převrácení podle čáry + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Název: + + + Rotation + Otáčení + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Jedinečný název dílu střihu + Jedinečný název dílu střihu Choose group name @@ -2509,6 +2572,18 @@ New group Nová skupina + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ Koeficient účinnosti: %1% + + DialogLayoutScale + + Layout scale + + + + Margins + Okraje + + + Left: + Levý: + + + cm + cm + + + Right: + Pravý: + + + Top: + Nahoře: + + + Bottom: + Dole: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + % + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3349,6 +3483,14 @@ Přesto použít nastavení? Auto crop unused width Automaticky ořezat nepoužívanou šířku + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3761,6 +3903,34 @@ Přesto použít nastavení? Center point Středový bod + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Název: + + + Rotation + Otáčení + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5435,6 +5605,30 @@ Přesto použít nastavení? This point cannot be origin point. Please, select another origin point Tento bod nemůže být původní bod. Vyberte, prosím, jiný původní bod + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Název: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5538,6 +5732,38 @@ Přesto použít nastavení? Orientation: Natočení: + + Options + Volby + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + % + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9569,6 +9795,13 @@ Tato volba se projeví po opětovném spuštění. Odstranit položku ze skupiny + + RenameGroup + + rename group + + + RenamePP @@ -11233,6 +11466,26 @@ Chcete uložit změny? Invalid version. Maximum supported format version is %1 Neplatná verze. Nejvyšší podporovaná verze formátu je %1 + + Can't open file %1: +%2. + Nelze otevřít soubor %1: +%2. + + + Can't open schema file %1: +%2. + Nelze otevřít soubor se schématem %1: +%2. + + + Could not load schema file '%1'. + Nepodařilo se nahrát soubor se schématem '%1'. + + + Validation error file %3 in line %1 column %2 + Chyba při ověřování souboru %3 na řádku %1, ve sloupci %2 + VAbstractCubicBezierPath @@ -11321,6 +11574,18 @@ Chcete uložit změny? Length Délka + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11492,6 +11757,21 @@ Chcete uložit změny? Neplatný zářez. + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11994,6 +12274,26 @@ Chcete uložit změny? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12087,7 +12387,7 @@ Chcete uložit změny? Can't open schema file %1: %2. - Nelze otevřít soubor se schématem %1: + Nelze otevřít soubor se schématem %1: %2. @@ -12096,7 +12396,7 @@ Chcete uložit změny? Validation error file %3 in line %1 column %2 - Chyba při ověřování souboru %3 na řádku %1, ve sloupci %2 + Chyba při ověřování souboru %3 na řádku %1, ve sloupci %2 Parsing error file %3 in line %1 column %2 @@ -12124,7 +12424,7 @@ Chcete uložit změny? Could not load schema file '%1'. - Nepodařilo se nahrát soubor se schématem '%1'. + Nepodařilo se nahrát soubor se schématem '%1'. Fail to write Canonical XML. @@ -12717,6 +13017,14 @@ Chcete uložit změny? Can't create history record for the tool. Nelze vytvořit záznam historie pro nástroj. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13034,6 +13342,10 @@ Chcete uložit změny? Origin point Původní bod + + Flipping by axis + Převrácení podle osy + VToolFlippingByLine @@ -13045,6 +13357,10 @@ Chcete uložit změny? Second line point Druhý bod čáry + + flipping by line + + VToolHeight @@ -13139,6 +13455,10 @@ Chcete uložit změny? Rotation origin point Původní bod otočení + + move + + VToolOptionsPropertyBrowser @@ -13739,6 +14059,10 @@ Chcete uložit změny? Rotation angle Úhel otáčení + + rotate + + VToolSeamAllowance @@ -15238,6 +15562,191 @@ Chcete uložit změny? Left symbol _ in the name OtočeníElOblouk_ + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15299,6 +15808,18 @@ Chcete uložit změny? Hide not in layout Skrýt ne v rozvržení + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15308,7 +15829,7 @@ Chcete uložit změny? Rename - Přejmenovat + Přejmenovat Delete @@ -15330,6 +15851,26 @@ Chcete uložit změny? Show All Ukázat vše + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Nastavení + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_de_DE.ts b/share/translations/valentina_de_DE.ts index 44b38165f..9d981a899 100644 --- a/share/translations/valentina_de_DE.ts +++ b/share/translations/valentina_de_DE.ts @@ -50,6 +50,13 @@ Verbindungsdetail hinzufügen + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Über Achse spiegeln + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Drehung + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Über Linie spiegeln + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Drehung + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Eindeutiger Name des Schnittteils + Eindeutiger Name des Schnittteils Choose group name @@ -2509,6 +2572,18 @@ New group Neue Gruppe + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Links: + + + cm + cm + + + Right: + Rechts: + + + Top: + Oben: + + + Bottom: + Unten: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3348,6 +3482,14 @@ Einstellungen trotzdem anwenden? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3760,6 +3902,34 @@ Einstellungen trotzdem anwenden? Center point Mittelpunkt + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Drehung + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5433,6 +5603,30 @@ Einstellungen trotzdem anwenden? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5536,6 +5730,38 @@ Einstellungen trotzdem anwenden? Orientation: Ausrichtung: + + Options + Optionen + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9549,6 +9775,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -11190,6 +11423,25 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Konnte Datei %1 nicht öffnen: %2. + + + Can't open schema file %1: +%2. + Konnte Schemadatei %1 nicht öffnen: +%2. + + + Could not load schema file '%1'. + Konnte Schemadatei %1 nicht öffnen. + + + Validation error file %3 in line %1 column %2 + Fehler bei der Gültigkeitsprüfung in Datei %3, Zeile %1, Spalte %2 + VAbstractCubicBezierPath @@ -11278,6 +11530,18 @@ Do you want to save your changes? Length Länge + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11445,6 +11709,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11943,6 +12222,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12035,7 +12334,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Konnte Schemadatei %1 nicht öffnen: + Konnte Schemadatei %1 nicht öffnen: %2. @@ -12044,7 +12343,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Fehler bei der Gültigkeitsprüfung in Datei %3, Zeile %1, Spalte %2 + Fehler bei der Gültigkeitsprüfung in Datei %3, Zeile %1, Spalte %2 Parsing error file %3 in line %1 column %2 @@ -12072,7 +12371,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Konnte Schemadatei %1 nicht öffnen. + Konnte Schemadatei %1 nicht öffnen. Fail to write Canonical XML. @@ -12665,6 +12964,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12954,6 +13261,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Über Achse spiegeln + VToolFlippingByLine @@ -12965,6 +13276,10 @@ Do you want to save your changes? Second line point Punkt 2 der Linie + + flipping by line + + VToolHeight @@ -13059,6 +13374,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13651,6 +13970,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15146,6 +15469,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15207,6 +15715,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15216,7 +15736,7 @@ Do you want to save your changes? Rename - Umbenennen + Umbenennen Delete @@ -15238,6 +15758,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Einstellungen + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_el_GR.ts b/share/translations/valentina_el_GR.ts index 556d8da2c..b48e0a0c6 100644 --- a/share/translations/valentina_el_GR.ts +++ b/share/translations/valentina_el_GR.ts @@ -50,6 +50,13 @@ προσθήκη λεπτομερειών συνένωσης + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2403,6 +2410,34 @@ Flipping by axis Αναστροφή κατά άξονα + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Όνομα: + + + Rotation + Περιστροφή + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2442,6 +2477,34 @@ Flipping by line Αναστροφή κατά γραμμή + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Όνομα: + + + Rotation + Περιστροφή + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2455,7 +2518,7 @@ Unique pattern piece name - Μοναδικό όνομα κομματιού πατρόν + Μοναδικό όνομα κομματιού πατρόν Choose group name @@ -2465,6 +2528,18 @@ New group Νέα ομάδα + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2992,6 +3067,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + Περιθώρια + + + Left: + Αριστερά: + + + cm + εκ + + + Right: + Δεξιά: + + + Top: + Επάνω: + + + Bottom: + Κάτω: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3276,6 +3410,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3688,6 +3830,34 @@ Apply settings anyway? Center point Κεντρικό σημείο + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Όνομα: + + + Rotation + Περιστροφή + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5349,6 +5519,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Όνομα: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5452,6 +5646,38 @@ Apply settings anyway? Orientation: + + Options + Επιλογές + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9363,6 +9589,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -10973,6 +11206,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -11061,6 +11312,18 @@ Do you want to save your changes? Length Μήκος + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11228,6 +11491,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11614,6 +11892,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -11687,15 +11985,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -11712,10 +12001,6 @@ Do you want to save your changes? Could not copy temp file to document file Δεν ήταν δυνατή η αντιγραφή του προσωρινού αρχείου στο αρχείο εγγράφου - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -12307,6 +12592,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12608,6 +12901,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Αναστροφή κατά άξονα + VToolFlippingByLine @@ -12619,6 +12916,10 @@ Do you want to save your changes? Second line point Δεύτερο σημείο γραμμής + + flipping by line + + VToolHeight @@ -12713,6 +13014,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13309,6 +13614,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -14734,6 +15043,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -14795,12 +15289,24 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups Rename - Μετονομασία + Μετονομασία Delete @@ -14822,6 +15328,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Προτιμήσεις + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_en_CA.ts b/share/translations/valentina_en_CA.ts index 9b4a1cc9e..6d08da1c9 100644 --- a/share/translations/valentina_en_CA.ts +++ b/share/translations/valentina_en_CA.ts @@ -50,6 +50,13 @@ add union details + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Unique pattern piece name + Unique pattern piece name Choose group name @@ -2509,6 +2572,18 @@ New group New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Left: + + + cm + cm + + + Right: + Right: + + + Top: + Top: + + + Bottom: + Bottom: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3347,6 +3481,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3759,6 +3901,34 @@ Apply settings anyway? Center point Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5432,6 +5602,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5535,6 +5729,38 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9560,6 +9786,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -11224,6 +11457,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Can't open file %1: +%2. + + + Can't open schema file %1: +%2. + Can't open schema file %1: +%2. + + + Could not load schema file '%1'. + Could not load schema file '%1'. + + + Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 + VAbstractCubicBezierPath @@ -11312,6 +11565,18 @@ Do you want to save your changes? Length Length + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11483,6 +11748,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11985,6 +12265,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12078,7 +12378,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. @@ -12087,7 +12387,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 Parsing error file %3 in line %1 column %2 @@ -12115,7 +12415,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Fail to write Canonical XML. @@ -12708,6 +13008,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13025,6 +13333,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Flipping by axis + VToolFlippingByLine @@ -13036,6 +13348,10 @@ Do you want to save your changes? Second line point Second line point + + flipping by line + + VToolHeight @@ -13130,6 +13446,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13730,6 +14050,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15229,6 +15553,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15290,6 +15799,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15299,7 +15820,7 @@ Do you want to save your changes? Rename - Rename + Rename Delete @@ -15321,6 +15842,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_en_IN.ts b/share/translations/valentina_en_IN.ts index db9d738cb..8d2186c7e 100644 --- a/share/translations/valentina_en_IN.ts +++ b/share/translations/valentina_en_IN.ts @@ -50,6 +50,13 @@ add union details + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Unique pattern piece name + Unique pattern piece name Choose group name @@ -2509,6 +2572,18 @@ New group New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Left: + + + cm + cm + + + Right: + Right: + + + Top: + Top: + + + Bottom: + Bottom: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3347,6 +3481,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3759,6 +3901,34 @@ Apply settings anyway? Center point Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5432,6 +5602,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5535,6 +5729,38 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9560,6 +9786,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -11224,6 +11457,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Can't open file %1: +%2. + + + Can't open schema file %1: +%2. + Can't open schema file %1: +%2. + + + Could not load schema file '%1'. + Could not load schema file '%1'. + + + Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 + VAbstractCubicBezierPath @@ -11312,6 +11565,18 @@ Do you want to save your changes? Length Length + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11483,6 +11748,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11985,6 +12265,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12078,7 +12378,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. @@ -12087,7 +12387,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 Parsing error file %3 in line %1 column %2 @@ -12115,7 +12415,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Fail to write Canonical XML. @@ -12708,6 +13008,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13025,6 +13333,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Flipping by axis + VToolFlippingByLine @@ -13036,6 +13348,10 @@ Do you want to save your changes? Second line point Second line point + + flipping by line + + VToolHeight @@ -13130,6 +13446,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13730,6 +14050,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15229,6 +15553,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15290,6 +15799,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15299,7 +15820,7 @@ Do you want to save your changes? Rename - Rename + Rename Delete @@ -15321,6 +15842,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_en_US.ts b/share/translations/valentina_en_US.ts index cfc4d098e..d4043c1fd 100644 --- a/share/translations/valentina_en_US.ts +++ b/share/translations/valentina_en_US.ts @@ -50,6 +50,13 @@ add union details + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Unique pattern piece name + Unique pattern piece name Choose group name @@ -2509,6 +2572,18 @@ New group New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Left: + + + cm + cm + + + Right: + Right: + + + Top: + Top: + + + Bottom: + Bottom: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3347,6 +3481,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3759,6 +3901,34 @@ Apply settings anyway? Center point Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5432,6 +5602,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Name: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5535,6 +5729,38 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9560,6 +9786,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -11224,6 +11457,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Can't open file %1: +%2. + + + Can't open schema file %1: +%2. + Can't open schema file %1: +%2. + + + Could not load schema file '%1'. + Could not load schema file '%1'. + + + Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 + VAbstractCubicBezierPath @@ -11312,6 +11565,18 @@ Do you want to save your changes? Length Length + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11483,6 +11748,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11985,6 +12265,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12078,7 +12378,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. @@ -12087,7 +12387,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 Parsing error file %3 in line %1 column %2 @@ -12115,7 +12415,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Fail to write Canonical XML. @@ -12708,6 +13008,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13025,6 +13333,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Flipping by axis + VToolFlippingByLine @@ -13036,6 +13348,10 @@ Do you want to save your changes? Second line point Second line point + + flipping by line + + VToolHeight @@ -13130,6 +13446,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13730,6 +14050,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15229,6 +15553,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15290,6 +15799,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15299,7 +15820,7 @@ Do you want to save your changes? Rename - Rename + Rename Delete @@ -15321,6 +15842,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_es_ES.ts b/share/translations/valentina_es_ES.ts index cd8f57e19..5faa86e87 100644 --- a/share/translations/valentina_es_ES.ts +++ b/share/translations/valentina_es_ES.ts @@ -50,6 +50,13 @@ añadir detalles de la unión + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Volteando por ejes + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nombre: + + + Rotation + Rotación + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Volteando por linea + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nombre: + + + Rotation + Rotación + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Nombre único de pieza del patrón + Nombre único de pieza del patrón Choose group name @@ -2509,6 +2572,18 @@ New group Nuevo grupo + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ Coeficiente de eficiencia: %1% + + DialogLayoutScale + + Layout scale + + + + Margins + Margenes + + + Left: + Izquierda: + + + cm + cm + + + Right: + Derecha: + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + % + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3348,6 +3482,14 @@ Aplicar características de todos modos? Auto crop unused width Recorte automático del ancho no utilizado + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3760,6 +3902,34 @@ Aplicar características de todos modos? Center point Punto central + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nombre: + + + Rotation + Rotación + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5433,6 +5603,30 @@ Aplicar características de todos modos? This point cannot be origin point. Please, select another origin point Este punto no puede ser punto de origen. Por favor, seleccione otro punto de origen + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nombre: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5536,6 +5730,38 @@ Aplicar características de todos modos? Orientation: Orientación: + + Options + Opciones + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + % + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9563,6 +9789,13 @@ Esta opción surtirá efecto después de reiniciar. Remover elemento del grupo + + RenameGroup + + rename group + + + RenamePP @@ -11227,6 +11460,26 @@ Quieres guardar los cambios? Invalid version. Maximum supported format version is %1 Versión invalida. La versión de formato máximo admitido es %1 + + Can't open file %1: +%2. + No se pudo abrir el archivo %1: +%2. + + + Can't open schema file %1: +%2. + No se pudo abrir el archivo de esquema %1: +%2. + + + Could not load schema file '%1'. + No se puede cargar el archivo de esquema '%1'. + + + Validation error file %3 in line %1 column %2 + Error de validación en el archivo %3 en la línea %1 columna %2 + VAbstractCubicBezierPath @@ -11315,6 +11568,18 @@ Quieres guardar los cambios? Length Longitud + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11486,6 +11751,21 @@ Quieres guardar los cambios? Pique invalido. + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11988,6 +12268,26 @@ Quieres guardar los cambios? Auto crop unused width (export mode). Auto cortar ancho sin uso (modo de exportación). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12081,7 +12381,7 @@ Quieres guardar los cambios? Can't open schema file %1: %2. - No se pudo abrir el archivo de esquema %1: + No se pudo abrir el archivo de esquema %1: %2. @@ -12090,7 +12390,7 @@ Quieres guardar los cambios? Validation error file %3 in line %1 column %2 - Error de validación en el archivo %3 en la línea %1 columna %2 + Error de validación en el archivo %3 en la línea %1 columna %2 Parsing error file %3 in line %1 column %2 @@ -12118,7 +12418,7 @@ Quieres guardar los cambios? Could not load schema file '%1'. - No se puede cargar el archivo de esquema '%1'. + No se puede cargar el archivo de esquema '%1'. Fail to write Canonical XML. @@ -12711,6 +13011,14 @@ Quieres guardar los cambios? Can't create history record for the tool. No se puede crear un registro de historial para la herramienta. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13028,6 +13336,10 @@ Quieres guardar los cambios? Origin point Punto origen + + Flipping by axis + Volteando por ejes + VToolFlippingByLine @@ -13039,6 +13351,10 @@ Quieres guardar los cambios? Second line point Punto segunda linea + + flipping by line + + VToolHeight @@ -13133,6 +13449,10 @@ Quieres guardar los cambios? Rotation origin point Punto de origen de rotación + + move + + VToolOptionsPropertyBrowser @@ -13733,6 +14053,10 @@ Quieres guardar los cambios? Rotation angle Angulo de rotación + + rotate + + VToolSeamAllowance @@ -15232,6 +15556,191 @@ Quieres guardar los cambios? Left symbol _ in the name RotaciónElArco_ + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15293,6 +15802,18 @@ Quieres guardar los cambios? Hide not in layout No ocultar en el diseño + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15302,7 +15823,7 @@ Quieres guardar los cambios? Rename - Renombrar + Renombrar Delete @@ -15324,6 +15845,26 @@ Quieres guardar los cambios? Show All Mostrar Todo + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferencias + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_fi_FI.ts b/share/translations/valentina_fi_FI.ts index 8e177bc36..466e8af13 100644 --- a/share/translations/valentina_fi_FI.ts +++ b/share/translations/valentina_fi_FI.ts @@ -36,6 +36,13 @@ + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2059,6 +2066,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nmi: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2094,6 +2129,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nmi: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2105,10 +2168,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -2117,6 +2176,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2628,6 +2699,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + cm + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -2852,6 +2982,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3260,6 +3398,34 @@ Apply settings anyway? Center point Keskipiste + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nmi: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4805,6 +4971,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nmi: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4888,6 +5078,38 @@ Apply settings anyway? Orientation: + + Options + Asetukset + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -8519,6 +8741,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -9997,6 +10226,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Tiedostoa %1 ei voitu avata: +%2. + + + Can't open schema file %1: +%2. + Skeematiedostoa %1 ei voitu avata. +%2. + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + Tarkastus virhe tiedostossa %3 rivillä %1 kohdassa %2 + VAbstractCubicBezierPath @@ -10085,6 +10334,18 @@ Do you want to save your changes? Length Pituus + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -10252,6 +10513,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -10634,6 +10910,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -10727,7 +11023,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Skeematiedostoa %1 ei voitu avata. + Skeematiedostoa %1 ei voitu avata. %2. @@ -10736,7 +11032,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Tarkastus virhe tiedostossa %3 rivillä %1 kohdassa %2 + Tarkastus virhe tiedostossa %3 rivillä %1 kohdassa %2 Parsing error file %3 in line %1 column %2 @@ -10762,10 +11058,6 @@ Do you want to save your changes? Could not remove document file Dokumenttitiedostoa ei voitu poistaa - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -11357,6 +11649,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -11607,6 +11907,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -11618,6 +11922,10 @@ Do you want to save your changes? Second line point Viivan toinen piste + + flipping by line + + VToolHeight @@ -11712,6 +12020,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -12252,6 +12564,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -13712,6 +14028,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -13773,13 +14274,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete Poista @@ -13800,6 +14309,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Asetukset + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_fr_FR.ts b/share/translations/valentina_fr_FR.ts index 52f42e174..5f0ef24b0 100644 --- a/share/translations/valentina_fr_FR.ts +++ b/share/translations/valentina_fr_FR.ts @@ -50,6 +50,13 @@ Ajouter des fusions de pièce de patron + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Nom unique de pièce de patron + Nom unique de pièce de patron Choose group name @@ -2509,6 +2572,18 @@ New group Nouveau groupe + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Gauche: + + + cm + + + + Right: + Droite: + + + Top: + Haut: + + + Bottom: + Bas: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3344,6 +3478,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3756,6 +3898,34 @@ Apply settings anyway? Center point Point central + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + Rotation + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5429,6 +5599,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5532,6 +5726,38 @@ Apply settings anyway? Orientation: + + Options + Options + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9545,6 +9771,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -11205,6 +11438,25 @@ Voulez-vous enregistrer les changements? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + impossible d'ouvrir le fichier %1: +%2. + + + Can't open schema file %1: +%2. + Erreur d'ouverture du fichier de schéma %1: %2. + + + Could not load schema file '%1'. + Impossible de lire le schéma de fichier '%1'. + + + Validation error file %3 in line %1 column %2 + Erreur de validation : fichier %3, ligne %1, colonne %2 + VAbstractCubicBezierPath @@ -11293,6 +11545,18 @@ Voulez-vous enregistrer les changements? Length Longueur + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11460,6 +11724,21 @@ Voulez-vous enregistrer les changements? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11962,6 +12241,26 @@ Voulez-vous enregistrer les changements? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12055,7 +12354,7 @@ Voulez-vous enregistrer les changements? Can't open schema file %1: %2. - Erreur d'ouverture du fichier de schéma %1: %2. + Erreur d'ouverture du fichier de schéma %1: %2. Could not load schema file. @@ -12063,7 +12362,7 @@ Voulez-vous enregistrer les changements? Validation error file %3 in line %1 column %2 - Erreur de validation : fichier %3, ligne %1, colonne %2 + Erreur de validation : fichier %3, ligne %1, colonne %2 Parsing error file %3 in line %1 column %2 @@ -12091,7 +12390,7 @@ Voulez-vous enregistrer les changements? Could not load schema file '%1'. - Impossible de lire le schéma de fichier '%1'. + Impossible de lire le schéma de fichier '%1'. Fail to write Canonical XML. @@ -12684,6 +12983,14 @@ Voulez-vous enregistrer les changements? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12993,6 +13300,10 @@ Voulez-vous enregistrer les changements? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -13004,6 +13315,10 @@ Voulez-vous enregistrer les changements? Second line point Point de deuxieme ligne + + flipping by line + + VToolHeight @@ -13098,6 +13413,10 @@ Voulez-vous enregistrer les changements? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13694,6 +14013,10 @@ Voulez-vous enregistrer les changements? Rotation angle + + rotate + + VToolSeamAllowance @@ -15193,6 +15516,191 @@ Voulez-vous enregistrer les changements? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15254,6 +15762,18 @@ Voulez-vous enregistrer les changements? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15263,7 +15783,7 @@ Voulez-vous enregistrer les changements? Rename - Renommer + Renommer Delete @@ -15285,6 +15805,26 @@ Voulez-vous enregistrer les changements? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Préférences + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_he_IL.ts b/share/translations/valentina_he_IL.ts index fdba7ec7b..4cf4f4d4e 100644 --- a/share/translations/valentina_he_IL.ts +++ b/share/translations/valentina_he_IL.ts @@ -36,6 +36,13 @@ + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -1668,6 +1675,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -1703,6 +1738,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -1714,10 +1777,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -1726,6 +1785,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2185,6 +2256,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -2381,6 +2511,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -2757,6 +2895,34 @@ Apply settings anyway? Center point נקודת מרכז + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4091,6 +4257,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4174,6 +4364,38 @@ Apply settings anyway? Orientation: + + Options + אפשרויות + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -7474,6 +7696,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -8815,6 +9044,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -8903,6 +9150,18 @@ Do you want to save your changes? Length אורך + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -9070,6 +9329,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -9448,6 +9722,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -9521,15 +9815,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -9538,10 +9823,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -10106,6 +10387,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -10352,6 +10641,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -10363,6 +10656,10 @@ Do you want to save your changes? Second line point + + flipping by line + + VToolHeight @@ -10457,6 +10754,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -10961,6 +11262,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -12346,6 +12651,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VWidgetDetails @@ -12385,13 +12875,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete למחוק @@ -12412,6 +12910,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_id_ID.ts b/share/translations/valentina_id_ID.ts index 357a7597d..7e5a2cad0 100644 --- a/share/translations/valentina_id_ID.ts +++ b/share/translations/valentina_id_ID.ts @@ -36,6 +36,13 @@ + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -1939,6 +1946,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -1974,6 +2009,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -1985,10 +2048,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -1997,6 +2056,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2456,6 +2527,61 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + cm + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -2652,6 +2778,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3044,6 +3178,34 @@ Apply settings anyway? Center point titik tengah + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4417,6 +4579,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4500,6 +4686,34 @@ Apply settings anyway? Orientation: + + Options + pilihan + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -7820,6 +8034,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -9195,6 +9416,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -9283,6 +9522,18 @@ Do you want to save your changes? Length panjang + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -9450,6 +9701,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -9832,6 +10098,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -9905,15 +10191,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -9922,10 +10199,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -10490,6 +10763,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -10736,6 +11017,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -10747,6 +11032,10 @@ Do you want to save your changes? Second line point + + flipping by line + + VToolHeight @@ -10841,6 +11130,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -11357,6 +11650,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -12747,6 +13044,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VWidgetDetails @@ -12786,13 +13268,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete hapus @@ -12813,6 +13303,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_it_IT.ts b/share/translations/valentina_it_IT.ts index 94ba8841e..d25c99035 100644 --- a/share/translations/valentina_it_IT.ts +++ b/share/translations/valentina_it_IT.ts @@ -50,6 +50,13 @@ Aggiungi dettagli di unione + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2439,6 +2446,34 @@ Flipping by axis Ruotare sull'asse + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotazione + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2478,6 +2513,34 @@ Flipping by line Ruota sulla linea + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotazione + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2491,7 +2554,7 @@ Unique pattern piece name - Nome unico del pezzo del modello + Nome unico del pezzo del modello Choose group name @@ -2501,6 +2564,18 @@ New group Nuovo gruppo + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3040,6 +3115,65 @@ Coefficiente di efficienza: %1% + + DialogLayoutScale + + Layout scale + + + + Margins + Margini + + + Left: + Sinistra: + + + cm + cm + + + Right: + Destra: + + + Top: + Top: + + + Bottom: + Fondo: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3341,6 +3475,14 @@ Applicare la configurazione comunque? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3753,6 +3895,34 @@ Applicare la configurazione comunque? Center point Punto centrale + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotazione + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5426,6 +5596,30 @@ Applicare la configurazione comunque? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5529,6 +5723,38 @@ Applicare la configurazione comunque? Orientation: Orientamento: + + Options + Opzioni + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9555,6 +9781,13 @@ Questa opzione sarà effettiva dopo il riavvio del programma. Rimuovi oggetto dal gruppo + + RenameGroup + + rename group + + + RenamePP @@ -11215,6 +11448,25 @@ Vuoi salvare le tue modifiche? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Impossibile aprire file %1: +%2. + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -11303,6 +11555,18 @@ Vuoi salvare le tue modifiche? Length Lunghezza + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11474,6 +11738,21 @@ Vuoi salvare le tue modifiche? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11944,6 +12223,26 @@ Vuoi salvare le tue modifiche? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12022,19 +12321,10 @@ Vuoi salvare le tue modifiche? Impossibile aprire file %1: %2. - - Can't open schema file %1: -%2. - - Could not load schema file. Impossibile caricare il file di schema - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -12047,10 +12337,6 @@ Vuoi salvare le tue modifiche? This id is not unique. Questo ID è già esistente. - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -12642,6 +12928,14 @@ Vuoi salvare le tue modifiche? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12955,6 +13249,10 @@ Vuoi salvare le tue modifiche? Origin point Punto d'origine + + Flipping by axis + Ruotare sull'asse + VToolFlippingByLine @@ -12966,6 +13264,10 @@ Vuoi salvare le tue modifiche? Second line point Secondo punto della linea + + flipping by line + + VToolHeight @@ -13060,6 +13362,10 @@ Vuoi salvare le tue modifiche? Rotation origin point Ruota punto d'origine + + move + + VToolOptionsPropertyBrowser @@ -13652,6 +13958,10 @@ Vuoi salvare le tue modifiche? Rotation angle Angolo di rotazione + + rotate + + VToolSeamAllowance @@ -15106,6 +15416,191 @@ Vuoi salvare le tue modifiche? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15167,12 +15662,24 @@ Vuoi salvare le tue modifiche? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups Rename - Rinomina + Rinomina Delete @@ -15194,6 +15701,26 @@ Vuoi salvare le tue modifiche? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferenze + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_nl_NL.ts b/share/translations/valentina_nl_NL.ts index d53ef63fa..c1f374f3b 100644 --- a/share/translations/valentina_nl_NL.ts +++ b/share/translations/valentina_nl_NL.ts @@ -50,6 +50,13 @@ voeg een samengevoegd detail toe + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Kantelen via de aslijn + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Naam: + + + Rotation + Rotatie + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Kantelen via de lijn + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Naam: + + + Rotation + Rotatie + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Unieke patroondeel naam + Unieke patroondeel naam Choose group name @@ -2509,6 +2572,18 @@ New group Nieuwe groep + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ Efficiëntie coëfficiënt: %1% + + DialogLayoutScale + + Layout scale + + + + Margins + Marges + + + Left: + Links: + + + cm + cm + + + Right: + Rechts: + + + Top: + Bovenaan: + + + Bottom: + Onderaan: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + % + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3349,6 +3483,14 @@ Toch de instellingen aanpassen? Auto crop unused width Automatisch inkorten van ongebruikte breedte + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3761,6 +3903,34 @@ Toch de instellingen aanpassen? Center point Middelpunt + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Naam: + + + Rotation + Rotatie + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5434,6 +5604,30 @@ Toch de instellingen aanpassen? This point cannot be origin point. Please, select another origin point Dit punt kan geen startpunt zijn. Gelieve een ander startpunt te kiezen + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Naam: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5537,6 +5731,38 @@ Toch de instellingen aanpassen? Orientation: Orientatie: + + Options + Opties + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + % + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9566,6 +9792,13 @@ Deze optie wordt actief na een herstart.. Verwijder item van groep + + RenameGroup + + rename group + + + RenamePP @@ -11230,6 +11463,26 @@ Wil je deze veranderingen opslaan? Invalid version. Maximum supported format version is %1 Ongeldige versie. Maximum ondersteund formaat is %1 + + Can't open file %1: +%2. + kan bestand niet openen %1: +%2. + + + Can't open schema file %1: +%2. + Kan schema bestand niet openen %1: +%2. + + + Could not load schema file '%1'. + Kan schema bestand niet laden '%1". + + + Validation error file %3 in line %1 column %2 + Validatie fout bestand %3 op lijn %1 kolom %2 + VAbstractCubicBezierPath @@ -11318,6 +11571,18 @@ Wil je deze veranderingen opslaan? Length Lengte + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11489,6 +11754,21 @@ Wil je deze veranderingen opslaan? Ongeldige inkeping. + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11991,6 +12271,26 @@ Wil je deze veranderingen opslaan? Auto crop unused width (export mode). Automatisch inkorten van ongebruikte breedte (export modus). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12084,7 +12384,7 @@ Wil je deze veranderingen opslaan? Can't open schema file %1: %2. - Kan schema bestand niet openen %1: + Kan schema bestand niet openen %1: %2. @@ -12093,7 +12393,7 @@ Wil je deze veranderingen opslaan? Validation error file %3 in line %1 column %2 - Validatie fout bestand %3 op lijn %1 kolom %2 + Validatie fout bestand %3 op lijn %1 kolom %2 Parsing error file %3 in line %1 column %2 @@ -12121,7 +12421,7 @@ Wil je deze veranderingen opslaan? Could not load schema file '%1'. - Kan schema bestand niet laden '%1". + Kan schema bestand niet laden '%1". Fail to write Canonical XML. @@ -12714,6 +13014,14 @@ Wil je deze veranderingen opslaan? Can't create history record for the tool. Kan geen geschiedenis item voor dit gereedschap aanmaken. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13031,6 +13339,10 @@ Wil je deze veranderingen opslaan? Origin point Startpunt + + Flipping by axis + Kantelen via de aslijn + VToolFlippingByLine @@ -13042,6 +13354,10 @@ Wil je deze veranderingen opslaan? Second line point Tweede lijnpunt + + flipping by line + + VToolHeight @@ -13136,6 +13452,10 @@ Wil je deze veranderingen opslaan? Rotation origin point Rotatie startpunt + + move + + VToolOptionsPropertyBrowser @@ -13736,6 +14056,10 @@ Wil je deze veranderingen opslaan? Rotation angle Hoek van draaiing + + rotate + + VToolSeamAllowance @@ -15235,6 +15559,191 @@ Wil je deze veranderingen opslaan? Left symbol _ in the name RotationElArc_ + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15296,6 +15805,18 @@ Wil je deze veranderingen opslaan? Hide not in layout Verberg niet in opmaak + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15305,7 +15826,7 @@ Wil je deze veranderingen opslaan? Rename - Hernoem + Hernoem Delete @@ -15327,6 +15848,26 @@ Wil je deze veranderingen opslaan? Show All Vertoon Alles + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Voorkeuren + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_pl_PL.ts b/share/translations/valentina_pl_PL.ts index 3543a96e8..ab5590421 100644 --- a/share/translations/valentina_pl_PL.ts +++ b/share/translations/valentina_pl_PL.ts @@ -50,6 +50,13 @@ dodaj szczegóły połaczenia + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2263,6 +2270,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nazwa: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2302,6 +2337,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nazwa: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2315,7 +2378,7 @@ Unique pattern piece name - Unikalna nazwa formy + Unikalna nazwa formy Choose group name @@ -2325,6 +2388,18 @@ New group Nowa grupa + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2816,6 +2891,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + Marginesy + + + Left: + Lewy: + + + cm + cm + + + Right: + Prawy: + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3036,6 +3170,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3440,6 +3582,34 @@ Apply settings anyway? Center point Punkt środkowy + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nazwa: + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4926,6 +5096,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nazwa: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5009,6 +5203,38 @@ Apply settings anyway? Orientation: + + Options + Opcje + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -8598,6 +8824,13 @@ This option will take an affect after restart. Usuń element z grupy + + RenameGroup + + rename group + + + RenamePP @@ -10179,6 +10412,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -10267,6 +10518,18 @@ Do you want to save your changes? Length Długość + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -10434,6 +10697,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -10816,6 +11094,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -10889,15 +11187,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -10906,10 +11195,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -11489,6 +11774,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -11747,6 +12040,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -11758,6 +12055,10 @@ Do you want to save your changes? Second line point + + flipping by line + + VToolHeight @@ -11852,6 +12153,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -12380,6 +12685,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -13815,6 +14124,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -13876,13 +14370,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete Usuń @@ -13903,6 +14405,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Ustawienia + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_pt_BR.ts b/share/translations/valentina_pt_BR.ts index cd2c19ffc..cc9d6ee7a 100644 --- a/share/translations/valentina_pt_BR.ts +++ b/share/translations/valentina_pt_BR.ts @@ -50,6 +50,13 @@ Adicionar detalhes de ligação + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Espelhar através do eixo + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotação + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Espelhar através de linha + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotação + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Nome único da peça de molde + Nome único da peça de molde Choose group name @@ -2509,6 +2572,18 @@ New group Novo grupo + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + Margens + + + Left: + Esquerda: + + + cm + cm + + + Right: + Direita: + + + Top: + Topo: + + + Bottom: + Base: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3345,6 +3479,14 @@ Aplicar configurações de qualquer forma? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3757,6 +3899,34 @@ Aplicar configurações de qualquer forma? Center point Ponto central + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Rotation + Rotação + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5430,6 +5600,30 @@ Aplicar configurações de qualquer forma? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Nome: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5529,6 +5723,38 @@ Aplicar configurações de qualquer forma? Orientation: Orientação: + + Options + Opções + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9543,6 +9769,13 @@ Esta opção terá um efeito após o reinício. + + RenameGroup + + rename group + + + RenamePP @@ -11203,6 +11436,26 @@ Deseja salvar suas mudanças? Invalid version. Maximum supported format version is %1 Versão inválida. O formato da versão máxima suportado é %1 + + Can't open file %1: +%2. + Impossível abrir o arquivo %1: +%2. + + + Can't open schema file %1: +%2. + Impossível abrir o arquivo de esquema %1: +%2. + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + Arquivo de erro de validação %3 na linha %1 coluna %2 + VAbstractCubicBezierPath @@ -11291,6 +11544,18 @@ Deseja salvar suas mudanças? Length Comprimento + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11462,6 +11727,21 @@ Deseja salvar suas mudanças? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11932,6 +12212,26 @@ Deseja salvar suas mudanças? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12025,7 +12325,7 @@ Deseja salvar suas mudanças? Can't open schema file %1: %2. - Impossível abrir o arquivo de esquema %1: + Impossível abrir o arquivo de esquema %1: %2. @@ -12034,7 +12334,7 @@ Deseja salvar suas mudanças? Validation error file %3 in line %1 column %2 - Arquivo de erro de validação %3 na linha %1 coluna %2 + Arquivo de erro de validação %3 na linha %1 coluna %2 Parsing error file %3 in line %1 column %2 @@ -12048,10 +12348,6 @@ Deseja salvar suas mudanças? Got wrong parameter id. Need only id > 0. Obteve parâmetro de identidade errado. Permitido somente Identidade > 0. - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -12643,6 +12939,14 @@ Deseja salvar suas mudanças? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -12960,6 +13264,10 @@ Deseja salvar suas mudanças? Origin point Ponto de origem + + Flipping by axis + Espelhar através do eixo + VToolFlippingByLine @@ -12971,6 +13279,10 @@ Deseja salvar suas mudanças? Second line point Segundo ponto da linha + + flipping by line + + VToolHeight @@ -13065,6 +13377,10 @@ Deseja salvar suas mudanças? Rotation origin point Rotação do ponto de origem + + move + + VToolOptionsPropertyBrowser @@ -13665,6 +13981,10 @@ Deseja salvar suas mudanças? Rotation angle Ângulo de rotação + + rotate + + VToolSeamAllowance @@ -15119,6 +15439,191 @@ Deseja salvar suas mudanças? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15180,6 +15685,18 @@ Deseja salvar suas mudanças? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15189,7 +15706,7 @@ Deseja salvar suas mudanças? Rename - Renomear + Renomear Delete @@ -15211,6 +15728,26 @@ Deseja salvar suas mudanças? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferências + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_ro_RO.ts b/share/translations/valentina_ro_RO.ts index 23bdd373b..b3ca87679 100644 --- a/share/translations/valentina_ro_RO.ts +++ b/share/translations/valentina_ro_RO.ts @@ -50,6 +50,13 @@ adauga detalii ale Uniunii + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2228,6 +2235,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2263,6 +2298,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2274,10 +2337,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -2286,6 +2345,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2801,6 +2872,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + cm + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3025,6 +3155,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3433,6 +3571,34 @@ Apply settings anyway? Center point Punct central + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4883,6 +5049,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4966,6 +5156,38 @@ Apply settings anyway? Orientation: + + Options + Opțiuni + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -8486,6 +8708,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -9932,6 +10161,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -10020,6 +10267,18 @@ Do you want to save your changes? Length Lungime + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -10187,6 +10446,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -10569,6 +10843,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -10642,15 +10936,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -10659,10 +10944,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -11231,6 +11512,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -11477,6 +11766,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -11488,6 +11781,10 @@ Do you want to save your changes? Second line point Al doilea Punct de linie + + flipping by line + + VToolHeight @@ -11582,6 +11879,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -12110,6 +12411,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -13535,6 +13840,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VWidgetDetails @@ -13574,13 +14064,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete Șterge @@ -13601,6 +14099,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Preferințe + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_ru_RU.ts b/share/translations/valentina_ru_RU.ts index 53738b7e6..61e8f5006 100644 --- a/share/translations/valentina_ru_RU.ts +++ b/share/translations/valentina_ru_RU.ts @@ -50,6 +50,13 @@ добавить объединение деталей + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Отразить объект по оси + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Отразить объект по линии + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Уникальное имя выкройки + Уникальное имя выкройки Choose group name @@ -2509,6 +2572,18 @@ New group Новая группа + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ Коэффициент эффективности: %1% + + DialogLayoutScale + + Layout scale + + + + Margins + Поля + + + Left: + Левое: + + + cm + см + + + Right: + Правое: + + + Top: + Верхнее: + + + Bottom: + Нижнее: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3349,6 +3483,14 @@ Apply settings anyway? Auto crop unused width Автоматически обрезать неиспользуемую ширину + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3761,6 +3903,34 @@ Apply settings anyway? Center point Центральная точка + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5435,6 +5605,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5538,6 +5732,38 @@ Apply settings anyway? Orientation: Ориентация: + + Options + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9568,6 +9794,13 @@ This option will take an affect after restart. Удалить объект из группы + + RenameGroup + + rename group + + + RenamePP @@ -11232,6 +11465,26 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 Недействительная версия. Максимально поддерживаемая версия формата %1 + + Can't open file %1: +%2. + Невозможно открыть файл %1: +%2. + + + Can't open schema file %1: +%2. + Невозможно открыть файл схемы %1: +%2. + + + Could not load schema file '%1'. + Не удалось открыть файл схемы '%1'. + + + Validation error file %3 in line %1 column %2 + Ошибка валидации файла %3 в строке %1 столбца %2 + VAbstractCubicBezierPath @@ -11320,6 +11573,18 @@ Do you want to save your changes? Length Длина + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11491,6 +11756,21 @@ Do you want to save your changes? Неправильная надсечка. + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11993,6 +12273,26 @@ Do you want to save your changes? Auto crop unused width (export mode). Автоматическая обрезка неиспользуемой ширины (режим экспорта). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12086,7 +12386,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Невозможно открыть файл схемы %1: + Невозможно открыть файл схемы %1: %2. @@ -12095,7 +12395,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Ошибка валидации файла %3 в строке %1 столбца %2 + Ошибка валидации файла %3 в строке %1 столбца %2 Parsing error file %3 in line %1 column %2 @@ -12123,7 +12423,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Не удалось открыть файл схемы '%1'. + Не удалось открыть файл схемы '%1'. Fail to write Canonical XML. @@ -12716,6 +13016,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13033,6 +13341,10 @@ Do you want to save your changes? Origin point Исходная точка + + Flipping by axis + Отразить объект по оси + VToolFlippingByLine @@ -13044,6 +13356,10 @@ Do you want to save your changes? Second line point Вторая точка линии + + flipping by line + + VToolHeight @@ -13138,6 +13454,10 @@ Do you want to save your changes? Rotation origin point Исходная точка вращения + + move + + VToolOptionsPropertyBrowser @@ -13738,6 +14058,10 @@ Do you want to save your changes? Rotation angle Угол вращения + + rotate + + VToolSeamAllowance @@ -15242,6 +15566,191 @@ Do you want to save your changes? Left symbol _ in the name ВращениеЭлДуга_ + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15303,6 +15812,18 @@ Do you want to save your changes? Hide not in layout Скрыть не в раскладке + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15312,7 +15833,7 @@ Do you want to save your changes? Rename - Переименовать + Переименовать Delete @@ -15334,6 +15855,26 @@ Do you want to save your changes? Show All Показать все + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_uk_UA.ts b/share/translations/valentina_uk_UA.ts index 23f445a34..45c6231e7 100644 --- a/share/translations/valentina_uk_UA.ts +++ b/share/translations/valentina_uk_UA.ts @@ -50,6 +50,13 @@ додати об'єднання деталей + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -2447,6 +2454,34 @@ Flipping by axis Відзеркалити по вісі + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Імя: + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -2486,6 +2521,34 @@ Flipping by line Відзеркалити по лінії + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Імя: + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -2499,7 +2562,7 @@ Unique pattern piece name - Унікальне ім'я лекала + Унікальне ім'я лекала Choose group name @@ -2509,6 +2572,18 @@ New group Нова група + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -3048,6 +3123,65 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + Ліве: + + + cm + см + + + Right: + Праве: + + + Top: + Верхнє: + + + Bottom: + Нижнє: + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -3347,6 +3481,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -3759,6 +3901,34 @@ Apply settings anyway? Center point Точка центру + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Імя: + + + Rotation + Поворот + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -5433,6 +5603,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + Імя: + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -5536,6 +5730,38 @@ Apply settings anyway? Orientation: + + Options + Параметри + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + ... + ... + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -9561,6 +9787,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -11225,6 +11458,25 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + Не можу відкрити файл%1: +%2. + + + Can't open schema file %1: +%2. + Не можу відкрити файл схеми %1:\n%2. + + + Could not load schema file '%1'. + Не вдалося завантажити файл схеми '%1'. + + + Validation error file %3 in line %1 column %2 + Помилка валідації файлу %3 в рядку %1 стовпця %2 + VAbstractCubicBezierPath @@ -11313,6 +11565,18 @@ Do you want to save your changes? Length Довжина + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -11484,6 +11748,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -11986,6 +12265,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -12079,7 +12378,7 @@ Do you want to save your changes? Can't open schema file %1: %2. - Не можу відкрити файл схеми %1:\n%2. + Не можу відкрити файл схеми %1:\n%2. Could not load schema file. @@ -12087,7 +12386,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Помилка валідації файлу %3 в рядку %1 стовпця %2 + Помилка валідації файлу %3 в рядку %1 стовпця %2 Parsing error file %3 in line %1 column %2 @@ -12115,7 +12414,7 @@ Do you want to save your changes? Could not load schema file '%1'. - Не вдалося завантажити файл схеми '%1'. + Не вдалося завантажити файл схеми '%1'. Fail to write Canonical XML. @@ -12708,6 +13007,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -13025,6 +13332,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + Відзеркалити по вісі + VToolFlippingByLine @@ -13036,6 +13347,10 @@ Do you want to save your changes? Second line point Друга точка лінії + + flipping by line + + VToolHeight @@ -13130,6 +13445,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -13730,6 +14049,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -15229,6 +15552,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VVITConverter @@ -15290,6 +15798,18 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups @@ -15299,7 +15819,7 @@ Do you want to save your changes? Rename - Перейменувати + Перейменувати Delete @@ -15321,6 +15841,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + Властивості + + + Categories: %1. + + Valentina diff --git a/share/translations/valentina_zh_CN.ts b/share/translations/valentina_zh_CN.ts index 3b04f2cc7..b5acb1a29 100644 --- a/share/translations/valentina_zh_CN.ts +++ b/share/translations/valentina_zh_CN.ts @@ -50,6 +50,13 @@ 添加合成细节 + + ChangeGroupOptions + + rename group + + + ChangeGroupVisibility @@ -1820,6 +1827,34 @@ Flipping by axis + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogFlippingByLine @@ -1855,6 +1890,34 @@ Flipping by line + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogGroup @@ -1866,10 +1929,6 @@ Group name: - - Unique pattern piece name - - Choose group name @@ -1878,6 +1937,18 @@ New group + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogHeight @@ -2329,6 +2400,61 @@ + + DialogLayoutScale + + Layout scale + + + + Margins + + + + Left: + + + + cm + + + + Right: + + + + Top: + + + + Bottom: + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + DialogLayoutSettings @@ -2533,6 +2659,14 @@ Apply settings anyway? Auto crop unused width + + Enable this option to prefer getting one sheet solutions. + + + + Prefer one sheet solution + + DialogLine @@ -2909,6 +3043,34 @@ Apply settings anyway? Center point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Rotation + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogNewMeasurements @@ -4194,6 +4356,30 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point + + Enable to create a visibility gropup from original objects + + + + Visibility Group + + + + Name: + + + + Tags: + + + + Separate each tag with comma. + + + + Add tags + + DialogSaveLAyout @@ -4277,6 +4463,34 @@ Apply settings anyway? Orientation: + + Options + + + + Scale + + + + Horizontal: + + + + Vertical: + + + + % + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + DialogSaveLayout @@ -7606,6 +7820,13 @@ This option will take an affect after restart. + + RenameGroup + + rename group + + + RenamePP @@ -9016,6 +9237,24 @@ Do you want to save your changes? Invalid version. Maximum supported format version is %1 + + Can't open file %1: +%2. + + + + Can't open schema file %1: +%2. + + + + Could not load schema file '%1'. + + + + Validation error file %3 in line %1 column %2 + + VAbstractCubicBezierPath @@ -9104,6 +9343,18 @@ Do you want to save your changes? Length 长度 + + operation options + + + + delete operation + + + + Visibility group + + VAbstractPattern @@ -9271,6 +9522,21 @@ Do you want to save your changes? + + VBank + + Preparing data for layout error: Detail '%1' square <= 0 + + + + Preparing data for layout error: Layout paper sheet <= 0 + + + + Preparing data for layout error: List of details is empty + + + VCommandLine @@ -9649,6 +9915,26 @@ Do you want to save your changes? Auto crop unused width (export mode). + + Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Horizontal scale + + + + Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). + + + + Vertical scale + + + + Prefer one sheet layout solution (export mode). + + VCommonSettings @@ -9722,15 +10008,6 @@ Do you want to save your changes? %2. - - Can't open schema file %1: -%2. - - - - Validation error file %3 in line %1 column %2 - - Parsing error file %3 in line %1 column %2 @@ -9739,10 +10016,6 @@ Do you want to save your changes? Couldn't get node - - Could not load schema file '%1'. - - Fail to write Canonical XML. @@ -10307,6 +10580,14 @@ Do you want to save your changes? Can't create history record for the tool. + + Reading final measurements error. + + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. + + VPiece @@ -10549,6 +10830,10 @@ Do you want to save your changes? Origin point + + Flipping by axis + + VToolFlippingByLine @@ -10560,6 +10845,10 @@ Do you want to save your changes? Second line point + + flipping by line + + VToolHeight @@ -10654,6 +10943,10 @@ Do you want to save your changes? Rotation origin point + + move + + VToolOptionsPropertyBrowser @@ -11158,6 +11451,10 @@ Do you want to save your changes? Rotation angle + + rotate + + VToolSeamAllowance @@ -12543,6 +12840,191 @@ Do you want to save your changes? Left symbol _ in the name + + converts degrees to radian + functionm degTorad + + + + converts radian to degrees + function radTodeg + + + + sine function working with radians + function sin + + + + cosine function working with radians + function cos + + + + tangens function working with radians + function tan + + + + arcus sine function working with radians + function asin + + + + arcus cosine function working with radians + function acos + + + + arcus tangens function working with radians + function atan + + + + hyperbolic sine function + function sinh + + + + hyperbolic cosine + function cosh + + + + hyperbolic tangens function + function tanh + + + + hyperbolic arcus sine function + function asinh + + + + hyperbolic arcus cosine function + function acosh + + + + hyperbolic arcur tangens function + function atanh + + + + sine function working with degrees + function sinD + + + + cosine function working with degrees + function cosD + + + + tangens function working with degrees + function tanD + + + + arcus sine function working with degrees + function asinD + + + + arcus cosine function working with degrees + function acosD + + + + arcus tangens function working with degrees + function atanD + + + + logarithm to the base 2 + function log2 + + + + logarithm to the base 10 + function log10 + + + + logarithm to the base 10 + function log + + + + logarithm to base e (2.71828...) + function ln + + + + e raised to the power of x + function exp + + + + square root of a value + function sqrt + + + + sign function -1 if x<0; 1 if x>0 + function sign + + + + round to nearest integer + function rint + + + + round to up to 1 decimal + function r2cm + + + + cut, split and rotate modeling operation. Takes cm units. + function csrCm + + + + cut, split and rotate modeling operation. Takes inch units. + function csrInch + + + + absolute value + function abs + + + + min of all arguments + function min + + + + max of all arguments + function max + + + + sum of all arguments + function sum + + + + mean value of all arguments + function avg + + + + Returns the floating-point remainder of numer/denom (rounded towards zero) + function fmod + + VWidgetDetails @@ -12582,13 +13064,21 @@ Do you want to save your changes? Hide not in layout + + Piece options + + + + Delete piece + + + + Cannot find piece by id '%1' + + VWidgetGroups - - Rename - - Delete 删除 @@ -12609,6 +13099,26 @@ Do you want to save your changes? Show All + + Tags: + + + + Separate each tag with comma. + + + + Filter by tags + + + + Preferences + + + + Categories: %1. + + Valentina diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index 6b31f0724..493a5392e 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -172,6 +172,10 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con vStdErr() << QApplication::translate("vNoisyHandler", "WARNING:") << logMsg << "\n"; break; case QtCriticalMsg: + if (isPatternMessage) + { + qApp->PostPatternMessage(logMsg, type); + } debugdate += QStringLiteral(":CRITICAL:%1(%2)] %3: %4: %5").arg(context.file).arg(context.line) .arg(context.function, context.category, logMsg); vStdErr() << QApplication::translate("vNoisyHandler", "CRITICAL:") << logMsg << "\n"; diff --git a/src/app/valentina/core/vcmdexport.cpp b/src/app/valentina/core/vcmdexport.cpp index b58f8f33e..e608db6c7 100644 --- a/src/app/valentina/core/vcmdexport.cpp +++ b/src/app/valentina/core/vcmdexport.cpp @@ -204,6 +204,7 @@ VLayoutGeneratorPtr VCommandLine::DefaultGenerator() const diag.SetAutoCropWidth(IsOptionSet(LONG_OPTION_CROP_WIDTH)); diag.SetUnitePages(IsOptionSet(LONG_OPTION_UNITE)); diag.SetSaveLength(IsOptionSet(LONG_OPTION_SAVELENGTH)); + diag.SetPreferOneSheetSolution(IsOptionSet(LONG_OPTION_PREFER_ONE_SHEET_SOLUTION)); diag.SetGroup(OptGroup()); if (IsOptionSet(LONG_OPTION_IGNORE_MARGINS)) @@ -408,6 +409,28 @@ bool VCommandLine::IsCSVWithHeader() const return IsOptionSet(LONG_OPTION_CSVWITHHEADER); } +//--------------------------------------------------------------------------------------------------------------------- +qreal VCommandLine::ExportXScale() const +{ + qreal xs = 0; + if (IsOptionSet(LONG_OPTION_EXPXSCALE)) + { + xs = OptionValue(LONG_OPTION_EXPXSCALE).toDouble(); + } + return xs; +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal VCommandLine::ExportYScale() const +{ + qreal ys = 0; + if (IsOptionSet(LONG_OPTION_EXPYSCALE)) + { + ys = OptionValue(LONG_OPTION_EXPYSCALE).toDouble(); + } + return ys; +} + //--------------------------------------------------------------------------------------------------------------------- QString VCommandLine::OptExportSuchDetails() const { @@ -664,6 +687,12 @@ void VCommandLine::InitCommandLineOptions() translate("VCommandLine", "Page bottom margin in current units like 3.0 (export mode). If not set will be " "used value from default printer. Or 0 if none printers was found."), translate("VCommandLine", "The bottom margin")}, + {LONG_OPTION_EXPXSCALE, + translate("VCommandLine", "Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode)."), + translate("VCommandLine", "Horizontal scale")}, + {LONG_OPTION_EXPYSCALE, + translate("VCommandLine", "Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode)."), + translate("VCommandLine", "Vertical scale")}, //================================================================================================================= {LONG_OPTION_FOLLOW_GRAINLINE, translate("VCommandLine", "Order detail to follow grainline direction (export mode).")}, @@ -678,6 +707,8 @@ void VCommandLine::InitCommandLineOptions() {{SINGLE_OPTION_UNITE, LONG_OPTION_UNITE}, translate("VCommandLine", "Unite pages if possible (export mode). Maximum value limited by QImage that " "supports only a maximum of 32768x32768 px images.")}, + {LONG_OPTION_PREFER_ONE_SHEET_SOLUTION, + translate("VCommandLine", "Prefer one sheet layout solution (export mode).")}, //================================================================================================================= {{SINGLE_OPTION_SAVELENGTH, LONG_OPTION_SAVELENGTH}, translate("VCommandLine", "Save length of the sheet if set (export mode). The option tells the program to use " diff --git a/src/app/valentina/core/vcmdexport.h b/src/app/valentina/core/vcmdexport.h index a89f0bf4c..b4b8057b7 100644 --- a/src/app/valentina/core/vcmdexport.h +++ b/src/app/valentina/core/vcmdexport.h @@ -88,6 +88,9 @@ public: bool IsExportOnlyDetails() const; bool IsCSVWithHeader() const; + qreal ExportXScale() const; + qreal ExportYScale() const; + //@brief returns the piece name regex or empty string if not set QString OptExportSuchDetails() const; diff --git a/src/app/valentina/dialogs/dialoghistory.cpp b/src/app/valentina/dialogs/dialoghistory.cpp index 7d8f1fb37..ec6c1ce22 100644 --- a/src/app/valentina/dialogs/dialoghistory.cpp +++ b/src/app/valentina/dialogs/dialoghistory.cpp @@ -40,7 +40,10 @@ #include "../vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.h" #include "../xml/vpattern.h" #include "../vmisc/diagnostic.h" + #include +#include +#include //--------------------------------------------------------------------------------------------------------------------- /** @@ -165,26 +168,30 @@ void DialogHistory::FillTable() qint32 currentRow = -1; qint32 count = 0; ui->tableWidget->setRowCount(history.size());//Make row count max possible number - for (qint32 i = 0; i< history.size(); ++i) + + std::function CreateRecord = [this](const VToolRecord &tool) { - const VToolRecord tool = history.at(i); - const QString historyRecord = Record(tool); - if (not historyRecord.isEmpty()) + return Record(tool); + }; + + QVector historyRecords = QtConcurrent::blockingMapped(history, CreateRecord); + + for (auto &record : historyRecords) + { + if (not record.description.isEmpty()) { currentRow++; { QTableWidgetItem *item = new QTableWidgetItem(QString()); item->setTextAlignment(Qt::AlignHCenter); - item->setData(Qt::UserRole, tool.getId()); + item->setData(Qt::UserRole, record.id); item->setFlags(item->flags() ^ Qt::ItemIsEditable); ui->tableWidget->setItem(currentRow, 0, item); } - QTableWidgetItem *item = new QTableWidgetItem(historyRecord); - QFont font = item->font(); - font.setBold(true); - item->setFont(font); + QTableWidgetItem *item = new QTableWidgetItem(record.description); + item->setFont(QFont("Times", 12, QFont::Bold)); item->setFlags(item->flags() ^ Qt::ItemIsEditable); ui->tableWidget->setItem(currentRow, 1, item); ++count; @@ -211,16 +218,20 @@ QT_WARNING_DISABLE_GCC("-Wswitch-default") * @param tool record data * @return description */ -QString DialogHistory::Record(const VToolRecord &tool) +HistoryRecord DialogHistory::Record(const VToolRecord &tool) const { // This check helps to find missed tools in the switch Q_STATIC_ASSERT_X(static_cast(Tool::LAST_ONE_DO_NOT_USE) == 55, "Not all tools were used in history."); - const QDomElement domElem = doc->elementById(tool.getId()); + HistoryRecord record; + record.id = tool.getId(); + + bool updateCache = false; + const QDomElement domElem = doc->elementById(tool.getId(), QString(), updateCache); if (domElem.isElement() == false) { - qDebug()<<"Can't find element by id"< spl = data->GeometricObject(tool.getId()); SCASSERT(not spl.isNull()) - return spl->NameForHistory(tr("Curve")); + record.description = spl->NameForHistory(tr("Curve")); + return record; } case Tool::CubicBezier: { const QSharedPointer spl = data->GeometricObject(tool.getId()); SCASSERT(not spl.isNull()) - return spl->NameForHistory(tr("Cubic bezier curve")); + record.description = spl->NameForHistory(tr("Cubic bezier curve")); + return record; } case Tool::Arc: { const QSharedPointer arc = data->GeometricObject(tool.getId()); SCASSERT(not arc.isNull()) - return arc->NameForHistory(tr("Arc")); + record.description = arc->NameForHistory(tr("Arc")); + return record; } case Tool::ArcWithLength: { const QSharedPointer arc = data->GeometricObject(tool.getId()); SCASSERT(not arc.isNull()) - return tr("%1 with length %2") - .arg(arc->NameForHistory(tr("Arc"))) - .arg(arc->GetLength()); + record.description = tr("%1 with length %2") + .arg(arc->NameForHistory(tr("Arc"))) + .arg(arc->GetLength()); + return record; } case Tool::SplinePath: { const QSharedPointer splPath = data->GeometricObject(tool.getId()); SCASSERT(not splPath.isNull()) - return splPath->NameForHistory(tr("Spline path")); + record.description = splPath->NameForHistory(tr("Spline path")); + return record; } case Tool::CubicBezierPath: { const QSharedPointer splPath = data->GeometricObject(tool.getId()); SCASSERT(not splPath.isNull()) - return splPath->NameForHistory(tr("Cubic bezier curve path")); + record.description = splPath->NameForHistory(tr("Cubic bezier curve path")); + return record; } case Tool::PointOfContact: - return tr("%4 - point of contact of arc with the center in point %1 and line %2_%3") - .arg(PointName(AttrUInt(domElem, AttrCenter)), - PointName(AttrUInt(domElem, AttrFirstPoint)), - PointName(AttrUInt(domElem, AttrSecondPoint)), - PointName(tool.getId())); + record.description = tr("%4 - point of contact of arc with the center in point %1 and line %2_%3") + .arg(PointName(AttrUInt(domElem, AttrCenter)), + PointName(AttrUInt(domElem, AttrFirstPoint)), + PointName(AttrUInt(domElem, AttrSecondPoint)), + PointName(tool.getId())); + return record; case Tool::Height: - return tr("Point of perpendicular from point %1 to line %2_%3") - .arg(PointName(AttrUInt(domElem, AttrBasePoint)), - PointName(AttrUInt(domElem, AttrP1Line)), - PointName(AttrUInt(domElem, AttrP2Line))); + record.description = tr("Point of perpendicular from point %1 to line %2_%3") + .arg(PointName(AttrUInt(domElem, AttrBasePoint)), + PointName(AttrUInt(domElem, AttrP1Line)), + PointName(AttrUInt(domElem, AttrP2Line))); + return record; case Tool::Triangle: - return tr("Triangle: axis %1_%2, points %3 and %4") - .arg(PointName(AttrUInt(domElem, AttrAxisP1)), - PointName(AttrUInt(domElem, AttrAxisP2)), - PointName(AttrUInt(domElem, AttrFirstPoint)), - PointName(AttrUInt(domElem, AttrSecondPoint))); + record.description = tr("Triangle: axis %1_%2, points %3 and %4") + .arg(PointName(AttrUInt(domElem, AttrAxisP1)), + PointName(AttrUInt(domElem, AttrAxisP2)), + PointName(AttrUInt(domElem, AttrFirstPoint)), + PointName(AttrUInt(domElem, AttrSecondPoint))); + return record; case Tool::PointOfIntersection: - return tr("%1 - point of intersection %2 and %3") - .arg(PointName(tool.getId()), - PointName(AttrUInt(domElem, AttrFirstPoint)), - PointName(AttrUInt(domElem, AttrSecondPoint))); + record.description = tr("%1 - point of intersection %2 and %3") + .arg(PointName(tool.getId()), + PointName(AttrUInt(domElem, AttrFirstPoint)), + PointName(AttrUInt(domElem, AttrSecondPoint))); + return record; case Tool::CutArc: { const QSharedPointer arc = data->GeometricObject(AttrUInt(domElem, AttrArc)); SCASSERT(not arc.isNull()) - return tr("%1 - cut %2") - .arg(PointName(tool.getId()), arc->NameForHistory(tr("arc"))); + record.description = tr("%1 - cut %2") + .arg(PointName(tool.getId()), arc->NameForHistory(tr("arc"))); + return record; } case Tool::CutSpline: { const quint32 splineId = AttrUInt(domElem, VToolCutSpline::AttrSpline); const QSharedPointer spl = data->GeometricObject(splineId); SCASSERT(not spl.isNull()) - return tr("%1 - cut %2") - .arg(PointName(tool.getId()), spl->NameForHistory(tr("curve"))); + record.description = tr("%1 - cut %2") + .arg(PointName(tool.getId()), spl->NameForHistory(tr("curve"))); + return record; } case Tool::CutSplinePath: { @@ -349,56 +380,71 @@ QString DialogHistory::Record(const VToolRecord &tool) const QSharedPointer splPath = data->GeometricObject(splinePathId); SCASSERT(not splPath.isNull()) - return tr("%1 - cut %2") - .arg(PointName(tool.getId()), splPath->NameForHistory(tr("curve path"))); + record.description = tr("%1 - cut %2") + .arg(PointName(tool.getId()), splPath->NameForHistory(tr("curve path"))); + return record; } case Tool::LineIntersectAxis: - return tr("%1 - point of intersection line %2_%3 and axis through point %4") - .arg(PointName(tool.getId()), - PointName(AttrUInt(domElem, AttrP1Line)), - PointName(AttrUInt(domElem, AttrP2Line)), - PointName(AttrUInt(domElem, AttrBasePoint))); + record.description = tr("%1 - point of intersection line %2_%3 and axis through point %4") + .arg(PointName(tool.getId()), + PointName(AttrUInt(domElem, AttrP1Line)), + PointName(AttrUInt(domElem, AttrP2Line)), + PointName(AttrUInt(domElem, AttrBasePoint))); + return record; case Tool::CurveIntersectAxis: - return tr("%1 - point of intersection curve and axis through point %2") - .arg(PointName(tool.getId()), PointName(AttrUInt(domElem, AttrBasePoint))); + record.description = tr("%1 - point of intersection curve and axis through point %2") + .arg(PointName(tool.getId()), PointName(AttrUInt(domElem, AttrBasePoint))); + return record; case Tool::PointOfIntersectionArcs: - return tr("%1 - point of arcs intersection").arg(PointName(tool.getId())); + record.description = tr("%1 - point of arcs intersection").arg(PointName(tool.getId())); + return record; case Tool::PointOfIntersectionCircles: - return tr("%1 - point of circles intersection").arg(PointName(tool.getId())); + record.description = tr("%1 - point of circles intersection").arg(PointName(tool.getId())); + return record; case Tool::PointOfIntersectionCurves: - return tr("%1 - point of curves intersection").arg(PointName(tool.getId())); + record.description = tr("%1 - point of curves intersection").arg(PointName(tool.getId())); + return record; case Tool::PointFromCircleAndTangent: - return tr("%1 - point from circle and tangent").arg(PointName(tool.getId())); + record.description = tr("%1 - point from circle and tangent").arg(PointName(tool.getId())); + return record; case Tool::PointFromArcAndTangent: - return tr("%1 - point from arc and tangent").arg(PointName(tool.getId())); + record.description = tr("%1 - point from arc and tangent").arg(PointName(tool.getId())); + return record; case Tool::TrueDarts: - return tr("Correction the dart %1_%2_%3") - .arg(PointName(AttrUInt(domElem, AttrDartP1)), - PointName(AttrUInt(domElem, AttrDartP2)), - PointName(AttrUInt(domElem, AttrDartP2))); + record.description = tr("Correction the dart %1_%2_%3") + .arg(PointName(AttrUInt(domElem, AttrDartP1)), + PointName(AttrUInt(domElem, AttrDartP2)), + PointName(AttrUInt(domElem, AttrDartP2))); + return record; case Tool::EllipticalArc: { const QSharedPointer elArc = data->GeometricObject(tool.getId()); SCASSERT(not elArc.isNull()) - return tr("%1 with length %2") - .arg(elArc->NameForHistory(tr("Elliptical arc"))) - .arg(elArc->GetLength()); + record.description = tr("%1 with length %2") + .arg(elArc->NameForHistory(tr("Elliptical arc"))) + .arg(elArc->GetLength()); + return record; } case Tool::Rotation: - return tr("Rotate objects around point %1. Suffix '%2'") - .arg(PointName(AttrUInt(domElem, AttrCenter)), - doc->GetParametrString(domElem, AttrSuffix, QString())); + record.description = tr("Rotate objects around point %1. Suffix '%2'") + .arg(PointName(AttrUInt(domElem, AttrCenter)), + doc->GetParametrString(domElem, AttrSuffix, QString())); + return record; case Tool::FlippingByLine: - return tr("Flipping by line %1_%2. Suffix '%3'") - .arg(PointName(AttrUInt(domElem, AttrP1Line)), - PointName(AttrUInt(domElem, AttrP2Line)), - doc->GetParametrString(domElem, AttrSuffix, QString())); + record.description = tr("Flipping by line %1_%2. Suffix '%3'") + .arg(PointName(AttrUInt(domElem, AttrP1Line)), + PointName(AttrUInt(domElem, AttrP2Line)), + doc->GetParametrString(domElem, AttrSuffix, QString())); + return record; case Tool::FlippingByAxis: - return tr("Flipping by axis through %1 point. Suffix '%2'") - .arg(PointName(AttrUInt(domElem, AttrCenter)), - doc->GetParametrString(domElem, AttrSuffix, QString())); + record.description = tr("Flipping by axis through %1 point. Suffix '%2'") + .arg(PointName(AttrUInt(domElem, AttrCenter)), + doc->GetParametrString(domElem, AttrSuffix, QString())); + return record; case Tool::Move: - return tr("Move objects. Suffix '%1'").arg(doc->GetParametrString(domElem, AttrSuffix, QString())); + record.description = tr("Move objects. Suffix '%1'") + .arg(doc->GetParametrString(domElem, AttrSuffix, QString())); + return record; //Because "history" not only show history of pattern, but help restore current data for each pattern's //piece, we need add record about details and nodes, but don't show them. case Tool::Piece: @@ -414,16 +460,16 @@ QString DialogHistory::Record(const VToolRecord &tool) case Tool::PlaceLabel: case Tool::InsertNode: case Tool::DuplicateDetail: - return QString(); + return record; } } catch (const VExceptionBadId &e) { qDebug()<GeometricObject(pointId)->name(); } //--------------------------------------------------------------------------------------------------------------------- -quint32 DialogHistory::AttrUInt(const QDomElement &domElement, const QString &name) +quint32 DialogHistory::AttrUInt(const QDomElement &domElement, const QString &name) const { return doc->GetParametrUInt(domElement, name, QChar('0')); } diff --git a/src/app/valentina/dialogs/dialoghistory.h b/src/app/valentina/dialogs/dialoghistory.h index bf5987b85..85e3e999d 100644 --- a/src/app/valentina/dialogs/dialoghistory.h +++ b/src/app/valentina/dialogs/dialoghistory.h @@ -35,6 +35,12 @@ class VPattern; +struct HistoryRecord +{ + QString description{}; + quint32 id{NULL_ID}; +}; + namespace Ui { class DialogHistory; @@ -86,11 +92,11 @@ private: qint32 cursorToolRecordRow; void FillTable(); - QString Record(const VToolRecord &tool); + HistoryRecord Record(const VToolRecord &tool) const; void InitialTable(); void ShowPoint(); - QString PointName(quint32 pointId); - quint32 AttrUInt(const QDomElement &domElement, const QString &name); + QString PointName(quint32 pointId) const; + quint32 AttrUInt(const QDomElement &domElement, const QString &name) const; void RetranslateUi(); int CursorRow() const; }; diff --git a/src/app/valentina/dialogs/dialoglayoutscale.cpp b/src/app/valentina/dialogs/dialoglayoutscale.cpp new file mode 100644 index 000000000..256c66f14 --- /dev/null +++ b/src/app/valentina/dialogs/dialoglayoutscale.cpp @@ -0,0 +1,214 @@ +/************************************************************************ + ** + ** @file dialoglayoutscale.cpp + ** @author Roman Telezhynskyi + ** @date 21 3, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "dialoglayoutscale.h" +#include "ui_dialoglayoutscale.h" +#include "../core/vapplication.h" +#include "../vmisc/vsettings.h" + +#include + +//--------------------------------------------------------------------------------------------------------------------- +DialogLayoutScale::DialogLayoutScale(bool printTiled, QWidget *parent) + :QDialog(parent), + ui(new Ui::DialogLayoutScale) +{ + ui->setupUi(this); + + qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + + QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok); + SCASSERT(bOk != nullptr) + connect(bOk, &QPushButton::clicked, this, &DialogLayoutScale::Save); + + if (not printTiled) + { + ui->groupBoxMargins->setVisible(false); + } + + connect(ui->toolButtonScaleConnected, &QToolButton::clicked, this, &DialogLayoutScale::ToggleScaleConnection); + + connect(ui->doubleSpinBoxHorizontalScale, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &DialogLayoutScale::HorizontalScaleChanged); + connect(ui->doubleSpinBoxVerticalScale, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &DialogLayoutScale::VerticalScaleChanged); + + ReadSettings(); +} + +//--------------------------------------------------------------------------------------------------------------------- +DialogLayoutScale::~DialogLayoutScale() +{ + delete ui; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::SetTiledMargins(QMarginsF margins) +{ + // read Margins top, right, bottom, left + margins = UnitConvertor(margins, Unit::Mm, qApp->patternUnit()); + + ui->doubleSpinBoxLeftField->setValue(margins.left()); + ui->doubleSpinBoxTopField->setValue(margins.top()); + ui->doubleSpinBoxRightField->setValue(margins.right()); + ui->doubleSpinBoxBottomField->setValue(margins.bottom()); +} + +//--------------------------------------------------------------------------------------------------------------------- +QMarginsF DialogLayoutScale::GetTiledMargins() const +{ + QMarginsF margins = QMarginsF( + ui->doubleSpinBoxLeftField->value(), + ui->doubleSpinBoxTopField->value(), + ui->doubleSpinBoxRightField->value(), + ui->doubleSpinBoxBottomField->value() + ); + + return UnitConvertor(margins, qApp->patternUnit(), Unit::Mm); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::SetXScale(qreal scale) +{ + ui->doubleSpinBoxHorizontalScale->setValue(scale * 100.); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal DialogLayoutScale::GetXScale() const +{ + return ui->doubleSpinBoxHorizontalScale->value() / 100.; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::SetYScale(qreal scale) +{ + ui->doubleSpinBoxVerticalScale->setValue(scale * 100.); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal DialogLayoutScale::GetYScale() const +{ + return ui->doubleSpinBoxVerticalScale->value() / 100.; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::showEvent(QShowEvent *event) +{ + QDialog::showEvent( event ); + if ( event->spontaneous() ) + { + return; + } + + if (isInitialized) + { + return; + } + // do your init stuff here + + setFixedSize(size()); + + isInitialized = true;//first show windows are held +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::Save() +{ + WriteSettings(); + + accept(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::ToggleScaleConnection() +{ + m_scaleConnected = not m_scaleConnected; + + QIcon icon; + icon.addFile(m_scaleConnected ? QStringLiteral(":/icon/32x32/link.png") + : QStringLiteral(":/icon/32x32/broken_link.png")); + ui->toolButtonScaleConnected->setIcon(icon); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::HorizontalScaleChanged(double d) +{ + if (m_scaleConnected) + { + ui->doubleSpinBoxVerticalScale->blockSignals(true); + ui->doubleSpinBoxVerticalScale->setValue(d); + ui->doubleSpinBoxVerticalScale->blockSignals(false); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::VerticalScaleChanged(double d) +{ + if (m_scaleConnected) + { + ui->doubleSpinBoxHorizontalScale->blockSignals(true); + ui->doubleSpinBoxHorizontalScale->setValue(d); + ui->doubleSpinBoxHorizontalScale->blockSignals(false); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::ReadSettings() +{ + VSettings *settings = qApp->ValentinaSettings(); + const Unit unit = qApp->patternUnit(); + + // read Margins top, right, bottom, left + const QMarginsF margins = settings->GetTiledPDFMargins(unit); + + ui->doubleSpinBoxLeftField->setValue(margins.left()); + ui->doubleSpinBoxTopField->setValue(margins.top()); + ui->doubleSpinBoxRightField->setValue(margins.right()); + ui->doubleSpinBoxBottomField->setValue(margins.bottom()); + + ui->doubleSpinBoxLeftField->setSuffix(UnitsToStr(unit, true)); + ui->doubleSpinBoxTopField->setSuffix(UnitsToStr(unit, true)); + ui->doubleSpinBoxRightField->setSuffix(UnitsToStr(unit, true)); + ui->doubleSpinBoxBottomField->setSuffix(UnitsToStr(unit, true)); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutScale::WriteSettings() const +{ + VSettings *settings = qApp->ValentinaSettings(); + const Unit unit = qApp->patternUnit(); + + // write Margins top, right, bottom, left + QMarginsF margins = QMarginsF( + ui->doubleSpinBoxLeftField->value(), + ui->doubleSpinBoxTopField->value(), + ui->doubleSpinBoxRightField->value(), + ui->doubleSpinBoxBottomField->value() + ); + settings->SetTiledPDFMargins(margins,unit); +} diff --git a/src/libs/vtools/undocommands/changegroupvisibility.h b/src/app/valentina/dialogs/dialoglayoutscale.h similarity index 53% rename from src/libs/vtools/undocommands/changegroupvisibility.h rename to src/app/valentina/dialogs/dialoglayoutscale.h index f126718e4..757f9c6e6 100644 --- a/src/libs/vtools/undocommands/changegroupvisibility.h +++ b/src/app/valentina/dialogs/dialoglayoutscale.h @@ -1,14 +1,14 @@ /************************************************************************ ** - ** @file changegroupVisibility.h + ** @file dialoglayoutscale.h ** @author Roman Telezhynskyi - ** @date 14 7, 2019 + ** @date 21 3, 2020 ** ** @brief ** @copyright ** This source code is part of the Valentina project, a pattern making ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2019 Valentina project + ** Copyright (C) 2020 Valentina project ** All Rights Reserved. ** ** Valentina is free software: you can redistribute it and/or modify @@ -25,31 +25,50 @@ ** along with Valentina. If not, see . ** *************************************************************************/ -#ifndef CHANGEGROUPVISIBILITY_H -#define CHANGEGROUPVISIBILITY_H +#ifndef DIALOGLAYOUTSCALE_H +#define DIALOGLAYOUTSCALE_H -#include "vundocommand.h" +#include -class ChangeGroupVisibility : public VUndoCommand +namespace Ui +{ + class DialogLayoutScale; +} + +class DialogLayoutScale : public QDialog { Q_OBJECT -public: - ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent = nullptr); - virtual ~ChangeGroupVisibility(); - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroup(vidtype id, bool visible); +public: + explicit DialogLayoutScale(bool printTiled, QWidget *parent = nullptr); + ~DialogLayoutScale(); + + void SetTiledMargins(QMarginsF margins); + QMarginsF GetTiledMargins() const; + + void SetXScale(qreal scale); + qreal GetXScale() const; + + void SetYScale(qreal scale); + qreal GetYScale() const; + +protected: + virtual void showEvent(QShowEvent *event) override; + +private slots: + void Save(); + void ToggleScaleConnection(); + void HorizontalScaleChanged(double d); + void VerticalScaleChanged(double d); private: - Q_DISABLE_COPY(ChangeGroupVisibility) + Q_DISABLE_COPY(DialogLayoutScale) + Ui::DialogLayoutScale *ui; + bool isInitialized{false}; + bool m_scaleConnected{true}; - bool m_oldVisibility{true}; - bool m_newVisibility{true}; - const QString m_nameActivDraw{}; - - void Do(bool visible); + void ReadSettings(); + void WriteSettings() const; }; -#endif // CHANGEGROUPVISIBILITY_H +#endif // DIALOGLAYOUTSCALE_H diff --git a/src/app/valentina/dialogs/dialoglayoutscale.ui b/src/app/valentina/dialogs/dialoglayoutscale.ui new file mode 100644 index 000000000..86fd6db95 --- /dev/null +++ b/src/app/valentina/dialogs/dialoglayoutscale.ui @@ -0,0 +1,334 @@ + + + DialogLayoutScale + + + + 0 + 0 + 404 + 211 + + + + Layout scale + + + + :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png + + + + + + + + true + + + Margins + + + false + + + + + + + 0 + 0 + + + + Left: + + + + + + + cm + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + Right: + + + + + + + cm + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + Top: + + + + + + + cm + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + Bottom: + + + + + + + cm + + + 0.100000000000000 + + + + + + + + + + + + Scale + + + + + + + + Horizontal: + + + + + + + Vertical: + + + + + + + + + + + % + + + 1 + + + 1.000000000000000 + + + 300.000000000000000 + + + 0.100000000000000 + + + 100.000000000000000 + + + + + + + % + + + 1 + + + 1.000000000000000 + + + 300.000000000000000 + + + 0.100000000000000 + + + 100.000000000000000 + + + + + + + + + 1 + + + 0 + + + 0 + + + + + + 10 + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + ... + + + + :/icon/32x32/link.png:/icon/32x32/link.png + + + + 32 + 32 + + + + QToolButton::DelayedPopup + + + + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + + + buttonBox + accepted() + DialogLayoutScale + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + DialogLayoutScale + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index 1847c4286..04549ef52 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -292,6 +292,18 @@ void DialogLayoutSettings::SetSaveLength(bool save) ui->checkBoxSaveLength->setChecked(save); } +//--------------------------------------------------------------------------------------------------------------------- +bool DialogLayoutSettings::IsPreferOneSheetSolution() const +{ + return ui->checkBoxOneSheetSolution->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogLayoutSettings::SetPreferOneSheetSolution(bool prefer) +{ + ui->checkBoxOneSheetSolution->setChecked(prefer); +} + //--------------------------------------------------------------------------------------------------------------------- bool DialogLayoutSettings::IsUnitePages() const { @@ -600,6 +612,7 @@ void DialogLayoutSettings::DialogAccepted() generator->SetAutoCropLength(GetAutoCropLength()); generator->SetAutoCropWidth(GetAutoCropWidth()); generator->SetSaveLength(IsSaveLength()); + generator->SetPreferOneSheetSolution(IsPreferOneSheetSolution()); generator->SetUnitePages(IsUnitePages()); generator->SetStripOptimization(IsStripOptimization()); generator->SetMultiplier(GetMultiplier()); @@ -695,6 +708,7 @@ void DialogLayoutSettings::RestoreDefaults() SetNestingTime(VSettings::GetDefNestingTime()); SetEfficiencyCoefficient(VSettings::GetDefEfficiencyCoefficient()); SetNestQuantity(VSettings::GetDefLayoutNestQuantity()); + SetPreferOneSheetSolution(VSettings::GetDefLayoutPreferOneSheetSolution()); CorrectMaxFileds(); IgnoreAllFields(ui->checkBoxIgnoreFileds->isChecked()); @@ -1019,6 +1033,7 @@ void DialogLayoutSettings::ReadSettings() SetAutoCropLength(settings->GetLayoutAutoCropLength()); SetAutoCropWidth(settings->GetLayoutAutoCropWidth()); SetSaveLength(settings->GetLayoutSaveLength()); + SetPreferOneSheetSolution(settings->GetLayoutPreferOneSheetSolution()); SetUnitePages(settings->GetLayoutUnitePages()); SetFields(settings->GetFields(GetDefPrinterFields())); SetIgnoreAllFields(settings->GetIgnoreAllFields()); @@ -1046,6 +1061,7 @@ void DialogLayoutSettings::WriteSettings() const settings->SetLayoutAutoCropLength(GetAutoCropLength()); settings->SetLayoutAutoCropWidth(GetAutoCropWidth()); settings->SetLayoutSaveLength(IsSaveLength()); + settings->SetLayoutPreferOneSheetSolution(IsPreferOneSheetSolution()); settings->SetLayoutUnitePages(IsUnitePages()); settings->SetFields(GetFields()); settings->SetIgnoreAllFields(IsIgnoreAllFields()); diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.h b/src/app/valentina/dialogs/dialoglayoutsettings.h index 778014b2b..bf6c9d8c7 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.h +++ b/src/app/valentina/dialogs/dialoglayoutsettings.h @@ -85,6 +85,9 @@ public: bool IsSaveLength() const; void SetSaveLength(bool save); + bool IsPreferOneSheetSolution() const; + void SetPreferOneSheetSolution(bool prefer); + bool IsUnitePages() const; void SetUnitePages(bool save); diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.ui b/src/app/valentina/dialogs/dialoglayoutsettings.ui index 648e09b5a..94f63d258 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.ui +++ b/src/app/valentina/dialogs/dialoglayoutsettings.ui @@ -7,7 +7,7 @@ 0 0 601 - 600 + 645 @@ -448,6 +448,16 @@ + + + + Enable this option to prefer getting one sheet solutions. + + + Prefer one sheet solution + + + diff --git a/src/app/valentina/dialogs/dialogs.h b/src/app/valentina/dialogs/dialogs.h index 122665410..2ca4e9ca3 100644 --- a/src/app/valentina/dialogs/dialogs.h +++ b/src/app/valentina/dialogs/dialogs.h @@ -36,5 +36,6 @@ #include "dialogaboutapp.h" #include "dialogpreferences.h" #include "dialogfinalmeasurements.h" +#include "dialoglayoutscale.h" #endif // DIALOGS_H diff --git a/src/app/valentina/dialogs/dialogs.pri b/src/app/valentina/dialogs/dialogs.pri index 2bb72de56..af53d7952 100644 --- a/src/app/valentina/dialogs/dialogs.pri +++ b/src/app/valentina/dialogs/dialogs.pri @@ -2,6 +2,7 @@ # This need for corect working file translations.pro HEADERS += \ + $$PWD/dialoglayoutscale.h \ $$PWD/dialogs.h \ $$PWD/dialogincrements.h \ $$PWD/dialoghistory.h \ @@ -26,6 +27,7 @@ HEADERS += \ SOURCES += \ $$PWD/dialogincrements.cpp \ $$PWD/dialoghistory.cpp \ + $$PWD/dialoglayoutscale.cpp \ $$PWD/dialogpatternproperties.cpp \ $$PWD/dialognewpattern.cpp \ $$PWD/dialogaboutapp.cpp \ @@ -47,6 +49,7 @@ SOURCES += \ FORMS += \ $$PWD/dialogincrements.ui \ $$PWD/dialoghistory.ui \ + $$PWD/dialoglayoutscale.ui \ $$PWD/dialogpatternproperties.ui \ $$PWD/dialognewpattern.ui \ $$PWD/dialogaboutapp.ui \ diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index fc095b21d..ecac7451b 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -151,26 +151,15 @@ DialogSaveLayout::DialogSaveLayout(int count, Draw mode, const QString &fileName InitTemplates(ui->comboBoxTemplates); + connect(ui->toolButtonScaleConnected, &QToolButton::clicked, this, &DialogSaveLayout::ToggleScaleConnection); + + connect(ui->doubleSpinBoxHorizontalScale, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &DialogSaveLayout::HorizontalScaleChanged); + connect(ui->doubleSpinBoxVerticalScale, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &DialogSaveLayout::VerticalScaleChanged); + ReadSettings(); - // connect for the template drop down box of the tiled pds - connect(ui->comboBoxTemplates, QOverload::of(&QComboBox::currentIndexChanged), - this, &DialogSaveLayout::WriteSettings); - - // connects for the margins of the tiled pdf - connect(ui->doubleSpinBoxLeftField, QOverload::of(&QDoubleSpinBox::valueChanged), - this, &DialogSaveLayout::WriteSettings); - connect(ui->doubleSpinBoxTopField, QOverload::of(&QDoubleSpinBox::valueChanged), - this, &DialogSaveLayout::WriteSettings); - connect(ui->doubleSpinBoxRightField, QOverload::of(&QDoubleSpinBox::valueChanged), - this, &DialogSaveLayout::WriteSettings); - connect(ui->doubleSpinBoxBottomField, QOverload::of(&QDoubleSpinBox::valueChanged), - this, &DialogSaveLayout::WriteSettings); - - // connects for the orientation buttons for the tiled pdf - connect(ui->toolButtonPortrait, &QToolButton::toggled, this, &DialogSaveLayout::WriteSettings); - connect(ui->toolButtonLandscape, &QToolButton::toggled, this, &DialogSaveLayout::WriteSettings); - ShowExample();//Show example for current format. } @@ -520,6 +509,8 @@ LayoutExportFormats DialogSaveLayout::Format() const //--------------------------------------------------------------------------------------------------------------------- void DialogSaveLayout::Save() { + WriteSettings(); + for (int i=0; i < count; ++i) { const QString name = Path()+'/'+FileName()+QString::number(i+1)+ExportFormatSuffix(Format()); @@ -623,6 +614,39 @@ void DialogSaveLayout::ShowExample() } } +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::ToggleScaleConnection() +{ + m_scaleConnected = not m_scaleConnected; + + QIcon icon; + icon.addFile(m_scaleConnected ? QStringLiteral(":/icon/32x32/link.png") + : QStringLiteral(":/icon/32x32/broken_link.png")); + ui->toolButtonScaleConnected->setIcon(icon); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::HorizontalScaleChanged(double d) +{ + if (m_scaleConnected) + { + ui->doubleSpinBoxVerticalScale->blockSignals(true); + ui->doubleSpinBoxVerticalScale->setValue(d); + ui->doubleSpinBoxVerticalScale->blockSignals(false); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::VerticalScaleChanged(double d) +{ + if (m_scaleConnected) + { + ui->doubleSpinBoxHorizontalScale->blockSignals(true); + ui->doubleSpinBoxHorizontalScale->setValue(d); + ui->doubleSpinBoxHorizontalScale->blockSignals(false); + } +} + //--------------------------------------------------------------------------------------------------------------------- bool DialogSaveLayout::IsTextAsPaths() const { @@ -719,6 +743,30 @@ PageOrientation DialogSaveLayout::GetTiledPageOrientation() const } } +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::SetXScale(qreal scale) +{ + ui->doubleSpinBoxHorizontalScale->setValue(scale * 100.); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal DialogSaveLayout::GetXScale() const +{ + return ui->doubleSpinBoxHorizontalScale->value() / 100.; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogSaveLayout::SetYScale(qreal scale) +{ + ui->doubleSpinBoxVerticalScale->setValue(scale * 100.); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal DialogSaveLayout::GetYScale() const +{ + return ui->doubleSpinBoxVerticalScale->value() / 100.; +} + //--------------------------------------------------------------------------------------------------------------------- void DialogSaveLayout::showEvent(QShowEvent *event) { @@ -810,16 +858,15 @@ QVector > DialogSaveLayout::InitFormats( InitFormat(LayoutExportFormats::DXF_AC1021_AAMA); InitFormat(LayoutExportFormats::DXF_AC1024_AAMA); InitFormat(LayoutExportFormats::DXF_AC1027_AAMA); - // We will support them anyway -// InitFormat(LayoutExportFormats::DXF_AC1006_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1009_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1012_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1014_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1015_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1018_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1021_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1024_ASTM); -// InitFormat(LayoutExportFormats::DXF_AC1027_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1006_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1009_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1012_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1014_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1015_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1018_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1021_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1024_ASTM); + InitFormat(LayoutExportFormats::DXF_AC1027_ASTM); InitFormat(LayoutExportFormats::PDFTiled); // InitFormat(LayoutExportFormats::NC); diff --git a/src/app/valentina/dialogs/dialogsavelayout.h b/src/app/valentina/dialogs/dialogsavelayout.h index 462c2330e..8f6d480f7 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.h +++ b/src/app/valentina/dialogs/dialogsavelayout.h @@ -86,6 +86,12 @@ public: void SetTiledPageOrientation(PageOrientation orientation); PageOrientation GetTiledPageOrientation() const; + void SetXScale(qreal scale); + qreal GetXScale() const; + + void SetYScale(qreal scale); + qreal GetYScale() const; + protected: virtual void showEvent(QShowEvent *event) override; void InitTemplates(QComboBox *comboBoxTemplates); @@ -94,6 +100,9 @@ private slots: void Save(); void PathChanged(const QString &text); void ShowExample(); + void ToggleScaleConnection(); + void HorizontalScaleChanged(double d); + void VerticalScaleChanged(double d); private: Q_DISABLE_COPY(DialogSaveLayout) Ui::DialogSaveLAyout *ui; @@ -101,6 +110,7 @@ private: bool isInitialized; Draw m_mode; bool m_tiledExportMode; + bool m_scaleConnected{true}; static bool havePdf; static bool tested; diff --git a/src/app/valentina/dialogs/dialogsavelayout.ui b/src/app/valentina/dialogs/dialogsavelayout.ui index c9440ace0..90bf2ac81 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.ui +++ b/src/app/valentina/dialogs/dialogsavelayout.ui @@ -6,8 +6,8 @@ 0 0 - 719 - 314 + 493 + 391 @@ -17,20 +17,20 @@ :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png - - - - - Path: - - - - + + + + + + Path: + + + - + 0 0 @@ -46,7 +46,7 @@ - + 0 0 @@ -61,44 +61,229 @@ - - - - File format: - - + + + + + + + 0 + 0 + + + + File format: + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - 0 - 0 - - - + + + + + + Options + + + + + + false + + + Binary form + + + + + + + true + + + Text as paths + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Scale + + + + + + + + Horizontal: + + + + + + + Vertical: + + + + + + + + + + + % + + + 1 + + + 1.000000000000000 + + + 300.000000000000000 + + + 0.100000000000000 + + + 100.000000000000000 + + + + + + + % + + + 1 + + + 1.000000000000000 + + + 300.000000000000000 + + + 0.100000000000000 + + + 100.000000000000000 + + + + + + + + + 1 + + + 0 + + + 0 + + + + + + 10 + + + + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + ... + + + + :/icon/32x32/link.png:/icon/32x32/link.png + + + + 32 + 32 + + + + QToolButton::DelayedPopup + + + + + + + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + + + + + + + + + - - - - false - - - Binary form - - - - - - - true - - - Text as paths - - - - + @@ -148,6 +333,9 @@ cm + + 0.100000000000000 + @@ -164,6 +352,9 @@ cm + + 0.100000000000000 + @@ -204,6 +395,9 @@ cm + + 0.100000000000000 + @@ -224,6 +418,9 @@ cm + + 0.100000000000000 + @@ -239,79 +436,75 @@ Paper format - - - - - + + + + + Templates: + + + + + + + + + + Orientation: + + + + + + + - Templates: + ... + + + + :/icon/16x16/portrait.png:/icon/16x16/portrait.png + + + true + + + true + + + true - - - - - + + - Orientation: + ... + + + + :/icon/16x16/landscape.png:/icon/16x16/landscape.png + + + true + + + true - - - - - - ... - - - - :/icon/16x16/portrait.png:/icon/16x16/portrait.png - - - true - - - true - - - true - - - - - - - ... - - - - :/icon/16x16/landscape.png:/icon/16x16/landscape.png - - - true - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + Qt::Horizontal + + + + 40 + 20 + + + @@ -320,19 +513,28 @@ - - - - File name: - - - - + + + QLayout::SetDefaultConstraint + + + + + + 0 + 0 + + + + File name: + + + - + 0 0 @@ -347,6 +549,12 @@ + + + 0 + 0 + + 130 @@ -363,7 +571,7 @@ - + Qt::Horizontal diff --git a/src/app/valentina/dialogs/vwidgetdetails.cpp b/src/app/valentina/dialogs/vwidgetdetails.cpp index 2145c6407..084ababfa 100644 --- a/src/app/valentina/dialogs/vwidgetdetails.cpp +++ b/src/app/valentina/dialogs/vwidgetdetails.cpp @@ -263,12 +263,44 @@ void VWidgetDetails::ShowContextMenu(const QPoint &pos) QAction *actionSelectAll = menu->addAction(tr("Select all")); QAction *actionSelectNone = menu->addAction(tr("Select none")); - QAction *actionSeparator = new QAction(this); - actionSeparator->setSeparator(true); - menu->addAction(actionSeparator); + menu->addSeparator(); QAction *actionInvertSelection = menu->addAction(tr("Invert selection")); + bool pieceMode = false; + QAction *actionPieceOptions = nullptr; + QAction *actionDeletePiece = nullptr; + VToolSeamAllowance *toolPiece = nullptr; + + QTableWidgetItem *selectedItem = ui->tableWidget->itemAt(pos); + if (selectedItem) + { + QTableWidgetItem *item = ui->tableWidget->item(selectedItem->row(), PieceColumn::InLayout); + const quint32 id = item->data(Qt::UserRole).toUInt(); + + try + { + toolPiece = qobject_cast(VAbstractPattern::getTool(id)); + if (toolPiece) + { + pieceMode = true; + menu->addSeparator(); + + actionPieceOptions = menu->addAction(QIcon::fromTheme(QStringLiteral("preferences-other")), + tr("Piece options")); + + actionDeletePiece = menu->addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), + tr("Delete piece")); + actionDeletePiece->setDisabled(toolPiece->referens() > 0); + } + } + catch (const VExceptionBadId &) + { + const QString errorMsg = tr("Cannot find piece by id '%1'").arg(id); + qWarning() << VAbstractApplication::patternMessageSignature + errorMsg; + } + } + const QHash *allDetails = m_data->DataPieces(); if (allDetails->count() == 0) { @@ -333,6 +365,23 @@ void VWidgetDetails::ShowContextMenu(const QPoint &pos) qApp->getUndoStack()->endMacro(); } + else if (pieceMode && selectedAction == actionPieceOptions) + { + toolPiece->ShowOptions(); + } + else if (pieceMode && selectedAction == actionDeletePiece) + { + try + { + toolPiece->DeleteFromMenu(); + } + catch(const VExceptionToolWasDeleted &e) + { + Q_UNUSED(e); + return;//Leave this method immediately!!! + } + //Leave this method immediately after call!!! + } } //------------------------------------------------------------------------------------------------------------------ diff --git a/src/app/valentina/dialogs/vwidgetgroups.cpp b/src/app/valentina/dialogs/vwidgetgroups.cpp index 02e19b6a5..17d09e1a9 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.cpp +++ b/src/app/valentina/dialogs/vwidgetgroups.cpp @@ -29,11 +29,11 @@ #include "vwidgetgroups.h" #include "ui_vwidgetgroups.h" #include "../vtools/dialogs/tools/dialoggroup.h" -#include "../vtools/undocommands/delgroup.h" -#include "../vtools/undocommands/changegroupvisibility.h" -#include "../vtools/undocommands/changemultiplegroupsvisibility.h" +#include "../vtools/undocommands/undogroup.h" #include "../vpatterndb/vcontainer.h" +#include "../vmisc/compatibility.h" +#include #include #include @@ -53,6 +53,7 @@ VWidgetGroups::VWidgetGroups(VAbstractPattern *doc, QWidget *parent) connect(ui->tableWidget, &QTableWidget::cellClicked, this, &VWidgetGroups::GroupVisibilityChanged); connect(ui->tableWidget, &QTableWidget::cellChanged, this, &VWidgetGroups::RenameGroup); connect(ui->tableWidget, &QTableWidget::customContextMenuRequested, this, &VWidgetGroups::CtxMenu); + connect(ui->lineEditTags, &QLineEdit::textChanged, this, &VWidgetGroups::UpdateGroups); } //--------------------------------------------------------------------------------------------------------------------- @@ -112,6 +113,32 @@ void VWidgetGroups::SetMultipleGroupsVisibility(const QVector &groups, qApp->getUndoStack()->push(changeGroups); } +//--------------------------------------------------------------------------------------------------------------------- +QMap VWidgetGroups::FilterGroups(const QMap &groups) +{ + QMap filtered; + QSet filterCategories = ConvertToSet(VAbstractPattern::FilterGroupTags(ui->lineEditTags->text())); + + if (filterCategories.isEmpty()) + { + return groups; + } + + auto i = groups.constBegin(); + while (i != groups.constEnd()) + { + const VGroupData &data = i.value(); + QSet groupCategories = ConvertToSet(data.tags); + if (SetIntersects(filterCategories, groupCategories)) + { + filtered.insert(i.key(), data); + } + ++i; + } + + return filtered; +} + //--------------------------------------------------------------------------------------------------------------------- int VWidgetGroups::GroupRow(vidtype id) const { @@ -150,9 +177,9 @@ void VWidgetGroups::RenameGroup(int row, int column) } const quint32 id = ui->tableWidget->item(row, 0)->data(Qt::UserRole).toUInt(); - doc->SetGroupName(id, ui->tableWidget->item(row, column)->text()); - - UpdateGroups(); + ::RenameGroup *renameGroup = new ::RenameGroup(doc, id, ui->tableWidget->item(row, column)->text()); + connect(renameGroup, &RenameGroup::UpdateGroups, this, &VWidgetGroups::UpdateGroups); + qApp->getUndoStack()->push(renameGroup); } //--------------------------------------------------------------------------------------------------------------------- @@ -187,7 +214,7 @@ void VWidgetGroups::CtxMenu(const QPoint &pos) menu->addAction(QIcon(QStringLiteral("://icon/16x16/closed_eye.png")), tr("Hide")) : menu->addAction(QIcon(QStringLiteral("://icon/16x16/open_eye.png")), tr("Show")); - QAction *actionRename = menu->addAction(tr("Rename")); + QAction *actionPreferences = menu->addAction(QIcon::fromTheme(preferencesOtherIcon), tr("Preferences")); QAction *actionDelete = menu->addAction(QIcon::fromTheme(editDeleteIcon), tr("Delete")); menu->addSeparator(); QAction *actionHideAll = menu->addAction(tr("Hide All")); @@ -201,19 +228,22 @@ void VWidgetGroups::CtxMenu(const QPoint &pos) { SetGroupVisibility(id, not doc->GetGroupVisibility(id)); } - else if (selectedAction == actionRename) + else if (selectedAction == actionPreferences) { QScopedPointer fackeContainer(new VContainer(qApp->TrVars(), qApp->patternUnitP(), VContainer::UniqueNamespace())); QScopedPointer dialog(new DialogGroup(fackeContainer.data(), NULL_ID, this)); dialog->SetName(doc->GetGroupName(id)); + dialog->SetTags(doc->GetGroupTags(id)); + dialog->SetGroupCategories(doc->GetGroupCategories()); const int result = dialog->exec(); if (result == QDialog::Accepted) { - doc->SetGroupName(id, dialog->GetName()); - item = ui->tableWidget->item(row, 1); - item->setText(dialog->GetName()); + ChangeGroupOptions *changeGroupOptions = new ChangeGroupOptions(doc, id, dialog->GetName(), + dialog->GetTags()); + connect(changeGroupOptions, &ChangeGroupOptions::UpdateGroups, this, &VWidgetGroups::UpdateGroups); + qApp->getUndoStack()->push(changeGroupOptions); } } else if (selectedAction == actionDelete) @@ -279,8 +309,13 @@ void VWidgetGroups::UpdateGroups() } //--------------------------------------------------------------------------------------------------------------------- -void VWidgetGroups::FillTable(const QMap > &groups) +void VWidgetGroups::FillTable(QMap groups) { + emit doc->UpdateToolTip(); + ui->lineEditTags->SetCompletion(doc->GetGroupCategories()); + + groups = FilterGroups(groups); + ui->tableWidget->blockSignals(true); ui->tableWidget->clear(); @@ -291,12 +326,12 @@ void VWidgetGroups::FillTable(const QMap > &groups while (i != groups.constEnd()) { ++currentRow; - const QPair data = i.value(); + const VGroupData data = i.value(); QTableWidgetItem *item = new QTableWidgetItem(); item->setTextAlignment(Qt::AlignHCenter); - (data.second) ? item->setIcon(QIcon("://icon/16x16/open_eye.png")) - : item->setIcon(QIcon("://icon/16x16/closed_eye.png")); + (data.visible) ? item->setIcon(QIcon("://icon/16x16/open_eye.png")) + : item->setIcon(QIcon("://icon/16x16/closed_eye.png")); item->setData(Qt::UserRole, i.key()); @@ -307,8 +342,9 @@ void VWidgetGroups::FillTable(const QMap > &groups ui->tableWidget->setItem(currentRow, 0, item); - item = new QTableWidgetItem(data.first); + item = new QTableWidgetItem(data.name); item->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter); + item->setToolTip(tr("Categories: %1.").arg(data.tags.join(", "))); if(doc->GroupIsEmpty(i.key())) { diff --git a/src/app/valentina/dialogs/vwidgetgroups.h b/src/app/valentina/dialogs/vwidgetgroups.h index 0d0838a68..ba4e0f17c 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.h +++ b/src/app/valentina/dialogs/vwidgetgroups.h @@ -34,6 +34,7 @@ class QTableWidgetItem; class VAbstractPattern; +struct VGroupData; namespace Ui { @@ -61,10 +62,12 @@ private: Ui::VWidgetGroups *ui; VAbstractPattern *doc; - void FillTable(const QMap > &groups); + void FillTable(QMap groups); void SetGroupVisibility(vidtype id, bool visible) const; void SetMultipleGroupsVisibility(const QVector &groups, bool visible) const; + QMap FilterGroups(const QMap &groups); + int GroupRow(vidtype id) const; }; diff --git a/src/app/valentina/dialogs/vwidgetgroups.ui b/src/app/valentina/dialogs/vwidgetgroups.ui index 006e30e6c..3a3ee72f3 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.ui +++ b/src/app/valentina/dialogs/vwidgetgroups.ui @@ -7,7 +7,7 @@ 0 0 371 - 279 + 438 @@ -18,6 +18,30 @@ :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Filter by tags + + + true + + + + + @@ -47,16 +71,23 @@ false - - false - 10 + + false + + + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
+
diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 427681cb6..f5bb15524 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -58,7 +58,7 @@ #include "tools/vtooluniondetails.h" #include "dialogs/dialogs.h" #include "dialogs/vwidgetgroups.h" -#include "../vtools/undocommands/addgroup.h" +#include "../vtools/undocommands/undogroup.h" #include "dialogs/vwidgetdetails.h" #include "../vpatterndb/vpiecepath.h" #include "../qmuparser/qmuparsererror.h" @@ -648,6 +648,12 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons case Tool::PlaceLabel: dialogTool->SetPiecesList(doc->GetActivePPPieces()); break; + case Tool::Rotation: + case Tool::Move: + case Tool::FlippingByAxis: + case Tool::FlippingByLine: + dialogTool->SetGroupCategories(doc->GetGroupCategories()); + break; default: break; } @@ -1241,7 +1247,8 @@ void MainWindow::ClosedDialogGroup(int result) { const QPointer dialog = qobject_cast(dialogTool); SCASSERT(not dialog.isNull()) - const QDomElement group = doc->CreateGroup(pattern->getNextId(), dialog->GetName(), dialog->GetGroup()); + const QDomElement group = doc->CreateGroup(pattern->getNextId(), dialog->GetName(), dialog->GetTags(), + dialog->GetGroup()); if (not group.isNull()) { AddGroup *addGroup = new AddGroup(group, doc); @@ -5527,6 +5534,8 @@ bool MainWindow::DoExport(const VCommandLinePtr &expParams) m_dialogSaveLayout->SelectFormat(static_cast(expParams->OptExportType())); m_dialogSaveLayout->SetBinaryDXFFormat(expParams->IsBinaryDXF()); m_dialogSaveLayout->SetTextAsPaths(expParams->IsTextAsPaths()); + m_dialogSaveLayout->SetXScale(expParams->ExportXScale()); + m_dialogSaveLayout->SetYScale(expParams->ExportYScale()); if (static_cast(expParams->OptExportType()) == LayoutExportFormats::PDFTiled) { @@ -5562,6 +5571,8 @@ bool MainWindow::DoExport(const VCommandLinePtr &expParams) m_dialogSaveLayout->SetDestinationPath(expParams->OptDestinationPath()); m_dialogSaveLayout->SelectFormat(static_cast(expParams->OptExportType())); m_dialogSaveLayout->SetBinaryDXFFormat(expParams->IsBinaryDXF()); + m_dialogSaveLayout->SetXScale(expParams->ExportXScale()); + m_dialogSaveLayout->SetYScale(expParams->ExportYScale()); if (static_cast(expParams->OptExportType()) == LayoutExportFormats::PDFTiled) { diff --git a/src/app/valentina/mainwindowsnogui.cpp b/src/app/valentina/mainwindowsnogui.cpp index 14459be31..559a02dcd 100644 --- a/src/app/valentina/mainwindowsnogui.cpp +++ b/src/app/valentina/mainwindowsnogui.cpp @@ -41,6 +41,7 @@ #include "../vlayout/vlayoutgenerator.h" #include "dialogs/dialoglayoutprogress.h" #include "dialogs/dialogsavelayout.h" +#include "dialogs/dialoglayoutscale.h" #include "../vlayout/vposter.h" #include "../vpatterndb/floatItemData/vpiecelabeldata.h" #include "../vpatterndb/floatItemData/vpatternlabeldata.h" @@ -312,7 +313,7 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator) if (lGenerator.PapersCount() <= papersCount) { const qreal layoutEfficiency = lGenerator.LayoutEfficiency(); - if (efficiency < layoutEfficiency) + if (efficiency < layoutEfficiency || lGenerator.PapersCount() < papersCount) { efficiency = layoutEfficiency; if (VApplication::IsGUIMode()) @@ -403,7 +404,10 @@ bool MainWindowsNoGUI::GenerateLayout(VLayoutGenerator& lGenerator) || (nestingState == LayoutErrors::NoError && not qFuzzyIsNull(lGenerator.GetEfficiencyCoefficient()) && efficiency >= lGenerator.GetEfficiencyCoefficient())) { - break; + if (not lGenerator.IsPreferOneSheetSolution() || lGenerator.PapersCount() == 1) + { + break; + } } if (IsTimeout()) @@ -510,7 +514,16 @@ void MainWindowsNoGUI::ExportData(const QVector &listDetails) format == LayoutExportFormats::DXF_AC1018_AAMA || format == LayoutExportFormats::DXF_AC1021_AAMA || format == LayoutExportFormats::DXF_AC1024_AAMA || - format == LayoutExportFormats::DXF_AC1027_AAMA) + format == LayoutExportFormats::DXF_AC1027_AAMA || + format == LayoutExportFormats::DXF_AC1006_ASTM || + format == LayoutExportFormats::DXF_AC1009_ASTM || + format == LayoutExportFormats::DXF_AC1012_ASTM || + format == LayoutExportFormats::DXF_AC1014_ASTM || + format == LayoutExportFormats::DXF_AC1015_ASTM || + format == LayoutExportFormats::DXF_AC1018_ASTM || + format == LayoutExportFormats::DXF_AC1021_ASTM || + format == LayoutExportFormats::DXF_AC1024_ASTM || + format == LayoutExportFormats::DXF_AC1027_ASTM) { if (m_dialogSaveLayout->Mode() == Draw::Layout) { @@ -665,15 +678,31 @@ void MainWindowsNoGUI::ExportApparelLayout(const QVector &details, switch (format) { case LayoutExportFormats::DXF_AC1006_ASTM: + ASTMDxfFile(name, DRW::AC1006, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1009_ASTM: + ASTMDxfFile(name, DRW::AC1009, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1012_ASTM: + ASTMDxfFile(name, DRW::AC1012, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1014_ASTM: + ASTMDxfFile(name, DRW::AC1014, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1015_ASTM: + ASTMDxfFile(name, DRW::AC1015, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1018_ASTM: + ASTMDxfFile(name, DRW::AC1018, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1021_ASTM: + ASTMDxfFile(name, DRW::AC1021, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1024_ASTM: + ASTMDxfFile(name, DRW::AC1024, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); + break; case LayoutExportFormats::DXF_AC1027_ASTM: - Q_UNREACHABLE(); // For now not supported + ASTMDxfFile(name, DRW::AC1027, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); break; case LayoutExportFormats::DXF_AC1006_AAMA: AAMADxfFile(name, DRW::AC1006, m_dialogSaveLayout->IsBinaryDXFFormat(), size, details); @@ -798,7 +827,6 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer) ToPixel(printer->pageRect(QPrinter::Millimeter).height(), Unit::Mm)); const double xscale = printer->pageRect().width() / printerPageRect.width(); const double yscale = printer->pageRect().height() / printerPageRect.height(); - const double scale = qMin(xscale, yscale); QPainter painter; if (not painter.begin(printer)) @@ -844,7 +872,9 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer) auto *paper = qgraphicsitem_cast(papers.at(i)); if (paper) { - *poster += posterazor->Calc(paper->rect().toRect(), i, orientation); + QRectF paperRect = paper->rect(); + QSizeF image(paperRect.width() * m_xscale, paperRect.height() * m_yscale); + *poster += posterazor->Calc(image.toSize(), i, orientation); } } @@ -949,7 +979,9 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer) qreal x,y; if(printer->fullPage()) { - QMarginsF printerMargins = printer->pageLayout().margins(); + QPageLayout layout = printer->pageLayout(); + layout.setUnits(QPageLayout::Millimeter); + QMarginsF printerMargins = layout.margins(); x = qFloor(ToPixel(printerMargins.left(),Unit::Mm)); y = qFloor(ToPixel(printerMargins.top(),Unit::Mm)); } @@ -958,7 +990,7 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer) x = 0; y = 0; } - QRectF target(x * scale, y * scale, source.width() * scale, source.height() * scale); + QRectF target(x * xscale, y * yscale, source.width() * xscale, source.height() * yscale); scenes.at(paperIndex)->render(&painter, target, source, Qt::IgnoreAspectRatio); @@ -1187,10 +1219,10 @@ void MainWindowsNoGUI::SvgFile(const QString &name, QGraphicsRectItem *paper, QG const QRectF r = paper->rect(); QSvgGenerator generator; generator.setFileName(name); - generator.setSize(QSize(qFloor(r.width() + margins.left() + margins.right()), - qFloor(r.height() + margins.top() + margins.bottom()))); - generator.setViewBox(QRectF(0, 0, r.width() + margins.left() + margins.right(), - r.height() + margins.top() + margins.bottom())); + generator.setSize(QSize(qFloor(r.width() * m_dialogSaveLayout->GetXScale() + margins.left() + margins.right()), + qFloor(r.height() * m_dialogSaveLayout->GetYScale() + margins.top() + margins.bottom()))); + generator.setViewBox(QRectF(0, 0, r.width() * m_dialogSaveLayout->GetXScale() + margins.left() + margins.right(), + r.height() * m_dialogSaveLayout->GetYScale() + margins.top() + margins.bottom())); generator.setTitle(tr("Pattern")); generator.setDescription(doc->GetDescription().toHtmlEscaped()); generator.setResolution(static_cast(PrintDPI)); @@ -1200,6 +1232,7 @@ void MainWindowsNoGUI::SvgFile(const QString &name, QGraphicsRectItem *paper, QG painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen(Qt::black, qApp->Settings()->WidthHairLine(), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); + painter.scale(m_dialogSaveLayout->GetXScale(), m_dialogSaveLayout->GetYScale()); scene->render(&painter, r, r, Qt::IgnoreAspectRatio); painter.end(); } @@ -1214,8 +1247,8 @@ void MainWindowsNoGUI::PngFile(const QString &name, QGraphicsRectItem *paper, QG { const QRectF r = paper->rect(); // Create the image with the exact size of the shrunk scene - QImage image(QSize(qFloor(r.width() + margins.left() + margins.right()), - qFloor(r.height() + margins.top() + margins.bottom())), + QImage image(QSize(qFloor(r.width() * m_dialogSaveLayout->GetXScale() + margins.left() + margins.right()), + qFloor(r.height() * m_dialogSaveLayout->GetYScale() + margins.top() + margins.bottom())), QImage::Format_ARGB32); image.fill(Qt::white); QPainter painter(&image); @@ -1223,6 +1256,7 @@ void MainWindowsNoGUI::PngFile(const QString &name, QGraphicsRectItem *paper, QG painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen(Qt::black, qApp->Settings()->WidthMainLine(), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); + painter.scale(m_dialogSaveLayout->GetXScale(), m_dialogSaveLayout->GetYScale()); scene->render(&painter, r, r, Qt::IgnoreAspectRatio); image.save(name); } @@ -1245,9 +1279,11 @@ void MainWindowsNoGUI::PdfFile(const QString &name, QGraphicsRectItem *paper, QG printer.setResolution(static_cast(PrintDPI)); printer.setOrientation(QPrinter::Portrait); printer.setFullPage(ignorePrinterFields); - if (not printer.setPageSize(QPageSize(QSizeF(FromPixel(r.width() + margins.left() + margins.right(), Unit::Mm), - FromPixel(r.height() + margins.top() + margins.bottom(), Unit::Mm)), - QPageSize::Millimeter))) + + qreal width = FromPixel(r.width() * m_dialogSaveLayout->GetXScale() + margins.left() + margins.right(), Unit::Mm); + qreal height = FromPixel(r.height() * m_dialogSaveLayout->GetYScale() + margins.top() + margins.bottom(), Unit::Mm); + + if (not printer.setPageSize(QPageSize(QSizeF(width, height), QPageSize::Millimeter))) { qWarning() << tr("Cannot set printer page size"); } @@ -1272,6 +1308,7 @@ void MainWindowsNoGUI::PdfFile(const QString &name, QGraphicsRectItem *paper, QG painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen(Qt::black, qApp->Settings()->WidthMainLine(), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); + painter.scale(m_dialogSaveLayout->GetXScale(), m_dialogSaveLayout->GetYScale()); scene->render(&painter, r, r, Qt::IgnoreAspectRatio); painter.end(); } @@ -1297,6 +1334,9 @@ void MainWindowsNoGUI::PdfTiledFile(const QString &name) qWarning()<GetXScale(); + m_yscale = m_dialogSaveLayout->GetYScale(); + printer.setOutputFileName(name); printer.setResolution(static_cast(PrintDPI)); PrintPages(&printer); @@ -1395,7 +1435,11 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary PrepareTextForDXF(endStringPlaceholder, details); VDxfPaintDevice generator; generator.setFileName(name); - generator.setSize(paper->rect().size().toSize()); + + const QRectF r = paper->rect(); + generator.setSize(QSize(qFloor(r.width() * m_dialogSaveLayout->GetXScale()), + qFloor(r.height() * m_dialogSaveLayout->GetYScale()))); + generator.setResolution(PrintDPI); generator.SetVersion(static_cast(version)); generator.SetBinaryFormat(binary); @@ -1404,6 +1448,7 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary QPainter painter; if (painter.begin(&generator)) { + painter.scale(m_dialogSaveLayout->GetXScale(), m_dialogSaveLayout->GetYScale()); scene->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio); painter.end(); } @@ -1413,6 +1458,23 @@ void MainWindowsNoGUI::FlatDxfFile(const QString &name, int version, bool binary //--------------------------------------------------------------------------------------------------------------------- void MainWindowsNoGUI::AAMADxfFile(const QString &name, int version, bool binary, const QSize &size, const QVector &details) const +{ + VDxfPaintDevice generator; + generator.setFileName(name); + generator.setSize(QSize(qCeil(size.width() * m_dialogSaveLayout->GetXScale()), + qCeil(size.height() * m_dialogSaveLayout->GetYScale()))); + generator.setResolution(PrintDPI); + generator.SetVersion(static_cast(version)); + generator.SetBinaryFormat(binary); + generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745 + generator.SetXScale(m_dialogSaveLayout->GetXScale()); + generator.SetYScale(m_dialogSaveLayout->GetYScale()); + generator.ExportToAAMA(details); +} + +//--------------------------------------------------------------------------------------------------------------------- +void MainWindowsNoGUI::ASTMDxfFile(const QString &name, int version, bool binary, const QSize &size, + const QVector &details) const { VDxfPaintDevice generator; generator.setFileName(name); @@ -1421,7 +1483,9 @@ void MainWindowsNoGUI::AAMADxfFile(const QString &name, int version, bool binary generator.SetVersion(static_cast(version)); generator.SetBinaryFormat(binary); generator.setInsunits(VarInsunits::Millimeters);// Decided to always use mm. See issue #745 - generator.ExportToAAMA(details); + generator.SetXScale(m_dialogSaveLayout->GetXScale()); + generator.SetYScale(m_dialogSaveLayout->GetYScale()); + generator.ExportToASTM(details); } QT_WARNING_POP @@ -1437,6 +1501,17 @@ void MainWindowsNoGUI::PreparePaper(int index) const shadows.at(index)->setVisible(false); paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));// border } + + QTransform matrix; + matrix.scale(m_xscale, m_yscale); + + QList paperDetails = details.at(index); + for (auto detail : paperDetails) + { + QTransform m = detail->transform(); + m *= matrix; + detail->setTransform(m); + } } //--------------------------------------------------------------------------------------------------------------------- @@ -1451,6 +1526,17 @@ void MainWindowsNoGUI::RestorePaper(int index) const scenes.at(index)->setBackgroundBrush(brush); shadows.at(index)->setVisible(true); } + + QTransform matrix; + matrix.scale(1./m_xscale, 1./m_yscale); + + QList paperDetails = details.at(index); + for (auto detail : paperDetails) + { + QTransform m = detail->transform(); + m *= matrix; + detail->setTransform(m); + } } //--------------------------------------------------------------------------------------------------------------------- @@ -1541,8 +1627,19 @@ void MainWindowsNoGUI::PrintPreview() return; } + { + DialogLayoutScale layoutScale(isTiled, this); + layoutScale.SetXScale(1); + layoutScale.SetYScale(1); + layoutScale.exec(); + + m_xscale = layoutScale.GetXScale(); + m_yscale = layoutScale.GetYScale(); + } + SetPrinterSettings(printer.data(), PrintType::PrintPreview); printer->setResolution(static_cast(PrintDPI)); + // display print preview dialog QPrintPreviewDialog preview(printer.data()); connect(&preview, &QPrintPreviewDialog::paintRequested, this, &MainWindowsNoGUI::PrintPages); @@ -1573,6 +1670,16 @@ void MainWindowsNoGUI::LayoutPrint() return; } + { + DialogLayoutScale layoutScale(isTiled, this); + layoutScale.SetXScale(1); + layoutScale.SetYScale(1); + layoutScale.exec(); + + m_xscale = layoutScale.GetXScale(); + m_yscale = layoutScale.GetYScale(); + } + SetPrinterSettings(printer.data(), PrintType::PrintNative); QPrintDialog dialog(printer.data(), this ); // If only user couldn't change page margins we could use method setMinMax(); diff --git a/src/app/valentina/mainwindowsnogui.h b/src/app/valentina/mainwindowsnogui.h index 7e9e289dd..77a69eb86 100644 --- a/src/app/valentina/mainwindowsnogui.h +++ b/src/app/valentina/mainwindowsnogui.h @@ -162,6 +162,9 @@ private: QString layoutPrinterName; + qreal m_xscale{1}; + qreal m_yscale{1}; + static QList CreateShadows(const QList &papers); static QList CreateScenes(const QList &papers, const QList &shadows, @@ -182,6 +185,8 @@ private: const QList > &details)const; void AAMADxfFile(const QString &name, int version, bool binary, const QSize &size, const QVector &details) const; + void ASTMDxfFile(const QString &name, int version, bool binary, const QSize &size, + const QVector &details) const; void PreparePaper(int index) const; void RestorePaper(int index) const; diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 53387a7e1..763ae9415 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -3450,6 +3450,22 @@ void VPattern::GarbageCollector(bool commit) { modElement.removeChild(modNode); cleared = true; + + // Clear history + try + { + vidtype id = GetParametrId(modNode); + auto record = std::find_if(history.begin(), history.end(), + [id](const VToolRecord &record) { return record.getId() == id; }); + if (record != history.end()) + { + history.erase(record); + } + } + catch(const VExceptionWrongId &) + { + // do nothing + } } } } diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc index bf0597e5d..5d41d6883 100644 --- a/src/libs/ifc/schema.qrc +++ b/src/libs/ifc/schema.qrc @@ -58,6 +58,7 @@ schema/pattern/v0.8.4.xsd schema/pattern/v0.8.5.xsd schema/pattern/v0.8.6.xsd + schema/pattern/v0.8.7.xsd schema/standard_measurements/v0.3.0.xsd schema/standard_measurements/v0.4.0.xsd schema/standard_measurements/v0.4.1.xsd diff --git a/src/libs/ifc/schema/pattern/v0.8.7.xsd b/src/libs/ifc/schema/pattern/v0.8.7.xsd new file mode 100644 index 000000000..26e7571a0 --- /dev/null +++ b/src/libs/ifc/schema/pattern/v0.8.7.xsd @@ -0,0 +1,1254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 1f010cc0d..c45c7a026 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -135,7 +135,8 @@ const QString VAbstractPattern::AttrNumber = QStringLiteral("number") const QString VAbstractPattern::AttrCheckUniqueness = QStringLiteral("checkUniqueness"); const QString VAbstractPattern::AttrManualPassmarkLength = QStringLiteral("manualPassmarkLength"); const QString VAbstractPattern::AttrPassmarkLength = QStringLiteral("passmarkLength"); -const QString VAbstractPattern::AttrOpacity = QStringLiteral("opacity"); +const QString VAbstractPattern::AttrOpacity = QStringLiteral("opacity"); +const QString VAbstractPattern::AttrTags = QStringLiteral("tags"); const QString VAbstractPattern::AttrAll = QStringLiteral("all"); @@ -283,6 +284,17 @@ QMap AdjustMaterials(QMap materials) return materials; } + +//--------------------------------------------------------------------------------------------------------------------- +QString PrepareGroupTags(QStringList tags) +{ + for (auto &tag : tags) + { + tag = tag.simplified(); + } + + return ConvertToList(ConvertToSet(tags)).join(','); +} } //--------------------------------------------------------------------------------------------------------------------- @@ -1730,6 +1742,12 @@ void VAbstractPattern::SelectedDetail(quint32 id) emit ShowDetail(id); } +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractPattern::UpdateVisiblityGroups() +{ + emit UpdateGroups(); +} + //--------------------------------------------------------------------------------------------------------------------- void VAbstractPattern::ToolExists(const quint32 &id) { @@ -2422,17 +2440,22 @@ QDomElement VAbstractPattern::CreateGroups() } //--------------------------------------------------------------------------------------------------------------------- -QDomElement VAbstractPattern::CreateGroup(quint32 id, const QString &name, const QMap &groupData) +QDomElement VAbstractPattern::CreateGroup(quint32 id, const QString &name, const QStringList &tags, + const QMap &groupData, vidtype tool) { if (id == NULL_ID || groupData.isEmpty()) { return QDomElement(); } + const QString preparedTags = PrepareGroupTags(tags); + QDomElement group = createElement(TagGroup); SetAttribute(group, AttrId, id); SetAttribute(group, AttrName, name); SetAttribute(group, AttrVisible, true); + SetAttributeOrRemoveIf(group, AttrTool, tool, tool == null_id); + SetAttributeOrRemoveIf(group, AttrTags, preparedTags, preparedTags.isEmpty()); auto i = groupData.constBegin(); while (i != groupData.constEnd()) @@ -2446,73 +2469,102 @@ QDomElement VAbstractPattern::CreateGroup(quint32 id, const QString &name, const return group; } +//--------------------------------------------------------------------------------------------------------------------- +vidtype VAbstractPattern::GroupLinkedToTool(vidtype toolId) const +{ + const QDomNodeList groups = elementsByTagName(TagGroup); + for (int i=0; i < groups.size(); ++i) + { + const QDomElement group = groups.at(i).toElement(); + if (not group.isNull() && group.hasAttribute(AttrTool)) + { + const quint32 id = GetParametrUInt(group, AttrTool, NULL_ID_STR); + + if (toolId == id) + { + return GetParametrUInt(group, AttrId, NULL_ID_STR); + } + } + } + + return null_id; +} //--------------------------------------------------------------------------------------------------------------------- QString VAbstractPattern::GetGroupName(quint32 id) { QString name = tr("New group"); - QDomElement groups = CreateGroups(); - if (not groups.isNull()) + QDomElement group = elementById(id, TagGroup); + if (group.isElement()) { - QDomElement group = elementById(id, TagGroup); - if (group.isElement()) - { - name = GetParametrString(group, AttrName, name); - return name; - } - else - { - if (groups.childNodes().isEmpty()) - { - QDomNode parent = groups.parentNode(); - parent.removeChild(groups); - } + name = GetParametrString(group, AttrName, name); - qDebug("Can't get group by id = %u.", id); - return name; - } - } - else - { - qDebug("Can't get tag Groups."); - return name; } + + return name; } //--------------------------------------------------------------------------------------------------------------------- void VAbstractPattern::SetGroupName(quint32 id, const QString &name) { - QDomElement groups = CreateGroups(); - if (not groups.isNull()) + QDomElement group = elementById(id, TagGroup); + if (group.isElement()) { - QDomElement group = elementById(id, TagGroup); - if (group.isElement()) - { - group.setAttribute(AttrName, name); - modified = true; - emit patternChanged(false); - } - else - { - if (groups.childNodes().isEmpty()) - { - QDomNode parent = groups.parentNode(); - parent.removeChild(groups); - } - - qDebug("Can't get group by id = %u.", id); - } - } - else - { - qDebug("Can't get tag Groups."); + group.setAttribute(AttrName, name); + modified = true; + emit patternChanged(false); } } //--------------------------------------------------------------------------------------------------------------------- -QMap > VAbstractPattern::GetGroups() +QStringList VAbstractPattern::GetGroupTags(vidtype id) { - QMap > data; + QStringList tags; + QDomElement group = elementById(id, TagGroup); + if (group.isElement()) + { + tags = FilterGroupTags(GetParametrEmptyString(group, AttrTags)); + } + + return tags; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractPattern::SetGroupTags(quint32 id, const QStringList &tags) +{ + QDomElement group = elementById(id, TagGroup); + if (group.isElement()) + { + const QString rawTags = tags.join(','); + SetAttributeOrRemoveIf(group, AttrTags, rawTags, rawTags.isEmpty()); + modified = true; + emit patternChanged(false); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList VAbstractPattern::GetGroupCategories() const +{ + QSet categories; + + const QDomNodeList groups = elementsByTagName(TagGroup); + for (int i=0; i < groups.size(); ++i) + { + const QDomElement group = groups.at(i).toElement(); + if (not group.isNull() && group.hasAttribute(AttrTags)) + { + QStringList groupTags = VAbstractPattern::FilterGroupTags(GetParametrEmptyString(group, AttrTags)); + categories.unite(ConvertToSet(groupTags)); + } + } + + return ConvertToList(categories); +} + +//--------------------------------------------------------------------------------------------------------------------- +QMap VAbstractPattern::GetGroups() +{ + QMap data; try { @@ -2529,11 +2581,13 @@ QMap > VAbstractPattern::GetGroups() { if (group.tagName() == TagGroup) { + VGroupData groupData; const quint32 id = GetParametrUInt(group, AttrId, QChar('0')); - const bool visible = GetParametrBool(group, AttrVisible, trueStr); - const QString name = GetParametrString(group, AttrName, tr("New group")); + groupData.visible = GetParametrBool(group, AttrVisible, trueStr); + groupData.name = GetParametrString(group, AttrName, tr("New group")); + groupData.tags = FilterGroupTags(GetParametrEmptyString(group, AttrTags)); - data.insert(id, qMakePair(name, visible)); + data.insert(id, groupData); } } } @@ -2547,7 +2601,7 @@ QMap > VAbstractPattern::GetGroups() } catch (const VExceptionConversionError &) { - return QMap >(); + return QMap(); } return data; @@ -2804,3 +2858,22 @@ QString VAbstractPattern::PieceDrawName(quint32 id) return draw.attribute(VAbstractPattern::AttrName); } + +//--------------------------------------------------------------------------------------------------------------------- +QStringList VAbstractPattern::FilterGroupTags(const QString &tags) +{ + if (tags.isEmpty()) + { + return QStringList(); + } + + QStringList list = tags.split(','); + for (auto &tag : list) + { + tag = tag.simplified(); + } + + list.removeAll(""); + + return ConvertToList(ConvertToSet(list)); +} diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 55167d2d0..6a3b7a981 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -78,6 +78,13 @@ struct VFinalMeasurement QString description; }; +struct VGroupData +{ + QString name{}; + bool visible{true}; + QStringList tags{}; +}; + QT_WARNING_POP class VAbstractPattern : public VDomDocument @@ -200,16 +207,27 @@ public: void ParseGroups(const QDomElement &domElement); QDomElement CreateGroups(); - QDomElement CreateGroup(quint32 id, const QString &name, const QMap &groupData); + QDomElement CreateGroup(quint32 id, const QString &name, const QStringList &tags, + const QMap &groupData, vidtype tool=null_id); + vidtype GroupLinkedToTool(vidtype toolId) const; + QString GetGroupName(quint32 id); void SetGroupName(quint32 id, const QString &name); - QMap > GetGroups(); + + QStringList GetGroupTags(vidtype id); + void SetGroupTags(quint32 id, const QStringList &tags); + + QStringList GetGroupCategories() const; + + QMap GetGroups(); QMap GetGroupsContainingItem(quint32 toolId, quint32 objectId, bool containItem); QDomElement AddItemToGroup(quint32 toolId, quint32 objectId, quint32 groupId); QDomElement RemoveItemFromGroup(quint32 toolId, quint32 objectId, quint32 groupId); bool GroupIsEmpty(quint32 id); bool GetGroupVisibility(quint32 id); + static QStringList FilterGroupTags(const QString &tags); + QString PieceDrawName(quint32 id); static const QString TagPattern; @@ -288,6 +306,7 @@ public: static const QString AttrManualPassmarkLength; static const QString AttrPassmarkLength; static const QString AttrOpacity; + static const QString AttrTags; static const QString AttrAll; @@ -404,7 +423,8 @@ signals: /** * @brief UpdateGroups emit if the groups have been updated */ - void UpdateGroups(); + void UpdateGroups(); + void UpdateToolTip(); public slots: virtual void LiteParseTree(const Document &parse)=0; @@ -413,6 +433,7 @@ public slots: void ClearScene(); void CheckInLayoutList(); void SelectedDetail(quint32 id); + void UpdateVisiblityGroups(); protected: /** @brief nameActivDraw name current pattern peace. */ diff --git a/src/libs/ifc/xml/vdomdocument.cpp b/src/libs/ifc/xml/vdomdocument.cpp index 40941545d..cd0733d4c 100644 --- a/src/libs/ifc/xml/vdomdocument.cpp +++ b/src/libs/ifc/xml/vdomdocument.cpp @@ -264,7 +264,7 @@ VDomDocument::~VDomDocument() } //--------------------------------------------------------------------------------------------------------------------- -QDomElement VDomDocument::elementById(quint32 id, const QString &tagName) +QDomElement VDomDocument::elementById(quint32 id, const QString &tagName, bool updateCache) { if (id == 0) { @@ -273,16 +273,27 @@ QDomElement VDomDocument::elementById(quint32 id, const QString &tagName) if (m_elementIdCache.contains(id)) { - const QDomElement e = m_elementIdCache.value(id); - if (e.parentNode().nodeType() != QDomNode::BaseNode) - { - return e; - } - m_elementIdCache.remove(id); + const QDomElement e = m_elementIdCache.value(id); + if (e.parentNode().nodeType() != QDomNode::BaseNode) + { + if (not tagName.isEmpty()) + { + if (e.tagName() == tagName) + { + return e; + } + } + else + { + return e; + } + } } - // Cached missed - RefreshElementIdCache(); + if (updateCache) + { // Cached missed + RefreshElementIdCache(); + } if (tagName.isEmpty()) { @@ -290,10 +301,8 @@ QDomElement VDomDocument::elementById(quint32 id, const QString &tagName) QHash tmpCache; if (VDomDocument::find(tmpCache, this->documentElement(), id)) { - m_elementIdCache = tmpCache; - return m_elementIdCache.value(id); + return tmpCache.value(id); } - m_elementIdCache = tmpCache; } else { @@ -305,7 +314,6 @@ QDomElement VDomDocument::elementById(quint32 id, const QString &tagName) { const quint32 elementId = GetParametrUInt(domElement, AttrId, NULL_ID_STR); - m_elementIdCache.insert(elementId, domElement); if (elementId == id) { return domElement; diff --git a/src/libs/ifc/xml/vdomdocument.h b/src/libs/ifc/xml/vdomdocument.h index ed3b2f108..238851546 100644 --- a/src/libs/ifc/xml/vdomdocument.h +++ b/src/libs/ifc/xml/vdomdocument.h @@ -96,7 +96,7 @@ public: explicit VDomDocument(QObject *parent = nullptr); virtual ~VDomDocument(); - QDomElement elementById(quint32 id, const QString &tagName = QString()); + QDomElement elementById(quint32 id, const QString &tagName = QString(), bool updateCache=true); template void SetAttribute(QDomElement &domElement, const QString &name, const T &value) const; diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index 1c29121a5..a38a9dbfc 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -59,8 +59,8 @@ class QDomElement; */ const QString VPatternConverter::PatternMinVerStr = QStringLiteral("0.1.4"); -const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.8.6"); -const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.8.6.xsd"); +const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.8.7"); +const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.8.7.xsd"); //VPatternConverter::PatternMinVer; // <== DON'T FORGET TO UPDATE TOO!!!! //VPatternConverter::PatternMaxVer; // <== DON'T FORGET TO UPDATE TOO!!!! @@ -236,7 +236,8 @@ QString VPatternConverter::XSDSchema(int ver) const std::make_pair(FORMAT_VERSION(0, 8, 3), QStringLiteral("://schema/pattern/v0.8.3.xsd")), std::make_pair(FORMAT_VERSION(0, 8, 4), QStringLiteral("://schema/pattern/v0.8.4.xsd")), std::make_pair(FORMAT_VERSION(0, 8, 5), QStringLiteral("://schema/pattern/v0.8.5.xsd")), - std::make_pair(FORMAT_VERSION(0, 8, 6), CurrentSchema) + std::make_pair(FORMAT_VERSION(0, 8, 6), QStringLiteral("://schema/pattern/v0.8.6.xsd")), + std::make_pair(FORMAT_VERSION(0, 8, 7), CurrentSchema) }; if (schemas.contains(ver)) @@ -481,6 +482,10 @@ void VPatternConverter::ApplyPatches() ValidateXML(XSDSchema(FORMAT_VERSION(0, 8, 6))); Q_FALLTHROUGH(); case (FORMAT_VERSION(0, 8, 6)): + ToV0_8_7(); + ValidateXML(XSDSchema(FORMAT_VERSION(0, 8, 7))); + Q_FALLTHROUGH(); + case (FORMAT_VERSION(0, 8, 7)): break; default: InvalidVersion(m_ver); @@ -498,7 +503,7 @@ void VPatternConverter::DowngradeToCurrentMaxVersion() bool VPatternConverter::IsReadOnly() const { // Check if attribute readOnly was not changed in file format - Q_STATIC_ASSERT_X(VPatternConverter::PatternMaxVer == FORMAT_VERSION(0, 8, 6), + Q_STATIC_ASSERT_X(VPatternConverter::PatternMaxVer == FORMAT_VERSION(0, 8, 7), "Check attribute readOnly."); // Possibly in future attribute readOnly will change position etc. @@ -1128,6 +1133,16 @@ void VPatternConverter::ToV0_8_6() Save(); } +//--------------------------------------------------------------------------------------------------------------------- +void VPatternConverter::ToV0_8_7() +{ + // TODO. Delete if minimal supported version is 0.8.7 + Q_STATIC_ASSERT_X(VPatternConverter::PatternMinVer < FORMAT_VERSION(0, 8, 7), + "Time to refactor the code."); + SetVersion(QStringLiteral("0.8.7")); + Save(); +} + //--------------------------------------------------------------------------------------------------------------------- void VPatternConverter::TagUnitToV0_2_0() { diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index 944820654..1adaabee3 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -53,7 +53,7 @@ public: static const QString PatternMaxVerStr; static const QString CurrentSchema; static Q_DECL_CONSTEXPR const int PatternMinVer = FORMAT_VERSION(0, 1, 4); - static Q_DECL_CONSTEXPR const int PatternMaxVer = FORMAT_VERSION(0, 8, 6); + static Q_DECL_CONSTEXPR const int PatternMaxVer = FORMAT_VERSION(0, 8, 7); protected: virtual int MinVer() const override; @@ -129,6 +129,7 @@ private: void ToV0_8_4(); void ToV0_8_5(); void ToV0_8_6(); + void ToV0_8_7(); void TagUnitToV0_2_0(); void TagIncrementToV0_2_0(); diff --git a/src/libs/vdxf/dxiface.cpp b/src/libs/vdxf/dxiface.cpp index fb7b743ef..88372d63f 100644 --- a/src/libs/vdxf/dxiface.cpp +++ b/src/libs/vdxf/dxiface.cpp @@ -43,9 +43,12 @@ bool dx_iface::fileExport(bool binary) void dx_iface::writeEntity(DRW_Entity* e){ switch (e->eType) { - case DRW::POINT: + case DRW::POINT: dxfW->writePoint(static_cast(e)); break; + case DRW::ASTMNOTCH: + dxfW->writeASTMNotch(static_cast(e)); + break; case DRW::LINE: dxfW->writeLine(static_cast(e)); break; @@ -283,6 +286,107 @@ void dx_iface::AddAAMAHeaderData() cData.headerC.addStr("$CLAYER", "1", 8); // Current layer name } +void dx_iface::AddASTMLayers() +{ + DRW_Layer layer; + + layer.name = '1';// piece boundary + layer.color = DRW::black; + cData.layers.push_back(layer); + + // Do not support +// layer.name = '2';// turn points +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + // Do not support +// layer.name = '3';// curve points +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + layer.name = '4';// V-notch and slit notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + // Do not support +// layer.name = '5';// grade reference and alternate grade reference line(s) +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + // Do not support +// layer.name = '6';// mirror line +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + layer.name = '7';// grainline + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = '8';// internal line(s) + layer.color = DRW::black; + cData.layers.push_back(layer); + + // Do not support +// layer.name = '9';// stripe reference line(s) +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + // Do not support +// layer.name = '10';// plaid reference line(s) +// layer.color = DRW::black; +// cData.layers.push_back(layer); + + layer.name = "11";// internal cutout(s) + layer.color = DRW::black; + cData.layers.push_back(layer); + + // Layer 12 intentionally left blank by the standard + + layer.name = "13";// drill holes + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "14";// sew line(s) + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "15";// annotation text + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "80";// T-notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "81";// castle notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "82";// check notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "83";// U-notch + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "84";// piece boundary quality validation curves + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "85";// internal lines quality validation curves + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "86";// internal cutouts quality validation curves + layer.color = DRW::black; + cData.layers.push_back(layer); + + layer.name = "87";// sew lines quality validation curves + layer.color = DRW::black; + cData.layers.push_back(layer); +} + void dx_iface::AddDefLayers() { DRW_Layer defLayer; diff --git a/src/libs/vdxf/dxiface.h b/src/libs/vdxf/dxiface.h index 15adc34f3..78c9b11d2 100644 --- a/src/libs/vdxf/dxiface.h +++ b/src/libs/vdxf/dxiface.h @@ -124,6 +124,7 @@ public: void AddDefLayers(); void AddAAMALayers(); void AddAAMAHeaderData(); + void AddASTMLayers(); private: Q_DISABLE_COPY(dx_iface) diff --git a/src/libs/vdxf/libdxfrw/drw_entities.cpp b/src/libs/vdxf/libdxfrw/drw_entities.cpp index 8f2c8a677..1450a07dc 100644 --- a/src/libs/vdxf/libdxfrw/drw_entities.cpp +++ b/src/libs/vdxf/libdxfrw/drw_entities.cpp @@ -224,6 +224,18 @@ void DRW_Point::parseCode(int code, dxfReader *reader){ } } +void DRW_ASTMNotch::parseCode(int code, dxfReader *reader) +{ + switch (code) { + case 50: + angle = reader->getDouble(); + break; + default: + DRW_Point::parseCode(code, reader); + break; + } +} + void DRW_Line::parseCode(int code, dxfReader *reader){ switch (code) { case 11: diff --git a/src/libs/vdxf/libdxfrw/drw_entities.h b/src/libs/vdxf/libdxfrw/drw_entities.h index 1b4719a94..667007d2a 100644 --- a/src/libs/vdxf/libdxfrw/drw_entities.h +++ b/src/libs/vdxf/libdxfrw/drw_entities.h @@ -80,6 +80,7 @@ namespace DRW { VIEWPORT, // WIPEOUT, //WIPEOUTVARIABLE XLINE, + ASTMNOTCH, // ASTM NOTCH UNKNOWN }; @@ -251,6 +252,22 @@ public: // the UCS in effect when the point was drawn }; + +class DRW_ASTMNotch : public DRW_Point { + SETENTFRIENDS +public: + DRW_ASTMNotch() + { + eType = DRW::ASTMNOTCH; + } + +protected: + void parseCode(int code, dxfReader *reader); + +public: + double angle{0}; /*!< angle, code 50 */ +}; + //! Class to handle line entity /*! * Class to handle line entity diff --git a/src/libs/vdxf/libdxfrw/libdxfrw.cpp b/src/libs/vdxf/libdxfrw/libdxfrw.cpp index 3f775a573..3f74513ba 100644 --- a/src/libs/vdxf/libdxfrw/libdxfrw.cpp +++ b/src/libs/vdxf/libdxfrw/libdxfrw.cpp @@ -553,6 +553,15 @@ bool dxfRW::writePoint(DRW_Point *ent) { return true; } +bool dxfRW::writeASTMNotch(DRW_ASTMNotch *ent) +{ + writePoint(ent); + writer->writeDouble(50, ent->angle); + writer->writeDouble(39, ent->thickness); // Defined, but not used in point + + return true; +} + bool dxfRW::writeLine(DRW_Line *ent) { writer->writeString(0, "LINE"); writeEntity(ent); diff --git a/src/libs/vdxf/libdxfrw/libdxfrw.h b/src/libs/vdxf/libdxfrw/libdxfrw.h index 6e3e17679..fa20baced 100644 --- a/src/libs/vdxf/libdxfrw/libdxfrw.h +++ b/src/libs/vdxf/libdxfrw/libdxfrw.h @@ -47,6 +47,7 @@ public: bool writeVport(DRW_Vport *ent); bool writeAppId(DRW_AppId *ent); bool writePoint(DRW_Point *ent); + bool writeASTMNotch(DRW_ASTMNotch *ent); bool writeLine(DRW_Line *ent); bool writeRay(DRW_Ray *ent); bool writeXline(DRW_Xline *ent); diff --git a/src/libs/vdxf/vdxfengine.cpp b/src/libs/vdxf/vdxfengine.cpp index af8f5546b..f023ea186 100644 --- a/src/libs/vdxf/vdxfengine.cpp +++ b/src/libs/vdxf/vdxfengine.cpp @@ -55,6 +55,23 @@ static const qreal AAMATextHeight = 2.5; +namespace +{ +QVector PieceOutline(const VLayoutPiece &detail) +{ + QVector outline; + if (detail.IsSeamAllowance() && not detail.IsSeamAllowanceBuiltIn()) + { + outline = detail.GetMappedSeamAllowancePoints(); + } + else + { + outline = detail.GetMappedContourPoints(); + } + return outline; +} +} + //--------------------------------------------------------------------------------------------------------------------- static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures() { @@ -570,6 +587,30 @@ void VDxfEngine::setInsunits(const VarInsunits &var) varInsunits = var; } +//--------------------------------------------------------------------------------------------------------------------- +qreal VDxfEngine::GetXScale() const +{ + return m_xscale; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::SetXScale(const qreal &xscale) +{ + m_xscale = xscale; +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal VDxfEngine::GetYScale() const +{ + return m_yscale; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::SetYScale(const qreal &yscale) +{ + m_yscale = yscale; +} + //--------------------------------------------------------------------------------------------------------------------- QT_WARNING_PUSH QT_WARNING_DISABLE_GCC("-Wswitch-default") @@ -623,9 +664,9 @@ bool VDxfEngine::ExportToAAMA(const QVector &details) } input->AddAAMALayers(); - ExportAAMAGlobalText(input, details); + ExportStyleSystemText(input, details); - for(auto &detail : details) + for(auto detail : details) { dx_ifaceBlock *detailBlock = new dx_ifaceBlock(); @@ -638,12 +679,14 @@ bool VDxfEngine::ExportToAAMA(const QVector &details) detailBlock->name = blockName.toStdString(); detailBlock->layer = '1'; + detail.Scale(m_xscale, m_yscale); + ExportAAMAOutline(detailBlock, detail); ExportAAMADraw(detailBlock, detail); ExportAAMAIntcut(detailBlock, detail); ExportAAMANotch(detailBlock, detail); ExportAAMAGrainline(detailBlock, detail); - ExportAAMAText(detailBlock, detail); + ExportPieceText(detailBlock, detail); ExportAAMADrill(detailBlock, detail); input->AddBlock(detailBlock); @@ -661,17 +704,7 @@ bool VDxfEngine::ExportToAAMA(const QVector &details) //--------------------------------------------------------------------------------------------------------------------- void VDxfEngine::ExportAAMAOutline(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) { - QVector outline; - if (detail.IsSeamAllowance() && not detail.IsSeamAllowanceBuiltIn()) - { - outline = detail.GetMappedSeamAllowancePoints(); - } - else - { - outline = detail.GetMappedContourPoints(); - } - - DRW_Entity *e = AAMAPolygon(outline, QChar('1'), true); + DRW_Entity *e = AAMAPolygon(PieceOutline(detail), QChar('1'), true); if (e) { detailBlock->ent.push_back(e); @@ -761,20 +794,20 @@ void VDxfEngine::ExportAAMAGrainline(dx_ifaceBlock *detailBlock, const VLayoutPi } //--------------------------------------------------------------------------------------------------------------------- -void VDxfEngine::ExportAAMAText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +void VDxfEngine::ExportPieceText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) { const QStringList list = detail.GetPieceText(); const QPointF startPos = detail.GetPieceTextPosition(); for (int i = 0; i < list.size(); ++i) { - QPointF pos(startPos.x(), startPos.y() - ToPixel(AAMATextHeight, varInsunits)*(list.size() - i-1)); + QPointF pos(startPos.x(), startPos.y() - ToPixel(AAMATextHeight * m_yscale, varInsunits)*(list.size() - i-1)); detailBlock->ent.push_back(AAMAText(pos, list.at(i), QChar('1'))); } } //--------------------------------------------------------------------------------------------------------------------- -void VDxfEngine::ExportAAMAGlobalText(const QSharedPointer &input, const QVector &details) +void VDxfEngine::ExportStyleSystemText(const QSharedPointer &input, const QVector &details) { for(auto &detail : details) { @@ -783,7 +816,8 @@ void VDxfEngine::ExportAAMAGlobalText(const QSharedPointer &input, con { for (int j = 0; j < strings.size(); ++j) { - QPointF pos(0, getSize().height() - ToPixel(AAMATextHeight, varInsunits)*(strings.size() - j-1)); + QPointF pos(0, getSize().height() - + ToPixel(AAMATextHeight * m_yscale, varInsunits)*(strings.size() - j-1)); input->AddEntity(AAMAText(pos, strings.at(j), QChar('1'))); } return; @@ -812,6 +846,263 @@ void VDxfEngine::ExportAAMADrill(dx_ifaceBlock *detailBlock, const VLayoutPiece } } +//--------------------------------------------------------------------------------------------------------------------- +bool VDxfEngine::ExportToASTM(const QVector &details) +{ + if (size.isValid() == false) + { + qWarning()<<"VDxfEngine::begin(), size is not valid"; + return false; + } + + input = QSharedPointer(new dx_iface(getFileNameForLocale(), m_version, varMeasurement, + varInsunits)); + + input->AddAAMAHeaderData(); + if (m_version > DRW::AC1009) + { + input->AddDefLayers(); + } + input->AddASTMLayers(); + + ExportStyleSystemText(input, details); + + for(auto detail : details) + { + dx_ifaceBlock *detailBlock = new dx_ifaceBlock(); + + QString blockName = detail.GetName(); + if (m_version <= DRW::AC1009) + { + blockName.replace(' ', '_'); + } + + detailBlock->name = blockName.toStdString(); + detailBlock->layer = '1'; + + detail.Scale(m_xscale, m_yscale); + + ExportASTMPieceBoundary(detailBlock, detail); + ExportASTMSewLine(detailBlock, detail); + ExportASTMInternalLine(detailBlock, detail); + ExportASTMInternalCutout(detailBlock, detail); + ExportASTMNotch(detailBlock, detail); + ExportAAMAGrainline(detailBlock, detail); + ExportPieceText(detailBlock, detail); + ExportASTMDrill(detailBlock, detail); + ExportASTMAnnotationText(detailBlock, detail); + + input->AddBlock(detailBlock); + + DRW_Insert *insert = new DRW_Insert(); + insert->name = blockName.toStdString(); + insert->layer = '1'; + + input->AddEntity(insert); + } + + return input->fileExport(m_binary); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMPieceBoundary(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + QVector pieceBoundary = PieceOutline(detail); + + // Piece boundary + DRW_Entity *e = AAMAPolygon(PieceOutline(detail), QChar('1'), true); + if (e) + { + detailBlock->ent.push_back(e); + } + + // Piece boundary quality validation curves + DRW_Entity *q = AAMAPolygon(PieceOutline(detail), "84", true); + if (q) + { + detailBlock->ent.push_back(q); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMSewLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + if (not detail.IsHideMainPath() && not detail.IsSeamAllowanceBuiltIn()) + { + QVector sewLine = detail.GetMappedContourPoints(); + + // Sew lines + if (DRW_Entity *e = AAMAPolygon(sewLine, "14", true)) + { + detailBlock->ent.push_back(e); + } + + // Sew lines quality validation curves + if (DRW_Entity *e = AAMAPolygon(sewLine, "87", true)) + { + detailBlock->ent.push_back(e); + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMInternalLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + const QVector> drawIntCut = detail.InternalPathsForCut(false); + for(auto &intCut : drawIntCut) + { + // Internal line + if (DRW_Entity *e = AAMAPolygon(intCut, QChar('8'), false)) + { + detailBlock->ent.push_back(e); + } + + // Internal lines quality validation curves + if (DRW_Entity *e = AAMAPolygon(intCut, "85", false)) + { + detailBlock->ent.push_back(e); + } + } + + const QVector labels = detail.GetPlaceLabels(); + for(auto &label : labels) + { + if (label.type != PlaceLabelType::Doubletree && label.type != PlaceLabelType::Button + && label.type != PlaceLabelType::Circle) + { + for(auto &p : qAsConst(label.shape)) + { + // Internal line (placelabel) + if (DRW_Entity *e = AAMAPolygon(p, QChar('8'), false)) + { + detailBlock->ent.push_back(e); + } + + // Internal lines quality validation curves + if (DRW_Entity *e = AAMAPolygon(p, "85", false)) + { + detailBlock->ent.push_back(e); + } + } + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMInternalCutout(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + QVector> drawIntCut = detail.InternalPathsForCut(true); + for(auto &intCut : drawIntCut) + { + // Internal cutout + if (DRW_Entity *e = AAMAPolygon(intCut, "11", false)) + { + detailBlock->ent.push_back(e); + } + + // Internal cutouts quality validation curves + if (DRW_Entity *e = AAMAPolygon(intCut, "86", false)) + { + detailBlock->ent.push_back(e); + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMAnnotationText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + QString name = detail.GetName(); + QPointF textPos = detail.VLayoutPiece::DetailBoundingRect().center(); + + QPointF pos(textPos.x(), textPos.y() - ToPixel(AAMATextHeight, varInsunits)); + detailBlock->ent.push_back(AAMAText(pos, name, "15")); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMDrill(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + const QVector labels = detail.GetPlaceLabels(); + + for(auto &label : labels) + { + if (label.type == PlaceLabelType::Doubletree || label.type == PlaceLabelType::Button + || label.type == PlaceLabelType::Circle) + { + const QPointF center = detail.GetMatrix().map(label.center); + DRW_Point *point = new DRW_Point(); + point->basePoint = DRW_Coord(FromPixel(center.x(), varInsunits), + FromPixel(getSize().height() - center.y(), varInsunits), 0); + point->layer = "13"; + + detailBlock->ent.push_back(point); + + // TODO. Investigate drill category +// QPointF pos(center.x(), center.y() - ToPixel(AAMATextHeight, varInsunits)); +// detailBlock->ent.push_back(AAMAText(pos, category, "13")); + } + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfEngine::ExportASTMNotch(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail) +{ + if (detail.IsSeamAllowance()) + { + const QVector passmarks = detail.GetPassmarks(); + for(auto &passmark : passmarks) + { + DRW_ASTMNotch *notch = new DRW_ASTMNotch(); + const QPointF center = passmark.baseLine.p1(); + + notch->basePoint = DRW_Coord(FromPixel(center.x(), varInsunits), + FromPixel(getSize().height() - center.y(), varInsunits), + FromPixel(passmark.baseLine.length(), varInsunits)); + + notch->angle = passmark.baseLine.angle(); + + if (passmark.type == PassmarkLineType::OneLine || passmark.type == PassmarkLineType::TwoLines + || passmark.type == PassmarkLineType::ThreeLines) + { // Slit notch + notch->layer = "4"; + } + else if (passmark.type == PassmarkLineType::VMark || passmark.type == PassmarkLineType::VMark2) + { + QLineF boundaryLine = QLineF(passmark.lines.first().p2(), passmark.lines.last().p2()); + notch->thickness = FromPixel(boundaryLine.length(), varInsunits); // width + + notch->layer = "4"; + } + else if (passmark.type == PassmarkLineType::TMark) + { + qreal width = FromPixel(passmark.lines.last().length(), varInsunits); + notch->thickness = FromPixel(width, varInsunits); + + notch->layer = "80"; + } + else if (passmark.type == PassmarkLineType::BoxMark) + { + QPointF start = passmark.lines.first().p1(); + QPointF end = passmark.lines.last().p2(); + + notch->layer = "81"; + + notch->thickness = FromPixel(QLineF(start, end).length(), varInsunits); + } + else if (passmark.type == PassmarkLineType::UMark) + { + QPointF start = passmark.lines.first().p1(); + QPointF end = passmark.lines.last().p2(); + + notch->thickness = FromPixel(QLineF(start, end).length(), varInsunits); + + notch->layer = "83"; + } + + detailBlock->ent.push_back(notch); + } + } +} + //--------------------------------------------------------------------------------------------------------------------- DRW_Entity *VDxfEngine::AAMAPolygon(const QVector &polygon, const QString &layer, bool forceClosed) { diff --git a/src/libs/vdxf/vdxfengine.h b/src/libs/vdxf/vdxfengine.h index 0c8c261e3..de1e8d0bf 100644 --- a/src/libs/vdxf/vdxfengine.h +++ b/src/libs/vdxf/vdxfengine.h @@ -92,6 +92,12 @@ public: void setMeasurement(const VarMeasurement &var); void setInsunits(const VarInsunits &var); + qreal GetXScale() const; + void SetXScale(const qreal &xscale); + + qreal GetYScale() const; + void SetYScale(const qreal &yscale); + private: Q_DISABLE_COPY(VDxfEngine) QSize size; @@ -104,6 +110,8 @@ private: VarMeasurement varMeasurement; VarInsunits varInsunits; DRW_Text *textBuffer; + qreal m_xscale{1}; + qreal m_yscale{1}; Q_REQUIRED_RESULT double FromPixel(double pix, const VarInsunits &unit) const; Q_REQUIRED_RESULT double ToPixel(double val, const VarInsunits &unit) const; @@ -114,10 +122,19 @@ private: void ExportAAMAIntcut(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); void ExportAAMANotch(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); void ExportAAMAGrainline(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); - void ExportAAMAText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); - void ExportAAMAGlobalText(const QSharedPointer &input, const QVector &details); + void ExportPieceText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportStyleSystemText(const QSharedPointer &input, const QVector &details); void ExportAAMADrill(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + bool ExportToASTM(const QVector &details); + void ExportASTMPieceBoundary(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMSewLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMInternalLine(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMInternalCutout(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMAnnotationText(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMDrill(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + void ExportASTMNotch(dx_ifaceBlock *detailBlock, const VLayoutPiece &detail); + Q_REQUIRED_RESULT DRW_Entity *AAMAPolygon(const QVector &polygon, const QString &layer, bool forceClosed); Q_REQUIRED_RESULT DRW_Entity *AAMALine(const QLineF &line, const QString &layer); Q_REQUIRED_RESULT DRW_Entity *AAMAText(const QPointF &pos, const QString &text, const QString &layer); diff --git a/src/libs/vdxf/vdxfpaintdevice.cpp b/src/libs/vdxf/vdxfpaintdevice.cpp index a45414e96..23622d211 100644 --- a/src/libs/vdxf/vdxfpaintdevice.cpp +++ b/src/libs/vdxf/vdxfpaintdevice.cpp @@ -162,6 +162,40 @@ void VDxfPaintDevice::setInsunits(const VarInsunits &var) engine->setInsunits(var); } +//--------------------------------------------------------------------------------------------------------------------- +qreal VDxfPaintDevice::GetXScale() const +{ + return engine->GetYScale(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfPaintDevice::SetXScale(const qreal &xscale) +{ + if (engine->isActive()) + { + qWarning("VDxfPaintDevice::SetXScale(), cannot set x scale while Dxf is being generated"); + return; + } + engine->SetXScale(xscale); +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal VDxfPaintDevice::GetYScale() const +{ + return engine->GetXScale(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VDxfPaintDevice::SetYScale(const qreal &yscale) +{ + if (engine->isActive()) + { + qWarning("VDxfPaintDevice::SetYScale(), cannot set y scale while Dxf is being generated"); + return; + } + engine->SetYScale(yscale); +} + //--------------------------------------------------------------------------------------------------------------------- bool VDxfPaintDevice::ExportToAAMA(const QVector &details) const { @@ -171,7 +205,16 @@ bool VDxfPaintDevice::ExportToAAMA(const QVector &details) const return res; } - //--------------------------------------------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------------------------------------------- +bool VDxfPaintDevice::ExportToASTM(const QVector &details) const +{ + engine->setActive(true); + const bool res = engine->ExportToASTM(details); + engine->setActive(false); + return res; +} + +//--------------------------------------------------------------------------------------------------------------------- int VDxfPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const { switch (metric) diff --git a/src/libs/vdxf/vdxfpaintdevice.h b/src/libs/vdxf/vdxfpaintdevice.h index e6fac0510..a78f762f8 100644 --- a/src/libs/vdxf/vdxfpaintdevice.h +++ b/src/libs/vdxf/vdxfpaintdevice.h @@ -66,7 +66,14 @@ public: void setMeasurement(const VarMeasurement &var); void setInsunits(const VarInsunits &var); + qreal GetXScale() const; + void SetXScale(const qreal &xscale); + + qreal GetYScale() const; + void SetYScale(const qreal &yscale); + bool ExportToAAMA(const QVector &details) const; + bool ExportToASTM(const QVector &details) const; protected: virtual int metric(PaintDeviceMetric metric) const override; diff --git a/src/libs/vformat/vpatternrecipe.cpp b/src/libs/vformat/vpatternrecipe.cpp index 57f86b31d..6a2756448 100644 --- a/src/libs/vformat/vpatternrecipe.cpp +++ b/src/libs/vformat/vpatternrecipe.cpp @@ -37,6 +37,7 @@ #include "../vgeometry/vsplinepath.h" #include "../vgeometry/vcubicbezierpath.h" #include "../vtools/tools/drawTools/drawtools.h" +#include "../vpatterndb/calculator.h" namespace { @@ -88,7 +89,7 @@ VPatternRecipe::VPatternRecipe(VContainer *data, VAbstractPattern *pattern, QObj QDomElement recipeElement = createElement(QStringLiteral("recipe")); recipeElement.appendChild(createComment(FileComment())); - SetAttribute(recipeElement, QStringLiteral("version"), QStringLiteral("1.0.0")); + SetAttribute(recipeElement, QStringLiteral("version"), QStringLiteral("1.1.0")); recipeElement.appendChild(Prerequisite()); recipeElement.appendChild(Content()); @@ -252,6 +253,8 @@ QDomElement VPatternRecipe::Content() content.appendChild(Draft(draw)); } + content.appendChild(FinalMeasurements()); + return content; } @@ -402,6 +405,46 @@ QT_WARNING_POP throw VExceptionInvalidHistory(tr("Can't create history record for the tool.")); } +//--------------------------------------------------------------------------------------------------------------------- +QDomElement VPatternRecipe::FinalMeasurements() +{ + QDomElement recipeFinalMeasurements = createElement(QStringLiteral("finalMeasurements")); + + const QVector measurements = m_pattern->GetFinalMeasurements(); + + for (auto &m : measurements) + { + recipeFinalMeasurements.appendChild(FinalMeasurement(m)); + } + + return recipeFinalMeasurements; +} + +//--------------------------------------------------------------------------------------------------------------------- +QDomElement VPatternRecipe::FinalMeasurement(const VFinalMeasurement &fm) +{ + QDomElement recipeFinalMeasurement = createElement(QStringLiteral("finalMeasurement")); + + SetAttribute(recipeFinalMeasurement, QStringLiteral("description"), fm.description); + SetAttribute(recipeFinalMeasurement, QStringLiteral("name"), fm.name); + SetAttribute(recipeFinalMeasurement, QStringLiteral("formula"), fm.formula); // TODO: localize + + QScopedPointer cal(new Calculator()); + const qreal result = cal->EvalFormula(m_data->DataVariables(), fm.formula); + if (qIsInf(result) || qIsNaN(result)) + { + const QString errorMsg = QString("%1\n\n%1").arg(tr("Reading final measurements error."), + tr("Value for final measurtement '%1' is infinite or NaN. " + "Please, check your calculations.").arg(fm.name)); + qApp->IsPedantic() ? throw VException(errorMsg) : + qWarning() << VAbstractApplication::patternMessageSignature + errorMsg; + } + + SetAttribute(recipeFinalMeasurement, QStringLiteral("value"), result); + + return recipeFinalMeasurement; +} + //--------------------------------------------------------------------------------------------------------------------- QDomElement VPatternRecipe::BasePoint(const VToolRecord &record) { diff --git a/src/libs/vformat/vpatternrecipe.h b/src/libs/vformat/vpatternrecipe.h index 3beb05267..4b53304a2 100644 --- a/src/libs/vformat/vpatternrecipe.h +++ b/src/libs/vformat/vpatternrecipe.h @@ -37,6 +37,7 @@ class VIncrement; class VToolRecord; class VFormula; class VAbstractOperation; +struct VFinalMeasurement; class VPatternRecipe : public VDomDocument { @@ -65,6 +66,9 @@ private: QDomElement Draft(const QDomElement &draft); QDomElement Step(const VToolRecord &tool); + QDomElement FinalMeasurements(); + QDomElement FinalMeasurement(const VFinalMeasurement &fm); + QDomElement BasePoint(const VToolRecord &record); QDomElement EndLine(const VToolRecord &record); QDomElement Line(const VToolRecord &record); diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index 649a4af02..ff7eef16b 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -51,7 +51,7 @@ const quint32 VAbstractPieceData::streamHeader = 0x05CDD73A; // CRC-32Q string "VAbstractPieceData" const quint16 VAbstractPieceData::classVersion = 2; -const qreal maxL = 2.5; +const qreal maxL = 3.5; const qreal VSAPoint::passmarkFactor = 0.5; const qreal VSAPoint::maxPassmarkLength = (10/*mm*/ / 25.4) * PrintDPI; diff --git a/src/libs/vlayout/vbank.cpp b/src/libs/vlayout/vbank.cpp index 32a72881c..1df82536c 100644 --- a/src/libs/vlayout/vbank.cpp +++ b/src/libs/vlayout/vbank.cpp @@ -29,6 +29,7 @@ #include "vbank.h" #include +#include #include "../vmisc/diagnostic.h" #include "../vmisc/vabstractapplication.h" @@ -334,8 +335,9 @@ bool VBank::PrepareUnsorted() const qint64 square = details.at(i).Square(); if (square <= 0) { - qCCritical(lBank, "Preparing data for layout error: Detail '%s' square <= 0", - qUtf8Printable(details.at(i).GetName())); + qCCritical(lBank) << VAbstractApplication::patternMessageSignature + + tr("Preparing data for layout error: Detail '%1' square <= 0") + .arg(details.at(i).GetName()); prepare = false; return prepare; } @@ -358,14 +360,16 @@ bool VBank::PrepareDetails() { if (layoutWidth <= 0) { - qCCritical(lBank, "Preparing data for layout error: Layout paper sheet <= 0"); + qCCritical(lBank) << VAbstractApplication::patternMessageSignature + + tr("Preparing data for layout error: Layout paper sheet <= 0"); prepare = false; return prepare; } if (details.isEmpty()) { - qCCritical(lBank, "Preparing data for layout error: List of details is empty"); + qCCritical(lBank) << VAbstractApplication::patternMessageSignature + + tr("Preparing data for layout error: List of details is empty"); prepare = false; return prepare; } diff --git a/src/libs/vlayout/vbank.h b/src/libs/vlayout/vbank.h index 7dd5a6c41..37b821e72 100644 --- a/src/libs/vlayout/vbank.h +++ b/src/libs/vlayout/vbank.h @@ -53,6 +53,7 @@ enum class Cases : qint8 { CaseThreeGroup = 0, CaseTwoGroup, CaseDesc, UnknownCa class VBank { + Q_DECLARE_TR_FUNCTIONS(VBank) public: VBank(); diff --git a/src/libs/vlayout/vcontour.cpp b/src/libs/vlayout/vcontour.cpp index 7a565e105..76fb6adce 100644 --- a/src/libs/vlayout/vcontour.cpp +++ b/src/libs/vlayout/vcontour.cpp @@ -278,8 +278,10 @@ QLineF VContour::GlobalEdge(int i) const const QLineF emptyEdge = EmptySheetEdge(); const qreal nShift = emptyEdge.length()/GlobalEdgesCount(); - edge = IsPortrait() ? QLineF(nShift*(i-1), emptyEdge.y1(), nShift*i, emptyEdge.y2()) : - QLineF(emptyEdge.x1(), nShift*(i-1), emptyEdge.x2(), nShift*i); + edge = IsPortrait() ? QLineF(nShift*(i-1) + emptyEdge.x1(), emptyEdge.y1(), + nShift*i + emptyEdge.x1(), emptyEdge.y2()) : + QLineF(emptyEdge.x1(), nShift*(i-1) + emptyEdge.y1(), + emptyEdge.x2(), nShift*i + emptyEdge.y1()); } else { @@ -445,7 +447,7 @@ bool VContour::IsPortrait() const QLineF VContour::EmptySheetEdge() const { const int offset = qRound(accuracyPointOnLine*4.); - const int layoutOffset = qCeil(d->layoutWidth - accuracyPointOnLine*4.); + const int layoutOffset = qCeil(d->layoutWidth - accuracyPointOnLine*2.); return IsPortrait() ? QLineF(offset, -layoutOffset, d->paperWidth-offset, -layoutOffset) : QLineF(-layoutOffset, offset, -layoutOffset, d->paperHeight-offset); } diff --git a/src/libs/vlayout/vlayoutgenerator.cpp b/src/libs/vlayout/vlayoutgenerator.cpp index db19d5bd8..c34d403c3 100644 --- a/src/libs/vlayout/vlayoutgenerator.cpp +++ b/src/libs/vlayout/vlayoutgenerator.cpp @@ -275,12 +275,7 @@ qreal VLayoutGenerator::LayoutEfficiency() const qreal efficiency = 0; if (not papers.isEmpty()) { - for(auto &paper : papers) - { - efficiency += paper.Efficiency(); - } - - efficiency /= papers.size(); + efficiency = MasterPage().Efficiency(); } return efficiency; } @@ -613,7 +608,7 @@ void VLayoutGenerator::UnitePages() } //--------------------------------------------------------------------------------------------------------------------- -void VLayoutGenerator::UniteDetails(int j, QList > &nDetails, qreal length, int i) +void VLayoutGenerator::UniteDetails(int j, QList > &nDetails, qreal length, int i) const { if ((j == 0 && nDetails.isEmpty()) || j >= nDetails.size()) {//First or new details in paper @@ -639,7 +634,7 @@ void VLayoutGenerator::UnitePapers(int j, QList &papersLength, qreal leng } //--------------------------------------------------------------------------------------------------------------------- -QList VLayoutGenerator::MoveDetails(qreal length, const QVector &details) +QList VLayoutGenerator::MoveDetails(qreal length, const QVector &details) const { if (qFuzzyIsNull(length)) { @@ -656,6 +651,87 @@ QList VLayoutGenerator::MoveDetails(qreal length, const QVector > nDetails; + qreal length = 0; + const int j = 0; // papers count. Always 1. + + for (int i = 0; i < papers.size(); ++i) + { + if (IsPortrait()) + { + int paperHeight = 0; + if (autoCropLength) + { + const QRectF rec = papers.at(i).DetailsBoundingRect(); + paperHeight = qRound(rec.y() + rec.height()); + } + else + { + paperHeight = papers.at(i).GetHeight(); + } + + if (i != papers.size()-1) + { + paperHeight = qRound(paperHeight + bank->GetLayoutWidth()*2); + } + + UniteDetails(j, nDetails, length, i); + length += paperHeight; + } + else + { + int paperWidth = 0; + if (autoCropLength) + { + const QRectF rec = papers.at(i).DetailsBoundingRect(); + paperWidth = qRound(rec.x() + rec.width()); + } + else + { + paperWidth = papers.at(i).GetWidth(); + } + + if (i != papers.size()-1) + { + paperWidth = qRound(paperWidth + bank->GetLayoutWidth()*2); + } + + UniteDetails(j, nDetails, length, i); + length += paperWidth; + } + } + + const int height = IsPortrait() ? qRound(length+accuracyPointOnLine*4) : PageHeight(); + const int width = IsPortrait() ? PageWidth() : qRound(length+accuracyPointOnLine*4); + + VLayoutPaper paper(height, width, bank->GetLayoutWidth()); + paper.SetShift(shift); + paper.SetPaperIndex(static_cast(0)); + paper.SetRotate(rotate); + paper.SetFollowGrainline(followGrainline); + paper.SetRotationNumber(rotationNumber); + paper.SetSaveLength(saveLength); + paper.SetDetails(nDetails.at(0)); + + return paper; +} + //--------------------------------------------------------------------------------------------------------------------- bool VLayoutGenerator::IsUnitePages() const { @@ -680,6 +756,18 @@ void VLayoutGenerator::SetSaveLength(bool value) saveLength = value; } +//--------------------------------------------------------------------------------------------------------------------- +bool VLayoutGenerator::IsPreferOneSheetSolution() const +{ + return preferOneSheetSolution; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VLayoutGenerator::SetPreferOneSheetSolution(bool value) +{ + preferOneSheetSolution = value; +} + //--------------------------------------------------------------------------------------------------------------------- bool VLayoutGenerator::GetAutoCropLength() const { diff --git a/src/libs/vlayout/vlayoutgenerator.h b/src/libs/vlayout/vlayoutgenerator.h index 2115140da..e7c4d011b 100644 --- a/src/libs/vlayout/vlayoutgenerator.h +++ b/src/libs/vlayout/vlayoutgenerator.h @@ -117,6 +117,9 @@ public: bool IsSaveLength() const; void SetSaveLength(bool value); + bool IsPreferOneSheetSolution() const; + void SetPreferOneSheetSolution(bool value); + bool IsUnitePages() const; void SetUnitePages(bool value); @@ -154,6 +157,7 @@ private: bool autoCropLength; bool autoCropWidth; bool saveLength; + bool preferOneSheetSolution{false}; bool unitePages; bool stripOptimizationEnabled; quint8 multiplier; @@ -167,9 +171,10 @@ private: void GatherPages(); void UnitePages(); - void UniteDetails(int j, QList > &nDetails, qreal length, int i); + void UniteDetails(int j, QList > &nDetails, qreal length, int i) const; void UnitePapers(int j, QList &papersLength, qreal length); - QList MoveDetails(qreal length, const QVector &details); + QList MoveDetails(qreal length, const QVector &details) const; + VLayoutPaper MasterPage() const; }; #endif // VLAYOUTGENERATOR_H diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp index e7a1fb53e..7d4fbb5cb 100644 --- a/src/libs/vlayout/vlayoutpiece.cpp +++ b/src/libs/vlayout/vlayoutpiece.cpp @@ -354,7 +354,7 @@ QVector ConvertPassmarks(const VPiece &piece, const VContainer } if (qApp->Settings()->IsDoublePassmark() - && not piece.IsHideMainPath() + && (qApp->Settings()->IsPieceShowMainPath() || not piece.IsHideMainPath()) && pData.isMainPathNode && pData.passmarkAngleType != PassmarkAngleType::Intersection && pData.passmarkAngleType != PassmarkAngleType::IntersectionOnlyLeft @@ -466,7 +466,8 @@ VLayoutPiece VLayoutPiece::Create(const VPiece &piece, vidtype id, const VContai qWarning() << VAbstractApplication::patternMessageSignature + errorMsg; } - det.SetCountourPoints(futureMainPath.result(), piece.IsHideMainPath()); + det.SetCountourPoints(futureMainPath.result(), + qApp->Settings()->IsPieceShowMainPath() ? false : piece.IsHideMainPath()); det.SetSeamAllowancePoints(futureSeamAllowance.result(), piece.IsSeamAllowance(), piece.IsSeamAllowanceBuiltIn()); det.SetInternalPaths(futureInternalPaths.result()); det.SetPassmarks(futurePassmarks.result()); @@ -543,6 +544,7 @@ QVector VLayoutPiece::Map(QVectormatrix.map(passmarks.at(i).baseLine); } return passmarks; @@ -828,6 +830,14 @@ void VLayoutPiece::Translate(qreal dx, qreal dy) d->matrix *= m; } +//--------------------------------------------------------------------------------------------------------------------- +void VLayoutPiece::Scale(qreal sx, qreal sy) +{ + QTransform m; + m.scale(sx, sy); + d->matrix *= m; +} + //--------------------------------------------------------------------------------------------------------------------- void VLayoutPiece::Rotate(const QPointF &originPoint, qreal degrees) { diff --git a/src/libs/vlayout/vlayoutpiece.h b/src/libs/vlayout/vlayoutpiece.h index f0471e84f..509bf18ac 100644 --- a/src/libs/vlayout/vlayoutpiece.h +++ b/src/libs/vlayout/vlayoutpiece.h @@ -126,6 +126,7 @@ public: void SetMirror(bool value); void Translate(qreal dx, qreal dy); + void Scale(qreal sx, qreal sy); void Rotate(const QPointF &originPoint, qreal degrees); void Mirror(const QLineF &edge); void Mirror(); diff --git a/src/libs/vlayout/vposter.cpp b/src/libs/vlayout/vposter.cpp index b278c564e..82069b214 100644 --- a/src/libs/vlayout/vposter.cpp +++ b/src/libs/vlayout/vposter.cpp @@ -124,7 +124,7 @@ VPoster::VPoster(const QPrinter *printer) } //--------------------------------------------------------------------------------------------------------------------- -QVector VPoster::Calc(const QRect &imageRect, int page, PageOrientation orientation) const +QVector VPoster::Calc(const QSize &imageRect, int page, PageOrientation orientation) const { QVector poster; @@ -390,7 +390,7 @@ int VPoster::CountColumns(int width, PageOrientation orientation) const } //--------------------------------------------------------------------------------------------------------------------- -PosterData VPoster::Cut(int i, int j, const QRect &imageRect, PageOrientation orientation) const +PosterData VPoster::Cut(int i, int j, const QSize &imageRect, PageOrientation orientation) const { Q_UNUSED(imageRect) @@ -431,7 +431,9 @@ QRect VPoster::PageRect() const if(printer->fullPage()) { - QMarginsF pMargins = printer->pageLayout().margins(); + QPageLayout layout = printer->pageLayout(); + layout.setUnits(QPageLayout::Millimeter); + QMarginsF pMargins = layout.margins(); QRectF newRect = rect.marginsRemoved(pMargins); const QRect pageRectFP(0, 0, qFloor(ToPixel(newRect.width())), qFloor(ToPixel(newRect.height()))); return pageRectFP; diff --git a/src/libs/vlayout/vposter.h b/src/libs/vlayout/vposter.h index 4860765f3..056b5fb3b 100644 --- a/src/libs/vlayout/vposter.h +++ b/src/libs/vlayout/vposter.h @@ -68,7 +68,7 @@ class VPoster public: explicit VPoster(const QPrinter *printer); - QVector Calc(const QRect &imageRect, int page, PageOrientation orientation) const; + QVector Calc(const QSize &imageRect, int page, PageOrientation orientation) const; QVector Tile(QGraphicsItem *parent, const PosterData &img, int sheets, const VWatermarkData &watermarkData, const QString &watermarkPath) const; @@ -84,7 +84,7 @@ private: int CountRows(int height, PageOrientation orientation) const; int CountColumns(int width, PageOrientation orientation) const; - PosterData Cut(int i, int j, const QRect &imageRect, PageOrientation orientation) const; + PosterData Cut(int i, int j, const QSize &imageRect, PageOrientation orientation) const; QRect PageRect() const; diff --git a/src/libs/vlayout/warnings.pri b/src/libs/vlayout/warnings.pri index f2b2a2224..2f715e3cc 100644 --- a/src/libs/vlayout/warnings.pri +++ b/src/libs/vlayout/warnings.pri @@ -45,7 +45,8 @@ unix { # Key -isystem disable checking errors in system headers. -isystem "$${OUT_PWD}/$${MOC_DIR}" \ -isystem "$${OUT_PWD}/$${RCC_DIR}" \ - $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + $$CLANG_DEBUG_CXXFLAGS \# See common.pri for more details. + -Wno-gnu-zero-variadic-macro-arguments\ # See macros qCCritical checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings QMAKE_CXXFLAGS += -Werror diff --git a/src/libs/vmisc/commandoptions.cpp b/src/libs/vmisc/commandoptions.cpp index 1a2eefe37..6499f46d5 100644 --- a/src/libs/vmisc/commandoptions.cpp +++ b/src/libs/vmisc/commandoptions.cpp @@ -53,6 +53,8 @@ const QString LONG_OPTION_BINARYDXF = QStringLiteral("bdxf"); const QString LONG_OPTION_TEXT2PATHS = QStringLiteral("text2paths"); const QString LONG_OPTION_EXPORTONLYDETAILS = QStringLiteral("exportOnlyDetails"); const QString LONG_OPTION_EXPORTSUCHDETAILS = QStringLiteral("exportSuchDetails"); +const QString LONG_OPTION_EXPXSCALE = QStringLiteral("xscale"); +const QString LONG_OPTION_EXPYSCALE = QStringLiteral("yscale"); const QString LONG_OPTION_CROP_LENGTH = QStringLiteral("crop"); const QString SINGLE_OPTION_CROP_LENGTH = QStringLiteral("c"); @@ -134,6 +136,7 @@ const QString LONG_OPTION_MANUAL_PRIORITY = QStringLiteral("manualPriority"); const QString LONG_OPTION_LANDSCAPE_ORIENTATION = QStringLiteral("landscapeOrientation"); const QString LONG_OPTION_NEST_QUANTITY = QStringLiteral("nestQuantity"); +const QString LONG_OPTION_PREFER_ONE_SHEET_SOLUTION = QStringLiteral("preferOneSheetSolution"); //--------------------------------------------------------------------------------------------------------------------- /** @@ -153,6 +156,8 @@ QStringList AllKeys() LONG_OPTION_TEXT2PATHS, LONG_OPTION_EXPORTONLYDETAILS, LONG_OPTION_EXPORTSUCHDETAILS, + LONG_OPTION_EXPXSCALE, + LONG_OPTION_EXPYSCALE, LONG_OPTION_CROP_LENGTH, SINGLE_OPTION_CROP_LENGTH, LONG_OPTION_CROP_WIDTH, LONG_OPTION_UNITE, SINGLE_OPTION_UNITE, @@ -189,6 +194,7 @@ QStringList AllKeys() LONG_OPTION_FOLLOW_GRAINLINE, LONG_OPTION_MANUAL_PRIORITY, LONG_OPTION_LANDSCAPE_ORIENTATION, - LONG_OPTION_NEST_QUANTITY + LONG_OPTION_NEST_QUANTITY, + LONG_OPTION_PREFER_ONE_SHEET_SOLUTION }; } diff --git a/src/libs/vmisc/commandoptions.h b/src/libs/vmisc/commandoptions.h index cd8c57ed5..a4737440e 100644 --- a/src/libs/vmisc/commandoptions.h +++ b/src/libs/vmisc/commandoptions.h @@ -50,6 +50,8 @@ extern const QString LONG_OPTION_BINARYDXF; extern const QString LONG_OPTION_TEXT2PATHS; extern const QString LONG_OPTION_EXPORTONLYDETAILS; extern const QString LONG_OPTION_EXPORTSUCHDETAILS; +extern const QString LONG_OPTION_EXPXSCALE; +extern const QString LONG_OPTION_EXPYSCALE; extern const QString LONG_OPTION_CROP_LENGTH; extern const QString SINGLE_OPTION_CROP_LENGTH; @@ -128,6 +130,7 @@ extern const QString LONG_OPTION_FOLLOW_GRAINLINE; extern const QString LONG_OPTION_MANUAL_PRIORITY; extern const QString LONG_OPTION_LANDSCAPE_ORIENTATION; extern const QString LONG_OPTION_NEST_QUANTITY; +extern const QString LONG_OPTION_PREFER_ONE_SHEET_SOLUTION; QStringList AllKeys(); diff --git a/src/libs/vmisc/compatibility.h b/src/libs/vmisc/compatibility.h index 982f3ed91..f00bdccf0 100644 --- a/src/libs/vmisc/compatibility.h +++ b/src/libs/vmisc/compatibility.h @@ -195,4 +195,27 @@ inline void AppendTo(Cont &container, const Input &input) #endif // QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) } +//--------------------------------------------------------------------------------------------------------------------- +template +inline bool SetIntersects(const QSet &set1, const QSet &set2) +{ +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) + return set1.intersects(set2); +#else + const bool otherIsBigger = set2.size() > set1.size(); + const QSet &smallestSet = otherIsBigger ? set1 : set2; + const QSet &biggestSet = otherIsBigger ? set2 : set1; + typename QSet::const_iterator i = smallestSet.cbegin(); + typename QSet::const_iterator e = smallestSet.cend(); + while (i != e) + { + if (biggestSet.contains(*i)) + return true; + ++i; + } + return false; + +#endif +} + #endif // COMPATIBILITY_H diff --git a/src/libs/vmisc/share/resources/icon.qrc b/src/libs/vmisc/share/resources/icon.qrc index ebd7ae48f..f4cff9ed5 100644 --- a/src/libs/vmisc/share/resources/icon.qrc +++ b/src/libs/vmisc/share/resources/icon.qrc @@ -85,5 +85,9 @@ icon/32x32/font_preferences.png icon/24x24/font_preferences@2x.png icon/24x24/font_preferences.png + icon/32x32/broken_link.png + icon/32x32/broken_link@2x.png + icon/32x32/link.png + icon/32x32/link@2x.png diff --git a/src/libs/vmisc/share/resources/icon/32x32/broken_link.png b/src/libs/vmisc/share/resources/icon/32x32/broken_link.png new file mode 100644 index 0000000000000000000000000000000000000000..e9eda1311efa3275fef208bf4f341fd2f3f2e259 GIT binary patch literal 1561 zcmV+!2Il#RP)0`ZQ7VfmCC4bDHxS?gj&=nwXvuy$^gSKfWvI}-qVMInrf2{de76%fB*ZR z?|$ce|3WZ@rGEDyHEW`Z1jbScVPgWQwQhfLkEQG^tb6loe115cPW0Zp_wC8gmT$I{oq=_4zBB*|cb!Pr>!)8!OG|;%>BPW*10f+HNJuci z?RMkxQp2M6N+ymf1d&DPqbQmK$QbA}~v z$1jT|0Z_2rs+k@Y`H~JP$z>UC)JqHlqIJHy&oJ$uTI9W>GfpF02a5j zV3ymx-IkM6f8o%fC;)JcjC^Px=tpw$3u+2+JpjDAwJIc9AGKDi)1vEc*ZtEKmMQ>f zFqt-yg$um^(2$W4{1IF*ne^)L@O`t5MslaMwYM=V>#fWROC>2io<1Wn{vARmq$tRl z$K%DNORdA>9?#;o6)SXs(b1};B}?+N-pb5|hHXJJppeUn+v(hW^TLH|nurLc zQmeH#W@oEU?OU<&ZdY$UA@p|u2*?>mM@B!W+Vfh(sS3+|zsvQBe%`!%M|ZdTkGi@; zoLp|hv#!RaOA{K+=C%K}XKgNOGZ@#)UqUIbh&bw+dZ zcz$V(g%YATRbe^u%GM*wP)*3k!@jYPn!i}%Zp_a9DtgYGEuPU)JQx}}NEka}Jb(Vz zpc#+}0yL44pU%(DPJiHZdc7kfmW<}+@z-}+4<;qftYHjk05I+c3DfCHll1We#bu{c zC@0(H=<2dYCM004$+STbgyJd5(A3mqcRQWCZ`9RYboKNYvYMKX7nE2xrlcmXHyGl; zz&HR`_VwBKIUEkmo}CmErJuVF0J55!zaG4P-7w`u zWNK)D>F7}aK<57aSoVHROn5}tbdSf2;bGTTXZNqX2LSVP52CN%Q`Tqi4}?z(gG|nu zCSxq`>l2?_E#QfulyNc$f&egff6{)lb^`$T7o;`1IT;s538#~$9CP$xSz>rf&q0_t zp)08xl8JtVk^j&x0b>9Gkp=*Go=vn~U?B7<2}MCEg~&uma|BG}CaEWcu_xcdFNy*P zk*FgYAN6$meSWA^D#&Dt9017NSr5h-mhGrc2n`L5@cDcQ1o$3F0JMC+P8b{*4E2Ie!m~Fv9ZwUG`Ms74%)9={qbaZ z(W?AiC#0Q@0l>KF2TrTjSqPBA7#=W?6SW6ccINN2;!K4ls91jkP!dr*{oQUr00000 LNkvXXu0mjfw71;L literal 0 HcmV?d00001 diff --git a/src/libs/vmisc/share/resources/icon/32x32/broken_link@2x.png b/src/libs/vmisc/share/resources/icon/32x32/broken_link@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7c709416c84348331a43d97f31bc71c668a60cf3 GIT binary patch literal 4495 zcmV;A5peE_P)Op?iGL!h-^)Y?*@v`O1do3ucoE%;**WkHtZV;2?0 z6|GhT>Y@U=tgf<)2nq;-MOO&4^uv}mX$%OZ71z?x+LAUOZSyf{GT--}^X?y$bg5$e zsZDgwKlA(Dx#!$7&wbzLJnzR4#$nWb>Sx&Ttq%eK>i^;ULY0;W*>dw`hJ~@%=!AX3 zEAhv7+}*%u&AI~1KKn4fcWv=_Yz>5Q8dI-(+L~M$I)@BhD!>a3FhK|*3~NnH?FQJ! zj4dzSzj6=8af~SdtJZ8l<5w@iC7)}YAc<}eO5Wl3`>kNmffEeC?{kn!B@mA%kw_$v zN~JPd>n}@XKl=PV7ahIy^Dkiiy(@Fu0xtXFOI2EXuZ8kLku%RYLlsAgL3HY4nE@ik zv12{x=;-ib@%Rp7_?8X#t=d1<`x9gJ<^f>E>c)v$dyV06xP1Dwsj4`V^=qv)5{V>Y zu^1AGB#hBu21-jKc>l~9DnFFhKoFZQyJKS|09^j1O}S?QtJZ7?F!OVvP;l9~=glE7 zLkNN6$9vG--Hli*4%c;I+ctv1Aj&JsQC3<4V+@SZ*uDErj>qFa@`nnpfA))u+?=t1 z^KNd;B1^bPO0jh6)X4+@mZi}CPCNGPYeQdO^d}k5yNZOkJe|p0)z{zuleT?rc&Gg^ zm>EJSOq_TYDXFeX3=Y&>_1Jctck_401OR!u7wq2kG#1|aeAtrw)kq{VwW6XN0C4zl z2M!%-k9nTCDSFuan_CrrbIaXJ+sZEb*lz}-iAKl9{u2X(%PdRU;cx*Q$3bsjpGc)r zg+1-Pjj#Uq_1;(jpvGd+up{yqJgcNM0wDyn_R!sZ6b%0N4fo&i1n?{1ne4sIUs?zN zX@nm6;i^woysxYC*qs#>6_8S*tgIA+LqqTPE4vUtGG|DT8Pj||JKqTe0009g29Zu@ zdOhuJ1XAxkDfR_+U2lCllfux@5CFh&92O)Zmd`p10C3k`IRXHoP$^|8l{K(*Dh&hO zk@UnNpzROL>H##hv*A67coNJE%eKg}lqG-y0KnR{IRk(Mh=>S81j8CIoc6h?)M)b( z#!iu-kYNKNf+PVD5rZVgXpEH$ND^7K!_32{EwQ$Oqt3JKq+n)SN(CZ7S_+<<2}+^j zIR$`V2E9vSuwgKP5l@b)J5*XoX7m{2!5F~JWMEl#%w_G%DF8@7FtTrc#0`j{+3)C4 zT|jvngaRQIgdq5AA6(CK6gZk&E?`(umIA=cFor=OhD?s?%YIi&0`ipJB88Fc8d09hAr!%l^JCQaV$Sn>q1R`;g5t$7DkSQ!0 z)dC7shzO{%ENhq)ZKTsF$5I%|F%BRJFl7yZKoDSt*VoxOYEa`E17=Pdqd`Ovf}oVe zWMofH0pKwVKs<5`GHVc#EIy-PR15Inifpccz|6>GTrk6Bt;=%D0*DgE7{kLnpt2_I zNMuHhJv{Pxb zFjq**bDSWU8Hsot+S73l)*Y2m`M?_F@gDGHBV zx5sn6*N^oahv#{)eKsacsD$5VT`iUSwfY+y^G5ES3t;iB&ldZXbx$Z5xVXBi3Pgl- zI*sVS0Ep4J`)KT>1+>=JXFu!e%Bw3XB7ZdiUaP4INZ=l6S&zTpaq3@~F~b`9?#Q9; z1Vj8FHWWKLFfagSMp01_s;jF>kyt@_90C3l0MK#89SHdCQX*VfRaHrO`FS8B96R2F zbUGaimIv=V{OA=Y6=cn}ZD_5pUk0VN19as-P*5-pL>I?h_w0A?Ys>*y)Y5|Hnwk;_ zu_iAPDLHe_98^r7KF#v`@5!_6N1E&EW;HHagqI($cTaHg?qnjlzU{3x6OBgUxh}vg z6q7{qTUoxm<_f?_Vq++scG1<v#66=QI?*3|5&*0&pk={=^IPldeP9{{#iS4;SOmrE%ZIE95oLZG<18fTqedE}2Yy_wBd$_jeyX1_Nehc)+b$tGM%Cu<#5Mp|i6S2M@lJ zOlLCRwk>P*_J``y0PxDPWw*e#pK`+CD<;pMFUqD)h2L=yE-xoi>OwmhTrqweaK;&s zfMH`^Ikta)=fPKBbvyU&1#6AU>C;hAQ85?H-_TN?3jka0y>zf+-@tA0c;@3nvDi*9 zqFNaR|97%{(J%$fEZOk!cr3oz0E_&<8rL&v0BCJ!sAbRlc5!v})QR)v0Yuo}+KOLq z+TWlUuDli3Q*XSfM*6sb=D0HV(ZF?gFg5|-}Ou8WQ>_pLl7^wq9= zL`eC+@o04RZ(Cd4R6O2eJa0EKzoavnt*$X$zZ@L=vtxzRQW)7YZmOIz?(KR*lre45t%WkW+=>yjm>WQA^-IPq^!3ir4!r0Wvo>C0ih0iZvTkQrkF z4^&m1wAjy_1{HYPTwv$ixp~6xpUy;!Nr;Oh@o`-ZIk!EA|0C*J4n_=5swVOBp*~Qa8`4reNcdlZ`xj_nXwNh%bFAyjR zMIu%~SsA2KIDYUTGJ}JaFs2GX*CXqm!xNjf+o8z7b%N+-2^A+Wk^vgD~)CiCR7mKJZ!IiUR5F&2PDQqC)%GNp3Tym?mT*=K`S~(D^^O zu=+U%0K80QHxbK_IC#(LZdI5$k6HnpIvtOSA} zNJF9XZU8{#(lY^1De#C)q`{j4MWY^u^lBs?9<)@kGvRGeVvv^6&)9gFo6^FIN=&fze5%mJv` zv12&%Yg*WKpHB`9Y;;qpkNZxXcwo^RZzP6O!N@R+}SFT zEr4$V047u=U_2w38OdZSn?MN$@xDnDp_ID5NTKH4&mYqIZV=s==UmdWZxjDhW=QD}Kbw`?-w$I(O=Oh8uefEF+fW9dhbgGI9!yqE`_4T8@{V;1| z)}>?dZs1b@fX;Pmk?9|5XJa0F=bd)1r>B>R2!(}VI6a3qL+t7g*NR-6uLaJIV7r_@J zp8)_ncB}<(7xrzr(e*SQPbL!mL$Pcw(Fr(^QU+a}`M`TUf5~YOS*N*0hKBipOQe(m z%d!{%rBZ2lp6=$T`8B@xFn0akytTuTpWdr&btIKc7aYM4IzZqjNIxEfFMl-9w~8UQDGP*Mhz1!PAeu7hRw;&5+X1NI=28|R@ooG?*_%B zGpSL3NRn8Obd-)1M~yL(0FzSy2qDaHU(hff3^0?0(JdgLT?rB*TT(ySVZsEFTL7>b zdGiJ%)n0(uCizFAwU7oIkB7NKYXg9^0oys|0>)%}#ONd~G9Xg+A8E}^M~O(3N||*5 zpU;Ntx&hmgIo2QnBL3Yg092a($Y%V+Y>sPfV2l}Vk+D)4?dFXY0Aq5#YGTSVAfGA^ zB#-LLmi8MSHkXm(lZTJQoU#C=jbS!y42Ij^1&Cm$HTy>e&KL6wz>&jUV$2K%vtV*_ z3IN*{d)&0^AL;aP90!1y=>!60C-Z&pH7^(}hY;01Ulu3NbK!Z~)y6%MQveJlSupW$ zdwcs}48!O1AruN~&v@6)yy1tw_iB1pGZzcP{NbPzC<+E0Ff(GY1dKLauED{a;s8&$ zJ)VcQ{%HS{($W&xwuREth>XQzH&sW9_Ju#!^pqD*#2hOQ4h9f2ef|=JuM`lUEG>;l zpU($l4Ep=~;d<_G2F!^u>l8ihUD)$Ky$(AcxH5hAqH6~-8TaaNI81>+0HII_mTlSb z*x(Z3#TEp89I`EYrp4YohkbY1()!q>NoR#BD=Q#`Kr|XfXJ=Pj8}BQ|p1sFDXDa%C zxp53mtT7t(pZRHF(6YaiUr=z>^yyQj-|vSp2GM8~$9sAai^W_o;~8Zu5ef#al9C9D zi;IWz2Pw3*wdsNA;4?a{KECl=%g2lZ#sq+iKKmRtef@G=y84AlAgn74htHclc@l!b zAV$Jt*LC4}9;8&TZ3|LLfPr`-jsph{A{rgorGYCq-na75@_${Ammat@cK~?zSoOIV z&o%LO6^qQ37hQ_a~cx$ZpC&zN} zm8)OG3-_<+omThJ&52}E4Gs)U8XSrR6Nxxd=`@mwB!-3t(bLn5&dx6G?mpU+Os5~x zhF7n@ch!NFYhJ|L%|9Ab0LJal)Act!Wc!LL&lAKe39^=%D}^9wjL}4*gV}61EH_EX zZ@l=m74CTLYg_=h@YCzC`9HEL)H$DcN`~1E1wwW{j26>ulo>9{Eg-b1N)1U<(^h4WTM<)?P18&I2aIBEOlqs4 zhL%fsY0@-(XwY8*N{d|5AFo6>aCs4Dm4|!Ec_vg0RkG zq9pNpN=iz;!x0N2V0LyEV`JmpVXhV`g7UPbrfBm8yjuM|ghjg?@3f2*6ug|Msu}`; z2>^i0l?YK3@n=u3f9!7|O%%uU?#B1m#Vf8?fWNC5*?W(ClD~Ub+2UdtJvVzhCMG8< z9?v}aYGPs{Ek53vnUIiRpBW#XyU}>Gd%e7ZkrKp2N530mkHI~kZ@R6vtk@do9B^)p zyW3VqU+wh>OrNU*F(F`A|$vKa0IfYvi_Ji`_i!hM{RM^WTtBb$;5pI!wL8h36IuviA+&JSlu`WNc^!e7=FHUO6kl%c4&3+oV6j-hIftsM zNKa40?c4o&FgWFste9%AsoeZs004z2nyZrBt_x151CdAs#0gt0Q3wVnwczATiMOG` zYuYkeIi6!br!yIiIoVm|oD=TdAN)ZiwYt6Gt$$Eu)Mq}t4kbPNp*W5hpNw={bJzu$j$aBv728R>|! z$~Eh~+^`3%HtQ>jq98aCyyb1E{K!8t`q$Xlc)z#t@Mpo`N+MO&>G$$1`r4U3FglMTJztMBN*f6y$9Gz;}Bcx zy+(MJ26F^(5CH@RVXY?_v8573nI=FDN2VELux+)y2ml?k9+ZD@bfrUfGA1AriHsOB zwvpg%dk)(j4#&Q@xL8|E=Kg|TufNo<+VY;u+5677xjVA+!{G=Xjf~Vi=(^Cg>67sF z55I#LXH{Ztu@83V?@H!eM<5UY0dTuq5CsuEH~U8C=U7H((}9R7yP)*cWiS%#q9R>O zNpa^p91Z}$?CcZx{iD6QrtKFv{nPU0`X`~`W#l<|6`gfO@SJFVjer6MA_Du}+i>W& hl8@VPrMA=%-+w6Lx0{>t(>(wH002ovPDHLkV1mbSD~JF9 literal 0 HcmV?d00001 diff --git a/src/libs/vmisc/share/resources/icon/32x32/link@2x.png b/src/libs/vmisc/share/resources/icon/32x32/link@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..46527dab9127e6cbd7fbabf202a33777e50fd8b5 GIT binary patch literal 3673 zcmV-f4yN&mP)Noy5D0YVMbMAfS|-Fwg3{o}n?KzhJG zuhzObzusHxzIXQd?ziWC2t&N4KlCceXwWn&I6}4v012?N;sbFb+WJPld+NkN9!hz{ zP;4^ik?n(@^Yg;r4h_dXllcR~R7VZddfyDt2PGwX+ZXSyU7CIF_9u1?2>_Jq4XSG! zkkI|)=g^&oA--u^*0e|@A|sIyS(e4jfNk3}5FOy?K-6&@_f5_G6F15YMufQW>6)C% zCv*Ad3%=8chNtJ@x~a<^m4^IYdHJyGtE#F*MMVV_7Um-yj!+~Lru_VT6qgiHK|z6J z)?*Th#8mRZZhX4t-33qXL(`#u^Bx0cJ+c$8t(%Vp-)VeUGp`#zVI0cK${~b+)*7zs z!f_k`fN7dA3KzUE~dth*O;SMHi) z8sf!KRilPqHM{~+N+c2qbab3YcUQMg*(nDg_E|owxTHvwl?_865P<8tICt(GPMto} z;wW0SxBm7+U;f4h9QpbE-eJJh$2JA?jpARFmJ}@>cguoLo60Q>bmY8 z7Wyc$WH3)QO`|#(3{DA#gx7~IB+v}F4Jmm!n1EqgS#EYxO zjE2wW0};^lX*1&ScpCzNscy3G$-WD*ZM}Vczv)fHz8esMsquKct*NOQARrhFV(i!| z5Mgm16;AS$8@%y>t3Mm1ETx1}3azbeNF48`BnYA)Z1I&z6$_9a%HNOi0n->1hm-&;04*~#`qu7)D5f}_+1~W5rk#`s{(9>-(^LZf%%na9YARwTWzH;QLDIa{%Jrf8*P?<02 z+MWTxGz5r1JjiMS5h)^euk>3cXd*Gl6b%i{Xiddp-cbQlkYI+9wE>zLnpuMR%KI^! z02`c%(g*}-hO!LrxIy?VWMbXtDg^SY$65~8iuKe2w*_DE{M>lTqh?CFmmyy4jV~>sUu}OU`_)N3I^ps zbl|2N9{=~3ha-QAkn}=nNl7Wd=<4d8RK2R9)p_UGr!tTJA`%HnDJ8VlupI}?e5Thd z@(u$cJtE1_N8<4WlyV`2KuK{iSw3raIpxjN%Dp)l@RyDrJrW~Fje^hTFDFvdWmqo` z1pGG^mz02rkW40#N+eRO=$*sQO!p1|JASoDlcxQ#c)Y8(w--c&qT(Wy6c?2mzy>05 zo0O8JlrW@#l%xTw@tNjR!%9o?!=VtE8QtAINT%#&_?*{0RSy7wXzasxT-W(^N5^@c zOe7(tL{(K4Dk{pa^7+hZ04N(LFd%$B|4mm_R+NnxF#=Lb^!N9pqoc#stY6yw)S?TX z0^qhsH{sCFo^+L>7khgzG<|mVER?HYnkGh%9);rKA_CHh5;*PaOG}GsL}evRGhH`4 zd#)AnMDlg5_10`g=@|g_Kf43~WAECU547TkTie<@PPVil7K>+!9KLLphjiM@naZ%l zg$w;Sd9sB&JG+kp;=6m+EV_Lx%rst?C##9l>S!3531i={i8RK%a!xa5Z0^#>gsU&id_@o!+j*^ zZYe}@C=|3NO_~TW@X^N~BN0!g9IaXe^ef9-I~qx7z`o-N4cBrlwM$~j0C@iHDQUWy zG3R%OjU!snF(%6DKt>QcId*KQd7#^;0bt{UBZfk>p#dPf4n4OJBh3RsXeJu8>S;r$ ziNz;pV)WKa3x`sqp#@;j>Ii@{xe^VgeE>yi$i*2_0H!^<6QAsRMiXCN^#g%H&~N^1 zKF@jL)jvM~zP{x!03cwv*6dXce+A%L8jNjp7J}=lAK(5J?ZN_p`t|D11b{Vb@Gpy} z;I>r_U$DqpXG!cdebyb!3`Vx{$FMBxZ-g)#e1`wIxvRE)p?0}UyHGC!uzJNGfVw)& zt=&1x64;zqkoVx2F{6u1i;K-nxie!51#C zI2^}8Fc?Ht)o2W_C@+^1&sIOuFe#VsDJKBzU0;m}_#KgHEGft@xNbycC8U(FZ5z$a z$I;#0!e-!Z79E&3$a= z^{=g)?;!xDe49)yZVmU}p66^rENtLYE`t*BLmVlqRh;m^HN0f|w6#S1;}D zz0lF!-2-MuVPPSHfnWs$O=T~sz^q$lnFHsuHB8flKj0Ta@QpM7afjs@0Cc~wKvZs->3*hC z3W<0^vCHp&xc=``d!DZOtya!A+s?JU-PYRid*$lojX#|C*1MY*E7mxiNFLQi24<0igP^ooJ|^|ErXCYn%a^-&kMsO7+Se8OO{C z*L8(v1`$C>69i!?F3O3lIq3_Cd_kPC?pb$70*U|)0K1==kLha;V1M0=ZUC4*{Q!2a zoskJlghPT{0;MU>41f$3OnAozXxo=D?wR(u)?m$s9^7vp4%W>WeE#6U8JC1+Y-naf zvrc~%1VEeG^=r=nAbbfTfG=kNxlG7pI1T?dcnnt%xr3c$%>W}QjHL7o0IYmqFkRXn zXU&Gte8ocug2BuNvfv2!WBa7oY=b6nO?0MteB0A|*39QF(V z#Nx7gUpn>IQh%=fSTeJ`I9&n|6Hy>1CLlLn09s|T-N7-b%t1ciuLTj~(iuZyz=U^Z zgxn~D37Ri?{{+$?e2&*BGy|M1nlb}IP)Sj+DDD{mOlcuA-FQ(ggdk=P4Z8L}Sz|LP zw15s1iL4G~hb7y3JI{J&Mkp9D958wu+lJN}QcCy(eh7$(;~x5jLH`SxkFT!=mc1dh zpzHm9AEY#(wT5Hc(9AuS^gEsbprtusGx(!qG6k&}LP!)B6$!&K{<0ViHx>JKi$Pn~RHzgp}#4HOXX319bGg&Q|YSnD}JdVhyd{iYMZI(P$Jx5DE(m z5DtgOSi=0#tjG6G{L;Ngjl&zJAo$DQV8%baC1*bIA7d=x|L0IBFrm1(2to)%qXUS? z;};y_Lw%bb&WRh$S*>ZteH(+}(vp{pON;KhW?cHpOe_||vEwHYjShV1*v@_s9R`R& ze1j?Ftn8JUNFB~6q;?lU%?n^ygJ!d;Q&O>XBa5#(! z#yx4-m~s@Z`B0%tz8IHq`0BJ=EurWt52M0Ip5N93jO{4V69C(kS8u5PTK|KmvmI%kK^DFd>rrnUir(0Pgulzr8Zc)+rZ8IeeYB9Smm z(*gmo9UIZ;0HVCwlm|G*H3lqFBl2tK_U=f rAgMW#jQjhVyE^Q)t@jS;_4)q>L;8$k7%FyX00000NkvXXu0mjf+=JUT literal 0 HcmV?d00001 diff --git a/src/libs/vmisc/vcommonsettings.cpp b/src/libs/vmisc/vcommonsettings.cpp index 1b9369cb3..5a4bfa8b4 100644 --- a/src/libs/vmisc/vcommonsettings.cpp +++ b/src/libs/vmisc/vcommonsettings.cpp @@ -238,6 +238,11 @@ VCommonSettings::VCommonSettings(Format format, Scope scope, const QString &orga :QSettings(format, scope, organization, application, parent) {} +//--------------------------------------------------------------------------------------------------------------------- +VCommonSettings::VCommonSettings(const QString &fileName, QSettings::Format format, QObject *parent) + :QSettings(fileName, format, parent) +{} + //--------------------------------------------------------------------------------------------------------------------- QString VCommonSettings::SharePath(const QString &shareItem) { diff --git a/src/libs/vmisc/vcommonsettings.h b/src/libs/vmisc/vcommonsettings.h index da65ccd61..26f5acd17 100644 --- a/src/libs/vmisc/vcommonsettings.h +++ b/src/libs/vmisc/vcommonsettings.h @@ -44,6 +44,7 @@ class VCommonSettings : public QSettings public: VCommonSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(), QObject *parent = nullptr); + VCommonSettings(const QString &fileName, Format format, QObject *parent = nullptr); static QString SharePath(const QString &shareItem); static QString MultisizeTablesPath(); diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index 12330741d..dbe6ff220 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -91,6 +91,8 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutNestQuantity, (QLatin1Stri Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutAutoCropLength, (QLatin1String("layout/autoCropLength"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutAutoCropWidth, (QLatin1String("layout/autoCropWidth"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutSaveLength, (QLatin1String("layout/saveLength"))) +Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutPreferOneSheetSolution, + (QLatin1String("layout/preferOneSheetSolution"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutUnitePages, (QLatin1String("layout/unitePages"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingFields, (QLatin1String("layout/fields"))) Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingIgnoreFields, (QLatin1String("layout/ignoreFields"))) @@ -137,6 +139,13 @@ VSettings::VSettings(Format format, Scope scope, const QString &organization, co qRegisterMetaTypeStreamOperators("QMarginsF"); } +//--------------------------------------------------------------------------------------------------------------------- +VSettings::VSettings(const QString &fileName, QSettings::Format format, QObject *parent) + :VCommonSettings(fileName, format, parent) +{ + qRegisterMetaTypeStreamOperators("QMarginsF"); +} + //--------------------------------------------------------------------------------------------------------------------- template inline T VSettings::ValueOrDef(const QString &setting, const T &defValue) const @@ -419,6 +428,24 @@ void VSettings::SetLayoutSaveLength(bool value) setValue(*settingLayoutSaveLength, value); } +//--------------------------------------------------------------------------------------------------------------------- +bool VSettings::GetLayoutPreferOneSheetSolution() const +{ + return value(*settingLayoutPreferOneSheetSolution, GetDefLayoutPreferOneSheetSolution()).toBool(); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool VSettings::GetDefLayoutPreferOneSheetSolution() +{ + return false; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VSettings::SetLayoutPreferOneSheetSolution(bool value) +{ + setValue(*settingLayoutPreferOneSheetSolution, value); +} + //--------------------------------------------------------------------------------------------------------------------- bool VSettings::GetLayoutUnitePages() const { diff --git a/src/libs/vmisc/vsettings.h b/src/libs/vmisc/vsettings.h index 47b8f831a..8b6d0aacd 100644 --- a/src/libs/vmisc/vsettings.h +++ b/src/libs/vmisc/vsettings.h @@ -45,6 +45,7 @@ class VSettings : public VCommonSettings public: VSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(), QObject *parent = nullptr); + VSettings(const QString &fileName, Format format, QObject *parent = nullptr); QString GetLabelLanguage() const; void SetLabelLanguage(const QString &value); @@ -109,6 +110,10 @@ public: static bool GetDefLayoutSaveLength(); void SetLayoutSaveLength(bool value); + bool GetLayoutPreferOneSheetSolution() const; + static bool GetDefLayoutPreferOneSheetSolution(); + void SetLayoutPreferOneSheetSolution(bool value); + bool GetLayoutUnitePages() const; static bool GetDefLayoutUnitePages(); void SetLayoutUnitePages(bool value); diff --git a/src/libs/vpatterndb/vpassmark.cpp b/src/libs/vpatterndb/vpassmark.cpp index 825e9f05e..8db56a243 100644 --- a/src/libs/vpatterndb/vpassmark.cpp +++ b/src/libs/vpatterndb/vpassmark.cpp @@ -660,7 +660,7 @@ QVector VPassmark::FullPassmark(const VPiece &piece, const VContainer *d QVector lines; lines += SAPassmark(piece, data, PassmarkSide::All); if (qApp->Settings()->IsDoublePassmark() - && not piece.IsHideMainPath() + && (qApp->Settings()->IsPieceShowMainPath() || not piece.IsHideMainPath()) && m_data.isMainPathNode && m_data.passmarkAngleType != PassmarkAngleType::Intersection && m_data.passmarkAngleType != PassmarkAngleType::IntersectionOnlyLeft diff --git a/src/libs/vpatterndb/vtranslatevars.cpp b/src/libs/vpatterndb/vtranslatevars.cpp index a45b55c91..aa4870654 100644 --- a/src/libs/vpatterndb/vtranslatevars.cpp +++ b/src/libs/vpatterndb/vtranslatevars.cpp @@ -47,15 +47,7 @@ //--------------------------------------------------------------------------------------------------------------------- VTranslateVars::VTranslateVars() - :VTranslateMeasurements(), - PMSystemNames(QMap()), - PMSystemAuthors(QMap()), - PMSystemBooks(QMap()), - variables(QMap()), - functions(QMap()), - placeholders(QMap()), - stDescriptions(QMap()), - translatedFunctions(QMap()) + :VTranslateMeasurements() { InitPatternMakingSystems(); InitVariables(); @@ -408,45 +400,140 @@ void VTranslateVars::InitVariables() void VTranslateVars::InitFunctions() { functions.insert(degTorad_F, translate("VTranslateVars", "degTorad", "converts degrees to radian")); + functionsDescriptions.insert(degTorad_F, translate("VTranslateVars", "converts degrees to radian", + "functionm degTorad")); + functions.insert(radTodeg_F, translate("VTranslateVars", "radTodeg", "converts radian to degrees")); + functionsDescriptions.insert(radTodeg_F, translate("VTranslateVars", "converts radian to degrees", + "function radTodeg")); + functions.insert(sin_F, translate("VTranslateVars", "sin", "sine function working with radians")); + functionsDescriptions.insert(sin_F, translate("VTranslateVars", "sine function working with radians", + "function sin")); + functions.insert(cos_F, translate("VTranslateVars", "cos", "cosine function working with radians")); + functionsDescriptions.insert(cos_F, translate("VTranslateVars", "cosine function working with radians", + "function cos")); + functions.insert(tan_F, translate("VTranslateVars", "tan", "tangens function working with radians")); + functionsDescriptions.insert(tan_F, translate("VTranslateVars", "tangens function working with radians", + "function tan")); + functions.insert(asin_F, translate("VTranslateVars", "asin", "arcus sine function working with radians")); + functionsDescriptions.insert(asin_F, translate("VTranslateVars", "arcus sine function working with radians", + "function asin")); + functions.insert(acos_F, translate("VTranslateVars", "acos", "arcus cosine function working with radians")); + functionsDescriptions.insert(acos_F, translate("VTranslateVars", "arcus cosine function working with radians", + "function acos")); + functions.insert(atan_F, translate("VTranslateVars", "atan", "arcus tangens function working with radians")); + functionsDescriptions.insert(atan_F, translate("VTranslateVars", "arcus tangens function working with radians", + "function atan")); + functions.insert(sinh_F, translate("VTranslateVars", "sinh", "hyperbolic sine function")); + functionsDescriptions.insert(sinh_F, translate("VTranslateVars", "hyperbolic sine function", "function sinh")); + functions.insert(cosh_F, translate("VTranslateVars", "cosh", "hyperbolic cosine")); + functionsDescriptions.insert(cosh_F, translate("VTranslateVars", "hyperbolic cosine", "function cosh")); + functions.insert(tanh_F, translate("VTranslateVars", "tanh", "hyperbolic tangens function")); + functionsDescriptions.insert(tanh_F, translate("VTranslateVars", "hyperbolic tangens function", "function tanh")); + functions.insert(asinh_F, translate("VTranslateVars", "asinh", "hyperbolic arcus sine function")); + functionsDescriptions.insert(asinh_F, translate("VTranslateVars", "hyperbolic arcus sine function", + "function asinh")); + functions.insert(acosh_F, translate("VTranslateVars", "acosh", "hyperbolic arcus cosine function")); + functionsDescriptions.insert(acosh_F, translate("VTranslateVars", "hyperbolic arcus cosine function", + "function acosh")); + functions.insert(atanh_F, translate("VTranslateVars", "atanh", "hyperbolic arcur tangens function")); + functionsDescriptions.insert(atanh_F, translate("VTranslateVars", "hyperbolic arcur tangens function", + "function atanh")); + functions.insert(sinD_F, translate("VTranslateVars", "sinD", "sine function working with degrees")); + functionsDescriptions.insert(sinD_F, translate("VTranslateVars", "sine function working with degrees", + "function sinD")); + functions.insert(cosD_F, translate("VTranslateVars", "cosD", "cosine function working with degrees")); + functionsDescriptions.insert(cosD_F, translate("VTranslateVars", "cosine function working with degrees", + "function cosD")); + functions.insert(tanD_F, translate("VTranslateVars", "tanD", "tangens function working with degrees")); + functionsDescriptions.insert(tanD_F, translate("VTranslateVars", "tangens function working with degrees", + "function tanD")); + functions.insert(asinD_F, translate("VTranslateVars", "asinD", "arcus sine function working with degrees")); + functionsDescriptions.insert(asinD_F, translate("VTranslateVars", "arcus sine function working with degrees", + "function asinD")); + functions.insert(acosD_F, translate("VTranslateVars", "acosD", "arcus cosine function working with degrees")); + functionsDescriptions.insert(acosD_F, translate("VTranslateVars", "arcus cosine function working with degrees", + "function acosD")); + functions.insert(atanD_F, translate("VTranslateVars", "atanD", "arcus tangens function working with degrees")); + functionsDescriptions.insert(atanD_F, translate("VTranslateVars", "arcus tangens function working with degrees", + "function atanD")); + functions.insert(log2_F, translate("VTranslateVars", "log2", "logarithm to the base 2")); + functionsDescriptions.insert(log2_F, translate("VTranslateVars", "logarithm to the base 2", "function log2")); + functions.insert(log10_F, translate("VTranslateVars", "log10", "logarithm to the base 10")); + functionsDescriptions.insert(log10_F, translate("VTranslateVars", "logarithm to the base 10", "function log10")); + functions.insert(log_F, translate("VTranslateVars", "log", "logarithm to the base 10")); + functionsDescriptions.insert(log_F, translate("VTranslateVars", "logarithm to the base 10", "function log")); + functions.insert(ln_F, translate("VTranslateVars", "ln", "logarithm to base e (2.71828...)")); + functionsDescriptions.insert(ln_F, translate("VTranslateVars", "logarithm to base e (2.71828...)", "function ln")); + functions.insert(exp_F, translate("VTranslateVars", "exp", "e raised to the power of x")); + functionsDescriptions.insert(exp_F, translate("VTranslateVars", "e raised to the power of x", "function exp")); + functions.insert(sqrt_F, translate("VTranslateVars", "sqrt", "square root of a value")); + functionsDescriptions.insert(sqrt_F, translate("VTranslateVars", "square root of a value", "function sqrt")); + functions.insert(sign_F, translate("VTranslateVars", "sign", "sign function -1 if x<0; 1 if x>0")); + functionsDescriptions.insert(sign_F, translate("VTranslateVars", "sign function -1 if x<0; 1 if x>0", + "function sign")); + functions.insert(rint_F, translate("VTranslateVars", "rint", "round to nearest integer")); + functionsDescriptions.insert(rint_F, translate("VTranslateVars", "round to nearest integer", "function rint")); + functions.insert(r2cm_F, translate("VTranslateVars", "r2cm", "round to up to 1 decimal")); + functionsDescriptions.insert(r2cm_F, translate("VTranslateVars", "round to up to 1 decimal", "function r2cm")); + functions.insert(csrCm_F, translate("VTranslateVars", "csrCm", "cut, split and rotate modeling operation. Takes" " cm units.")); + functionsDescriptions.insert(csrCm_F, translate("VTranslateVars", "cut, split and rotate modeling operation. Takes " + "cm units.", "function csrCm")); + functions.insert(csrInch_F, translate("VTranslateVars", "csrInch", "cut, split and rotate modeling operation. Takes" - " inch units.")); + " inch units.")); + functionsDescriptions.insert(csrInch_F, translate("VTranslateVars", "cut, split and rotate modeling operation. Takes" + " inch units.", "function csrInch")); + functions.insert(abs_F, translate("VTranslateVars", "abs", "absolute value")); + functionsDescriptions.insert(abs_F, translate("VTranslateVars", "absolute value", "function abs")); + functions.insert(min_F, translate("VTranslateVars", "min", "min of all arguments")); + functionsDescriptions.insert(min_F, translate("VTranslateVars", "min of all arguments", "function min")); + functions.insert(max_F, translate("VTranslateVars", "max", "max of all arguments")); + functionsDescriptions.insert(max_F, translate("VTranslateVars", "max of all arguments", "function max")); + functions.insert(sum_F, translate("VTranslateVars", "sum", "sum of all arguments")); + functionsDescriptions.insert(sum_F, translate("VTranslateVars", "sum of all arguments", "function sum")); + functions.insert(avg_F, translate("VTranslateVars", "avg", "mean value of all arguments")); + functionsDescriptions.insert(avg_F, translate("VTranslateVars", "mean value of all arguments", "function avg")); + functions.insert(fmod_F, translate("VTranslateVars", "fmod", "Returns the floating-point remainder of numer/denom (rounded towards zero)")); + functionsDescriptions.insert(fmod_F, translate("VTranslateVars", "Returns the floating-point remainder of " + "numer/denom (rounded towards zero)", + "function fmod")); } //--------------------------------------------------------------------------------------------------------------------- @@ -1094,6 +1181,7 @@ void VTranslateVars::Retranslate() PMSystemBooks.clear(); variables.clear(); functions.clear(); + functionsDescriptions.clear(); stDescriptions.clear(); InitPatternMakingSystems(); @@ -1115,3 +1203,9 @@ QMap VTranslateVars::GetFunctions() const { return functions; } + +//--------------------------------------------------------------------------------------------------------------------- +QMap VTranslateVars::GetFunctionsDescriptions() const +{ + return functionsDescriptions; +} diff --git a/src/libs/vpatterndb/vtranslatevars.h b/src/libs/vpatterndb/vtranslatevars.h index c7842fdef..c5d02c94d 100644 --- a/src/libs/vpatterndb/vtranslatevars.h +++ b/src/libs/vpatterndb/vtranslatevars.h @@ -67,19 +67,21 @@ public: QMap GetTranslatedFunctions() const; QMap GetFunctions() const; + QMap GetFunctionsDescriptions() const; static void BiasTokens(int position, int bias, QMap &tokens); private: Q_DISABLE_COPY(VTranslateVars) - QMap PMSystemNames; - QMap PMSystemAuthors; - QMap PMSystemBooks; - QMap variables; - QMap functions; - QMap placeholders; - QMap stDescriptions; - QMap translatedFunctions; + QMap PMSystemNames{}; + QMap PMSystemAuthors{}; + QMap PMSystemBooks{}; + QMap variables{}; + QMap functions{}; + QMap functionsDescriptions{}; + QMap placeholders{}; + QMap stDescriptions{}; + QMap translatedFunctions{}; void InitPatternMakingSystems(); void InitVariables(); diff --git a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp index 912fec524..a7d3663ab 100644 --- a/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp +++ b/src/libs/vtools/dialogs/support/dialogeditwrongformula.cpp @@ -612,6 +612,7 @@ void DialogEditWrongFormula::ShowFunctions() ui->tableWidget->setColumnHidden(ColumnFullName, true); ui->labelDescription->setText(QString()); + const QMap functionsDescriptions = qApp->TrVars()->GetFunctionsDescriptions(); const QMap functions = qApp->TrVars()->GetFunctions(); QMap::const_iterator i = functions.constBegin(); while (i != functions.constEnd()) @@ -622,7 +623,10 @@ void DialogEditWrongFormula::ShowFunctions() font.setBold(true); item->setFont(font); ui->tableWidget->setItem(ui->tableWidget->rowCount()-1, ColumnName, item); - item->setToolTip(i.value().getMdisambiguation()); + + functionsDescriptions.contains(i.key()) + ? item->setToolTip(functionsDescriptions.value(i.key()).translate(qApp->Settings()->GetLocale())) + : item->setToolTip(i.value().getMdisambiguation()); ++i; } diff --git a/src/libs/vtools/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp index 5032edb41..b8cef020f 100644 --- a/src/libs/vtools/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -151,7 +151,7 @@ void DialogEndLine::EvalLength() formulaData.labelEditFormula = ui->labelEditFormula; formulaData.labelResult = ui->labelResultCalculation; formulaData.postfix = UnitsToStr(qApp->patternUnit(), true); - formulaData.checkLessThanZero = true; + formulaData.checkLessThanZero = false; Eval(formulaData, flagFormula); } diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp index b9e746971..e370fc820 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -67,6 +68,7 @@ DialogFlippingByAxis::DialogFlippingByAxis(const VContainer *data, quint32 toolI stage1(true), m_suffix(), flagName(true), + flagGroupName(true), flagError(false) { ui->setupUi(this); @@ -81,6 +83,7 @@ DialogFlippingByAxis::DialogFlippingByAxis(const VContainer *data, quint32 toolI ui->comboBoxOriginPoint->setCurrentIndex(-1); connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogFlippingByAxis::SuffixChanged); + connect(ui->lineEditVisibilityGroup, &QLineEdit::textChanged, this, &DialogFlippingByAxis::GroupNameChanged); connect(ui->comboBoxOriginPoint, &QComboBox::currentTextChanged, this, &DialogFlippingByAxis::PointChanged); @@ -147,6 +150,49 @@ QVector DialogFlippingByAxis::GetObjects() const return ConvertToVector(objects); } +//--------------------------------------------------------------------------------------------------------------------- +QString DialogFlippingByAxis::GetVisibilityGroupName() const +{ + return ui->lineEditVisibilityGroup->text(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::SetVisibilityGroupName(const QString &name) +{ + ui->lineEditVisibilityGroup->setText(name.isEmpty() ? tr("Rotation") : name); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool DialogFlippingByAxis::HasLinkedVisibilityGroup() const +{ + return ui->groupBoxVisibilityGroup->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::SetHasLinkedVisibilityGroup(bool linked) +{ + ui->groupBoxVisibilityGroup->setChecked(linked); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::SetVisibilityGroupTags(const QStringList &tags) +{ + ui->lineEditGroupTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogFlippingByAxis::GetVisibilityGroupTags() const +{ + return ui->lineEditGroupTags->text().split(','); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::SetGroupCategories(const QStringList &categories) +{ + m_groupTags = categories; + ui->lineEditGroupTags->SetCompletion(m_groupTags); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogFlippingByAxis::ShowDialog(bool click) { @@ -277,6 +323,27 @@ void DialogFlippingByAxis::SuffixChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByAxis::GroupNameChanged() +{ + QLineEdit* edit = qobject_cast(sender()); + if (edit) + { + const QString name = edit->text(); + if (name.isEmpty()) + { + flagGroupName = false; + ChangeColor(ui->labelGroupName, errorColor); + CheckState(); + return; + } + + flagGroupName = true; + ChangeColor(ui->labelGroupName, OkColor(this)); + } + CheckState(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogFlippingByAxis::ShowVisualization() { @@ -295,6 +362,18 @@ void DialogFlippingByAxis::SaveData() operation->SetOriginPointId(GetOriginPointId()); operation->SetAxisType(GetAxisType()); operation->RefreshGeometry(); + + QStringList groupTags = ui->lineEditGroupTags->text().split(','); + for (auto &tag : groupTags) + { + tag = tag.trimmed(); + if (not m_groupTags.contains(tag)) + { + m_groupTags.append(tag); + } + } + + ui->lineEditGroupTags->SetCompletion(m_groupTags); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.h b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.h index 0b31ac1ce..234261fe0 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.h +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.h @@ -65,6 +65,17 @@ public: QVector GetObjects() const; + QString GetVisibilityGroupName() const; + void SetVisibilityGroupName(const QString &name); + + bool HasLinkedVisibilityGroup() const; + void SetHasLinkedVisibilityGroup(bool linked); + + void SetVisibilityGroupTags(const QStringList &tags); + QStringList GetVisibilityGroupTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + virtual void ShowDialog(bool click) override; public slots: @@ -73,6 +84,7 @@ public slots: private slots: void SuffixChanged(); + void GroupNameChanged(); protected: virtual void ShowVisualization() override; @@ -96,15 +108,18 @@ private: QString m_suffix; bool flagName; + bool flagGroupName; bool flagError; + QStringList m_groupTags{}; + static void FillComboBoxAxisType(QComboBox *box); }; //--------------------------------------------------------------------------------------------------------------------- inline bool DialogFlippingByAxis::IsValid() const { - return flagError && flagName; + return flagError && flagName && flagGroupName; } #endif // DIALOGFLIPPINGBYAXIS_H diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.ui b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.ui index d21839e55..9ebf2e47f 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.ui +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyaxis.ui @@ -6,8 +6,8 @@ 0 0 - 285 - 146 + 304 + 237 @@ -48,6 +48,61 @@
+ + + + Enable to create a visibility gropup from original objects + + + Visibility Group + + + true + + + false + + + + + + Name: + + + + + + + Flipping by axis + + + true + + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + + + + + + @@ -60,6 +115,13 @@ + + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
+
diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp b/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp index bf62e73c3..9532bd364 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyline.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -67,6 +68,7 @@ DialogFlippingByLine::DialogFlippingByLine(const VContainer *data, quint32 toolI stage1(true), m_suffix(), flagName(true), + flagGroupName(true), flagError(false) { ui->setupUi(this); @@ -79,6 +81,7 @@ DialogFlippingByLine::DialogFlippingByLine(const VContainer *data, quint32 toolI FillComboBoxPoints(ui->comboBoxSecondLinePoint); connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogFlippingByLine::SuffixChanged); + connect(ui->lineEditVisibilityGroup, &QLineEdit::textChanged, this, &DialogFlippingByLine::GroupNameChanged); connect(ui->comboBoxFirstLinePoint, &QComboBox::currentTextChanged, this, &DialogFlippingByLine::PointChanged); connect(ui->comboBoxSecondLinePoint, &QComboBox::currentTextChanged, @@ -142,6 +145,49 @@ QVector DialogFlippingByLine::GetObjects() const return ConvertToVector(objects); } +//--------------------------------------------------------------------------------------------------------------------- +QString DialogFlippingByLine::GetVisibilityGroupName() const +{ + return ui->lineEditVisibilityGroup->text(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::SetVisibilityGroupName(const QString &name) +{ + ui->lineEditVisibilityGroup->setText(name.isEmpty() ? tr("Rotation") : name); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool DialogFlippingByLine::HasLinkedVisibilityGroup() const +{ + return ui->groupBoxVisibilityGroup->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::SetHasLinkedVisibilityGroup(bool linked) +{ + ui->groupBoxVisibilityGroup->setChecked(linked); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::SetVisibilityGroupTags(const QStringList &tags) +{ + ui->lineEditGroupTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogFlippingByLine::GetVisibilityGroupTags() const +{ + return ui->lineEditGroupTags->text().split(','); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::SetGroupCategories(const QStringList &categories) +{ + m_groupTags = categories; + ui->lineEditGroupTags->SetCompletion(m_groupTags); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogFlippingByLine::ShowDialog(bool click) { @@ -301,6 +347,27 @@ void DialogFlippingByLine::SuffixChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogFlippingByLine::GroupNameChanged() +{ + QLineEdit* edit = qobject_cast(sender()); + if (edit) + { + const QString name = edit->text(); + if (name.isEmpty()) + { + flagGroupName = false; + ChangeColor(ui->labelGroupName, errorColor); + CheckState(); + return; + } + + flagGroupName = true; + ChangeColor(ui->labelGroupName, OkColor(this)); + } + CheckState(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogFlippingByLine::ShowVisualization() { @@ -319,6 +386,18 @@ void DialogFlippingByLine::SaveData() operation->SetFirstLinePointId(GetFirstLinePointId()); operation->SetSecondLinePointId(GetSecondLinePointId()); operation->RefreshGeometry(); + + QStringList groupTags = ui->lineEditGroupTags->text().split(','); + for (auto &tag : groupTags) + { + tag = tag.trimmed(); + if (not m_groupTags.contains(tag)) + { + m_groupTags.append(tag); + } + } + + ui->lineEditGroupTags->SetCompletion(m_groupTags); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyline.h b/src/libs/vtools/dialogs/tools/dialogflippingbyline.h index b4334b4e7..27a4314a2 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyline.h +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyline.h @@ -65,6 +65,17 @@ public: QVector GetObjects() const; + QString GetVisibilityGroupName() const; + void SetVisibilityGroupName(const QString &name); + + bool HasLinkedVisibilityGroup() const; + void SetHasLinkedVisibilityGroup(bool linked); + + void SetVisibilityGroupTags(const QStringList &tags); + QStringList GetVisibilityGroupTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + virtual void ShowDialog(bool click) override; public slots: @@ -73,6 +84,7 @@ public slots: private slots: void SuffixChanged(); + void GroupNameChanged(); protected: virtual void ShowVisualization() override; @@ -96,13 +108,16 @@ private: QString m_suffix; bool flagName; + bool flagGroupName; bool flagError; + + QStringList m_groupTags{}; }; //--------------------------------------------------------------------------------------------------------------------- inline bool DialogFlippingByLine::IsValid() const { - return flagError && flagName; + return flagError && flagName && flagGroupName; } #endif // DIALOGFLIPPINGBYLINE_H diff --git a/src/libs/vtools/dialogs/tools/dialogflippingbyline.ui b/src/libs/vtools/dialogs/tools/dialogflippingbyline.ui index fc76e9099..788368f5c 100644 --- a/src/libs/vtools/dialogs/tools/dialogflippingbyline.ui +++ b/src/libs/vtools/dialogs/tools/dialogflippingbyline.ui @@ -6,8 +6,8 @@ 0 0 - 285 - 146 + 304 + 237 @@ -52,6 +52,61 @@ + + + + Enable to create a visibility gropup from original objects + + + Visibility Group + + + true + + + false + + + + + + Name: + + + + + + + Flipping by line + + + true + + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + + + + + + @@ -64,6 +119,13 @@ + + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
+
diff --git a/src/libs/vtools/dialogs/tools/dialoggroup.cpp b/src/libs/vtools/dialogs/tools/dialoggroup.cpp index 8aad034bf..3b5f4a713 100644 --- a/src/libs/vtools/dialogs/tools/dialoggroup.cpp +++ b/src/libs/vtools/dialogs/tools/dialoggroup.cpp @@ -28,6 +28,7 @@ #include "dialoggroup.h" +#include #include #include "ui_dialoggroup.h" @@ -63,6 +64,24 @@ QString DialogGroup::GetName() const return ui->lineEditName->text(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogGroup::SetTags(const QStringList &tags) +{ + ui->lineEditTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogGroup::GetTags() const +{ + return ui->lineEditTags->text().split(","); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogGroup::SetGroupCategories(const QStringList &categories) +{ + ui->lineEditTags->SetCompletion(categories); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogGroup::ShowDialog(bool click) { diff --git a/src/libs/vtools/dialogs/tools/dialoggroup.h b/src/libs/vtools/dialogs/tools/dialoggroup.h index ec0efd4c9..ca9632c89 100644 --- a/src/libs/vtools/dialogs/tools/dialoggroup.h +++ b/src/libs/vtools/dialogs/tools/dialoggroup.h @@ -54,6 +54,11 @@ public: void SetName(const QString &name); QString GetName() const; + void SetTags(const QStringList &tags); + QStringList GetTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + QMap GetGroup() const; virtual void ShowDialog(bool click) override; diff --git a/src/libs/vtools/dialogs/tools/dialoggroup.ui b/src/libs/vtools/dialogs/tools/dialoggroup.ui index 3983b99f8..436f2229f 100644 --- a/src/libs/vtools/dialogs/tools/dialoggroup.ui +++ b/src/libs/vtools/dialogs/tools/dialoggroup.ui @@ -6,8 +6,8 @@ 0 0 - 397 - 80 + 294 + 104
@@ -19,22 +19,45 @@ - - + + Group name: - + - Unique pattern piece name + Choose group name + + true + + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + @@ -51,6 +74,13 @@ + + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
+
diff --git a/src/libs/vtools/dialogs/tools/dialogmove.cpp b/src/libs/vtools/dialogs/tools/dialogmove.cpp index 2c9a3ee2a..c079a97a5 100644 --- a/src/libs/vtools/dialogs/tools/dialogmove.cpp +++ b/src/libs/vtools/dialogs/tools/dialogmove.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -85,7 +86,8 @@ DialogMove::DialogMove(const VContainer *data, quint32 toolId, QWidget *parent) flagAngle(false), flagRotationAngle(false), flagLength(false), - flagName(true) + flagName(true), + flagGroupName(true) { ui->setupUi(this); @@ -118,6 +120,7 @@ DialogMove::DialogMove(const VContainer *data, quint32 toolId, QWidget *parent) ui->comboBoxRotationOriginPoint->blockSignals(false); connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogMove::SuffixChanged); + connect(ui->lineEditVisibilityGroup, &QLineEdit::textChanged, this, &DialogMove::GroupNameChanged); connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogMove::FXAngle); connect(ui->toolButtonExprRotationAngle, &QPushButton::clicked, this, &DialogMove::FXRotationAngle); connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogMove::FXLength); @@ -257,6 +260,49 @@ QVector DialogMove::GetObjects() const return ConvertToVector(objects); } +//--------------------------------------------------------------------------------------------------------------------- +QString DialogMove::GetVisibilityGroupName() const +{ + return ui->lineEditVisibilityGroup->text(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::SetVisibilityGroupName(const QString &name) +{ + ui->lineEditVisibilityGroup->setText(name.isEmpty() ? tr("Rotation") : name); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool DialogMove::HasLinkedVisibilityGroup() const +{ + return ui->groupBoxVisibilityGroup->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::SetHasLinkedVisibilityGroup(bool linked) +{ + ui->groupBoxVisibilityGroup->setChecked(linked); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::SetVisibilityGroupTags(const QStringList &tags) +{ + ui->lineEditGroupTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogMove::GetVisibilityGroupTags() const +{ + return ui->lineEditGroupTags->text().split(','); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::SetGroupCategories(const QStringList &categories) +{ + m_groupTags = categories; + ui->lineEditGroupTags->SetCompletion(m_groupTags); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogMove::ShowDialog(bool click) { @@ -481,6 +527,27 @@ void DialogMove::SuffixChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogMove::GroupNameChanged() +{ + QLineEdit* edit = qobject_cast(sender()); + if (edit) + { + const QString name = edit->text(); + if (name.isEmpty()) + { + flagGroupName = false; + ChangeColor(ui->labelGroupName, errorColor); + CheckState(); + return; + } + + flagGroupName = true; + ChangeColor(ui->labelGroupName, OkColor(this)); + } + CheckState(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogMove::ShowVisualization() { @@ -504,6 +571,18 @@ void DialogMove::SaveData() operation->SetRotationAngle(formulaRotationAngle); operation->SetRotationOriginPointId(GetRotationOrigPointId()); operation->RefreshGeometry(); + + QStringList groupTags = ui->lineEditGroupTags->text().split(','); + for (auto &tag : groupTags) + { + tag = tag.trimmed(); + if (not m_groupTags.contains(tag)) + { + m_groupTags.append(tag); + } + } + + ui->lineEditGroupTags->SetCompletion(m_groupTags); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogmove.h b/src/libs/vtools/dialogs/tools/dialogmove.h index 632ad3b26..741d8d144 100644 --- a/src/libs/vtools/dialogs/tools/dialogmove.h +++ b/src/libs/vtools/dialogs/tools/dialogmove.h @@ -70,6 +70,17 @@ public: QVector GetObjects() const; + QString GetVisibilityGroupName() const; + void SetVisibilityGroupName(const QString &name); + + bool HasLinkedVisibilityGroup() const; + void SetHasLinkedVisibilityGroup(bool linked); + + void SetVisibilityGroupTags(const QStringList &tags); + QStringList GetVisibilityGroupTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + virtual void ShowDialog(bool click) override; public slots: @@ -87,6 +98,7 @@ private slots: void FXLength(); void SuffixChanged(); + void GroupNameChanged(); protected: virtual void ShowVisualization() override; @@ -129,6 +141,9 @@ private: bool flagRotationAngle; bool flagLength; bool flagName; + bool flagGroupName; + + QStringList m_groupTags{}; void EvalAngle(); void EvalRotationAngle(); @@ -138,7 +153,7 @@ private: //--------------------------------------------------------------------------------------------------------------------- inline bool DialogMove::IsValid() const { - return flagAngle && flagRotationAngle && flagLength && flagName; + return flagAngle && flagRotationAngle && flagLength && flagName && flagGroupName; } #endif // DIALOGMOVING_H diff --git a/src/libs/vtools/dialogs/tools/dialogmove.ui b/src/libs/vtools/dialogs/tools/dialogmove.ui index 2dcc1d530..defd52ef1 100644 --- a/src/libs/vtools/dialogs/tools/dialogmove.ui +++ b/src/libs/vtools/dialogs/tools/dialogmove.ui @@ -6,8 +6,8 @@ 0 0 - 292 - 332 + 424 + 432 @@ -591,6 +591,61 @@
+ + + + Enable to create a visibility gropup from original objects + + + Visibility Group + + + true + + + false + + + + + + Name: + + + + + + + Move + + + true + + + + + + + Tags: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + + + + + + @@ -604,6 +659,11 @@ + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
VPlainTextEdit QPlainTextEdit diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.cpp b/src/libs/vtools/dialogs/tools/dialogrotation.cpp index cc9d0404e..306477be9 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.cpp +++ b/src/libs/vtools/dialogs/tools/dialogrotation.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -77,6 +78,7 @@ DialogRotation::DialogRotation(const VContainer *data, quint32 toolId, QWidget * m_firstRelease(false), flagAngle(false), flagName(true), + flagGroupName(true), flagError(false) { ui->setupUi(this); @@ -94,6 +96,7 @@ DialogRotation::DialogRotation(const VContainer *data, quint32 toolId, QWidget * FillComboBoxPoints(ui->comboBoxOriginPoint); connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogRotation::SuffixChanged); + connect(ui->lineEditVisibilityGroup, &QLineEdit::textChanged, this, &DialogRotation::GroupNameChanged); connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogRotation::FXAngle); connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, [this]() { @@ -170,6 +173,49 @@ QVector DialogRotation::GetObjects() const return ConvertToVector(objects); } +//--------------------------------------------------------------------------------------------------------------------- +QString DialogRotation::GetVisibilityGroupName() const +{ + return ui->lineEditVisibilityGroup->text(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::SetVisibilityGroupName(const QString &name) +{ + ui->lineEditVisibilityGroup->setText(name.isEmpty() ? tr("Rotation") : name); +} + +//--------------------------------------------------------------------------------------------------------------------- +bool DialogRotation::HasLinkedVisibilityGroup() const +{ + return ui->groupBoxVisibilityGroup->isChecked(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::SetHasLinkedVisibilityGroup(bool linked) +{ + ui->groupBoxVisibilityGroup->setChecked(linked); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::SetVisibilityGroupTags(const QStringList &tags) +{ + ui->lineEditGroupTags->setText(tags.join(", ")); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogRotation::GetVisibilityGroupTags() const +{ + return ui->lineEditGroupTags->text().split(','); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::SetGroupCategories(const QStringList &categories) +{ + m_groupTags = categories; + ui->lineEditGroupTags->SetCompletion(m_groupTags); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogRotation::ShowDialog(bool click) { @@ -366,6 +412,27 @@ void DialogRotation::SuffixChanged() CheckState(); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogRotation::GroupNameChanged() +{ + QLineEdit* edit = qobject_cast(sender()); + if (edit) + { + const QString name = edit->text(); + if (name.isEmpty()) + { + flagGroupName = false; + ChangeColor(ui->labelGroupName, errorColor); + CheckState(); + return; + } + + flagGroupName = true; + ChangeColor(ui->labelGroupName, OkColor(this)); + } + CheckState(); +} + //--------------------------------------------------------------------------------------------------------------------- void DialogRotation::ShowVisualization() { @@ -385,6 +452,18 @@ void DialogRotation::SaveData() operation->SetOriginPointId(GetOrigPointId()); operation->SetAngle(formulaAngle); operation->RefreshGeometry(); + + QStringList groupTags = ui->lineEditGroupTags->text().split(','); + for (auto &tag : groupTags) + { + tag = tag.trimmed(); + if (not m_groupTags.contains(tag)) + { + m_groupTags.append(tag); + } + } + + ui->lineEditGroupTags->SetCompletion(m_groupTags); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.h b/src/libs/vtools/dialogs/tools/dialogrotation.h index f26194389..89b1221d5 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.h +++ b/src/libs/vtools/dialogs/tools/dialogrotation.h @@ -63,6 +63,17 @@ public: QVector GetObjects() const; + QString GetVisibilityGroupName() const; + void SetVisibilityGroupName(const QString &name); + + bool HasLinkedVisibilityGroup() const; + void SetHasLinkedVisibilityGroup(bool linked); + + void SetVisibilityGroupTags(const QStringList &tags); + QStringList GetVisibilityGroupTags() const; + + virtual void SetGroupCategories(const QStringList &categories) override; + virtual void ShowDialog(bool click) override; public slots: @@ -74,6 +85,7 @@ private slots: void DeployAngleTextEdit(); void FXAngle(); void SuffixChanged(); + void GroupNameChanged(); void EvalAngle(); protected: @@ -111,13 +123,16 @@ private: /** @brief flagAngle true if value of angle is correct */ bool flagAngle; bool flagName; + bool flagGroupName; bool flagError; + + QStringList m_groupTags{}; }; //--------------------------------------------------------------------------------------------------------------------- inline bool DialogRotation::IsValid() const { - return flagAngle && flagName && flagError; + return flagAngle && flagName && flagError && flagGroupName; } #endif // DIALOGROTATION_H diff --git a/src/libs/vtools/dialogs/tools/dialogrotation.ui b/src/libs/vtools/dialogs/tools/dialogrotation.ui index cae139a96..84bc08968 100644 --- a/src/libs/vtools/dialogs/tools/dialogrotation.ui +++ b/src/libs/vtools/dialogs/tools/dialogrotation.ui @@ -6,8 +6,8 @@ 0 0 - 285 - 189 + 392 + 282 @@ -222,6 +222,61 @@
+ + + + Enable to create a visibility gropup from original objects + + + Visibility Group + + + true + + + false + + + + + + Tags: + + + + + + + Rotation + + + true + + + + + + + Name: + + + + + + + Separate each tag with comma. + + + Add tags + + + true + + + + + + @@ -235,6 +290,11 @@ + + VCompleterLineEdit + QLineEdit +
vlineedit.h
+
VPlainTextEdit QPlainTextEdit diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index 2e69eb12c..ee514bfd0 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -799,6 +799,13 @@ void DialogTool::SetToolId(const quint32 &value) toolId = value; } +//--------------------------------------------------------------------------------------------------------------------- +void DialogTool::SetGroupCategories(const QStringList &categories) +{ + Q_UNUSED(categories) + // do nothing +} + //--------------------------------------------------------------------------------------------------------------------- void DialogTool::ShowDialog(bool click) { diff --git a/src/libs/vtools/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h index 46e3775ae..c13c54651 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -90,6 +90,8 @@ public: quint32 GetToolId() const; void SetToolId(const quint32 &value); + virtual void SetGroupCategories(const QStringList &categories); + static void MoveListRowTop(QListWidget *list); static void MoveListRowUp(QListWidget *list); static void MoveListRowDown(QListWidget *list); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp index 5672d9325..86db51444 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp @@ -3059,6 +3059,12 @@ void DialogSeamAllowance::InitPatternPieceDataTab() //--------------------------------------------------------------------------------------------------------------------- void DialogSeamAllowance::InitLabelsTab() { + QString labelValue = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); + uiTabLabels->lineEditDLWidthFormula->setPlainText(labelValue); + uiTabLabels->lineEditDLHeightFormula->setPlainText(labelValue); + uiTabLabels->lineEditPLWidthFormula->setPlainText(labelValue); + uiTabLabels->lineEditPLHeightFormula->setPlainText(labelValue); + m_DLWidthBaseHeight = uiTabLabels->lineEditDLWidthFormula->height(); m_DLHeightBaseHeight = uiTabLabels->lineEditDLHeightFormula->height(); m_DLAngleBaseHeight = uiTabLabels->lineEditDLAngleFormula->height(); @@ -3125,6 +3131,9 @@ void DialogSeamAllowance::InitLabelsTab() //--------------------------------------------------------------------------------------------------------------------- void DialogSeamAllowance::InitGrainlineTab() { + uiTabGrainline->lineEditLenFormula->setPlainText( + QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit()))); + connect(uiTabGrainline->groupBoxGrainline, &QGroupBox::toggled, this, &DialogSeamAllowance::EnabledGrainline); connect(uiTabGrainline->pushButtonRot, &QPushButton::clicked, this, &DialogSeamAllowance::EditGrainlineFormula); connect(uiTabGrainline->pushButtonLen, &QPushButton::clicked, this, &DialogSeamAllowance::EditGrainlineFormula); @@ -3349,7 +3358,7 @@ void DialogSeamAllowance::SetGrainlineLength(QString lengthFormula) { if (lengthFormula.isEmpty()) { - lengthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + lengthFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(lengthFormula, qApp->Settings()->GetOsSeparator()); @@ -3369,7 +3378,7 @@ void DialogSeamAllowance::SetDLWidth(QString widthFormula) { if (widthFormula.isEmpty()) { - widthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + widthFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(widthFormula, qApp->Settings()->GetOsSeparator()); @@ -3389,7 +3398,7 @@ void DialogSeamAllowance::SetDLHeight(QString heightFormula) { if (heightFormula.isEmpty()) { - heightFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + heightFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(heightFormula, qApp->Settings()->GetOsSeparator()); @@ -3429,7 +3438,7 @@ void DialogSeamAllowance::SetPLWidth(QString widthFormula) { if (widthFormula.isEmpty()) { - widthFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + widthFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(widthFormula, qApp->Settings()->GetOsSeparator()); @@ -3449,7 +3458,7 @@ void DialogSeamAllowance::SetPLHeight(QString heightFormula) { if (heightFormula.isEmpty()) { - heightFormula = QString().setNum(UnitConvertor(1, Unit::Cm, *data->GetPatternUnit())); + heightFormula = QString().setNum(UnitConvertor(10, Unit::Cm, *data->GetPatternUnit())); } const QString formula = qApp->TrVars()->FormulaToUser(heightFormula, qApp->Settings()->GetOsSeparator()); diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp index e64036d7d..ca558230f 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp @@ -74,6 +74,8 @@ void VToolFlippingByAxis::setDialog() dialogTool->SetOriginPointId(m_originPointId); dialogTool->SetAxisType(m_axisType); dialogTool->SetSuffix(suffix); + + SetDialogVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -89,6 +91,9 @@ VToolFlippingByAxis *VToolFlippingByAxis::Create(const QPointer &dia initData.axisType = dialogTool->GetAxisType(); initData.suffix = dialogTool->GetSuffix(); initData.source = dialogTool->GetObjects(); + initData.hasLinkedVisibilityGroup = dialogTool->HasLinkedVisibilityGroup(); + initData.visibilityGroupName = dialogTool->GetVisibilityGroupName(); + initData.visibilityGroupTags = dialogTool->GetVisibilityGroupTags(); initData.scene = scene; initData.doc = doc; initData.data = data; @@ -123,6 +128,11 @@ VToolFlippingByAxis *VToolFlippingByAxis::Create(VToolFlippingByAxisInitData ini if (initData.parse == Document::FullParse) { + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + qApp->getUndoStack()->beginMacro(tr("Flipping by axis")); + } + VAbstractTool::AddRecord(initData.id, Tool::FlippingByAxis, initData.doc); VToolFlippingByAxis *tool = new VToolFlippingByAxis(initData); initData.scene->addItem(tool); @@ -133,6 +143,13 @@ VToolFlippingByAxis *VToolFlippingByAxis::Create(VToolFlippingByAxisInitData ini { initData.doc->IncrementReferens(initData.data->GetGObject(idObject)->getIdTool()); } + + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + VAbstractOperation::CreateVisibilityGroup(initData); + qApp->getUndoStack()->endMacro(); + } + return tool; } return nullptr; @@ -208,6 +225,10 @@ void VToolFlippingByAxis::SaveDialog(QDomElement &domElement, QList &ol doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetOriginPointId())); doc->SetAttribute(domElement, AttrAxisType, QString().setNum(static_cast(dialogTool->GetAxisType()))); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); } //--------------------------------------------------------------------------------------------------------------------- @@ -234,8 +255,10 @@ void VToolFlippingByAxis::SaveOptions(QDomElement &tag, QSharedPointer //--------------------------------------------------------------------------------------------------------------------- QString VToolFlippingByAxis::MakeToolTip() const { - return QStringLiteral(" %1: %2 ") - .arg(tr("Origin point"), OriginPointName()); + return QStringLiteral(" %1: %2 " + "%3") + .arg(tr("Origin point"), OriginPointName()) // 1, 2 + .arg(VisibilityGroupToolTip()); // 3 } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp index 97d161154..e862a99b7 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp @@ -74,6 +74,8 @@ void VToolFlippingByLine::setDialog() dialogTool->SetFirstLinePointId(m_firstLinePointId); dialogTool->SetSecondLinePointId(m_secondLinePointId); dialogTool->SetSuffix(suffix); + + SetDialogVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -89,6 +91,9 @@ VToolFlippingByLine *VToolFlippingByLine::Create(const QPointer &dia initData.secondLinePointId = dialogTool->GetSecondLinePointId(); initData.suffix = dialogTool->GetSuffix(); initData.source = dialogTool->GetObjects(); + initData.hasLinkedVisibilityGroup = dialogTool->HasLinkedVisibilityGroup(); + initData.visibilityGroupName = dialogTool->GetVisibilityGroupName(); + initData.visibilityGroupTags = dialogTool->GetVisibilityGroupTags(); initData.scene = scene; initData.doc = doc; initData.data = data; @@ -116,6 +121,11 @@ VToolFlippingByLine *VToolFlippingByLine::Create(VToolFlippingByLineInitData ini if (initData.parse == Document::FullParse) { + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + qApp->getUndoStack()->beginMacro(tr("flipping by line")); + } + VAbstractTool::AddRecord(initData.id, Tool::FlippingByLine, initData.doc); VToolFlippingByLine *tool = new VToolFlippingByLine(initData); initData.scene->addItem(tool); @@ -127,6 +137,13 @@ VToolFlippingByLine *VToolFlippingByLine::Create(VToolFlippingByLineInitData ini { initData.doc->IncrementReferens(initData.data->GetGObject(idObject)->getIdTool()); } + + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + VAbstractOperation::CreateVisibilityGroup(initData); + qApp->getUndoStack()->endMacro(); + } + return tool; } return nullptr; @@ -195,6 +212,10 @@ void VToolFlippingByLine::SaveDialog(QDomElement &domElement, QList &ol doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetFirstLinePointId())); doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetSecondLinePointId())); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); } //--------------------------------------------------------------------------------------------------------------------- @@ -222,8 +243,11 @@ void VToolFlippingByLine::SaveOptions(QDomElement &tag, QSharedPointer QString VToolFlippingByLine::MakeToolTip() const { return QStringLiteral(" %1: %2 " - " %3: %4 ") - .arg(tr("First line point"), FirstLinePointName(), tr("Second line point"), SecondLinePointName()); + " %3: %4 " + "%5") + .arg(tr("First line point"), FirstLinePointName(), + tr("Second line point"), SecondLinePointName()) // 1, 2, 3, 4 + .arg(VisibilityGroupToolTip()); // 5 } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp index 9d1ad8a3f..e3b72e2fa 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp @@ -29,12 +29,44 @@ #include "vabstractoperation.h" #include "../../../undocommands/label/operationmovelabel.h" #include "../../../undocommands/label/operationshowlabel.h" +#include "../../../undocommands/savetooloptions.h" +#include "../../../undocommands/undogroup.h" +#include "../../../undocommands/deltool.h" #include "../vgeometry/vpointf.h" const QString VAbstractOperation::TagItem = QStringLiteral("item"); const QString VAbstractOperation::TagSource = QStringLiteral("source"); const QString VAbstractOperation::TagDestination = QStringLiteral("destination"); +namespace +{ +/** + * @brief VisibilityGroupDataFromSource converts source list to visibility group list. + * @param data container with pattern data + * @param source list with source objects + * @return visibility group data + */ +QMap VisibilityGroupDataFromSource(const VContainer *data, const QVector &source) +{ + QMap groupData; + + for (auto &sId : source) + { + try + { + groupData.insert(sId, data->GetGObject(sId)->getIdTool()); + } + catch (const VExceptionBadId &) + { + // ignore + } + + } + + return groupData; +} +} + //--------------------------------------------------------------------------------------------------------------------- QString VAbstractOperation::getTagName() const { @@ -498,6 +530,26 @@ VAbstractOperation::VAbstractOperation(VAbstractPattern *doc, VContainer *data, destination(destination), operatedObjects() { + connect(doc, &VAbstractPattern::UpdateToolTip, [this]() + { + QMapIterator i(operatedObjects); + while (i.hasNext()) + { + i.next(); + if (i.value()->GetType() == GOType::Point) + { + VSimplePoint *item = qobject_cast(i.value()); + SCASSERT(item != nullptr) + item->setToolTip(ComplexPointToolTip(i.key())); + } + else + { + VSimpleCurve *item = qobject_cast(i.value()); + SCASSERT(item != nullptr) + item->setToolTip(ComplexCurveToolTip(i.key())); + } + } + }); } //--------------------------------------------------------------------------------------------------------------------- @@ -528,6 +580,95 @@ void VAbstractOperation::ChangeLabelVisibility(quint32 id, bool visible) } } +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractOperation::ApplyToolOptions(const QList &oldDependencies, const QList &newDependencies, + const QDomElement &oldDomElement, const QDomElement &newDomElement) +{ + bool updateToolOptions = + newDependencies != oldDependencies || not VDomDocument::Compare(newDomElement, oldDomElement); + bool updateVisibilityOptions = NeedUpdateVisibilityGroup(); + + if (updateToolOptions && updateVisibilityOptions) + { + qApp->getUndoStack()->beginMacro(tr("operation options")); + } + + if (updateToolOptions) + { + SaveToolOptions *saveOptions = new SaveToolOptions(oldDomElement, newDomElement, oldDependencies, + newDependencies, doc, m_id); + connect(saveOptions, &SaveToolOptions::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); + qApp->getUndoStack()->push(saveOptions); + } + + if (updateVisibilityOptions) + { + vidtype group = doc->GroupLinkedToTool(m_id); + + if (hasLinkedGroup) + { + if (group != null_id) + { + ChangeGroupOptions *groupOptions = new ChangeGroupOptions(doc, group, groupName, groupTags); + connect(groupOptions, &ChangeGroupOptions::UpdateGroups, doc, &VAbstractPattern::UpdateVisiblityGroups); + qApp->getUndoStack()->push(groupOptions); + } + else + { + VAbstractOperationInitData initData; + initData.id = m_id; + initData.hasLinkedVisibilityGroup = hasLinkedGroup; + initData.visibilityGroupName = groupName; + initData.visibilityGroupTags = groupTags; + initData.data = &(VDataTool::data); + initData.doc = doc; + initData.source = source; + + VAbstractOperation::CreateVisibilityGroup(initData); + } + } + else + { + DelGroup *delGroup = new DelGroup(doc, group); + connect(delGroup, &DelGroup::UpdateGroups, doc, &VAbstractPattern::UpdateVisiblityGroups); + qApp->getUndoStack()->push(delGroup); + } + } + + if (updateToolOptions && updateVisibilityOptions) + { + qApp->getUndoStack()->endMacro(); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractOperation::PerformDelete() +{ + vidtype group = doc->GroupLinkedToTool(m_id); + bool deleteGroup = group != null_id; + + qCDebug(vTool, "Begin deleting."); + if (deleteGroup) + { + qApp->getUndoStack()->beginMacro(tr("delete operation")); + + qCDebug(vTool, "Deleting the linked group."); + DelGroup *delGroup = new DelGroup(doc, group); + connect(delGroup, &DelGroup::UpdateGroups, doc, &VAbstractPattern::UpdateVisiblityGroups); + qApp->getUndoStack()->push(delGroup); + } + + qCDebug(vTool, "Deleting the tool."); + DelTool *delTool = new DelTool(doc, m_id); + connect(delTool, &DelTool::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); + qApp->getUndoStack()->push(delTool); + + if (deleteGroup) + { + qApp->getUndoStack()->endMacro(); + } +} + //--------------------------------------------------------------------------------------------------------------------- void VAbstractOperation::UpdateNamePosition(quint32 id, const QPointF &pos) { @@ -641,6 +782,33 @@ void VAbstractOperation::AllowCurveSelecting(bool enabled, GOType type) } } +//--------------------------------------------------------------------------------------------------------------------- +bool VAbstractOperation::NeedUpdateVisibilityGroup() const +{ + vidtype group = doc->GroupLinkedToTool(m_id); + + if (hasLinkedGroup) + { + if (group != null_id) + { + if (groupName != doc->GetGroupName(group) || groupTags != doc->GetGroupTags(group)) + { + return true; // rename group + } + } + else + { + return true; // create group + } + } + else + { + return group != null_id; // remove group + } + + return false; +} + //--------------------------------------------------------------------------------------------------------------------- void VAbstractOperation::InitOperatedObjects() { @@ -725,3 +893,38 @@ QString VAbstractOperation::ComplexCurveToolTip(quint32 itemId) const .arg(UnitsToStr(qApp->patternUnit(), true), MakeToolTip()); return toolTip; } + +//--------------------------------------------------------------------------------------------------------------------- +QString VAbstractOperation::VisibilityGroupToolTip() const +{ + vidtype group = doc->GroupLinkedToTool(m_id); + if (group != null_id) + { + return QStringLiteral(" %1: %2 ") + .arg(tr("Visibility group"), doc->GetGroupName(group)); // 1, 2 + } + + return QString(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractOperation::CreateVisibilityGroup(const VAbstractOperationInitData &initData) +{ + if (not initData.hasLinkedVisibilityGroup && not initData.visibilityGroupName.isEmpty()) + { + return; + } + + const QMap groupData = VisibilityGroupDataFromSource(initData.data, initData.source); + vidtype groupId = initData.data->getNextId(); + const QDomElement group = initData.doc->CreateGroup(groupId, initData.visibilityGroupName, + initData.visibilityGroupTags, groupData, initData.id); + if (not group.isNull()) + { + AddGroup *addGroup = new AddGroup(group, initData.doc); + connect(addGroup, &AddGroup::UpdateGroups, initData.doc, &VAbstractPattern::UpdateVisiblityGroups); + qApp->getUndoStack()->push(addGroup); + } + + return; +} diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h index 411b25d90..926411a72 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h @@ -53,15 +53,15 @@ struct DestinationItem struct VAbstractOperationInitData : VAbstractToolInitData { VAbstractOperationInitData() - : VAbstractToolInitData(), - suffix(), - source(), - destination() + : VAbstractToolInitData() {} - QString suffix; - QVector source; - QVector destination; + QString suffix{}; + QVector source{}; + QVector destination{}; + QString visibilityGroupName{}; + QStringList visibilityGroupTags{}; + bool hasLinkedVisibilityGroup{false}; }; // FIXME. I don't know how to use QGraphicsItem properly, so just took first available finished class. @@ -133,12 +133,19 @@ protected: QMap operatedObjects; + bool hasLinkedGroup{false}; + QString groupName{}; + QStringList groupTags{}; + VAbstractOperation(VAbstractPattern *doc, VContainer *data, quint32 id, const QString &suffix, const QVector &source, const QVector &destination, QGraphicsItem *parent = nullptr); virtual void AddToFile() override; virtual void ChangeLabelVisibility(quint32 id, bool visible) override; + virtual void ApplyToolOptions(const QList &oldDependencies, const QList &newDependencies, + const QDomElement &oldDomElement, const QDomElement &newDomElement) override; + virtual void PerformDelete() override; void UpdateNamePosition(quint32 id, const QPointF &pos); void SaveSourceDestination(QDomElement &tag); @@ -146,6 +153,9 @@ protected: template void ShowToolVisualization(bool show); + template + void SetDialogVisibilityGroupData(QPointer dialogTool); + void InitCurve(quint32 id, VContainer *data, GOType curveType, SceneObject sceneType); template @@ -155,13 +165,38 @@ protected: QString ComplexPointToolTip(quint32 itemId) const; QString ComplexCurveToolTip(quint32 itemId) const; + QString VisibilityGroupToolTip() const; + + static void CreateVisibilityGroup(const VAbstractOperationInitData & initData); private: Q_DISABLE_COPY(VAbstractOperation) void AllowCurveHover(bool enabled, GOType type); void AllowCurveSelecting(bool enabled, GOType type); + + bool NeedUpdateVisibilityGroup() const; }; +//--------------------------------------------------------------------------------------------------------------------- +template +void VAbstractOperation::SetDialogVisibilityGroupData(QPointer dialogTool) +{ + SCASSERT(not dialogTool.isNull()) + + vidtype group = doc->GroupLinkedToTool(m_id); + dialogTool->SetGroupCategories(doc->GetGroupCategories()); + if (group != null_id) + { + dialogTool->SetHasLinkedVisibilityGroup(true); + dialogTool->SetVisibilityGroupName(doc->GetGroupName(group)); + dialogTool->SetVisibilityGroupTags(doc->GetGroupTags(group)); + } + else + { + dialogTool->SetHasLinkedVisibilityGroup(false); + } +} + //--------------------------------------------------------------------------------------------------------------------- template void VAbstractOperation::ShowToolVisualization(bool show) diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp index c0bf390e3..24c5bf9b4 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp @@ -128,6 +128,8 @@ void VToolMove::setDialog() dialogTool->SetLength(formulaLength); dialogTool->SetSuffix(suffix); dialogTool->SetRotationOrigPointId(origPointId); + + SetDialogVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -145,6 +147,9 @@ VToolMove *VToolMove::Create(const QPointer &dialog, VMainGraphicsSc initData.rotationOrigin = dialogTool->GetRotationOrigPointId(); initData.suffix = dialogTool->GetSuffix(); initData.source = dialogTool->GetObjects(); + initData.hasLinkedVisibilityGroup = dialogTool->HasLinkedVisibilityGroup(); + initData.visibilityGroupName = dialogTool->GetVisibilityGroupName(); + initData.visibilityGroupTags = dialogTool->GetVisibilityGroupTags(); initData.scene = scene; initData.doc = doc; initData.data = data; @@ -309,6 +314,11 @@ QT_WARNING_POP if (initData.parse == Document::FullParse) { + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + qApp->getUndoStack()->beginMacro(tr("move")); + } + VAbstractTool::AddRecord(initData.id, Tool::Move, initData.doc); VToolMove *tool = new VToolMove(initData); initData.scene->addItem(tool); @@ -324,6 +334,13 @@ QT_WARNING_POP { initData.doc->IncrementReferens(initData.data->GetGObject(idObject)->getIdTool()); } + + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + VAbstractOperation::CreateVisibilityGroup(initData); + qApp->getUndoStack()->endMacro(); + } + return tool; } return nullptr; @@ -464,6 +481,10 @@ void VToolMove::SaveDialog(QDomElement &domElement, QList &oldDependenc doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetRotationOrigPointId())); doc->SetAttribute(domElement, AttrRotationAngle, dialogTool->GetRotationAngle()); + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); } //--------------------------------------------------------------------------------------------------------------------- @@ -497,7 +518,8 @@ QString VToolMove::MakeToolTip() const return QStringLiteral(" %1: %2° " " %3: %4 %5 " " %6: %7° " - " %8: %9 ") + " %8: %9 " + "%10") .arg(tr("Angle")) // 1 .arg(GetFormulaAngle().getDoubleValue()) // 2 .arg(tr("Length")) // 3 @@ -506,7 +528,8 @@ QString VToolMove::MakeToolTip() const tr("Rotation angle")) // 6 .arg(GetFormulaRotationAngle().getDoubleValue()) // 7 .arg(tr("Rotation origin point"), // 8 - OriginPointName()); // 9 + OriginPointName()) // 9 + .arg(VisibilityGroupToolTip()); // 10 } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index efbaf0083..1d4428f33 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -98,6 +98,8 @@ void VToolRotation::setDialog() dialogTool->SetOrigPointId(origPointId); dialogTool->SetAngle(formulaAngle); dialogTool->SetSuffix(suffix); + + SetDialogVisibilityGroupData(dialogTool); } //--------------------------------------------------------------------------------------------------------------------- @@ -113,6 +115,9 @@ VToolRotation *VToolRotation::Create(const QPointer &dialog, VMainGr initData.angle = dialogTool->GetAngle(); initData.suffix = dialogTool->GetSuffix(); initData.source = dialogTool->GetObjects(); + initData.hasLinkedVisibilityGroup = dialogTool->HasLinkedVisibilityGroup(); + initData.visibilityGroupName = dialogTool->GetVisibilityGroupName(); + initData.visibilityGroupTags = dialogTool->GetVisibilityGroupTags(); initData.scene = scene; initData.doc = doc; initData.data = data; @@ -251,6 +256,11 @@ QT_WARNING_POP if (initData.parse == Document::FullParse) { + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + qApp->getUndoStack()->beginMacro(tr("rotate")); + } + VAbstractTool::AddRecord(initData.id, Tool::Rotation, initData.doc); VToolRotation *tool = new VToolRotation(initData); initData.scene->addItem(tool); @@ -261,6 +271,13 @@ QT_WARNING_POP { initData.doc->IncrementReferens(initData.data->GetGObject(idObject)->getIdTool()); } + + if (initData.typeCreation == Source::FromGui && initData.hasLinkedVisibilityGroup) + { + VAbstractOperation::CreateVisibilityGroup(initData); + qApp->getUndoStack()->endMacro(); + } + return tool; } return nullptr; @@ -344,6 +361,10 @@ void VToolRotation::SaveDialog(QDomElement &domElement, QList &oldDepen doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetOrigPointId())); doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); + + // Save for later use. + hasLinkedGroup = dialogTool->HasLinkedVisibilityGroup(); + groupName = dialogTool->GetVisibilityGroupName(); } //--------------------------------------------------------------------------------------------------------------------- @@ -371,9 +392,11 @@ void VToolRotation::SaveOptions(QDomElement &tag, QSharedPointer &obj) QString VToolRotation::MakeToolTip() const { return QStringLiteral(" %1: %2 " - " %3: %4° ") - .arg(tr("Origin point"), OriginPointName(), tr("Rotation angle")) - .arg(GetFormulaAngle().getDoubleValue()); + " %3: %4° " + "%5") + .arg(tr("Origin point"), OriginPointName(), tr("Rotation angle")) // 1, 2, 3 + .arg(GetFormulaAngle().getDoubleValue()) // 4 + .arg(VisibilityGroupToolTip()); // 5 } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/vdrawtool.cpp b/src/libs/vtools/tools/drawTools/vdrawtool.cpp index 682a9c368..1abee64b1 100644 --- a/src/libs/vtools/tools/drawTools/vdrawtool.cpp +++ b/src/libs/vtools/tools/drawTools/vdrawtool.cpp @@ -114,14 +114,7 @@ void VDrawTool::SaveDialogChange(const QString &undoText) QList oldDependencies; QList newDependencies; SaveDialog(newDomElement, oldDependencies, newDependencies); - - if (newDependencies != oldDependencies || not VDomDocument::Compare(newDomElement, oldDomElement)) - { - SaveToolOptions *saveOptions = new SaveToolOptions(oldDomElement, newDomElement, oldDependencies, - newDependencies, doc, m_id); - connect(saveOptions, &SaveToolOptions::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); - qApp->getUndoStack()->push(saveOptions); - } + ApplyToolOptions(oldDependencies, newDependencies, oldDomElement, newDomElement); } else { @@ -129,6 +122,19 @@ void VDrawTool::SaveDialogChange(const QString &undoText) } } +//--------------------------------------------------------------------------------------------------------------------- +void VDrawTool::ApplyToolOptions(const QList &oldDependencies, const QList &newDependencies, + const QDomElement &oldDomElement, const QDomElement &newDomElement) +{ + if (newDependencies != oldDependencies || not VDomDocument::Compare(newDomElement, oldDomElement)) + { + SaveToolOptions *saveOptions = new SaveToolOptions(oldDomElement, newDomElement, oldDependencies, + newDependencies, doc, m_id); + connect(saveOptions, &SaveToolOptions::NeedLiteParsing, doc, &VAbstractPattern::LiteParseTree); + qApp->getUndoStack()->push(saveOptions); + } +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief AddToFile add tag with informations about tool into file. diff --git a/src/libs/vtools/tools/drawTools/vdrawtool.h b/src/libs/vtools/tools/drawTools/vdrawtool.h index 396401400..b8de88334 100644 --- a/src/libs/vtools/tools/drawTools/vdrawtool.h +++ b/src/libs/vtools/tools/drawTools/vdrawtool.h @@ -51,9 +51,7 @@ #include "../vwidgets/vabstractmainwindow.h" #include "../vdatatool.h" #include "../vgeometry/vpointf.h" -#include "../vtools/undocommands/addgroup.h" -#include "../vtools/undocommands/additemtogroup.h" -#include "../vtools/undocommands/removeitemfromgroup.h" +#include "../vtools/undocommands/undogroup.h" /** * @brief The VDrawTool abstract class for all draw tool. @@ -101,6 +99,8 @@ protected: virtual void SaveDialog(QDomElement &domElement, QList &oldDependencies, QList &newDependencies)=0; virtual void SaveDialogChange(const QString &undoText = QString()) final; + virtual void ApplyToolOptions(const QList &oldDependencies, const QList &newDependencies, + const QDomElement &oldDomElement, const QDomElement &newDomElement); virtual void AddToFile() override; void SaveOption(QSharedPointer &obj); virtual void SaveOptions(QDomElement &tag, QSharedPointer &obj); diff --git a/src/libs/vtools/tools/vabstracttool.cpp b/src/libs/vtools/tools/vabstracttool.cpp index 17b459939..0488f935a 100644 --- a/src/libs/vtools/tools/vabstracttool.cpp +++ b/src/libs/vtools/tools/vabstracttool.cpp @@ -224,10 +224,7 @@ void VAbstractTool::DeleteToolWithConfirm(bool ask) } } - qCDebug(vTool, "Begin deleting."); - DelTool *delTool = new DelTool(doc, m_id); - connect(delTool, &DelTool::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); - qApp->getUndoStack()->push(delTool); + PerformDelete(); // Throw exception, this will help prevent case when we forget to immediately quit function. VExceptionToolWasDeleted e("Tool was used after deleting."); @@ -239,6 +236,15 @@ void VAbstractTool::DeleteToolWithConfirm(bool ask) } } +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractTool::PerformDelete() +{ + qCDebug(vTool, "Begin deleting."); + DelTool *delTool = new DelTool(doc, m_id); + connect(delTool, &DelTool::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing); + qApp->getUndoStack()->push(delTool); +} + //--------------------------------------------------------------------------------------------------------------------- int VAbstractTool::ConfirmDeletion() { diff --git a/src/libs/vtools/tools/vabstracttool.h b/src/libs/vtools/tools/vabstracttool.h index 00f467654..80d6135b2 100644 --- a/src/libs/vtools/tools/vabstracttool.h +++ b/src/libs/vtools/tools/vabstracttool.h @@ -159,6 +159,7 @@ protected: */ virtual void RemoveReferens() {} virtual void DeleteToolWithConfirm(bool ask = true); + virtual void PerformDelete(); static int ConfirmDeletion(); template diff --git a/src/libs/vtools/tools/vtoolseamallowance.h b/src/libs/vtools/tools/vtoolseamallowance.h index c2e256f99..9de9c5d8b 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.h +++ b/src/libs/vtools/tools/vtoolseamallowance.h @@ -133,6 +133,8 @@ public slots: void Highlight(quint32 id); void UpdateDetailLabel(); void UpdatePatternInfo(); + void ShowOptions(); + void DeleteFromMenu(); protected slots: void UpdateGrainline(); void SaveMoveDetail(const QPointF &ptPos); @@ -161,11 +163,9 @@ protected: virtual void SaveDialogChange(const QString &undoText = QString()) final; private slots: - void ShowOptions(); void ToggleInLayout(bool checked); void ToggleForbidFlipping(bool checked); void ToggleForceFlipping(bool checked); - void DeleteFromMenu(); void ToggleExcludeState(quint32 id); void ToggleNodePointAngleType(quint32 id, PieceNodeAngle type); void ToggleNodePointPassmark(quint32 id, bool toggle); diff --git a/src/libs/vtools/undocommands/addgroup.cpp b/src/libs/vtools/undocommands/addgroup.cpp deleted file mode 100644 index c0eab5ff0..000000000 --- a/src/libs/vtools/undocommands/addgroup.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/************************************************************************ - ** - ** @file addgroup.cpp - ** @author Roman Telezhynskyi - ** @date 6 4, 2016 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ - -#include "addgroup.h" - -#include -#include - -#include "../vmisc/vabstractapplication.h" -#include "../vmisc/def.h" -#include "../vwidgets/vmaingraphicsview.h" -#include "../ifc/xml/vabstractpattern.h" -#include "vundocommand.h" - -//--------------------------------------------------------------------------------------------------------------------- -AddGroup::AddGroup(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent) - : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("add group")); - nodeId = doc->GetParametrId(xml); -} - -//--------------------------------------------------------------------------------------------------------------------- -AddGroup::~AddGroup() -{ -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddGroup::undo() -{ - qCDebug(vUndo, "Undo."); - - doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - group.setAttribute(VAbstractPattern::AttrVisible, trueStr); - doc->ParseGroups(groups); - if (groups.removeChild(group).isNull()) - { - qCDebug(vUndo, "Can't delete group."); - return; - } - emit UpdateGroups(); - } - else - { - if (groups.childNodes().isEmpty()) - { - QDomNode parent = groups.parentNode(); - parent.removeChild(groups); - } - - qCDebug(vUndo, "Can't get group by id = %u.", nodeId); - return; - } - } - else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - if (qApp->GetDrawMode() == Draw::Calculation) - { - emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo - } -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddGroup::redo() -{ - qCDebug(vUndo, "Redo."); - - doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - groups.appendChild(xml); - doc->ParseGroups(groups); - emit UpdateGroups(); - } - else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); -} diff --git a/src/libs/vtools/undocommands/addgroup.h b/src/libs/vtools/undocommands/addgroup.h deleted file mode 100644 index 0c8b21267..000000000 --- a/src/libs/vtools/undocommands/addgroup.h +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************ - ** - ** @file addgroup.h - ** @author Roman Telezhynskyi - ** @date 6 4, 2016 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ - -#ifndef ADDGROUP_H -#define ADDGROUP_H - -#include -#include -#include -#include -#include -#include - -#include "vundocommand.h" - -class AddGroup : public VUndoCommand -{ - Q_OBJECT -public: - AddGroup(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent = nullptr); - virtual ~AddGroup(); - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroups(); -private: - Q_DISABLE_COPY(AddGroup) - const QString nameActivDraw; -}; - -#endif // ADDGROUP_H diff --git a/src/libs/vtools/undocommands/additemtogroup.cpp b/src/libs/vtools/undocommands/additemtogroup.cpp deleted file mode 100644 index 2c5af9d5e..000000000 --- a/src/libs/vtools/undocommands/additemtogroup.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/************************************************************************ - ** - ** @file addgroup.h - ** @author Ronan Le Tiec - ** @date 31 3, 2018 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ - -#include "additemtogroup.h" - -#include -#include - -#include "../vmisc/vabstractapplication.h" -#include "../vmisc/def.h" -#include "../vwidgets/vmaingraphicsview.h" -#include "../ifc/xml/vabstractpattern.h" -#include "../vtools/tools/vdatatool.h" -#include "vundocommand.h" - -//--------------------------------------------------------------------------------------------------------------------- -AddItemToGroup::AddItemToGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent) - : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("Add item to group")); - nodeId = groupId; -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddItemToGroup::undo() -{ - qCDebug(vUndo, "Undo the add item to group"); - performUndoRedo(true); -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddItemToGroup::redo() -{ - qCDebug(vUndo, "Redo the add item to group"); - performUndoRedo(false); -} - -//--------------------------------------------------------------------------------------------------------------------- -void AddItemToGroup::performUndoRedo(bool isUndo) -{ - doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change - - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - if(isUndo) - { - if (group.removeChild(xml).isNull()) - { - qCDebug(vUndo, "Can't delete item."); - return; - } - - // set the item visible. Because if the undo is done when unvisible and it's not in any group after the - // undo, it stays unvisible until the entire drawing is completly rerendered. - quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR); - quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR); - VDataTool* tool = VAbstractPattern::getTool(toolId); - tool->GroupVisibility(objectId,true); - } - else // is redo - { - - if (group.appendChild(xml).isNull()) - { - qCDebug(vUndo, "Can't add item."); - return; - } - } - - doc->SetModified(true); - emit qApp->getCurrentDocument()->patternChanged(false); - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - emit UpdateGroups(); - } - else - { - qCDebug(vUndo, "Can't get group by id = %u.", nodeId); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - if (qApp->GetDrawMode() == Draw::Calculation) - { - emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo - } -} diff --git a/src/libs/vtools/undocommands/additemtogroup.h b/src/libs/vtools/undocommands/additemtogroup.h deleted file mode 100644 index 3f8d9c7b8..000000000 --- a/src/libs/vtools/undocommands/additemtogroup.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************ - ** - ** @file addgroup.h - ** @author Ronan Le Tiec - ** @date 31 3, 2018 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ - -#ifndef ADDITEMTOGROUP_H -#define ADDITEMTOGROUP_H - -#include -#include -#include -#include -#include -#include - -#include "vundocommand.h" - -class AddItemToGroup : public VUndoCommand -{ - Q_OBJECT -public: - AddItemToGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent = nullptr); - virtual ~AddItemToGroup()=default; - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroups(); -protected: - void performUndoRedo(bool isUndo); -private: - Q_DISABLE_COPY(AddItemToGroup) - const QString nameActivDraw; -}; - -#endif // ADDITEMTOGROUP_H diff --git a/src/libs/vtools/undocommands/changegroupvisibility.cpp b/src/libs/vtools/undocommands/changegroupvisibility.cpp deleted file mode 100644 index ef511f084..000000000 --- a/src/libs/vtools/undocommands/changegroupvisibility.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/************************************************************************ - ** - ** @file changegroupVisibility.cpp - ** @author Roman Telezhynskyi - ** @date 14 7, 2019 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2019 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ -#include "changegroupvisibility.h" -#include "../vmisc/vabstractapplication.h" -#include "../vwidgets/vmaingraphicsview.h" - -//--------------------------------------------------------------------------------------------------------------------- -ChangeGroupVisibility::ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent) - : VUndoCommand(QDomElement(), doc, parent), - m_newVisibility(visible), - m_nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("change group visibility")); - nodeId = id; - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - m_oldVisibility = doc->GetParametrBool(group, VAbstractPattern::AttrVisible, trueStr); - } - else - { - qDebug("Can't get group by id = %u.", id); - } -} - -//--------------------------------------------------------------------------------------------------------------------- -ChangeGroupVisibility::~ChangeGroupVisibility() -{} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeGroupVisibility::undo() -{ - qCDebug(vUndo, "Undo."); - - Do(m_oldVisibility); -} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeGroupVisibility::redo() -{ - qCDebug(vUndo, "Redo."); - - Do(m_newVisibility); -} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeGroupVisibility::Do(bool visible) -{ - doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change - - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - doc->SetAttribute(group, VAbstractPattern::AttrVisible, visible); - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } - - emit UpdateGroup(nodeId, visible); - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - } - else - { - qDebug("Can't get group by id = %u.", nodeId); - } -} diff --git a/src/libs/vtools/undocommands/changemultiplegroupsvisibility.cpp b/src/libs/vtools/undocommands/changemultiplegroupsvisibility.cpp deleted file mode 100644 index 47e16355c..000000000 --- a/src/libs/vtools/undocommands/changemultiplegroupsvisibility.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/************************************************************************ - ** - ** @file changemultiplegroupsVisibility.cpp - ** @author Roman Telezhynskyi - ** @date 15 7, 2019 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2019 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ -#include "changemultiplegroupsvisibility.h" -#include "../vmisc/vabstractapplication.h" -#include "../vwidgets/vmaingraphicsview.h" - -//--------------------------------------------------------------------------------------------------------------------- -ChangeMultipleGroupsVisibility::ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector &groups, - bool visible, QUndoCommand *parent) - : VUndoCommand(QDomElement(), doc, parent), - m_groups(groups), - m_newVisibility(visible), - m_nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("change multiple groups visibility")); - - for(auto & groupId : m_groups) - { - QDomElement group = doc->elementById(groupId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - m_oldVisibility.insert(groupId, doc->GetParametrBool(group, VAbstractPattern::AttrVisible, trueStr)); - } - else - { - qDebug("Can't get group by id = %u.", groupId); - } - } - -} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeMultipleGroupsVisibility::undo() -{ - qCDebug(vUndo, "Undo."); - - doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change - - QMap groupsState; - - QMap::const_iterator i = m_oldVisibility.constBegin(); - while (i != m_oldVisibility.constEnd()) - { - QDomElement group = doc->elementById(i.key(), VAbstractPattern::TagGroup); - if (group.isElement()) - { - doc->SetAttribute(group, VAbstractPattern::AttrVisible, i.value()); - groupsState.insert(i.key(), i.value()); - } - else - { - qDebug("Can't get group by id = %u.", i.key()); - } - ++i; - } - - if (not groupsState.isEmpty()) - { - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - - emit UpdateMultipleGroups(groupsState); - } -} - -//--------------------------------------------------------------------------------------------------------------------- -void ChangeMultipleGroupsVisibility::redo() -{ - qCDebug(vUndo, "ChangeMultipleGroupsVisibility::redo"); - - doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change - - QMap groupsState; - - for (auto& groupId : m_groups) - { - QDomElement group = doc->elementById(groupId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - doc->SetAttribute(group, VAbstractPattern::AttrVisible, m_newVisibility); - groupsState.insert(groupId, m_newVisibility); - } - else - { - qDebug("Can't get group by id = %u.", groupId); - } - } - - if (not groupsState.isEmpty()) - { - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - - emit UpdateMultipleGroups(groupsState); - } -} diff --git a/src/libs/vtools/undocommands/changemultiplegroupsvisibility.h b/src/libs/vtools/undocommands/changemultiplegroupsvisibility.h deleted file mode 100644 index 4a70c65c8..000000000 --- a/src/libs/vtools/undocommands/changemultiplegroupsvisibility.h +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************ - ** - ** @file changemultiplegroupsVisibility.h - ** @author Roman Telezhynskyi - ** @date 15 7, 2019 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2019 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ -#ifndef CHANGEMULTIPLEGROUPSVISIBILITY_H -#define CHANGEMULTIPLEGROUPSVISIBILITY_H - -#include "vundocommand.h" - -class ChangeMultipleGroupsVisibility : public VUndoCommand -{ - Q_OBJECT -public: - ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector &groups, bool visible, - QUndoCommand *parent = nullptr); - virtual ~ChangeMultipleGroupsVisibility() =default; - virtual void undo() override; - virtual void redo() override; - -signals: - void UpdateMultipleGroups(const QMap &groups); - -private: - Q_DISABLE_COPY(ChangeMultipleGroupsVisibility) - - QVector m_groups; - bool m_newVisibility{true}; - QMap m_oldVisibility{}; - const QString m_nameActivDraw{}; -}; - -#endif // CHANGEMULTIPLEGROUPSVISIBILITY_H diff --git a/src/libs/vtools/undocommands/delgroup.cpp b/src/libs/vtools/undocommands/delgroup.cpp deleted file mode 100644 index 87e818c25..000000000 --- a/src/libs/vtools/undocommands/delgroup.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************************ - ** - ** @file delgroup.cpp - ** @author Roman Telezhynskyi - ** @date 6 4, 2016 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ - -#include "delgroup.h" - -#include -#include -#include - -#include "../vmisc/vabstractapplication.h" -#include "../vmisc/def.h" -#include "../vwidgets/vmaingraphicsview.h" -#include "../ifc/xml/vabstractpattern.h" -#include "vundocommand.h" - -//--------------------------------------------------------------------------------------------------------------------- -DelGroup::DelGroup(VAbstractPattern *doc, quint32 id, QUndoCommand *parent) - : VUndoCommand(QDomElement(), doc, parent), nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("delete group")); - nodeId = id; - xml = doc->CloneNodeById(nodeId); -} - -//--------------------------------------------------------------------------------------------------------------------- -DelGroup::~DelGroup() -{ -} - -//--------------------------------------------------------------------------------------------------------------------- -void DelGroup::undo() -{ - qCDebug(vUndo, "Undo."); - - if (qApp->GetDrawMode() == Draw::Calculation) - { - emit doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change - } - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - groups.appendChild(xml); - doc->ParseGroups(groups); - emit UpdateGroups(); - } - else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); -} - -//--------------------------------------------------------------------------------------------------------------------- -void DelGroup::redo() -{ - qCDebug(vUndo, "Redo."); - - if (qApp->GetDrawMode() == Draw::Calculation) - {//Keep first! - emit doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change - } - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - group.setAttribute(VAbstractPattern::AttrVisible, trueStr); - doc->ParseGroups(groups); - if (groups.removeChild(group).isNull()) - { - qCDebug(vUndo, "Can't delete group."); - return; - } - emit UpdateGroups(); - - if (groups.childNodes().isEmpty()) - { - QDomNode parent = groups.parentNode(); - parent.removeChild(groups); - } - } - else - { - qCDebug(vUndo, "Can't get group by id = %u.", nodeId); - return; - } - } - else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); -} diff --git a/src/libs/vtools/undocommands/delgroup.h b/src/libs/vtools/undocommands/delgroup.h deleted file mode 100644 index bdd5120f1..000000000 --- a/src/libs/vtools/undocommands/delgroup.h +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************ - ** - ** @file delgroup.h - ** @author Roman Telezhynskyi - ** @date 6 4, 2016 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ - -#ifndef DELGROUP_H -#define DELGROUP_H - -#include -#include -#include -#include -#include - -#include "vundocommand.h" - -class DelGroup : public VUndoCommand -{ - Q_OBJECT -public: - DelGroup(VAbstractPattern *doc, quint32 id, QUndoCommand *parent = nullptr); - virtual ~DelGroup(); - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroups(); -private: - Q_DISABLE_COPY(DelGroup) - const QString nameActivDraw; -}; - -#endif // DELGROUP_H diff --git a/src/libs/vtools/undocommands/removeitemfromgroup.cpp b/src/libs/vtools/undocommands/removeitemfromgroup.cpp deleted file mode 100644 index 27b905ebe..000000000 --- a/src/libs/vtools/undocommands/removeitemfromgroup.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/************************************************************************ - ** - ** @file removeitemfromgroup.cpp - ** @author Ronan Le Tiec - ** @date 1 4, 2018 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ - -#include "removeitemfromgroup.h" - -#include -#include - -#include "../vmisc/vabstractapplication.h" -#include "../vmisc/def.h" -#include "../vwidgets/vmaingraphicsview.h" -#include "../ifc/xml/vabstractpattern.h" -#include "../vtools/tools/vdatatool.h" -#include "vundocommand.h" - -//--------------------------------------------------------------------------------------------------------------------- - -RemoveItemFromGroup::RemoveItemFromGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent) - : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) -{ - setText(tr("Remove item from group")); - nodeId = groupId; -} - -//--------------------------------------------------------------------------------------------------------------------- -void RemoveItemFromGroup::undo() -{ - qCDebug(vUndo, "Undo the remove item from group"); - performUndoRedo(true); -} - -//--------------------------------------------------------------------------------------------------------------------- -void RemoveItemFromGroup::redo() -{ - qCDebug(vUndo, "Redo the add item to group"); - performUndoRedo(false); -} - -//--------------------------------------------------------------------------------------------------------------------- -void RemoveItemFromGroup::performUndoRedo(bool isUndo) -{ - doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change - - QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); - if (group.isElement()) - { - if(isUndo) - { - if (group.appendChild(xml).isNull()) - { - qCDebug(vUndo, "Can't add the item."); - return; - } - } - else // is redo - { - if (group.removeChild(xml).isNull()) - { - qCDebug(vUndo, "Can't delete item."); - return; - } - - // set the item visible. Because if the undo is done when unvisibile and it's not in any group after the - // undo, it stays unvisible until the entire drawing is completly rerendered. - quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR); - quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR); - VDataTool* tool = VAbstractPattern::getTool(toolId); - tool->GroupVisibility(objectId,true); - } - - doc->SetModified(true); - emit qApp->getCurrentDocument()->patternChanged(false); - - QDomElement groups = doc->CreateGroups(); - if (not groups.isNull()) - { - doc->ParseGroups(groups); - } else - { - qCDebug(vUndo, "Can't get tag Groups."); - return; - } - - emit UpdateGroups(); - } - else - { - qCDebug(vUndo, "Can't get group by id = %u.", nodeId); - return; - } - - VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); - - if (qApp->GetDrawMode() == Draw::Calculation) - { - emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo - } -} diff --git a/src/libs/vtools/undocommands/removeitemfromgroup.h b/src/libs/vtools/undocommands/removeitemfromgroup.h deleted file mode 100644 index e19873476..000000000 --- a/src/libs/vtools/undocommands/removeitemfromgroup.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************ - ** - ** @file removeitemfromgroup.h - ** @author Ronan Le Tiec - ** @date 31 3, 2018 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2016 Valentina project - ** All Rights Reserved. - ** - ** Valentina is free software: you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by - ** the Free Software Foundation, either version 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina is distributed in the hope that it will be useful, - ** but WITHOUT ANY WARRANTY; without even the implied warranty of - ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ** GNU General Public License for more details. - ** - ** You should have received a copy of the GNU General Public License - ** along with Valentina. If not, see . - ** - *************************************************************************/ - -#ifndef REMOVEITEMFROMGROUP_H -#define REMOVEITEMFROMGROUP_H - -#include -#include -#include -#include -#include -#include - -#include "vundocommand.h" - -class RemoveItemFromGroup : public VUndoCommand -{ - Q_OBJECT -public: - RemoveItemFromGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent = nullptr); - virtual ~RemoveItemFromGroup()=default; - virtual void undo() override; - virtual void redo() override; -signals: - void UpdateGroups(); -protected: - void performUndoRedo(bool isUndo); -private: - Q_DISABLE_COPY(RemoveItemFromGroup) - const QString nameActivDraw; -}; - -#endif // REMOVEITEMFROMGROUP_H diff --git a/src/libs/vtools/undocommands/undocommands.pri b/src/libs/vtools/undocommands/undocommands.pri index 310cb557c..37d8a34b6 100644 --- a/src/libs/vtools/undocommands/undocommands.pri +++ b/src/libs/vtools/undocommands/undocommands.pri @@ -4,20 +4,17 @@ HEADERS += \ $$PWD/addtocalc.h \ $$PWD/addpatternpiece.h \ - $$PWD/changegroupvisibility.h \ - $$PWD/changemultiplegroupsvisibility.h \ $$PWD/movespoint.h \ $$PWD/movespline.h \ $$PWD/movesplinepath.h \ $$PWD/savetooloptions.h \ $$PWD/deltool.h \ $$PWD/deletepatternpiece.h \ + $$PWD/undogroup.h \ $$PWD/vundocommand.h \ $$PWD/renamepp.h \ $$PWD/label/movelabel.h \ $$PWD/label/movedoublelabel.h \ - $$PWD/addgroup.h \ - $$PWD/delgroup.h \ $$PWD/label/moveabstractlabel.h \ $$PWD/label/operationmovelabel.h \ $$PWD/addpiece.h \ @@ -29,27 +26,22 @@ HEADERS += \ $$PWD/label/showdoublelabel.h \ $$PWD/label/operationshowlabel.h \ $$PWD/saveplacelabeloptions.h \ - $$PWD/togglepiecestate.h \ - $$PWD/additemtogroup.h \ - $$PWD/removeitemfromgroup.h + $$PWD/togglepiecestate.h SOURCES += \ $$PWD/addtocalc.cpp \ $$PWD/addpatternpiece.cpp \ - $$PWD/changegroupvisibility.cpp \ - $$PWD/changemultiplegroupsvisibility.cpp \ $$PWD/movespoint.cpp \ $$PWD/movespline.cpp \ $$PWD/movesplinepath.cpp \ $$PWD/savetooloptions.cpp \ $$PWD/deltool.cpp \ $$PWD/deletepatternpiece.cpp \ + $$PWD/undogroup.cpp \ $$PWD/vundocommand.cpp \ $$PWD/renamepp.cpp \ $$PWD/label/movelabel.cpp \ $$PWD/label/movedoublelabel.cpp \ - $$PWD/addgroup.cpp \ - $$PWD/delgroup.cpp \ $$PWD/label/moveabstractlabel.cpp \ $$PWD/label/operationmovelabel.cpp \ $$PWD/addpiece.cpp \ @@ -61,6 +53,4 @@ SOURCES += \ $$PWD/label/showdoublelabel.cpp \ $$PWD/label/operationshowlabel.cpp \ $$PWD/saveplacelabeloptions.cpp \ - $$PWD/togglepiecestate.cpp \ - $$PWD/additemtogroup.cpp \ - $$PWD/removeitemfromgroup.cpp + $$PWD/togglepiecestate.cpp diff --git a/src/libs/vtools/undocommands/undogroup.cpp b/src/libs/vtools/undocommands/undogroup.cpp new file mode 100644 index 000000000..8b9def919 --- /dev/null +++ b/src/libs/vtools/undocommands/undogroup.cpp @@ -0,0 +1,592 @@ +/************************************************************************ + ** + ** @file undogroup.cpp + ** @author Roman Telezhynskyi + ** @date 18 3, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "undogroup.h" + +#include +#include + +#include "../vmisc/vabstractapplication.h" +#include "../vmisc/def.h" +#include "../vwidgets/vmaingraphicsview.h" +#include "../ifc/xml/vabstractpattern.h" +#include "vundocommand.h" +#include "../vtools/tools/vdatatool.h" + +//AddGroup +//--------------------------------------------------------------------------------------------------------------------- +AddGroup::AddGroup(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent) + : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("add group")); + nodeId = doc->GetParametrId(xml); +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddGroup::undo() +{ + qCDebug(vUndo, "Undo."); + + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + group.setAttribute(VAbstractPattern::AttrVisible, trueStr); + doc->ParseGroups(groups); + if (groups.removeChild(group).isNull()) + { + qCDebug(vUndo, "Can't delete group."); + return; + } + emit UpdateGroups(); + } + else + { + if (groups.childNodes().isEmpty()) + { + QDomNode parent = groups.parentNode(); + parent.removeChild(groups); + } + + qCDebug(vUndo, "Can't get group by id = %u.", nodeId); + return; + } + } + else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + if (qApp->GetDrawMode() == Draw::Calculation) + { + emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddGroup::redo() +{ + qCDebug(vUndo, "Redo."); + + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + groups.appendChild(xml); + doc->ParseGroups(groups); + emit UpdateGroups(); + } + else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); +} + +//RenameGroup +//--------------------------------------------------------------------------------------------------------------------- +RenameGroup::RenameGroup(VAbstractPattern *doc, quint32 id, const QString &name, QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + newName(name) +{ + setText(tr("rename group")); + nodeId = id; + oldName = doc->GetGroupName(nodeId); +} + +//--------------------------------------------------------------------------------------------------------------------- +void RenameGroup::undo() +{ + qCDebug(vUndo, "Undo."); + doc->SetGroupName(nodeId, oldName); + emit UpdateGroups(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void RenameGroup::redo() +{ + qCDebug(vUndo, "Redo."); + + doc->SetGroupName(nodeId, newName); + emit UpdateGroups(); +} + +//ChangeGroupOptions +//--------------------------------------------------------------------------------------------------------------------- +ChangeGroupOptions::ChangeGroupOptions(VAbstractPattern *doc, quint32 id, const QString &name, const QStringList &tags, + QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + newName(name), + newTags(tags) +{ + setText(tr("rename group")); + nodeId = id; + oldName = doc->GetGroupName(nodeId); + oldTags = doc->GetGroupTags(nodeId); +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupOptions::undo() +{ + qCDebug(vUndo, "Undo."); + doc->SetGroupName(nodeId, oldName); + doc->SetGroupTags(nodeId, oldTags); + emit UpdateGroups(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupOptions::redo() +{ + qCDebug(vUndo, "Redo."); + doc->SetGroupName(nodeId, newName); + doc->SetGroupTags(nodeId, newTags); + emit UpdateGroups(); +} + +//AddItemToGroup +//--------------------------------------------------------------------------------------------------------------------- +AddItemToGroup::AddItemToGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent) + : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("Add item to group")); + nodeId = groupId; +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddItemToGroup::undo() +{ + qCDebug(vUndo, "Undo the add item to group"); + performUndoRedo(true); +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddItemToGroup::redo() +{ + qCDebug(vUndo, "Redo the add item to group"); + performUndoRedo(false); +} + +//--------------------------------------------------------------------------------------------------------------------- +void AddItemToGroup::performUndoRedo(bool isUndo) +{ + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change + + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + if(isUndo) + { + if (group.removeChild(xml).isNull()) + { + qCDebug(vUndo, "Can't delete item."); + return; + } + + // set the item visible. Because if the undo is done when unvisible and it's not in any group after the + // undo, it stays unvisible until the entire drawing is completly rerendered. + quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR); + quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR); + VDataTool* tool = VAbstractPattern::getTool(toolId); + tool->GroupVisibility(objectId,true); + } + else // is redo + { + + if (group.appendChild(xml).isNull()) + { + qCDebug(vUndo, "Can't add item."); + return; + } + } + + doc->SetModified(true); + emit qApp->getCurrentDocument()->patternChanged(false); + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + emit UpdateGroups(); + } + else + { + qCDebug(vUndo, "Can't get group by id = %u.", nodeId); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + if (qApp->GetDrawMode() == Draw::Calculation) + { + emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo + } +} + +//RemoveItemFromGroup +//--------------------------------------------------------------------------------------------------------------------- +RemoveItemFromGroup::RemoveItemFromGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, + QUndoCommand *parent) + : VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("Remove item from group")); + nodeId = groupId; +} + +//--------------------------------------------------------------------------------------------------------------------- +void RemoveItemFromGroup::undo() +{ + qCDebug(vUndo, "Undo the remove item from group"); + performUndoRedo(true); +} + +//--------------------------------------------------------------------------------------------------------------------- +void RemoveItemFromGroup::redo() +{ + qCDebug(vUndo, "Redo the add item to group"); + performUndoRedo(false); +} + +//--------------------------------------------------------------------------------------------------------------------- +void RemoveItemFromGroup::performUndoRedo(bool isUndo) +{ + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change + + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + if(isUndo) + { + if (group.appendChild(xml).isNull()) + { + qCDebug(vUndo, "Can't add the item."); + return; + } + } + else // is redo + { + if (group.removeChild(xml).isNull()) + { + qCDebug(vUndo, "Can't delete item."); + return; + } + + // set the item visible. Because if the undo is done when unvisibile and it's not in any group after the + // undo, it stays unvisible until the entire drawing is completly rerendered. + quint32 objectId = doc->GetParametrUInt(xml, QStringLiteral("object"), NULL_ID_STR); + quint32 toolId = doc->GetParametrUInt(xml, QStringLiteral("tool"), NULL_ID_STR); + VDataTool* tool = VAbstractPattern::getTool(toolId); + tool->GroupVisibility(objectId,true); + } + + doc->SetModified(true); + emit qApp->getCurrentDocument()->patternChanged(false); + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + emit UpdateGroups(); + } + else + { + qCDebug(vUndo, "Can't get group by id = %u.", nodeId); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + + if (qApp->GetDrawMode() == Draw::Calculation) + { + emit doc->SetCurrentPP(nameActivDraw);//Return current pattern piece after undo + } +} + +//ChangeGroupVisibility +//--------------------------------------------------------------------------------------------------------------------- +ChangeGroupVisibility::ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + m_newVisibility(visible), + m_nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("change group visibility")); + nodeId = id; + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + m_oldVisibility = doc->GetParametrBool(group, VAbstractPattern::AttrVisible, trueStr); + } + else + { + qDebug("Can't get group by id = %u.", id); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupVisibility::undo() +{ + qCDebug(vUndo, "Undo."); + + Do(m_oldVisibility); +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupVisibility::redo() +{ + qCDebug(vUndo, "Redo."); + + Do(m_newVisibility); +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeGroupVisibility::Do(bool visible) +{ + doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change + + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + doc->SetAttribute(group, VAbstractPattern::AttrVisible, visible); + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } + + emit UpdateGroup(nodeId, visible); + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + } + else + { + qDebug("Can't get group by id = %u.", nodeId); + } +} + +//ChangeMultipleGroupsVisibility +//--------------------------------------------------------------------------------------------------------------------- +ChangeMultipleGroupsVisibility::ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector &groups, + bool visible, QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), + m_groups(groups), + m_newVisibility(visible), + m_nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("change multiple groups visibility")); + + for(auto & groupId : m_groups) + { + QDomElement group = doc->elementById(groupId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + m_oldVisibility.insert(groupId, doc->GetParametrBool(group, VAbstractPattern::AttrVisible, trueStr)); + } + else + { + qDebug("Can't get group by id = %u.", groupId); + } + } + +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeMultipleGroupsVisibility::undo() +{ + qCDebug(vUndo, "Undo."); + + doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change + + QMap groupsState; + + QMap::const_iterator i = m_oldVisibility.constBegin(); + while (i != m_oldVisibility.constEnd()) + { + QDomElement group = doc->elementById(i.key(), VAbstractPattern::TagGroup); + if (group.isElement()) + { + doc->SetAttribute(group, VAbstractPattern::AttrVisible, i.value()); + groupsState.insert(i.key(), i.value()); + } + else + { + qDebug("Can't get group by id = %u.", i.key()); + } + ++i; + } + + if (not groupsState.isEmpty()) + { + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + + emit UpdateMultipleGroups(groupsState); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void ChangeMultipleGroupsVisibility::redo() +{ + qCDebug(vUndo, "ChangeMultipleGroupsVisibility::redo"); + + doc->ChangeActivPP(m_nameActivDraw);//Without this user will not see this change + + QMap groupsState; + + for (auto& groupId : m_groups) + { + QDomElement group = doc->elementById(groupId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + doc->SetAttribute(group, VAbstractPattern::AttrVisible, m_newVisibility); + groupsState.insert(groupId, m_newVisibility); + } + else + { + qDebug("Can't get group by id = %u.", groupId); + } + } + + if (not groupsState.isEmpty()) + { + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + doc->ParseGroups(groups); + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); + + emit UpdateMultipleGroups(groupsState); + } +} + +//DelGroup +//--------------------------------------------------------------------------------------------------------------------- +DelGroup::DelGroup(VAbstractPattern *doc, quint32 id, QUndoCommand *parent) + : VUndoCommand(QDomElement(), doc, parent), nameActivDraw(doc->GetNameActivPP()) +{ + setText(tr("delete group")); + nodeId = id; + xml = doc->CloneNodeById(nodeId); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DelGroup::undo() +{ + qCDebug(vUndo, "Undo."); + + if (qApp->GetDrawMode() == Draw::Calculation) + { + emit doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change + } + + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + groups.appendChild(xml); + doc->ParseGroups(groups); + emit UpdateGroups(); + } + else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DelGroup::redo() +{ + qCDebug(vUndo, "Redo."); + + if (qApp->GetDrawMode() == Draw::Calculation) + {//Keep first! + emit doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change + } + QDomElement groups = doc->CreateGroups(); + if (not groups.isNull()) + { + QDomElement group = doc->elementById(nodeId, VAbstractPattern::TagGroup); + if (group.isElement()) + { + group.setAttribute(VAbstractPattern::AttrVisible, trueStr); + doc->ParseGroups(groups); + if (groups.removeChild(group).isNull()) + { + qCDebug(vUndo, "Can't delete group."); + return; + } + emit UpdateGroups(); + + if (groups.childNodes().isEmpty()) + { + QDomNode parent = groups.parentNode(); + parent.removeChild(groups); + } + } + else + { + qCDebug(vUndo, "Can't get group by id = %u.", nodeId); + return; + } + } + else + { + qCDebug(vUndo, "Can't get tag Groups."); + return; + } + + VMainGraphicsView::NewSceneRect(qApp->getCurrentScene(), qApp->getSceneView()); +} diff --git a/src/libs/vtools/undocommands/undogroup.h b/src/libs/vtools/undocommands/undogroup.h new file mode 100644 index 000000000..e3185fc8c --- /dev/null +++ b/src/libs/vtools/undocommands/undogroup.h @@ -0,0 +1,184 @@ +/************************************************************************ + ** + ** @file undogroup.h + ** @author Roman Telezhynskyi + ** @date 18 3, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef UNDOGROUP_H +#define UNDOGROUP_H + + +#include +#include +#include +#include +#include +#include + +#include "vundocommand.h" + +class AddGroup : public VUndoCommand +{ + Q_OBJECT +public: + AddGroup(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand *parent = nullptr); + virtual ~AddGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +private: + Q_DISABLE_COPY(AddGroup) + const QString nameActivDraw; +}; + +class RenameGroup : public VUndoCommand +{ + Q_OBJECT +public: + RenameGroup(VAbstractPattern *doc, quint32 id, const QString &name, QUndoCommand *parent = nullptr); + virtual ~RenameGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +private: + Q_DISABLE_COPY(RenameGroup) + QString newName; + QString oldName{}; +}; + +class ChangeGroupOptions : public VUndoCommand +{ + Q_OBJECT +public: + ChangeGroupOptions(VAbstractPattern *doc, quint32 id, const QString &name, const QStringList &tags, + QUndoCommand *parent = nullptr); + virtual ~ChangeGroupOptions()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +private: + Q_DISABLE_COPY(ChangeGroupOptions) + QString newName; + QString oldName{}; + QStringList newTags; + QStringList oldTags{}; +}; + +class AddItemToGroup : public VUndoCommand +{ + Q_OBJECT +public: + AddItemToGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent = nullptr); + virtual ~AddItemToGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +protected: + void performUndoRedo(bool isUndo); +private: + Q_DISABLE_COPY(AddItemToGroup) + const QString nameActivDraw; +}; + +class RemoveItemFromGroup : public VUndoCommand +{ + Q_OBJECT +public: + RemoveItemFromGroup(const QDomElement &xml, VAbstractPattern *doc, quint32 groupId, QUndoCommand *parent = nullptr); + virtual ~RemoveItemFromGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +protected: + void performUndoRedo(bool isUndo); +private: + Q_DISABLE_COPY(RemoveItemFromGroup) + const QString nameActivDraw; +}; + +class ChangeGroupVisibility : public VUndoCommand +{ + Q_OBJECT +public: + ChangeGroupVisibility(VAbstractPattern *doc, vidtype id, bool visible, QUndoCommand *parent = nullptr); + virtual ~ChangeGroupVisibility()=default; + virtual void undo() override; + virtual void redo() override; + +signals: + void UpdateGroup(vidtype id, bool visible); + +private: + Q_DISABLE_COPY(ChangeGroupVisibility) + + bool m_oldVisibility{true}; + bool m_newVisibility{true}; + const QString m_nameActivDraw{}; + + void Do(bool visible); +}; + +class ChangeMultipleGroupsVisibility : public VUndoCommand +{ + Q_OBJECT +public: + ChangeMultipleGroupsVisibility(VAbstractPattern *doc, const QVector &groups, bool visible, + QUndoCommand *parent = nullptr); + virtual ~ChangeMultipleGroupsVisibility() =default; + virtual void undo() override; + virtual void redo() override; + +signals: + void UpdateMultipleGroups(const QMap &groups); + +private: + Q_DISABLE_COPY(ChangeMultipleGroupsVisibility) + + QVector m_groups; + bool m_newVisibility{true}; + QMap m_oldVisibility{}; + const QString m_nameActivDraw{}; +}; + +class DelGroup : public VUndoCommand +{ + Q_OBJECT +public: + DelGroup(VAbstractPattern *doc, quint32 id, QUndoCommand *parent = nullptr); + virtual ~DelGroup()=default; + virtual void undo() override; + virtual void redo() override; +signals: + void UpdateGroups(); +private: + Q_DISABLE_COPY(DelGroup) + const QString nameActivDraw; +}; + +#endif // UNDOGROUP_H diff --git a/src/libs/vwidgets/vlineedit.cpp b/src/libs/vwidgets/vlineedit.cpp index d00e656f6..e919a5456 100644 --- a/src/libs/vwidgets/vlineedit.cpp +++ b/src/libs/vwidgets/vlineedit.cpp @@ -28,6 +28,66 @@ #include "vlineedit.h" +#include +#include +#include +#include +#include + +#include "../vmisc/compatibility.h" + +namespace +{ +class MultiSelectCompleter : public QCompleter +{ +public: + explicit MultiSelectCompleter(QObject* parent=nullptr); + virtual ~MultiSelectCompleter() =default; + + virtual QString pathFromIndex(const QModelIndex& index) const override; + virtual QStringList splitPath(const QString& path) const override; + +private: + Q_DISABLE_COPY(MultiSelectCompleter) +}; +} + +//MultiSelectCompleter +//--------------------------------------------------------------------------------------------------------------------- +MultiSelectCompleter::MultiSelectCompleter(QObject *parent) + : QCompleter(parent) +{} + +//--------------------------------------------------------------------------------------------------------------------- +QString MultiSelectCompleter::pathFromIndex(const QModelIndex& index) const +{ + QString path = QCompleter::pathFromIndex(index); + + QString text = static_cast(widget())->text(); + + int pos = text.lastIndexOf(','); + if (pos >= 0) + { + path = text.left(pos) + ", " + path; + } + + return path; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList MultiSelectCompleter::splitPath( const QString& path ) const +{ + int pos = path.lastIndexOf(',') + 1; + + while (pos < path.length() && path.at(pos) == QLatin1Char(' ')) + { + pos++; + } + + return QStringList(path.mid(pos)); +} + +//VLineEdit //--------------------------------------------------------------------------------------------------------------------- VLineEdit::VLineEdit(QWidget *parent) : QLineEdit(parent), @@ -74,3 +134,59 @@ void VLineEdit::mousePressEvent(QMouseEvent *e) } } +// VCompleterLineEdit +//--------------------------------------------------------------------------------------------------------------------- +VCompleterLineEdit::VCompleterLineEdit(QWidget *parent) + : VLineEdit(parent), + m_model(new QStringListModel(this)) +{ + setCompleter(new MultiSelectCompleter()); + completer()->setModel(m_model); + completer()->setCompletionMode(QCompleter::PopupCompletion); + completer()->setCaseSensitivity(Qt::CaseInsensitive); + connect(this, &VCompleterLineEdit::textEdited, this, &VCompleterLineEdit::ShowCompletion); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::SetCompletion(const QStringList &list) +{ + m_model->setStringList(list); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::focusInEvent(QFocusEvent *e) +{ + QLineEdit::focusInEvent(e); + // force completion when line edit is focued in + completer()->complete(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::ShowCompletion() +{ +// PrepareCompletion(); + + // force to show all items when text is empty + completer()->setCompletionMode(text().isEmpty() ? QCompleter::UnfilteredPopupCompletion + : QCompleter::PopupCompletion); + if (text().isEmpty()) + { + // completion list will be hidden now; we will show it again after a delay + QTimer::singleShot(100, this, &VCompleterLineEdit::CompletionPopup); + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::CompletionPopup() +{ + // apparently, complete() works only in event handler + QApplication::postEvent(this, new QEvent(QEvent::User)); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VCompleterLineEdit::customEvent(QEvent *e) +{ + QLineEdit::customEvent(e); + // force completion after text is deleted + completer()->complete(); +} diff --git a/src/libs/vwidgets/vlineedit.h b/src/libs/vwidgets/vlineedit.h index 096eef4e4..23a75a35c 100644 --- a/src/libs/vwidgets/vlineedit.h +++ b/src/libs/vwidgets/vlineedit.h @@ -31,6 +31,8 @@ #include +class QStringListModel; + class VLineEdit : public QLineEdit { Q_OBJECT @@ -47,4 +49,31 @@ private: bool m_selectOnMousePress; }; +/*! Line edit widget with auto completion based on QStringListModel. + Modified behaviour: completion list will appear even when contents of + line edit is empty. Full list of options will be showed when line edit + has focus and is empty. + */ +class VCompleterLineEdit : public VLineEdit +{ + Q_OBJECT +public: + explicit VCompleterLineEdit(QWidget *parent = nullptr); + + //! Set list of options used for completion. + void SetCompletion(const QStringList &list); + +protected: + virtual void focusInEvent(QFocusEvent *e) override; + virtual void customEvent(QEvent* e) override; + +private slots: + void ShowCompletion(); + void CompletionPopup(); + +private: + Q_DISABLE_COPY(VCompleterLineEdit) + QStringListModel *m_model; +}; + #endif // VLINEEDIT_H diff --git a/src/test/ValentinaTest/share/Issue_298_case1/output.json b/src/test/ValentinaTest/share/Issue_298_case1/output.json index 1a44b8e0a..f7c9f2516 100644 --- a/src/test/ValentinaTest/share/Issue_298_case1/output.json +++ b/src/test/ValentinaTest/share/Issue_298_case1/output.json @@ -117,13 +117,8 @@ }, { "type": "QPointF", - "x": 1033.62206579804, - "y": 991.8906443458876 - }, - { - "type": "QPointF", - "x": 940.8759712878797, - "y": 1031.2978406173477 + "x": 1034.5174749200823, + "y": 1122.8420636232784 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/share/Issue_548_case1/output.json b/src/test/ValentinaTest/share/Issue_548_case1/output.json index 042cd5f37..0efb7d010 100644 --- a/src/test/ValentinaTest/share/Issue_548_case1/output.json +++ b/src/test/ValentinaTest/share/Issue_548_case1/output.json @@ -27,13 +27,8 @@ }, { "type": "QPointF", - "x": 29.78045942584839, - "y": 314.5929172205191 - }, - { - "type": "QPointF", - "x": 17.016714467558195, - "y": 305.7450353602103 + "x": 11.986528767485936, + "y": 326.6317413168879 }, { "type": "QPointF", diff --git a/src/test/ValentinaTest/tst_vposter.cpp b/src/test/ValentinaTest/tst_vposter.cpp index 5613ad178..6f7ae25e6 100644 --- a/src/test/ValentinaTest/tst_vposter.cpp +++ b/src/test/ValentinaTest/tst_vposter.cpp @@ -55,7 +55,7 @@ void TST_VPoster::BigPoster() printer.setPageMargins(QMarginsF(left, top, right, bottom), QPageLayout::Millimeter); - const QRect image(0, 0, 2622, 3178); // Little bit bigger than A1 + const QSize image(2622, 3178); // Little bit bigger than A1 VPoster posterazor(&printer); const QVector poster = posterazor.Calc(image, 0, PageOrientation::Portrait); @@ -75,7 +75,7 @@ void TST_VPoster::SmallPoster() printer.setResolution(96);// By default printer.setPageSize(QPageSize(QPageSize::A4)); - const QRect image(0, 0, 700, 1000); // Little bit less than A4 + const QSize image(700, 1000); // Little bit less than A4 VPoster posterazor(&printer); const QVector poster = posterazor.Calc(image, 0, PageOrientation::Portrait); From 186a855cbd308b2ec09499d02a15ed816015d81a Mon Sep 17 00:00:00 2001 From: vorzelmir Date: Fri, 3 Apr 2020 23:05:03 +0300 Subject: [PATCH 007/321] vpuzzlecommandline header the plan --- src/app/puzzle/puzzle.pri | 6 ++- src/app/puzzle/vpuzzlecommandline.cpp | 13 ++++++ src/app/puzzle/vpuzzlecommandline.h | 57 +++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 src/app/puzzle/vpuzzlecommandline.cpp create mode 100644 src/app/puzzle/vpuzzlecommandline.h diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri index 101fff4e3..c8db5a556 100644 --- a/src/app/puzzle/puzzle.pri +++ b/src/app/puzzle/puzzle.pri @@ -4,14 +4,16 @@ SOURCES += \ $$PWD/main.cpp \ $$PWD/puzzlemainwindow.cpp \ - $$PWD/puzzleapplication.cpp + $$PWD/puzzleapplication.cpp \ + $$PWD/vpuzzlecommandline.cpp *msvc*:SOURCES += $$PWD/stable.cpp HEADERS += \ $$PWD/puzzlemainwindow.h \ $$PWD/stable.h \ - $$PWD/puzzleapplication.h + $$PWD/puzzleapplication.h \ + $$PWD/vpuzzlecommandline.h FORMS += \ $$PWD/puzzlemainwindow.ui diff --git a/src/app/puzzle/vpuzzlecommandline.cpp b/src/app/puzzle/vpuzzlecommandline.cpp new file mode 100644 index 000000000..681d04f32 --- /dev/null +++ b/src/app/puzzle/vpuzzlecommandline.cpp @@ -0,0 +1,13 @@ +#include "vpuzzlecommandline.h" + +VPuzzleCommandLine::VPuzzleCommandLine(): + parser(), + isGuiEnabled(false) +{ + parser.setApplicationDescription(tr("Valentina's manual layout editor.")); + parser.addHelpOption(); + parser.addVersionOption(); + parser.addPositionalArgument("filename", tr("The raw layout file.")); +} + + diff --git a/src/app/puzzle/vpuzzlecommandline.h b/src/app/puzzle/vpuzzlecommandline.h new file mode 100644 index 000000000..a5148f666 --- /dev/null +++ b/src/app/puzzle/vpuzzlecommandline.h @@ -0,0 +1,57 @@ +#ifndef VPUZZLECOMMANDLINE_H +#define VPUZZLECOMMANDLINE_H + +#include +#include +#include +#include +#include + +class VPuzzleCommandLine: public QObject +{ + Q_OBJECT +public: + virtual ~VPuzzleCommandLine() = default; + + /** + * @brief if user enabled export from cmd + */ + bool IsExportEnabled() const; + /** + * @brief the base name of layout file or empty string if not + */ + QString OptionBaseName() const; + /** + * @brief if user enabled test mode from cmd + */ + bool IsTestModeEnabled() const; + /** + * @brief if gui enabled or not + */ + bool IsGuiEnabled() const; + /** + * @brief the file name which should be loaded + */ + QString OptionFileName() const; +protected: + VPuzzleCommandLine(); + /** + * @brief create the single instance of the class inside puzzleapplication + */ + static std::shared_ptr Instance(const QCoreApplication &app); +private: + Q_DISABLE_COPY(VPuzzleCommandLine) + static std::shared_ptr instance; + QCommandLineParser parser; + bool isGuiEnabled; + + /** + * @brief add options to the QCommandLineParser that there are in the cmd can be + */ + void InitCommandLineOptions(); + bool IsOptionSet(const QString &option)const; + QString OptionValue(const QString &option) const; + QStringList OptionValues(const QString &option) const; +}; + +#endif // VPUZZLECOMMANDLINE_H From b88e23697eb3e15137315b044cdd27be876a7064 Mon Sep 17 00:00:00 2001 From: vorzelmir Date: Tue, 7 Apr 2020 00:57:01 +0300 Subject: [PATCH 008/321] puzzle command line initial options --- src/app/puzzle/puzzle.pro | 2 +- src/app/puzzle/vpuzzlecommandline.cpp | 116 +++++++++++++++++++++++++- src/app/puzzle/vpuzzlecommandline.h | 5 +- 3 files changed, 117 insertions(+), 6 deletions(-) diff --git a/src/app/puzzle/puzzle.pro b/src/app/puzzle/puzzle.pro index 7463ba832..818e299dd 100644 --- a/src/app/puzzle/puzzle.pro +++ b/src/app/puzzle/puzzle.pro @@ -7,7 +7,7 @@ # File with common stuff for whole project include(../../../common.pri) -QT += core gui widgets network xml xmlpatterns printsupport +QT += core gui widgets network xml xmlpatterns printsupport testlib # Name of binary file TARGET = puzzle diff --git a/src/app/puzzle/vpuzzlecommandline.cpp b/src/app/puzzle/vpuzzlecommandline.cpp index 681d04f32..1c826e341 100644 --- a/src/app/puzzle/vpuzzlecommandline.cpp +++ b/src/app/puzzle/vpuzzlecommandline.cpp @@ -1,13 +1,125 @@ #include "vpuzzlecommandline.h" +#include "../vmisc/commandoptions.h" +#include "../vmisc/vsysexits.h" +#include +#include +std::shared_ptr VPuzzleCommandLine::instance = nullptr; + +#define translate(context, source) QCoreApplication::translate((context), source) + +//------------------------------------------------------------------------------------------------ +bool VPuzzleCommandLine::IsExportEnabled() const +{ + const bool result = IsOptionSet(QStringLiteral("destination")); + int argSize = parser.positionalArguments().size(); + if (result && argSize != 1) + { + qCritical() << translate("Puzzle", "Export options can be used with single input file only.") << "/n"; + const_cast(this)->parser.showHelp(V_EX_USAGE); + } + return result; +} + +//---------------------------------------------------------------------------------------------- +QString VPuzzleCommandLine::OptionBaseName() const +{ + QString path; + if (IsExportEnabled()) + { + path = OptionValue(QStringLiteral("destination")); + } + + return path; +} + +//-------------------------------------------------------------------------------------------- +bool VPuzzleCommandLine::IsTestModeEnabled() const +{ + const bool r = IsOptionSet(QStringLiteral("test")); + if (r && parser.positionalArguments().size() != 1) + { + qCritical() << translate("VCommandLine", "Test option can be used with single input file only.") << "/n"; + const_cast(this)->parser.showHelp(V_EX_USAGE); + } + return r; +} + +//-------------------------------------------------------------------------------------------- +bool VPuzzleCommandLine::IsGuiEnabled() const +{ + return isGuiEnabled; +} + +//-------------------------------------------------------------------------------------------- +QStringList VPuzzleCommandLine::OptionFileNames() const +{ + return parser.positionalArguments(); +} + +//---------------------------------------------------------------------------------------------- VPuzzleCommandLine::VPuzzleCommandLine(): parser(), isGuiEnabled(false) { - parser.setApplicationDescription(tr("Valentina's manual layout editor.")); + parser.setApplicationDescription(translate("Puzzle", "Valentina's manual layout editor.")); parser.addHelpOption(); parser.addVersionOption(); - parser.addPositionalArgument("filename", tr("The raw layout file.")); + + InitCommandLineOptions(); +} + +//------------------------------------------------------------------------------------------- +std::shared_ptr VPuzzleCommandLine::Instance(const QCoreApplication &app) +{ + if (instance == nullptr) + { + instance.reset(new VPuzzleCommandLine); + } + instance->parser.process(app); + + instance->isGuiEnabled = not (instance->IsGuiEnabled() || instance->IsExportEnabled()); + return instance; +} + +//------------------------------------------------------------------------------------------- +void VPuzzleCommandLine::InitCommandLineOptions() +{ + if (IsExportEnabled()) + { + QStringList args = parser.positionalArguments(); + parser.setSingleDashWordOptionMode( + QCommandLineParser::SingleDashWordOptionMode(args.takeFirst().toInt())); + QString source = args.isEmpty() ? QString() : args.at(0); + QString destination = args.isEmpty() ? QString() : args.at(1); + parser.clearPositionalArguments(); + parser.addPositionalArgument(source, + translate("Puzzle", "The raw layout input file.")); + parser.addPositionalArgument(destination, + translate("Puzzle", "The destination folder")); + } + + QCommandLineOption forceOption(QStringList() << "f" << "force", + translate("Puzzle", "Overwrite existing files.")); + parser.addOption(forceOption); +} + +//-------------------------------------------------------------------------------------------- +bool VPuzzleCommandLine::IsOptionSet(const QString &option) const +{ + return parser.isSet(option); +} + +//------------------------------------------------------------------------------------------- +QString VPuzzleCommandLine::OptionValue(const QString &option) const +{ + return parser.value(option); +} + +//-------------------------------------------------------------------------------------------- +QStringList VPuzzleCommandLine::OptionValues(const QString &option) const +{ + return parser.values(option); } diff --git a/src/app/puzzle/vpuzzlecommandline.h b/src/app/puzzle/vpuzzlecommandline.h index a5148f666..2735e6487 100644 --- a/src/app/puzzle/vpuzzlecommandline.h +++ b/src/app/puzzle/vpuzzlecommandline.h @@ -2,8 +2,6 @@ #define VPUZZLECOMMANDLINE_H #include -#include -#include #include #include @@ -32,7 +30,7 @@ public: /** * @brief the file name which should be loaded */ - QString OptionFileName() const; + QStringList OptionFileNames() const; protected: VPuzzleCommandLine(); /** @@ -49,6 +47,7 @@ private: * @brief add options to the QCommandLineParser that there are in the cmd can be */ void InitCommandLineOptions(); + bool IsOptionSet(const QString &option)const; QString OptionValue(const QString &option) const; QStringList OptionValues(const QString &option) const; From f4e4f100f3dd92b0960caed1eef9279f0a608b54 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Fri, 10 Apr 2020 21:08:29 +0200 Subject: [PATCH 009/321] MenuBar edit, first signals and slots --- src/app/puzzle/puzzlemainwindow.cpp | 113 ++++++++++++++++++++++ src/app/puzzle/puzzlemainwindow.h | 14 +++ src/app/puzzle/puzzlemainwindow.ui | 140 +++++++++++++++++++++++++--- src/app/puzzle/stable.h | 2 +- src/app/puzzle/version.h | 2 +- 5 files changed, 258 insertions(+), 13 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 8e1c556f9..2fec23266 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -34,6 +34,8 @@ PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : ui(new Ui::PuzzleMainWindow) { ui->setupUi(this); + + InitMenuBar(); } //--------------------------------------------------------------------------------------------------------------------- @@ -48,3 +50,114 @@ bool PuzzleMainWindow::LoadFile(const QString &path) Q_UNUSED(path) return true; } + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitMenuBar() +{ + // connects the actions for the file menu + connect(ui->actionNew, &QAction::triggered, this, &PuzzleMainWindow::New); + connect(ui->actionOpen, &QAction::triggered, this, &PuzzleMainWindow::Open); + connect(ui->actionSave, &QAction::triggered, this, &PuzzleMainWindow::Save); + connect(ui->actionSaveAs, &QAction::triggered, this, &PuzzleMainWindow::SaveAs); + connect(ui->actionImportRawLayout, &QAction::triggered, this, &PuzzleMainWindow::ImportRawLayout); + connect(ui->actionExit, &QAction::triggered, this, &PuzzleMainWindow::close); + + // connects the actions for the edit menu + // TODO : initialise the undo / redo + + // connects the actions for the windows menu + // TODO : initialise the entries for the different windows + connect(ui->actionCloseLayout, &QAction::triggered, this, &PuzzleMainWindow::CloseLayout); + + // connects the action for the Help Menu + connect(ui->actionAboutQt, &QAction::triggered, this, &PuzzleMainWindow::AboutQt); + connect(ui->actionAboutPuzzle, &QAction::triggered, this, &PuzzleMainWindow::AboutPuzzle); + +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::New() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::New"); + int ret = msgBox.exec(); + + // TODO + + +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::Open() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::Open"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::Save() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::Save"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::SaveAs() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::SaveAs"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::ImportRawLayout() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::ImportRawLayout"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CloseLayout() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CloseLayout"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::AboutQt() +{ + QMessageBox::aboutQt(this, tr("About Qt")); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::AboutPuzzle() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::AboutPuzzle"); + int ret = msgBox.exec(); + + // TODO +} + + diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 8f489647d..ac1ba0cb6 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -29,6 +29,7 @@ #define PUZZLEMAINWINDOW_H #include +#include namespace Ui { class PuzzleMainWindow; @@ -47,6 +48,19 @@ public: private: Q_DISABLE_COPY(PuzzleMainWindow) Ui::PuzzleMainWindow *ui; + + void InitMenuBar(); + + void New(); + void Open(); + void Save(); + void SaveAs(); + void ImportRawLayout(); + void CloseLayout(); + + void AboutQt(); + void AboutPuzzle(); + }; #endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 9de7e2667..0dee51b58 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -1,24 +1,142 @@ + PuzzleMainWindow - - + + 0 0 - 400 - 300 + 1427 + 904 - + PuzzleMainWindow - - - - + + + + + 0 + 0 + 1427 + 22 + + + + + &File + + + + + + + + + + + + + &Edit + + + + + + &Windows + + + + + + &Help + + + + + + + + + + + + TopToolBarArea + + + false + + + + + + Open + + + Ctrl+O + + + + + Save + + + Ctrl+S + + + + + Save As + + + Ctrl+Shift+S + + + + + Close Layout + + + + + Import Raw Layout Data + + + + + true + + + + + + E&xit + + + Ctrl+Q + + + + + New + + + Ctrl+N + + + + + About &Qt + + + + + About &Puzzle + + - - + diff --git a/src/app/puzzle/stable.h b/src/app/puzzle/stable.h index 4611a10a7..22e9d4702 100644 --- a/src/app/puzzle/stable.h +++ b/src/app/puzzle/stable.h @@ -30,7 +30,7 @@ #define STABLE_H /* I like to include this pragma too, so the build log indicates if pre-compiled headers were in use. */ -#pragma message("Compiling precompiled headers for tape utility.\n") +#pragma message("Compiling precompiled headers for puzzle utility.\n") /* Add C includes here */ diff --git a/src/app/puzzle/version.h b/src/app/puzzle/version.h index 76e256844..bde0ae5b0 100644 --- a/src/app/puzzle/version.h +++ b/src/app/puzzle/version.h @@ -33,7 +33,7 @@ #define VER_INTERNALNAME_STR "Puzzle" #define VER_ORIGINALFILENAME_STR "puzzle.exe" -#define VER_PRODUCTNAME_STR "Tape" +#define VER_PRODUCTNAME_STR "Puzzle" #define VER_FILEDESCRIPTION_STR "Valentina's manual layout creator." #endif // VERSION_H From 51e0694f36b776db8705e01228cd43243c661269 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 11 Apr 2020 10:38:04 +0300 Subject: [PATCH 010/321] Merge branch 'develop' into feature/manual-layout. --- share/translations/valentina.ts | 49 +- share/translations/valentina_cs_CZ.ts | 97 +- share/translations/valentina_de_DE.ts | 1076 +++++++++-------- share/translations/valentina_el_GR.ts | 89 +- share/translations/valentina_en_CA.ts | 133 +- share/translations/valentina_en_IN.ts | 95 +- share/translations/valentina_en_US.ts | 95 +- share/translations/valentina_es_ES.ts | 348 +++--- share/translations/valentina_fi_FI.ts | 77 +- share/translations/valentina_fr_FR.ts | 93 +- share/translations/valentina_he_IL.ts | 49 +- share/translations/valentina_id_ID.ts | 49 +- share/translations/valentina_it_IT.ts | 99 +- share/translations/valentina_nl_NL.ts | 289 ++--- share/translations/valentina_pl_PL.ts | 77 +- share/translations/valentina_pt_BR.ts | 95 +- share/translations/valentina_ro_RO.ts | 63 +- share/translations/valentina_ru_RU.ts | 305 +++-- share/translations/valentina_uk_UA.ts | 95 +- share/translations/valentina_zh_CN.ts | 49 +- .../valentina/dialogs/dialogincrements.cpp | 21 +- src/app/valentina/dialogs/dialogincrements.h | 6 +- .../valentina/dialogs/dialoglayoutscale.ui | 8 +- .../valentina/dialogs/dialoglayoutsettings.ui | 6 +- src/app/valentina/dialogs/dialogsavelayout.ui | 8 +- src/app/valentina/dialogs/vwidgetgroups.cpp | 1 - src/libs/vmisc/customevents.h | 4 +- src/libs/vtools/dialogs/tools/dialogtool.cpp | 4 +- .../dialogs/tools/piece/dialogpiecepath.ui | 10 +- .../dialogs/tools/piece/tabs/tabpassmarks.ui | 2 +- .../operation/vabstractoperation.cpp | 2 +- src/libs/vtools/undocommands/undogroup.cpp | 4 + .../TranslationsTest/tst_tstranslation.cpp | 28 + src/test/TranslationsTest/tst_tstranslation.h | 2 + 34 files changed, 1368 insertions(+), 2060 deletions(-) diff --git a/share/translations/valentina.ts b/share/translations/valentina.ts index ddcd84322..69877ce64 100644 --- a/share/translations/valentina.ts +++ b/share/translations/valentina.ts @@ -3181,22 +3181,10 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - ... ... - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - -
DialogLayoutSettings @@ -3465,10 +3453,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3477,10 +3461,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3498,11 +3478,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -4890,10 +4875,6 @@ Apply settings anyway? Length: Length: - - = - - U mark @@ -5777,18 +5758,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -11203,10 +11172,6 @@ Do you want to save your changes? Formula wizard Formula wizard - - = - - Value Value diff --git a/share/translations/valentina_cs_CZ.ts b/share/translations/valentina_cs_CZ.ts index af9b1d3a2..5ca1e2ee2 100644 --- a/share/translations/valentina_cs_CZ.ts +++ b/share/translations/valentina_cs_CZ.ts @@ -2464,11 +2464,11 @@ Name: - Název: + Název: Rotation - Otáčení + Otáčení Tags: @@ -2531,11 +2531,11 @@ Name: - Název: + Název: Rotation - Otáčení + Otáčení Tags: @@ -3131,27 +3131,27 @@ Margins - Okraje + Okraje Left: - Levý: + Levý: cm - cm + cm Right: - Pravý: + Pravý: Top: - Nahoře: + Nahoře: Bottom: - Dole: + Dole: Scale @@ -3165,22 +3165,6 @@ Vertical: - - % - % - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3451,10 +3435,6 @@ Přesto použít nastavení? Time given for the algorithm to find best layout. Čas daný algoritmu k nalezení nejlepšího rozvržení. - - min - min - Efficiency: Účinnost: @@ -3463,10 +3443,6 @@ Přesto použít nastavení? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - % - Manual priority Ruční přednost @@ -3484,11 +3460,16 @@ Přesto použít nastavení? Automaticky ořezat nepoužívanou šířku - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + min + + + Enable this option to prefer getting one sheet solutions. @@ -3913,11 +3894,11 @@ Přesto použít nastavení? Name: - Název: + Název: Rotation - Otáčení + Otáčení Tags: @@ -4872,10 +4853,6 @@ Přesto použít nastavení? Length: Délka: - - = - = - U mark Značka U @@ -5615,7 +5592,7 @@ Přesto použít nastavení? Name: - Název: + Název: Tags: @@ -5734,7 +5711,7 @@ Přesto použít nastavení? Options - Volby + Volby Scale @@ -5748,22 +5725,6 @@ Přesto použít nastavení? Vertical: - - % - % - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -10925,10 +10886,6 @@ Chcete uložit změny? Formula wizard Průvodce vzorcem - - = - = - Value Hodnota @@ -11469,22 +11426,22 @@ Chcete uložit změny? Can't open file %1: %2. - Nelze otevřít soubor %1: + Nelze otevřít soubor %1: %2. Can't open schema file %1: %2. - Nelze otevřít soubor se schématem %1: + Nelze otevřít soubor se schématem %1: %2. Could not load schema file '%1'. - Nepodařilo se nahrát soubor se schématem '%1'. + Nepodařilo se nahrát soubor se schématem '%1'. Validation error file %3 in line %1 column %2 - Chyba při ověřování souboru %3 na řádku %1, ve sloupci %2 + Chyba při ověřování souboru %3 na řádku %1, ve sloupci %2 @@ -13344,7 +13301,7 @@ Chcete uložit změny? Flipping by axis - Převrácení podle osy + Převrácení podle osy @@ -15865,7 +15822,7 @@ Chcete uložit změny? Preferences - Nastavení + Nastavení Categories: %1. diff --git a/share/translations/valentina_de_DE.ts b/share/translations/valentina_de_DE.ts index 9d981a899..1c415e19a 100644 --- a/share/translations/valentina_de_DE.ts +++ b/share/translations/valentina_de_DE.ts @@ -61,14 +61,14 @@ ChangeGroupVisibility change group visibility - + Gruppen Sichtbarkeit ändern ChangeMultipleGroupsVisibility change multiple groups visibility - + Mehrere Gruppensichtbarkeiten ändern @@ -375,11 +375,11 @@ Interfacing - Futter + Verbindungskante Interlining - Zwischenfutter + Einlagestoff @@ -1039,7 +1039,7 @@ Cannot find point with id %1 - + Punkt mit ID %1 kann nicht gefunden werden @@ -1370,7 +1370,7 @@ DialogDateTimeFormats Label date time editor - Datum-Zeit-Beschriftungseditor + Bezeichnung Datum/Zeit bearbeiten Format: @@ -1537,11 +1537,11 @@ Detail label visible - Detailbeschriftung sichtbar + Detailbezeichnung sichtbar Pattern label visible - Musterbeschriftung sichtbar + Musterbezeichnung sichtbar Fabric @@ -1675,19 +1675,19 @@ DialogEditLabel Edit label template - Labelvorlage bearbeiten + Bezeichnungsvorlage bearbeiten Clear current and begin new label - Aktuelles löschen und neues Label beginnen + Aktuelle löschen und neue Bezeichnung beginnen Import from label template - Von Labelvorlage importieren + Von Bezeichnungsvorlage importieren Export label as template - Label als Vorlage exportieren + Bezeichner als Vorlage exportieren Edit @@ -1749,11 +1749,11 @@ Label template - Labelvorlage + Bezeichnungsvorlage Export label template - Labelvorlage exportieren + Bezeichnungsvorlage exportieren template @@ -1829,7 +1829,7 @@ Piece annotation - Schnitteilbeschriftung + Schnitteilanmerkung Piece orientation @@ -1837,7 +1837,7 @@ Piece rotation - Schnitteildrehung + Schnittmusterteil drehen Piece tilt @@ -1873,7 +1873,7 @@ Material: Interfacing - + Material: Verbindungskante Interfacing @@ -1881,7 +1881,7 @@ Material: Interlining - + Material: Einlagestoff Interlining @@ -1889,7 +1889,7 @@ Word: Cut - + Wort: Schnitt Cut @@ -1897,7 +1897,7 @@ Word: on fold - + Wort: auf Falz on fold @@ -2115,7 +2115,7 @@ Rotation angle: - Rotations-Winkel: + Drehungs-Winkel: Center point: @@ -2131,11 +2131,11 @@ Edit radius1 - Bearbeite Radius1 + Radius1 bearbeiten Edit radius2 - Bearbeite Radius2 + Radius2 bearbeiten Edit first angle @@ -2147,7 +2147,7 @@ Edit rotation angle - Bearbeite Rotations-Winkel + Drehungs-Winkel bearbeiten Elliptical arc @@ -2393,7 +2393,7 @@ Edit measurement - Maß anpassen + Maß bearbeiten Empty field @@ -2413,7 +2413,7 @@ <html><head/><body><p>Search final measurements by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search final measurements by regex.</p></body></html> - + <html><head/><body><p>Suche nach endgültigen Maßen mit Ausdruck.</p><p> Schreibe &quot;/r/&quot; an den Beginn des Suchausdrucks um das endgültige Maß mit einem RegEx zu suchen.</p></body></html> @@ -2464,11 +2464,11 @@ Name: - Name: + Name: Rotation - Drehung + Drehung Tags: @@ -2531,11 +2531,11 @@ Name: - Name: + Name: Rotation - Drehung + Drehung Tags: @@ -2828,19 +2828,19 @@ Rotate objects around point %1. Suffix '%2' - + Drehe Objekte um den Punkt %1. Endung '%2' Flipping by line %1_%2. Suffix '%3' - + Spiegeln der Linie %1_%2. Endung '%3' Flipping by axis through %1 point. Suffix '%2' - + Spiegeln an Achse durch Punkt %1. Endung '%2' Move objects. Suffix '%1' - + Verschiebe Objekte. Endung '%1' @@ -3027,15 +3027,15 @@ <html><head/><body><p>Search increments by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search increments by regex.</p></body></html> - + <html><head/><body><p>Suche Zunahmen nach Ausdruck.</p><p>Schreibe &quot;/r/&quot; an den Beginn des Suchausdrucks um die Zunahme mit einem RegEx zu suchen.</p></body></html> <html><head/><body><p>Search preview calculations by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search preview calculations by regex.</p></body></html> - + <html><head/><body><p>Suche Preview Berechnungen nach Ausdruck. </p><p>Schreibe &quot;/r/&quot; an den Beginn des Suchausdrucks um Preview Berechnungen mit einem RegEx zu suchen.</p></body></html> Increment - + Zunahme Separator @@ -3108,19 +3108,19 @@ Nesting. Please, wait. - + Verschachtelung läuft. Bitte warten. Time left: - + Zeit verbleibend: Time left: %1 - + Zeit verbleibend: %1 Efficiency coefficient: %1% - + Effizienz-Koeffizient: %1% @@ -3131,27 +3131,27 @@ Margins - + Ränder Left: - Links: + Links: cm - cm + cm Right: - Rechts: + Rechts: Top: - Oben: + Oben: Bottom: - Unten: + Unten: Scale @@ -3440,56 +3440,57 @@ Einstellungen trotzdem anwenden? Follow grainline - + Folge der Fadenlauf-Linie Time: - + Zeit: Time given for the algorithm to find best layout. + Zeit die dem Algorithmus bleibt um das beste Layout zu finden. + + + Efficiency: + Effizienz: + + + Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. + Setze den Layout Effizienz-Koeffizienten. Der Layout Effizienz-Koeffizient ist das Verhältnis der Fläche der Schnittteile zum umgebenden Rechteck aller Schnittteile. Wenn die Verschachtelungstiefe den notwendigen Wert erreicht hat endet der Vorgang. Wenn der Wert 0 ist wird keine Prüfung durchgeführt. + + + Manual priority + Manuelle Rangordnung + + + Nest quantity of copies according to piece settings. + Verschachtele eine Anzahl Kopien entsprechend der Schnittteileinstellungen. + + + Nest quantity + Verschachtelungs Anzahl + + + Auto crop unused width + Automatisches Bechneiden unbenutzter Breite + + + Prefer one sheet solution min - + minutes + min - Efficiency: - - - - Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - - - % - - - - Manual priority - - - - Nest quantity of copies according to piece settings. - - - - Nest quantity - - - - Auto crop unused width + Enable this option to prefer getting one sheet solutions. Enable this option to prefer getting one sheet solutions. - - Prefer one sheet solution - - DialogLine @@ -3888,15 +3889,15 @@ Einstellungen trotzdem anwenden? Rotation angle: - Rotations-Winkel: + Drehungs-Winkel: Edit rotation angle - Bearbeite Rotations-Winkel + Drehungs-Winkel bearbeiten Rotation origin point: - Rotationsurprung: + Drehung um Ursprungspunkt: Center point @@ -3912,11 +3913,11 @@ Einstellungen trotzdem anwenden? Name: - Name: + Name: Rotation - Drehung + Drehung Tags: @@ -3975,7 +3976,7 @@ Einstellungen trotzdem anwenden? Multisize - + Multimaß @@ -4323,7 +4324,7 @@ Einstellungen trotzdem anwenden? From multisize measurements - + Aus Multimaß-Maße Pattern @@ -4335,19 +4336,19 @@ Einstellungen trotzdem anwenden? Label data - Beschriftungsdaten + Bezeichnungsdaten Label template: - Beschriftungstemplate: + Bezeichnungsvorlage: Edit pattern label - Schnittmusterbeschriftung editieren + Musterbezeichnung bearbeiten Edit template - Template editieren + Vorlage bearbeiten Date format: @@ -4359,11 +4360,11 @@ Einstellungen trotzdem anwenden? Save label data. - Beschriftungsdaten speichern. + Bezeichnungsdaten speichern. Label data were changed. Do you want to save them before editing label template? - Beschriftungen wurden angepasst. Möchten Sie diese speichern bevor Sie das Beschriftungstemplate editieren? + Bezeichnungsdaten wurden angepasst. Möchten Sie diese Speichern bevor Sie die Bezeichnungsvorlage editieren? Materials @@ -4387,7 +4388,7 @@ Einstellungen trotzdem anwenden? Label language: - Sprache der Bezeichnung: + Bezeichnungs Sprache: @@ -4669,11 +4670,11 @@ Einstellungen trotzdem anwenden? Passmarks - + Passmarken Passmark: - + Passmarke: One line @@ -4701,7 +4702,7 @@ Einstellungen trotzdem anwenden? Passmark - + Passmarke Marks @@ -4725,7 +4726,7 @@ Einstellungen trotzdem anwenden? Select if need designate the corner point as a passmark - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll Intersection @@ -4741,7 +4742,7 @@ Einstellungen trotzdem anwenden? Select if need designate the corner point as a passmark. Show only left passmark. - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll. Nur linke Passmarke anzeigen. Intersection (only left) @@ -4749,7 +4750,7 @@ Einstellungen trotzdem anwenden? Select if need designate the corner point as a passmark. Show only right passmark. - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll. Nur rechte Passmarke anzeigen. Intersection (only right) @@ -4757,7 +4758,7 @@ Einstellungen trotzdem anwenden? Control - + Steuerung Visible @@ -4817,7 +4818,7 @@ Einstellungen trotzdem anwenden? The path is a cut contour. Use to control export to DXF-AAMA - + Der Pfad ist eine Schnittkante. Verwenden um den Export in DXF-AAMA zu steuern The list of pieces is empty. Please, first create at least one piece for current pattern piece. @@ -4825,11 +4826,11 @@ Einstellungen trotzdem anwenden? This option has effect only if the second passmark on seam line enabled in global preferences. The option helps disable the second passmark for this passmark only. - + Diese Option hat nur dann Effekt, wenn die zweite Passmarke auf der Nahtkante in den globalen Einstellungen aktiviert ist. Diese Option hilft die zweite Passmarke nur für diese Passmarke zu unterdrücken. Show the second passmark on seam line - + Zeige die zweite Passmarke auf der Nahtkante Excluded @@ -4837,7 +4838,7 @@ Einstellungen trotzdem anwenden? The same curve repeats twice! - + Die selbe Kurve wiederholt sich zweimal! <Empty> @@ -4849,43 +4850,39 @@ Einstellungen trotzdem anwenden? Acute angle that looks inside of piece - + Spitzer Winkel der in das Schnittteil hinein geht Acute angle that looks outside of piece - + Spitzer Winkel der aus dem Schnittteil heraus schaut V mark 2 - + V Markierung 2 Select main path objects, <b>%1</b> - reverse direction curve, <b>%2</b> - finish creation - + Wähle die maßgeblichen Hauptpfad Objekte, <b>%1</b> - umgekehrte Richtung der Kurve, <b>%2</b> - Erstellung beenden Manual length - + Manuelle Längenangabe Length: Länge: - - = - - U mark - + U Markierung Box mark - + Box Markierung Edit passmark length - + Ändern der Passmarken Länge @@ -4983,7 +4980,7 @@ Einstellungen trotzdem anwenden? Doubletree - + Dublette Corner @@ -4999,15 +4996,15 @@ Einstellungen trotzdem anwenden? Button - + Knopf Place label - Beschriftung plazieren + Bezeichner platzieren Control - + Steuerung Visible @@ -5031,7 +5028,7 @@ Einstellungen trotzdem anwenden? Circle - + Kreis @@ -5374,7 +5371,7 @@ Einstellungen trotzdem anwenden? Tool point of intersetion arcs - + Werkzeug Punkt am Schnittpunkt der Bögen @@ -5481,7 +5478,7 @@ Einstellungen trotzdem anwenden? Tool point of intersection circles - + Werkzeug Punkt am Schnittpunkt der Kreise @@ -5601,7 +5598,7 @@ Einstellungen trotzdem anwenden? This point cannot be origin point. Please, select another origin point - + Dieser Punkt kann nicht der Ausgangspunkt sein. Bitte wähle einen anderen Ausgangspunkt Enable to create a visibility gropup from original objects @@ -5613,7 +5610,7 @@ Einstellungen trotzdem anwenden? Name: - Name: + Name: Tags: @@ -5732,7 +5729,7 @@ Einstellungen trotzdem anwenden? Options - Optionen + Optionen Scale @@ -5746,22 +5743,6 @@ Einstellungen trotzdem anwenden? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -5843,11 +5824,11 @@ Einstellungen trotzdem anwenden? tiled - + unterteilt Numerical control - + Numerische Steuerung @@ -5994,7 +5975,7 @@ Einstellungen trotzdem anwenden? Passmark - + Passmarke Each point in the path must be unique! @@ -6002,7 +5983,7 @@ Einstellungen trotzdem anwenden? Passmarks - + Passmarken Workpiece tool @@ -6026,7 +6007,7 @@ Einstellungen trotzdem anwenden? Doubletree - + Dublette Corner @@ -6042,7 +6023,7 @@ Einstellungen trotzdem anwenden? Button - + Knopf Place label @@ -6054,11 +6035,11 @@ Einstellungen trotzdem anwenden? To open all detail's features complete creating the main path. Please, press OK. - + Um die Eigenschaften des Details zu öffnen vervollständige den maßgeblichen Hauptpfad. Bitte drücke OK. The same curve repeats twice! - + Die selbe Kurve wiederholt sich zweimal! <Empty> @@ -6066,15 +6047,15 @@ Einstellungen trotzdem anwenden? Select main path objects clockwise, <b>%1</b> - reverse direction curve, <b>%2</b> - finish creation - + Wähle die maßgeblichen Hauptpfad Objekte im Uhrzeigersinn, <b>%1</b> - umgekehrte Richtung der Kurve, <b>%2</b> - Erstellung beenden Circle - + Kreis Edit passmark length - + Ändern der Passmarken Länge @@ -6502,7 +6483,7 @@ Einstellungen trotzdem anwenden? Cannot find point with id %1 - + Punkt mit ID %1 kann nicht gefunden werden @@ -6521,9 +6502,9 @@ Einstellungen trotzdem anwenden? Followed %n option(s) require restart to take effect: %1. - - Folgende %n Option(en) erfordern einen Neustart um wirksam zu werden: %1. - Folgende %n Option(en) erfordern einen Neustart um wirksam zu werden: %1. + + Folgende %n Option(en) erfordern einen Neubeginn um Wirkung zu zeigen: %1. + Folgende %n Option(en) erfordern einen Neubeginn um Wirkung zu zeigen: %1. @@ -6909,7 +6890,7 @@ Einstellungen trotzdem anwenden? Feed error: invalid "enclosure" with the download link - + Nachrichten Fehler: ungültige "enclosure" des Download Links Error @@ -8077,7 +8058,7 @@ Sollen die Änderungen gespeichert werden? Gradation doesn't support inches - + Abstufung unterstützt keine Inches Measurements have been synced @@ -8137,11 +8118,11 @@ Sollen die Änderungen gespeichert werden? Load Multisize - + Lade MultiMaße Load multisize measurements file - + Lade MultiMaß Maße-Datei Open Tape @@ -8153,7 +8134,7 @@ Sollen die Änderungen gespeichert werden? Edit linked to the pattern measurements - + Änderung der mit dem Schnitt verbundenen Maße Sync @@ -8161,15 +8142,15 @@ Sollen die Änderungen gespeichert werden? Synchronize linked to the pattern measurements after change - + Synchronisierung der mit dem Schnitt verbundenen Maße nach Änderung Unload Current - + Entladen der aktuellen Maße Unload measurements if they were not used in a pattern file - + Entladen der Maße, die nicht in der Schnitt Datei verwendet wurden Individual measurements @@ -8177,7 +8158,7 @@ Sollen die Änderungen gespeichert werden? Multisize measurements - + MultiMaß Maße Pattern files @@ -8201,11 +8182,11 @@ Sollen die Änderungen gespeichert werden? Open Tape app for creating or editing measurements file - + Öffnen der Tape App um ein Maß-Datei anzulegen oder zu ändern Export increments to CSV - + Exportieren der Zunahmen in CSV Name @@ -8241,7 +8222,7 @@ Sollen die Änderungen gespeichert werden? zoom fit best current pattern piece - + Zoom Best-Fit aktuelles Schnittteil Export details skiping the Layout stage @@ -8261,11 +8242,11 @@ Sollen die Änderungen gespeichert werden? Couldn't set size. Need a file with multisize measurements. - + Konnte die Größe nicht übernehmen. Benötige eine Datei mit MultiMaß Massen. Couldn't set height. Need a file with multisize measurements. - + Konnte die Höhe nicht übernehmen. Benötige eine Datei mit MultiMaß Massen. Label template editor @@ -8305,7 +8286,7 @@ Sollen die Änderungen gespeichert werden? You can't export empty scene. Please, include at least one detail in layout. - + Leere Szene kann nicht exportiert werden. Bitte mindestens ein Detail in den Zuschnittplan aufnehmen. Export final measurements error. @@ -8341,19 +8322,19 @@ Sollen die Änderungen gespeichert werden? Select placelabel center point - + Wähle den Mittelpunkt der Beschriftung aus The measurements file '%1' could not be found or provides not enough information. - + Die Maß-Datei '%1' konnte nicht gefunden werden oder enthält ungenügende Informationen. Use these tools to create a pattern - + Verwende diese Werkzeuge um einen Schnitt zu erstellen Scale: - + Maßstab: Create new pattern piece to start working. @@ -8365,127 +8346,127 @@ Sollen die Änderungen gespeichert werden? Cannot save settings. Access denied. - + Kann Einstellungen nicht speichern. Zugriff verwehrt. Ctrl+O - + Strg+O Cannot read settings from a malformed .INI file. - + Kann Einstellungen nicht aus fehlerhafter .INI Datei lesen. Select path objects, <b>%1</b> - reverse direction curve - + Wähle Pfad Objekte, <b>%1</b> - umgekehrte Richtung der Kurve Select one or more objects, hold <b>%1</b> - for multiple selection, <b>%2</b> - finish creation - + Wähle ein oder mehr Objekte, halte <b>%1</b> - für Mehrfachauswahl, <b>%2</b> - Erstellung beenden Select one or more objects, hold <b>%1</b> - for multiple selection, <b>%2</b> - confirm selection - + Wähle ein oder mehr Objekte, halte <b>%1</b> - für Mehrfachauswahl, <b>%2</b> - Auswahl bestätigen Point of intersection circle and segment - + Punkt am Schnittpunkt von Kreis und Abschnitt Increase label font - + Beschriftung vergrößern Decrease label font - + Beschriftung verkleinern Original label font - + Original Beschriftung Hide labels - + Beschriftung verstecken Groups of visibility - + Gruppen Sichtbarkeit Export recipe - + Exportieren der Anleitung Recipe files - + Anleitungs-Dateien recipe - + Anleitung Could not save recipe. %1 - + Konnte Anleitung nicht speichern. %1 Curved path tool which uses point as control handle - + Werkzeug Gekrümmter Pfad verwendet einstellbare Angriffspunkte Point of intersection arc and axis - + Punkt am Schnittpunkt von Bogen und Achse Show main path - + Zeige Hauptpfad Globally show pieces main path - + Globale Anzeige des Hauptpfads der Schnittteile Pattern messages - + Schnitt Nachrichten Clear all messages - + Lösche alle Nachrichten Filter - + Filter DEBUG - + DEBUG WARNING - + WARNUNG CRITICAL - + KRITISCH FATAL - + FATAL INFO - + INFO Auto refresh the list with each parse - + Automatische Aktualisierung der Liste mit jedem Leseversuch Watermark - + Wasserzeichen Load - + Laden Remove @@ -8493,19 +8474,19 @@ Sollen die Änderungen gespeichert werden? Edit current - + Aktuelles Anpassen Editor - + Editor Create or edit a watermark - + Anlegen oder Ändern eines Wasserzeichens Watermark files - + Wasserzeichen Dateien @@ -8596,11 +8577,11 @@ Sollen die Änderungen gespeichert werden? Cannot set printer margins - + Kann Druckränder nicht setzen Can't create a path - + Kann keinen Pfad erstellen Pattern @@ -8620,15 +8601,15 @@ Sollen die Änderungen gespeichert werden? Value in line %1 is infinite or NaN. Please, check your calculations. - + Wert in Zeile %1 ist unendlich oder keine Zahl. Bitte die Berechnung überprüfen. Parser error at line %1: %2. - + Fehler beim Lesen in Zeile %1: %2. File error %1. - + Datei Fehler %1. One or more pattern pieces are bigger than the paper format you selected. Please, select a bigger paper format. @@ -8636,7 +8617,7 @@ Sollen die Änderungen gespeichert werden? Description - Beschreibung + Beschreibung Measurement file has unknown format. @@ -8652,7 +8633,7 @@ Sollen die Änderungen gespeichert werden? Application doesn't support multisize table with inches. - + Anwendung unterstützt keine MultiMaß-Tabelle mit Inches. File error. @@ -8664,27 +8645,27 @@ Sollen die Änderungen gespeichert werden? Please, additionally provide: %1 - + Bitte zusätzlich angeben: %1 Preparing details for layout - + Vorbereitung der Details für den Zuschnittplan Timeout. - + Zeitüberschreitung. Cannot set printer page size - + Kann die Seitengröße für den Druck nicht einstellen Cannot set custom printer page size - + Kann keine selbsterstellte Druck Seitengröße einstellen Process has been stoped because of exception. - + Vorgang wurde wegen eines Fehlers unterbrochen. File error. @@ -8692,7 +8673,11 @@ Sollen die Änderungen gespeichert werden? %1 %2 - + Datei Fehler. + +%1 + +%2 @@ -8738,14 +8723,14 @@ Sollen die Änderungen gespeichert werden? OperationMoveLabel move point label - Punkt-Label bewegen + Verschiebe Punkt Beschreibung OperationShowLabel toggle label - + Bezeichner ein/ausschalten @@ -8829,6 +8814,10 @@ Sollen die Änderungen gespeichert werden? Count steps (0 - no limit): Schritte (0 - unbegrenzt): + + All user defined materials have been deleted! + Alle benutzerdefinierten Materialien wurden gelöscht! + User defined materials Benutzerdefinierte Materialien @@ -8845,104 +8834,112 @@ Sollen die Änderungen gespeichert werden? Forbid flipping Umdrehen verhindern + + By default forbid flipping for all workpieces + Spiegeln aller Arbeitsstücke als Vorgabe verbieten + + + By default forbid flipping for all new created workpieces + Spiegeln aller neu erstellten Arbeitsstücke als Vorgabe verbieten + PreferencesConfigurationPage Save - Speichern + Speichern Auto-save modified pattern - Automatisches Speichern + Automatisches Speichern geänderter Schnittmuster Interval: - Intervall: + Intervall: min - min + min Language - Sprache + Sprache GUI language: - Sprache der Benutzeroberfläche: + Sprache der Benutzeroberfläche: Decimal separator parts: - Dezimaltrennzeichen: + Dezimal Trennsymbol: Default unit: - Standard-Maßeinheit: + Standard Einheit: Label language: - Sprache der Bezeichnung: + Bezeichnungs Sprache: Pattern making system - Schnittmuster-System + Schnittmuster Fertigungs-System Pattern making system: - Schnittmuster-System: + Schnittmuster Fertigungs-System: Author: - Autor: + Autor: Book: - Buch: + Buch: Pattern editing - + Muster bearbeiten Reset warnings - + Warnungen zurücksetzen Toolbar - Symbolleiste + Werkzeugleiste The text appears under the icon (recommended for beginners). - Der Text wird unter dem Symbol angezeigt (empfohlen für Anfänger). + Der Text erscheint unter dem Icon (empfohlen für Anfangende). With OS options - + Mit Betriebssystem (OS) Optionen Centimeters - Zentimeter + Zentimeter Millimiters - Millimeter + Millimeter Inches - Zoll + Inch Update a pattern only after a curve release - + Aktualisieren eines Schnittmusters erst nach Loslassen der Kurve Free curve mode - + Freier Kurvenmodus default unit - + Standard Einheit General @@ -8950,85 +8947,85 @@ Sollen die Änderungen gespeichert werden? Double click calls Zoom fit best for current pattern piece - + Doppelklick ruft Zoom Best-Fit für das aktuelle Schnittmusterteil auf Scrolling - + Scrollen Animation - + Animation Duration: - + Dauer: Scrolling animation duration - + Dauer der Scrollanimation ms milliseconds - + ms Update interval: - + Aktualisierungsintervall: Time in milliseconds between each animation update - + Zeit in Millisekunden zwischen den Animationssequenzen Mouse scale - + Maus Skalierung Sensor: sensor mouse - + Sensor: Scale scrolling sensitivity for mouse with sensor - + Skalieren der Scrollempfindlichkeit für Maus mit Sensor Wheel: mouse wheel - + Mausrad: Scale scrolling sensitivity for mouse with wheel - + Skalieren der Scrollempfindlichkeit für Maus mit Rad Acceleration: - + Beschleunigung: User Interface - + Benutzeroberfläche Activate dark mode - + Dunklen Hintergrund aktivieren dark mode - + Dunkler Hintergrund PreferencesPathPage Paths that Valentina uses - + Pfade die Valentina benutzt Type - Typ + Typ Path @@ -9044,15 +9041,15 @@ Sollen die Änderungen gespeichert werden? Open Directory - Verzeichnis öffnen + Öffentliches Verzeichnis (Open Directory) My Individual Measurements - + Meine Persönlichen Maße My Multisize Measurements - + Meine MultiMaß Masse My Patterns @@ -9068,26 +9065,26 @@ Sollen die Änderungen gespeichert werden? My label templates - + Meine Bezeichnungsvorlagen PreferencesPatternPage Graphical output - Grafische Ausgabe + Grafische Ausgabe Use antialiasing - Antialiasing verwenden + Kantenglättung (Anti-Aliasing) verwenden Undo - Rückgängig + Zurück Count steps (0 - no limit): - Schritte (0 - unbegrenzt): + Anzahl Schritte (0 - keine Beschränkung): Workpiece @@ -9099,27 +9096,27 @@ Sollen die Änderungen gespeichert werden? Show a passmark both in the seam allowance and on the seam line. - + Passmarke anzeigen, sowohl auf der Nahtzugabe als auch auf der Naht. Show second passmark on seam line - + Zweite Passmarke auf der Naht anzeigen By default forbid flipping for all new created workpieces - + Spiegeln aller neu erstellten Arbeitsstücke als Standard verbieten By default hide the main path if the seam allowance was enabled - + Verstecke automatisch den Hauptpfad wenn eine Nahtzugabe eingestellt ist Hide main path - + Verstecke Hauptpfad Label font: - + Bezeichner Schriftart: Seam allowance @@ -9127,23 +9124,23 @@ Sollen die Änderungen gespeichert werden? Default value: - + Vorgabe Wert: Label data/time format - + Bezeichner Datum/Zeit Format Date: - + Datum: Edit formats - + Format bearbeiten Time: - + Zeit: Materials @@ -9151,11 +9148,11 @@ Sollen die Änderungen gespeichert werden? Known materials: - + Bekannte Materialien: Manage list of known materials - + Verwaltung der Liste bekannter Materialien Manage @@ -9163,27 +9160,27 @@ Sollen die Änderungen gespeichert werden? When manage pattern materials save them to known materials list - + Verwaltung der Materialien eines Musters speichert diese in die Liste der bekannten Materialien Remeber pattern materials - + Materialien des Musters behalten Curve approximation: - + Kurven-Näherung: Set default curve approximation scale - + Standard Größenordnung der Kurven-Näherung setzen Bold line width - + Fette Zeilenbreite Line width: - + Zeilenbreite: Millimiters @@ -9196,19 +9193,20 @@ Sollen die Änderungen gespeichert werden? Use OpenGL to render a scene. This option will take an affect after restart. - + Verwende OpenGL um eine Szene zu berechnen. +Diese Option wird nach einem Neustart aktiv. Use OpenGL render - + OpenGL Berechnung verwenden antialiasing - + Kantenglättung (Anti-Aliasing) scene render - + Szene berechnen @@ -9390,31 +9388,31 @@ This option will take an affect after restart. Wrong tag name '%1'. - Falscher Symbolname '%1'. + Falscher Symbolname '%1'. Can't convert toUInt parameter - Konnte nicht in Parameter vom Typ 'Integer' umwandeln + Konnte nicht in Parameter vom Typ 'positive Ganzzahl' umwandeln Can't convert toBool parameter - Konnte nicht in Parameter vom Typ 'Boolean' umwandeln + Konnte nicht in Parameter vom Typ 'Wahrheitswert' umwandeln Got empty parameter - Leerer Parameter erhalten + Leerer Parameter erhalten Can't convert toDouble parameter - Kann Parameter toDouble nicht konvertieren + Konnte nicht in Parameter vom Typ 'Fließkomma' umwandeln Got wrong parameter id. Need only id > 0. - Falsche Parameter-ID. Wert > 0 erforderlich. + Falsche Parameter-ID. Wert > 0 erforderlich. United detail - + Vereinigungs Detail Fabric @@ -9442,43 +9440,43 @@ This option will take an affect after restart. Visibility trigger contains error and will be ignored - + Sichtbarkeits Auslöser enthält Fehler und wird ignoriert User material number %1 was not defined in this pattern. - + Benutzer Material Nummer %1 wurde nicht in diesem Schnitt definiert. Error in internal path '%1'. There is no intersection of first point with cutting countour - + Fehler in internem Pfad '%1'. Es gibt keinen Schnittpunkt des ersten Punktes mit der Schnittkontur Error in internal path '%1'. There is no intersection of last point with cutting countour - + Fehler in internem Pfad '%1'. Es gibt keinen Schnittpunkt des letzten Punktes mit der Schnittkontur Cannot calculate a notch for point '%1' in piece '%2'. Seam allowance is empty. - + Kann keinen Einschnitt an Punkt '%1' in Schnittteil '%2' berechnen. Nahtzugabe ist leer. Cannot calculate a notch for point '%1' in piece '%2'. Cannot find position for a notch. - + Cannot calculate a notch for point '%1' in piece '%2'. Kann keine Position für einen Einschnitt finden. Cannot calculate a notch for point '%1' in piece '%2'. Unable to fix a notch position. - + Cannot calculate a notch for point '%1' in piece '%2'. Es ist unmöglich eine Einschnitt Position festzulegen. Cannot calculate a notch for point '%1' in piece '%2'. Notch collapse. - + Kann keinen Einschnitt an Punkt '%1' in Schnittteil '%2' berechnen. Einschnitt fehlgeschlagen. Cannot calculate a notch for point '%1' in piece '%2'. Cannot find intersection. - + Cannot calculate a notch for point '%1' in piece '%2'. Kann keinen Schnittpunkt finden. Cannot get tokens from formula '%1'. Parser error: %2. - + Kann die Symbole aus Formel '%1' nicht lesen. Lese-Fehler: %2. Error @@ -9486,7 +9484,7 @@ This option will take an affect after restart. Empty formula - + Leere Formel Invalid result. Value is infinite or NaN. Please, check your calculations. @@ -9506,55 +9504,55 @@ This option will take an affect after restart. Piece '%1' has invalid layout allowance. Please, check seam allowance to check how seam allowance behave. - + Schnittteil '%1' hat ungültige Zuschnittzugabe. Bitte die Nahtzugabe überprüfen, um zu prüfen wie sich die Nahtzugabe verhält. Piece '%1'. Seam allowance is not valid. - + Schnitteil '%1'. Nahtzugabe ist ungültig. Found null notch for point '%1' in piece '%2'. Length is less than minimal allowed. - + Leerer Einschnitt an Punkt '%1' in Schnittteil '%2' gefunden. Länge ist geringer als die Minimalangabe erlaubt. Cannot calculate a notch for point '%1' in piece '%2' with built in seam allowance. User must manually provide length. - + Kann keinen Einschnitt für Punkt '%1' in Schnittteil '%2' berechnen mit vorgegebener Nahtzugabe. Der Benutzer muss die Länge manuell vorgeben. Cannot calculate seam allowance before for point '%1'. Reason: %2. - + Kann die Nahtzugabe vor Punkt '%1' nicht berechnen . Ursache: %2. Cannot calculate seam allowance after for point '%1'. Reason: %2. - + Kann die Nahtzugabe nach Punkt '%1' nicht berechnen . Ursache: %2. Cannot calculate seam allowance after for point '%1'. Reason: - + Kann die Nahtzugabe nach Punkt '%1' nicht berechnen . Ursache: Cannot calculate passmark length for point '%1'. Reason: %2. - + Kann die Passmarken Länge für Punkt '%1' nicht berechnen. Ursache: %2. Passmark '%1' is not part of piece '%2'. - + Passmarke '%1' ist nicht Teil von Schnittteil '%2'. Cannot cast tool with id '%1'. - + Kann Werkzeug mit der ID '%1' nicht aufrufen. Empty list of nodes for tool with id '%1'. - + Leere Liste der Knoten für Werkzeug mit der ID '%1'. Invalid formula '%1' for tool with id '%2'. %3. - + Ungültige Formel '%1' für Werkzeug mit der ID '%2'. %3. Can't convert toInt parameter - + Konnte nicht in Parameter vom Typ 'Ganzzahl' umwandeln @@ -9772,7 +9770,7 @@ This option will take an affect after restart. RemoveItemFromGroup Remove item from group - + Element aus Gruppe entfernen @@ -9789,6 +9787,13 @@ This option will take an affect after restart. Schnittteil umbenennen + + RotationMoveLabel + + move point label + Verschiebe Punkt Beschreibung + + SaveDetailOptions @@ -9800,21 +9805,21 @@ This option will take an affect after restart. SavePieceOptions save detail options - + Detailoptionen speichern SavePiecePathOptions save path options - + Pfad-Optionen speichern SavePlaceLabelOptions save place label options - + Beschriftung Platzierungs-Optionen speichern @@ -9828,18 +9833,18 @@ This option will take an affect after restart. ShowDoubleLabel toggle the first dart label - + Ein/Ausschalten der ersten Abnäher-Bezeichnung togggle the second dart label - + Ein/Ausschalten der zweiten Abnäher-Bezeichnung ShowLabel toggle label - + Bezeichner ein/ausschalten @@ -10404,6 +10409,10 @@ Do you want to save your changes? Export to CSV Als CSV exportieren + + Comma-Separated Values (*.cvs) + Komma-Separierte Werte (*,csv) + Invalid value Ungültiger Wert @@ -10414,7 +10423,7 @@ Do you want to save your changes? Comma-Separated Values - + Komma-Separierte Werte Customer's name @@ -10442,7 +10451,7 @@ Do you want to save your changes? The measurements document has no write permissions. - + Die Maß-Datei hat keine Schreibrechte. Cannot set permissions for %1 to writable. @@ -10462,7 +10471,7 @@ Do you want to save your changes? Multisize measurements - + MultiMaß Maße Invalid result. Value is infinite or NaN. Please, check your calculations. @@ -10474,19 +10483,19 @@ Do you want to save your changes? Export from multisize measurements is not supported. - + Exportieren von MultiMaß-Maßen wird nicht unterstützt. Customer name: - Name des Kunden: + Kundenname: Open multisize … - + MultiMaß öffnen … Create from existing … - + Erstellen aus Vorhandenem … Save… @@ -10494,59 +10503,59 @@ Do you want to save your changes? Import from CSV - + Aus CSV importieren Measurement name in is empty. - + Name des Maßes in ist leer. Merasurement '%1' doesn't match regex pattern. - + Maß '%1' entspricht keinem RegEx pattern. Merasurement '%1' already used in file. - + Maß '%1' wird bereits in Datei verwendet. Measurement '%1' is not one of known measurements. - + Maß '%1' ist kein bekanntes Maß. Individual measurements require at least 2 columns. - + Individuelle Maße erfordern mindestens 2 Spalten. Error in row %1. - + Fehler in Zeile %1. Multisize measurements require at least 4 columns. - + MultiMaß Maße erfordern mindestens 4 Spalten. Cannot convert base size value to double in column 2. - + Kann den Wert der Basis-Größe nicht in eine Fließkommazahl wandeln in Spalte 2. Cannot convert height increase value to double in column 3. - + Kann den Wert der Höhen-Zunahme nicht in eine Fließkommazahl wandeln in Spalte 3. Cannot convert size increase value to double in column 4. - + Kann den Wert der Größenzunahme nicht in eine Fließkommazahl wandeln in Spalte 4. Imported file must not contain the same name twice. - + Importierte Datei darf die selbe Bezeichnung nicht zweimal enthalten. Error in row %1. Measurement name is empty. - + Fehler in Zeile %1. Maß Bezeichnung ist leer. Cannot save settings. Access denied. - + Kann Einstellungen nicht speichern. Zugriff verwehrt. &File @@ -10590,23 +10599,23 @@ Do you want to save your changes? <html><head/><body><p>Search measurements by term. </p><p>Prepend &quot;/r/&quot; to the front of the search string to search measurements by regex.</p></body></html> - + <html><head/><body><p>Suche nach Maßen mit Ausdruck. </p><p>chreibe &quot;/r/&quot; an den Beginn des Suchausdrucks um Maße mit einem RegEx zu suchen.</p></body></html> Do you want to change the premissions? - + Wollen Sie die Berechtigung ändern ? Cannot read settings from a malformed .INI file. - + Kann Einstellungen nicht aus fehlerhafter .INI Datei lesen. Height (%1): - + Höhe (%1): Size (%1): - + Größe (%1): @@ -10641,15 +10650,15 @@ Do you want to save your changes? Center pin: - + Mittlerer Pin: Top pin: - + Oberer Pin: Bottom pin: - + Unterer Pin: Arrows: @@ -10660,7 +10669,7 @@ Do you want to save your changes? TabLabels Piece label data - + Stück Bezeichnungs-Daten Letter: @@ -10672,7 +10681,7 @@ Do you want to save your changes? Placement: - Platzierung: + Platzierung: Labels @@ -10708,15 +10717,15 @@ Do you want to save your changes? Center pin: - + Mittlerer Pin: Top left pin: - + Oberer linker Pin: Bottom right pin: - + Unterer rechter Pin: Angle: @@ -10740,7 +10749,7 @@ Do you want to save your changes? Quantity: - + Anzahl: on fold @@ -10748,11 +10757,11 @@ Do you want to save your changes? Annotation: - + Anmerkung: A text field to add comments in - + Ein Textfeld um Kommentare hinzuzufügen Orientation: @@ -10760,34 +10769,34 @@ Do you want to save your changes? Rotation: - Drehung: + Drehung: Tilt: - + Neigung: Fold position: - + Falz Position: Edit piece label template - + Schnittteil Bezeichnungsvorlage bearbeiten Options to control position a detail label. <b>Not available if a detail label template is empty</b>. - + Optionen um die Position einer Detail Bezeichnung anzupassen. <b>Nicht verfügbar, wenn die Detail Bezeichnungsvorlage leer ist</b>. Options to control position a pattern label. <b>Not available if a pattern label template is empty</b>. - + Optionen um die Position einer Schnittmuster Bezeichnung anzupassen. <b>Nicht verfügbar, wenn die Schnittmuster Bezeichnungsvorlage leer ist</b>. TabPassmarks Passmark: - + Passmarke: One line @@ -10827,7 +10836,7 @@ Do you want to save your changes? Select if need designate the corner point as a passmark - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll Intersection @@ -10835,15 +10844,15 @@ Do you want to save your changes? Show the second passmark on seam line - + Zeige die zweite Passmarke auf der Nahtkante This option has effect only if the second passmark on seam line enabled in global preferences. The option helps disable the second passmark for this passmark only. - + Diese Option hat nur dann Effekt, wenn die zweite Passmarke auf der Nahtkante in den globalen Einstellungen aktiviert ist. Diese Option hilft die zweite Passmarke nur für diese Passmarke zu unterdrücken. Select if need designate the corner point as a passmark. Show only left passmark. - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll. Nur linke Passmarke anzeigen. Intersection (only left) @@ -10851,7 +10860,7 @@ Do you want to save your changes? Select if need designate the corner point as a passmark. Show only right passmark. - + Auswählen wenn der Eckpunkt als Passmarke gekennzeichnet werden soll. Nur rechte Passmarke anzeigen. Intersection (only right) @@ -10871,19 +10880,19 @@ Do you want to save your changes? Acute angle that looks intside of piece - + Spitzer Winkel der in das Schnittteil hinein geht Acute angle that looks outside of piece - + Spitzer Winkel der aus dem Schnittteil heraus schaut V mark 2 - + V Marke 2 Manual length - + Manuelle Längenangabe Length: @@ -10893,10 +10902,6 @@ Do you want to save your changes? Formula wizard Formelassistent - - = - - Value Wert @@ -10911,26 +10916,26 @@ Do you want to save your changes? U mark - + U Markierung Box mark - + Box Markierung List of all defined passmarks. To define a passmark return to the Main Path tab, call context menu for a point item and make it a passmark. - + Liste aller definierten Passmarken. Um eine Passmarke zu definieren gehe auf den Reiter Hauptpfad, rufe das Kontext Menü für ein Punktelement auf und wähle Passmarke aus. TabPaths Main path - + Hauptpfad All objects in path should follow in clockwise direction. - Alle Objekte im Pfad sollten im Uhrzeigersinn folgen. + Alle Objekte im Pfad sollten im Uhrzeigersinn folgen. Forbid piece be mirrored in a layout. @@ -10998,23 +11003,23 @@ Do you want to save your changes? Start point: - + Anfangspunkt: End point: - + Endpunkt: Include as: - + Einfügen als: Internal paths - + Interne Pfade The seam allowance is part of main path - + Die Nahtzugabe ist Teil des Hauptpfades Built in @@ -11022,11 +11027,11 @@ Do you want to save your changes? Hide the main path if the seam allowance is enabled - + Verstecke den Hauptpfad wenn eine Nahtzugabe eingestellt ist Hide main path - + Verstecke Hauptpfad Name of detail: @@ -11042,11 +11047,11 @@ Do you want to save your changes? Force piece to be always flipped in a layout. - + Zwangsweise das Schnittteil immer im Zuschnittplan spiegeln. Force flipping - + Spiegeln erzwingen Move on top @@ -11066,16 +11071,16 @@ Do you want to save your changes? Priority: - + Rangordnung: Controls priority in layout. 0 - no priority. - + Steuert die Rangordnung im Zuschnittplan. 0 - keine Rangordnung. Automatic seam allowance - + Automatisch Custom @@ -11094,7 +11099,7 @@ Do you want to save your changes? Tape This test build is older than %1 days. To provide you with better quality service we restrict the lifetime you can use a test build. To continue using Tape please update to newer test build. The application will be shut down. - + Diese Testversion ist älter als %1 Tage. Um Ihnen eine bessere Qualität bieten zu können, beschränken wir die Dauer der Nutzung einer Testversion. Um weiterhin Tape verwenden zu können, aktualisieren Sie bitte auf eine neuere Testversion. Die Anwendung wird geschloßen. @@ -11222,86 +11227,86 @@ Do you want to save your changes? TapePreferencesConfigurationPage Language - Sprache + Sprache GUI language: - Sprache der Benutzeroberfläche: + Sprache der Benutzeroberfläche: Decimal separator parts: - Dezimaltrennzeichen: + Dezimal Trennsymbol: Pattern making system - Schnittmuster-System + Schnittmuster Fertigungs-System Pattern making system: - Schnittmuster-System: + Schnittmuster Fertigungs-System: Author: - Autor: + Autor: Book: - Buch: + Buch: Measurements editing - + Maße bearbeiten Reset warnings - + Warnungen zurücksetzen Toolbar - Symbolleiste + Werkzeugleiste The text appears under the icon (recommended for beginners). - Der Text wird unter dem Symbol angezeigt (empfohlen für Anfänger). + Der Text erscheint unter dem Icon (empfohlen für Anfangende). Default height and size - Standardhöhe und Größe + Standard Höhe und Größe Default height: - Standardhöhe: + Standardhöhe: Default size: - Standardgröße: + Standardgröße: With OS options - + Mit Betriebssystem (OS) Optionen User Interface - + Benutzeroberfläche Activate dark mode - + Dunklen Hintergrund aktivieren dark mode - + Dunkler Hintergrund TapePreferencesPathPage Paths that Valentina uses - + Pfade die Valentina benutzt Type - Typ + Typ Path @@ -11317,15 +11322,15 @@ Do you want to save your changes? Open Directory - Verzeichnis öffnen + Öffentliches Verzeichnis (Open Directory) My Individual Measurements - + Meine Persönlichen Maße My Multisize Measurements - + Meine MultiMaß Masse My Templates @@ -11336,18 +11341,25 @@ Do you want to save your changes? Meine Schnittmuster + + ToggleDetailInLayout + + detail in layout list + Detail in Zuschnittplan Liste + + TogglePieceForceForbidFlipping piece flipping - + Schnittteil spiegeln TogglePieceInLayout detail in layout list - + Detail in Zuschnittplan Liste @@ -11411,36 +11423,40 @@ Do you want to save your changes? Unexpected version "%1". Unerwartete Version "%1". + + Error replacing a symlink by real file: %1. + Fehler beim Ersetzen eines symbolischen Links durch eine echte Datei: %1. + Error openning a temp file: %1. - + Fehler beim Öffnen der temporären Datei: %1. Invalid version. Minimum supported format version is %1 - + Ungültige Version. Die minimal unterstützte Format Version ist %1 Invalid version. Maximum supported format version is %1 - + Ungültige Version. Die maximal unterstützte Format Version ist %1 Can't open file %1: %2. - Konnte Datei %1 nicht öffnen: %2. + Konnte Datei %1 nicht öffnen: %2. Can't open schema file %1: %2. - Konnte Schemadatei %1 nicht öffnen: + Konnte Schemadatei %1 nicht öffnen: %2. Could not load schema file '%1'. - Konnte Schemadatei %1 nicht öffnen. + Konnte Schemadatei %1 nicht öffnen. Validation error file %3 in line %1 column %2 - Fehler bei der Gültigkeitsprüfung in Datei %3, Zeile %1, Spalte %2 + Fehler bei der Gültigkeitsprüfung in Datei %3, Zeile %1, Spalte %2 @@ -11465,7 +11481,7 @@ Do you want to save your changes? Tabloid Paper format - + Tablett Roll 24in @@ -11495,17 +11511,17 @@ Do you want to save your changes? Roll 48in Paper format - Rolle 44 Zoll {48i?} + Rolle 44 Zoll {48 Zoll ?} Roll 62in Paper format - Rolle 44 Zoll {62i?} + Rolle 44 Zoll {62 Zoll ?} Roll 72in Paper format - Rolle 44 Zoll {72i?} + Rolle 44 Zoll {72 Zoll ?} Custom @@ -11517,18 +11533,18 @@ Do you want to save your changes? VAbstractNode This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. VAbstractOperation Label - + Bezeichnung Length - Länge + Länge operation options @@ -11566,25 +11582,25 @@ Do you want to save your changes? VAbstractPiece Piece '%1'. Not enough points to build seam allowance. - + Schnittteil '%1'. Nicht genügend Punkte vorhanden um Nahtzugabe zu erstellen. VAbstractPieceData Detail - Detail + Detail VAbstractSpline Length - Länge + Länge Label - + Bezeichnung @@ -11627,47 +11643,51 @@ Do you want to save your changes? light salmon - + Helle Lachsfarbe + + + golden rod + Goldrute orange - + Orange deep pink - + Tiefrosa violet - + Violett dark violet - + Dunkles Violett medium sea green - + Mittleres Seegrün lime - + Zitronengrün deep sky blue - + Tiefes Himmelblau corn flower blue - + Kornblumenblau Edit wrong formula - Formel korrigieren + Formel korrigieren goldenrod - + Goldrute @@ -11706,7 +11726,7 @@ Do you want to save your changes? Invalid notch. - + Fehlerhafter Einschnitt. @@ -11980,7 +12000,7 @@ Do you want to save your changes? Rotation in degrees (one of predefined, export mode). Default value is 180. 0 is no-rotate. Valid values: %1. Each value show how many times details will be rotated. For example 180 mean two times (360/180=2) by 180 degree. - Drehung in Grad (eins der vordefinierten, Exportmodus). Standardwert ist 180. 0 bedeutet keine Drehung. Gültige erte: %1. Jeder Wert zeigt, wie oft Details gedreht werden sollen. Zum Beispiel bedeutet 180, dass das Detail zweimal im 180 Grad gedreht word (360/180=2). + Drehung in Grad (um einen vordefinierten Winkel, Exportmodus). Standardwert ist 180. 0 bedeutet keine Drehung. Gültige Werte: %1. Jeder Wert gibt an, wie oft Details gedreht werden sollen. Zum Beispiel bedeutet 180, dass das Detail zweimal um 180 Grad gedreht wird (360/180=2). Unite pages if possible (export mode). Maximum value limited by QImage that supports only a maximum of 32768x32768 px images. @@ -12020,7 +12040,11 @@ Do you want to save your changes? Number corresponding to output format (default = 0, export mode): - + Zahl entspricht Ausgabeformat (default = 0 , Exportmodus): + + + Number corresponding to page template (default = 0, export mode): + Zahl entspricht Seitenvorlage (Standard = 0, Exportmodus): Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). Alternatively you can use the %1 environment variable. @@ -12028,47 +12052,47 @@ Do you want to save your changes? Export dxf in binary form. - + Export in DXF Binär Format. Export text as paths. - + Text als Pfade exportieren. Export only details. Export details as they positioned in the details mode. Any layout related options will be ignored. - + Exportiere ausschließlich Details. Exportiere Details wie sie im Detailsmodus positioniert wurden. Alle mit dem Zuschnittsplan zusammenhängenden Möglichkeiten werden ignoriert. Export only details that match a piece name regex. - + Exportiere ausschließlich Details die einem Schnittteil RegEx entsprechen. The name regex - + Der RegEx für die Bezeichnung Export to csv with header. By default disabled. - + Exportiere als CSV mit Kopfzeile. Im Standard deaktiviert. Specify codec that will be used to save data. List of supported codecs provided by Qt. Default value depend from system. On Windows, the codec will be based on a system locale. On Unix systems, the codec will might fall back to using the iconv library if no builtin codec for the locale can be found. Valid values for this installation: - + Angabe zum Zeichensatz der verwendet wird um die Daten zu speichern. Die Liste der unterstützten Zeichensätze wird von Qt zur Verfügung gestellt. Der Standard Wert hängt vom System ab. Unter Windows, entspricht der Zeichensatz der Systemeinstellung. Auf Unix Systemen, kann der Zeichensatz auf die iConv Bibliothek zurückgreifen, falls kein vorhandener Zeichensatz für die Systemeinstellung gefunden wird. Gültige Werte für diese Installation: Codec name - + Zeichensatz Specify csv separator character. Default value is '%1'. Valid characters: - + Angabe des CSV Trennzeichens. Standard Wert ist '%1'. Gültige Zeichen: Separator character - + Trennzeichen Calling this command enable exporting final measurements. Specify path to csv file with final measurements. The path must contain path to directory and name of file. It can be absolute or relatetive. In case of relative path will be used current working directory to calc a destination path. - + Der Aufruf dieses Befehls ermöglicht den Export der endgültigen Maße. Gib das Verzeichnisangabe die CSV Datei mit den endgültigen Maßen an. Die Verzeichnisangabe muss das Verzeichnis und den Dateinamen enthalten. Es kann absolut oder relativ angegeben werden. Im Fall einer relativen Verzeichnisangabe wird der Zielpfad ausgehende vom aktuellen Arbeitsverzeichnis ermittelt. Path to csv file @@ -12387,7 +12411,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. Couldn't get version information. @@ -12422,7 +12446,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. Add to group @@ -12555,7 +12579,7 @@ Do you want to save your changes? Force flipping - + Spiegeln erzwingen by length @@ -12583,7 +12607,7 @@ Do you want to save your changes? Passmark - + Passmarke Seam allowance angle @@ -12651,15 +12675,15 @@ Do you want to save your changes? V mark 2 - + V Marke 2 U mark - + U Markierung Box mark - + Box Markierung @@ -12916,7 +12940,7 @@ Do you want to save your changes? Detail - Detail + Detail Unnamed path @@ -12977,11 +13001,11 @@ Do you want to save your changes? VPiece Cannot calculate a notch for point '%1' in piece '%2'. - + Kann keinen Einschnitt an Punkt '%1' in Schnittteil '%2' berechnen. Notch for point '%1' in piece '%2' will be disabled. Manual length is less than allowed value. - + Einschnitt für Punkt '%1' in Schnittteil '%2' wird deaktiviert. Die angegebene manuelle Länge ist geringer als die Minimalangabe erlaubt. @@ -13066,7 +13090,7 @@ Do you want to save your changes? VToolAlongLine Length - Länge + Länge Angle @@ -13074,14 +13098,14 @@ Do you want to save your changes? Label - + Bezeichnung VToolArc Length - Länge + Länge Radius @@ -13097,14 +13121,14 @@ Do you want to save your changes? Label - + Bezeichnung VToolArcWithLength Length - Länge + Länge Radius @@ -13120,14 +13144,14 @@ Do you want to save your changes? Label - + Bezeichnung VToolBasePoint Label - + Bezeichnung @@ -13225,14 +13249,14 @@ Do you want to save your changes? VToolDoublePoint Label - + Bezeichnung VToolEllipticalArc Length - Länge + Länge Radius @@ -13248,7 +13272,7 @@ Do you want to save your changes? Label - + Bezeichnung Rotation @@ -13263,7 +13287,7 @@ Do you want to save your changes? Flipping by axis - Über Achse spiegeln + Über Achse spiegeln @@ -13285,7 +13309,7 @@ Do you want to save your changes? VToolHeight Length - Länge + Länge Angle @@ -13293,14 +13317,14 @@ Do you want to save your changes? Label - + Bezeichnung VToolLine Length - Länge + Länge Angle @@ -13311,7 +13335,7 @@ Do you want to save your changes? VToolLineIntersect Label - + Bezeichnung Error calculating point '%1'. Lines (%2;%3) and (%4;%5) have no point of intersection @@ -13322,7 +13346,7 @@ Do you want to save your changes? VToolLineIntersectAxis Length - Länge + Länge Angle @@ -13330,7 +13354,7 @@ Do you want to save your changes? Label - + Bezeichnung Error calculating point '%1'. Line (%2;%3) doesn't have intersection with axis through point '%4' and angle %5° @@ -13341,7 +13365,7 @@ Do you want to save your changes? VToolLinePoint Length - Länge + Länge Angle @@ -13349,7 +13373,7 @@ Do you want to save your changes? Label - + Bezeichnung @@ -13360,7 +13384,7 @@ Do you want to save your changes? Length - Länge + Länge Center point @@ -13887,7 +13911,7 @@ Do you want to save your changes? Rotation angle: - Rotations-Winkel: + Drehungs-Winkel: Fourth point: @@ -13903,7 +13927,7 @@ Do you want to save your changes? Rotation origin point: - Rotationsurprung: + Drehung um Ursprungspunkt: @@ -13924,7 +13948,7 @@ Do you want to save your changes? VToolPointOfContact Length - Länge + Länge Angle @@ -13932,7 +13956,7 @@ Do you want to save your changes? Label - + Bezeichnung Error calculating point '%1'. Circle with center '%2' and radius '%3' doesn't have intersection with line (%4;%5) @@ -14043,11 +14067,11 @@ Do you want to save your changes? Force flipping - + Spiegeln erzwingen This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. Tool was used after deleting. @@ -14058,7 +14082,7 @@ Do you want to save your changes? VToolShoulderPoint Length - Länge + Länge Angle @@ -14066,7 +14090,7 @@ Do you want to save your changes? Label - + Bezeichnung @@ -14082,9 +14106,13 @@ Do you want to save your changes? union details + + United detail + Vereinigungs Detail + This id (%1) is not unique. - + Diese ID (%1) ist nicht eindeutig. @@ -15772,7 +15800,7 @@ Do you want to save your changes? Preferences - Einstellungen + Einstellungen Categories: %1. @@ -15890,7 +15918,7 @@ Do you want to save your changes? WatermarkWindow Watermark - + Wasserzeichen Opacity: @@ -15987,7 +16015,7 @@ Do you want to save your changes? Watermark files - + Wasserzeichen Dateien Save as diff --git a/share/translations/valentina_el_GR.ts b/share/translations/valentina_el_GR.ts index b48e0a0c6..29681d775 100644 --- a/share/translations/valentina_el_GR.ts +++ b/share/translations/valentina_el_GR.ts @@ -2420,11 +2420,11 @@ Name: - Όνομα: + Όνομα: Rotation - Περιστροφή + Περιστροφή Tags: @@ -2487,11 +2487,11 @@ Name: - Όνομα: + Όνομα: Rotation - Περιστροφή + Περιστροφή Tags: @@ -3075,27 +3075,27 @@ Margins - Περιθώρια + Περιθώρια Left: - Αριστερά: + Αριστερά: cm - εκ + εκ Right: - Δεξιά: + Δεξιά: Top: - Επάνω: + Επάνω: Bottom: - Κάτω: + Κάτω: Scale @@ -3109,22 +3109,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3378,10 +3362,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3390,10 +3370,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3411,11 +3387,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3840,11 +3821,11 @@ Apply settings anyway? Name: - Όνομα: + Όνομα: Rotation - Περιστροφή + Περιστροφή Tags: @@ -4787,10 +4768,6 @@ Apply settings anyway? Length: Μήκος: - - = - - U mark @@ -5529,7 +5506,7 @@ Apply settings anyway? Name: - Όνομα: + Όνομα: Tags: @@ -5648,7 +5625,7 @@ Apply settings anyway? Options - Επιλογές + Επιλογές Scale @@ -5662,22 +5639,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -10688,10 +10649,6 @@ Do you want to save your changes? Formula wizard Βοηθός φόρμουλας - - = - - Value Τιμή @@ -12903,7 +12860,7 @@ Do you want to save your changes? Flipping by axis - Αναστροφή κατά άξονα + Αναστροφή κατά άξονα @@ -15342,7 +15299,7 @@ Do you want to save your changes? Preferences - Προτιμήσεις + Προτιμήσεις Categories: %1. diff --git a/share/translations/valentina_en_CA.ts b/share/translations/valentina_en_CA.ts index 6d08da1c9..9e433e7a3 100644 --- a/share/translations/valentina_en_CA.ts +++ b/share/translations/valentina_en_CA.ts @@ -2464,11 +2464,11 @@ Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -2531,11 +2531,11 @@ Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -3135,23 +3135,23 @@ Left: - Left: + Left: cm - cm + cm Right: - Right: + Right: Top: - Top: + Top: Bottom: - Bottom: + Bottom: Scale @@ -3165,22 +3165,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3449,10 +3433,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3461,10 +3441,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3482,11 +3458,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3911,11 +3892,11 @@ Apply settings anyway? Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -4870,10 +4851,6 @@ Apply settings anyway? Length: Length: - - = - - U mark @@ -5612,7 +5589,7 @@ Apply settings anyway? Name: - Name: + Name: Tags: @@ -5731,7 +5708,7 @@ Apply settings anyway? Options - Options + Options Scale @@ -5745,22 +5722,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -10916,10 +10877,6 @@ Do you want to save your changes? Formula wizard Formula wizard - - = - - Value Value @@ -11460,22 +11417,22 @@ Do you want to save your changes? Can't open file %1: %2. - Can't open file %1: + Can't open file %1: %2. Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 @@ -13335,7 +13292,7 @@ Do you want to save your changes? Flipping by axis - Flipping by axis + Flipping by axis @@ -15596,22 +15553,22 @@ Do you want to save your changes? hyperbolic sine function function sinh - + hyperbolic sine function hyperbolic cosine function cosh - + hyperbolic cosine hyperbolic tangens function function tanh - + hyperbolic tangens function hyperbolic arcus sine function function asinh - + hyperbolic arcus sine function hyperbolic arcus cosine function @@ -15621,7 +15578,7 @@ Do you want to save your changes? hyperbolic arcur tangens function function atanh - + hyperbolic arcur tangens function sine function working with degrees @@ -15656,42 +15613,42 @@ Do you want to save your changes? logarithm to the base 2 function log2 - + logarithm to the base 2 logarithm to the base 10 function log10 - + logarithm to the base 10 logarithm to the base 10 function log - + logarithm to the base 10 logarithm to base e (2.71828...) function ln - + logarithm to base e (2.71828...) e raised to the power of x function exp - + e raised to the power of x square root of a value function sqrt - + square root of a value sign function -1 if x<0; 1 if x>0 function sign - + sign function -1 if x<0; 1 if x>0 round to nearest integer function rint - + round to nearest integer round to up to 1 decimal @@ -15711,32 +15668,32 @@ Do you want to save your changes? absolute value function abs - + absolute value min of all arguments function min - + min of all arguments max of all arguments function max - + max of all arguments sum of all arguments function sum - + sum of all arguments mean value of all arguments function avg - + mean value of all arguments Returns the floating-point remainder of numer/denom (rounded towards zero) function fmod - + Returns the floating-point remainder of numer/denom (rounded towards zero) @@ -15856,7 +15813,7 @@ Do you want to save your changes? Preferences - Preferences + Preferences Categories: %1. diff --git a/share/translations/valentina_en_IN.ts b/share/translations/valentina_en_IN.ts index 8d2186c7e..e1ff249cf 100644 --- a/share/translations/valentina_en_IN.ts +++ b/share/translations/valentina_en_IN.ts @@ -2464,11 +2464,11 @@ Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -2531,11 +2531,11 @@ Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -3135,23 +3135,23 @@ Left: - Left: + Left: cm - cm + cm Right: - Right: + Right: Top: - Top: + Top: Bottom: - Bottom: + Bottom: Scale @@ -3165,22 +3165,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3449,10 +3433,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3461,10 +3441,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3482,11 +3458,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3911,11 +3892,11 @@ Apply settings anyway? Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -4870,10 +4851,6 @@ Apply settings anyway? Length: Length: - - = - - U mark @@ -5612,7 +5589,7 @@ Apply settings anyway? Name: - Name: + Name: Tags: @@ -5731,7 +5708,7 @@ Apply settings anyway? Options - Options + Options Scale @@ -5745,22 +5722,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -10916,10 +10877,6 @@ Do you want to save your changes? Formula wizard Formula wizard - - = - - Value Value @@ -11460,22 +11417,22 @@ Do you want to save your changes? Can't open file %1: %2. - Can't open file %1: + Can't open file %1: %2. Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 @@ -13335,7 +13292,7 @@ Do you want to save your changes? Flipping by axis - Flipping by axis + Flipping by axis @@ -15856,7 +15813,7 @@ Do you want to save your changes? Preferences - Preferences + Preferences Categories: %1. diff --git a/share/translations/valentina_en_US.ts b/share/translations/valentina_en_US.ts index d4043c1fd..821d8af44 100644 --- a/share/translations/valentina_en_US.ts +++ b/share/translations/valentina_en_US.ts @@ -2464,11 +2464,11 @@ Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -2531,11 +2531,11 @@ Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -3135,23 +3135,23 @@ Left: - Left: + Left: cm - cm + cm Right: - Right: + Right: Top: - Top: + Top: Bottom: - Bottom: + Bottom: Scale @@ -3165,22 +3165,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3449,10 +3433,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3461,10 +3441,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3482,11 +3458,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3911,11 +3892,11 @@ Apply settings anyway? Name: - Name: + Name: Rotation - Rotation + Rotation Tags: @@ -4870,10 +4851,6 @@ Apply settings anyway? Length: Length: - - = - - U mark @@ -5612,7 +5589,7 @@ Apply settings anyway? Name: - Name: + Name: Tags: @@ -5731,7 +5708,7 @@ Apply settings anyway? Options - Options + Options Scale @@ -5745,22 +5722,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -10916,10 +10877,6 @@ Do you want to save your changes? Formula wizard Formula wizard - - = - - Value Value @@ -11460,22 +11417,22 @@ Do you want to save your changes? Can't open file %1: %2. - Can't open file %1: + Can't open file %1: %2. Can't open schema file %1: %2. - Can't open schema file %1: + Can't open schema file %1: %2. Could not load schema file '%1'. - Could not load schema file '%1'. + Could not load schema file '%1'. Validation error file %3 in line %1 column %2 - Validation error file %3 in line %1 column %2 + Validation error file %3 in line %1 column %2 @@ -13335,7 +13292,7 @@ Do you want to save your changes? Flipping by axis - Flipping by axis + Flipping by axis @@ -15856,7 +15813,7 @@ Do you want to save your changes? Preferences - Preferences + Preferences Categories: %1. diff --git a/share/translations/valentina_es_ES.ts b/share/translations/valentina_es_ES.ts index 5faa86e87..fbb7a1c41 100644 --- a/share/translations/valentina_es_ES.ts +++ b/share/translations/valentina_es_ES.ts @@ -54,7 +54,7 @@ ChangeGroupOptions rename group - + renombrar grupo @@ -2456,31 +2456,31 @@ Enable to create a visibility gropup from original objects - + Habilitar para crear un grupo de visibilidad a partir de objetos originales Visibility Group - + Grupo de Visibilidad Name: - Nombre: + Nombre: Rotation - Rotación + Rotación Tags: - + Etiquetas: Separate each tag with comma. - + Separar cada etiqueta con coma. Add tags - + Agregar etiquetas @@ -2523,31 +2523,31 @@ Enable to create a visibility gropup from original objects - + Habilitar para crear un grupo de visibilidad a partir de objetos originales Visibility Group - + Grupo de Visibilidad Name: - Nombre: + Nombre: Rotation - Rotación + Rotación Tags: - + Etiquetas: Separate each tag with comma. - + Separar cada etiqueta con coma. Add tags - + Agregar etiquetas @@ -2574,15 +2574,15 @@ Tags: - + Etiquetas: Separate each tag with comma. - + Separar cada etiqueta con coma. Add tags - + Agregar etiquetas @@ -3127,59 +3127,43 @@ DialogLayoutScale Layout scale - + Escala del diseño Margins - Margenes + Margenes Left: - Izquierda: + Izquierda: cm - cm + cm Right: - Derecha: + Derecha: Top: - + Superior: Bottom: - + Inferior: Scale - + Escala Horizontal: - + Horizontal: Vertical: - - - - % - % - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - + Vertical: @@ -3450,10 +3434,6 @@ Aplicar características de todos modos? Time given for the algorithm to find best layout. Tiempo dado para que el algoritmo encuentre el mejor diseño. - - min - min - Efficiency: Eficiencia: @@ -3462,10 +3442,6 @@ Aplicar características de todos modos? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Establecer coeficiente de eficiencia del diseño. El coeficiente de eficiencia del diseño es el radio del área ocupada por las piezas al limite rectangular de todas las piezas. Si el anidamiento alcanza el nivel requerido, el proceso se detiene. Si el valor es 0 no se realizará ninguna comprobación. - - % - % - Manual priority Prioridad manual @@ -3483,12 +3459,17 @@ Aplicar características de todos modos? Recorte automático del ancho no utilizado - Enable this option to prefer getting one sheet solutions. - + Prefer one sheet solution + Prefiere una solución de hoja - Prefer one sheet solution - + min + minutes + min + + + Enable this option to prefer getting one sheet solutions. + Habilite esta opción para preferir obtener soluciones de una hoja. @@ -3904,31 +3885,31 @@ Aplicar características de todos modos? Enable to create a visibility gropup from original objects - + Habilitar para crear un grupo de visibilidad a partir de objetos originales Visibility Group - + Grupo de Visibilidad Name: - Nombre: + Nombre: Rotation - Rotación + Rotación Tags: - + Etiquetas: Separate each tag with comma. - + Separar cada etiqueta con coma. Add tags - + Agregar etiquetas @@ -4871,10 +4852,6 @@ Aplicar características de todos modos? Length: Longitud: - - = - = - U mark Marca U @@ -5605,27 +5582,27 @@ Aplicar características de todos modos? Enable to create a visibility gropup from original objects - + Habilitar para crear un grupo de visibilidad a partir de objetos originales Visibility Group - + Grupo de Visibilidad Name: - Nombre: + Nombre: Tags: - + Etiquetas: Separate each tag with comma. - + Separar cada etiqueta con coma. Add tags - + Agregar etiquetas @@ -5732,35 +5709,19 @@ Aplicar características de todos modos? Options - Opciones + Opciones Scale - + Escala Horizontal: - + Horizontal: Vertical: - - - - % - % - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - + Vertical: @@ -6521,7 +6482,7 @@ Aplicar características de todos modos? Followed %n option(s) require restart to take effect: %1. - + Para seguir %n opción(es) se requiere re-inicializar el programa: %1. Para seguir %n opción(es) se requiere re-inicializar el programa: %1. @@ -8482,11 +8443,11 @@ el patrón. Watermark - + Marca de Agua Load - + Cargar Remove @@ -8494,19 +8455,19 @@ el patrón. Edit current - + Editar actual Editor - + Editor Create or edit a watermark - + Crear o editar una marca de agua Watermark files - + Archivos de marca de agua @@ -8693,7 +8654,11 @@ el patrón. %1 %2 - + Error archivo. + +%1 + +%2 @@ -9568,7 +9533,7 @@ Esta opción surtirá efecto después de reiniciar. Can't convert toInt parameter - + No se puede convertir el parámetro toInt @@ -9793,7 +9758,7 @@ Esta opción surtirá efecto después de reiniciar. RenameGroup rename group - + renombrar grupo @@ -10919,10 +10884,6 @@ Quieres guardar los cambios? Formula wizard Asistente de formula - - = - = - Value Valor @@ -10945,7 +10906,7 @@ Quieres guardar los cambios? List of all defined passmarks. To define a passmark return to the Main Path tab, call context menu for a point item and make it a passmark. - + Lista de todos los piques definidos. Para definir un pique regrese a la pestaña de Ruta Principal, llame al menú de contexto por un punto del articulo y hágalo un pique. @@ -11463,22 +11424,22 @@ Quieres guardar los cambios? Can't open file %1: %2. - No se pudo abrir el archivo %1: + No se pudo abrir el archivo %1: %2. Can't open schema file %1: %2. - No se pudo abrir el archivo de esquema %1: + No se pudo abrir el archivo de esquema %1: %2. Could not load schema file '%1'. - No se puede cargar el archivo de esquema '%1'. + No se puede cargar el archivo de esquema '%1'. Validation error file %3 in line %1 column %2 - Error de validación en el archivo %3 en la línea %1 columna %2 + Error de validación en el archivo %3 en la línea %1 columna %2 @@ -11570,15 +11531,15 @@ Quieres guardar los cambios? operation options - + opciones de operacion delete operation - + borrar operacion Visibility group - + Grupo de visibilidad @@ -11755,15 +11716,15 @@ Quieres guardar los cambios? VBank Preparing data for layout error: Detail '%1' square <= 0 - + Preparación de datos para error de diseño: Detalle '%1' cuadro <= 0 Preparing data for layout error: Layout paper sheet <= 0 - + Preparación de datos para el error de diseño: Hoja de papel del diseño <= 0 Preparing data for layout error: List of details is empty - + Preparación de datos para el error de diseño: la lista de detalles está vacía @@ -12270,23 +12231,23 @@ Quieres guardar los cambios? Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). - + Establecer factor de escala horizontal desde 0.01 hasta 3.0 (predeterminado = 1.0, modo exportación). Horizontal scale - + Escala horizontal Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). - + Establecer escala vertical desde 0.01 hasta 3.0 ( Predeterminado = 1.0, modo exportación). Vertical scale - + Escala vertical Prefer one sheet layout solution (export mode). - + Prefiere una solución de diseño de hoja (modo de exportación). @@ -13013,11 +12974,11 @@ Quieres guardar los cambios? Reading final measurements error. - + Error de lectura de medidas finales. Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. - + Valor para medida final '%1' es infinito o no es un numero. Por favor, revise sus cálculos. @@ -13028,7 +12989,7 @@ Quieres guardar los cambios? Notch for point '%1' in piece '%2' will be disabled. Manual length is less than allowed value. - + Pique para el punto '%1' en la pieza '%2' será inhabilitado. La longitud manual es menor que el valor permitido. @@ -13047,7 +13008,7 @@ Quieres guardar los cambios? Not supported file suffix '%1' - + No soporta el archivo con sufijo '%1' cm @@ -13061,7 +13022,7 @@ Quieres guardar los cambios? Cannot open the watermark image. - + No se puede abrir la imagen de marca de agua. @@ -13338,7 +13299,7 @@ Quieres guardar los cambios? Flipping by axis - Volteando por ejes + Volteando por ejes @@ -13353,7 +13314,7 @@ Quieres guardar los cambios? flipping by line - + voltear por linea @@ -13451,7 +13412,7 @@ Quieres guardar los cambios? move - + mover @@ -14055,7 +14016,7 @@ Quieres guardar los cambios? rotate - + rotar @@ -15559,187 +15520,187 @@ Quieres guardar los cambios? converts degrees to radian functionm degTorad - + convertir grados a radianes converts radian to degrees function radTodeg - + convertir radianes a grados sine function working with radians function sin - + función seno trabajando con radianes cosine function working with radians function cos - + función coseno trabajando con radianes tangens function working with radians function tan - + función tangente trabajando con radianes arcus sine function working with radians function asin - + función arcoseno trabajando con radianes arcus cosine function working with radians function acos - + función arco coseno trabajando con radianes arcus tangens function working with radians function atan - + función arco tangente trabajando con radianes hyperbolic sine function function sinh - + función seno hiperbolico hyperbolic cosine function cosh - + coseno hiperbolico hyperbolic tangens function function tanh - + función tangente hiperbolico hyperbolic arcus sine function function asinh - + función arco coseno hiperbolico hyperbolic arcus cosine function function acosh - + función arco coseno hiperbolico hyperbolic arcur tangens function function atanh - + función arco tangente hiperbolica sine function working with degrees function sinD - + función seno trabajando con grados cosine function working with degrees function cosD - + función coseno trabajando con grados tangens function working with degrees function tanD - + función tangente trabajando con grados arcus sine function working with degrees function asinD - + función arco seno trabajando con grados arcus cosine function working with degrees function acosD - + función arco coseno trabajando con grados arcus tangens function working with degrees function atanD - + función arco tangente trabajando con grados logarithm to the base 2 function log2 - + logaritmo de base 2 logarithm to the base 10 function log10 - + logaritmo de base 10 logarithm to the base 10 function log - + logaritmo de base 10 logarithm to base e (2.71828...) function ln - + logaritmo base e (2.71828...) e raised to the power of x function exp - + e elevado a la potencia de x square root of a value function sqrt - + raíz cuadrada de un valor sign function -1 if x<0; 1 if x>0 function sign - + signo de la función -1 si x<0; 1 si x>0 round to nearest integer function rint - + redondear al entero mas cercano round to up to 1 decimal function r2cm - + redondear hasta 1 decimal cut, split and rotate modeling operation. Takes cm units. function csrCm - + cortar, dividir y rotar la operación de modelado. Toma unidades cm. cut, split and rotate modeling operation. Takes inch units. function csrInch - + cortar, dividir y rotar la operación de modelado. Toma unidades pulgadas. absolute value function abs - + valor absoluto min of all arguments function min - + minimo de todos los argumentos max of all arguments function max - + máximo de todos los argumentos sum of all arguments function sum - + suma de todos los argumentos mean value of all arguments function avg - + significado del valor de todos los argumentos Returns the floating-point remainder of numer/denom (rounded towards zero) function fmod - + Devuelve el resto de punto flotante de numerador/denominador (redondeado hacia cero) @@ -15804,15 +15765,15 @@ Quieres guardar los cambios? Piece options - + Opciones de pieza Delete piece - + Eliminar pieza Cannot find piece by id '%1' - + No se puede encontrar pieza con id '%1' @@ -15847,23 +15808,23 @@ Quieres guardar los cambios? Tags: - + Etiquetas: Separate each tag with comma. - + Separar cada etiqueta con coma. Filter by tags - + Filtrar por etiquetas Preferences - Preferencias + Preferencias Categories: %1. - + Categoría: %1. @@ -15993,11 +15954,11 @@ Quieres guardar los cambios? WatermarkWindow Watermark - + Marca de Agua Opacity: - + Opacidad: Text @@ -16009,7 +15970,7 @@ Quieres guardar los cambios? watermark text - + texto marca de agua Rotation: @@ -16017,20 +15978,20 @@ Quieres guardar los cambios? Font: - + Fuente: The quick brown fox jumps over the lazy dog Use native text to test a font options - + El que es perico, donde quiera es verde Edit font - + Editar fuente Image - + Imagen Path: @@ -16038,7 +15999,7 @@ Quieres guardar los cambios? path to image - + ruta a la imagen Browse… @@ -16046,7 +16007,7 @@ Quieres guardar los cambios? Gray color - + Color gris &File @@ -16082,7 +16043,7 @@ Quieres guardar los cambios? Watermark image - + Imagen Marca de agua File error. @@ -16090,7 +16051,7 @@ Quieres guardar los cambios? Watermark files - + Archivos de marca de agua Save as @@ -16098,7 +16059,7 @@ Quieres guardar los cambios? watermark - + marca de agua Failed to lock. This file already opened in another window. @@ -16139,7 +16100,8 @@ Quieres guardar los cambios? The watermark has been modified. Do you want to save your changes? - + La marca de agua ha sido modificada. +Quiere guardar los cambios? Don't Save @@ -16151,15 +16113,15 @@ Do you want to save your changes? untitled.vwm - + sintítulo.vwm Confirm format rewriting - + Confirmar reescritura de formato This file is using previous format version v%1. The current is v%2. Saving the file with this app version will update the format version for this file. This may prevent you from be able to open the file with older app versions. Do you really want to continue? - + Este archivo esta usando un formato de version previo v%1. El actual es v%2. Guardando el archivo con esta version de la aplicación actualizara el formato de version para este archivo. Esto puede impedir que pueda abrir el archivo con versiones anteriores de la aplicación. ¿Realmente quieres continuar? File saved diff --git a/share/translations/valentina_fi_FI.ts b/share/translations/valentina_fi_FI.ts index 466e8af13..2101ca8e9 100644 --- a/share/translations/valentina_fi_FI.ts +++ b/share/translations/valentina_fi_FI.ts @@ -2076,7 +2076,7 @@ Name: - Nmi: + Nmi: Rotation @@ -2139,7 +2139,7 @@ Name: - Nmi: + Nmi: Rotation @@ -2715,7 +2715,7 @@ cm - cm + cm Right: @@ -2741,22 +2741,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -2950,10 +2934,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -2962,10 +2942,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -2983,11 +2959,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3408,7 +3389,7 @@ Apply settings anyway? Name: - Nmi: + Nmi: Rotation @@ -4307,10 +4288,6 @@ Apply settings anyway? Length: - - = - - U mark @@ -4981,7 +4958,7 @@ Apply settings anyway? Name: - Nmi: + Nmi: Tags: @@ -5080,7 +5057,7 @@ Apply settings anyway? Options - Asetukset + Asetukset Scale @@ -5094,22 +5071,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -9740,10 +9701,6 @@ Do you want to save your changes? Formula wizard - - = - - Value Arvo @@ -10229,13 +10186,13 @@ Do you want to save your changes? Can't open file %1: %2. - Tiedostoa %1 ei voitu avata: + Tiedostoa %1 ei voitu avata: %2. Can't open schema file %1: %2. - Skeematiedostoa %1 ei voitu avata. + Skeematiedostoa %1 ei voitu avata. %2. @@ -10244,7 +10201,7 @@ Do you want to save your changes? Validation error file %3 in line %1 column %2 - Tarkastus virhe tiedostossa %3 rivillä %1 kohdassa %2 + Tarkastus virhe tiedostossa %3 rivillä %1 kohdassa %2 @@ -14323,7 +14280,7 @@ Do you want to save your changes? Preferences - Asetukset + Asetukset Categories: %1. diff --git a/share/translations/valentina_fr_FR.ts b/share/translations/valentina_fr_FR.ts index 5f0ef24b0..cfc022d15 100644 --- a/share/translations/valentina_fr_FR.ts +++ b/share/translations/valentina_fr_FR.ts @@ -2464,11 +2464,11 @@ Name: - + Nom: Rotation - Rotation + Rotation Tags: @@ -2531,11 +2531,11 @@ Name: - + Nom: Rotation - Rotation + Rotation Tags: @@ -3135,23 +3135,23 @@ Left: - Gauche: + Gauche: cm - + cm Right: - Droite: + Droite: Top: - Haut: + Haut: Bottom: - Bas: + Bas: Scale @@ -3165,22 +3165,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3446,10 +3430,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3458,10 +3438,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3479,11 +3455,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3908,11 +3889,11 @@ Apply settings anyway? Name: - + Nom: Rotation - Rotation + Rotation Tags: @@ -4867,10 +4848,6 @@ Apply settings anyway? Length: Longueur: - - = - - U mark @@ -5609,7 +5586,7 @@ Apply settings anyway? Name: - + Nom: Tags: @@ -5728,7 +5705,7 @@ Apply settings anyway? Options - Options + Options Scale @@ -5742,22 +5719,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -10901,10 +10862,6 @@ Voulez-vous enregistrer les changements? Formula wizard Assistant formule - - = - - Value Valeur @@ -11441,21 +11398,21 @@ Voulez-vous enregistrer les changements? Can't open file %1: %2. - impossible d'ouvrir le fichier %1: + impossible d'ouvrir le fichier %1: %2. Can't open schema file %1: %2. - Erreur d'ouverture du fichier de schéma %1: %2. + Erreur d'ouverture du fichier de schéma %1: %2. Could not load schema file '%1'. - Impossible de lire le schéma de fichier '%1'. + Impossible de lire le schéma de fichier '%1'. Validation error file %3 in line %1 column %2 - Erreur de validation : fichier %3, ligne %1, colonne %2 + Erreur de validation : fichier %3, ligne %1, colonne %2 @@ -15819,7 +15776,7 @@ Voulez-vous enregistrer les changements? Preferences - Préférences + Préférences Categories: %1. diff --git a/share/translations/valentina_he_IL.ts b/share/translations/valentina_he_IL.ts index 4cf4f4d4e..51c1cf1d1 100644 --- a/share/translations/valentina_he_IL.ts +++ b/share/translations/valentina_he_IL.ts @@ -2298,22 +2298,10 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - ... ... - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -2479,10 +2467,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -2491,10 +2475,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -2512,11 +2492,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3641,10 +3626,6 @@ Apply settings anyway? Length: - - = - - U mark @@ -4380,22 +4361,10 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - ... ... - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -8663,10 +8632,6 @@ Do you want to save your changes? Formula wizard - - = - - Value diff --git a/share/translations/valentina_id_ID.ts b/share/translations/valentina_id_ID.ts index 7e5a2cad0..dc8318172 100644 --- a/share/translations/valentina_id_ID.ts +++ b/share/translations/valentina_id_ID.ts @@ -2569,18 +2569,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -2746,10 +2734,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -2758,10 +2742,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -2779,11 +2759,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3940,10 +3925,6 @@ Apply settings anyway? Length: - - = - - U mark @@ -4702,18 +4683,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -8993,10 +8962,6 @@ Do you want to save your changes? Formula wizard - - = - - Value diff --git a/share/translations/valentina_it_IT.ts b/share/translations/valentina_it_IT.ts index d25c99035..7fb63f5c3 100644 --- a/share/translations/valentina_it_IT.ts +++ b/share/translations/valentina_it_IT.ts @@ -2456,11 +2456,11 @@ Name: - Nome: + Nome: Rotation - Rotazione + Rotazione Tags: @@ -2523,11 +2523,11 @@ Name: - Nome: + Nome: Rotation - Rotazione + Rotazione Tags: @@ -3123,27 +3123,27 @@ Margins - Margini + Margini Left: - Sinistra: + Sinistra: cm - cm + cm Right: - Destra: + Destra: Top: - Top: + Top: Bottom: - Fondo: + Fondo: Scale @@ -3157,22 +3157,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3443,10 +3427,6 @@ Applicare la configurazione comunque? Time given for the algorithm to find best layout. Tempo concesso all’algoritmo per trovare il miglior piazzamento. - - min - min - Efficiency: Efficienza: @@ -3455,10 +3435,6 @@ Applicare la configurazione comunque? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Imposta coefficiente di efficienza del piazzamento. Il coefficiente di efficienza del piazzamento è la percentuale di area occupata dai pezzi all’interno dell’area delimitata. Se la loro disposizione raggiunge il livello richiesto, il processo si interrompe. Se il valore è impostato su 0 non viene effettuata nessuna verifica. - - % - - Manual priority @@ -3476,11 +3452,16 @@ Applicare la configurazione comunque? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + min + + + Enable this option to prefer getting one sheet solutions. @@ -3905,11 +3886,11 @@ Applicare la configurazione comunque? Name: - Nome: + Nome: Rotation - Rotazione + Rotazione Tags: @@ -4802,11 +4783,11 @@ Applicare la configurazione comunque? Continue the first point to the cutting contour - + Prolunga il primo punto fino al contorno del pezzo Continue the last point to the cutting contour - + Prolunga l'ultimo punto fino al contorno del pezzo The path is a cut contour. Use to control export to DXF-AAMA @@ -4864,10 +4845,6 @@ Applicare la configurazione comunque? Length: Lunghezza: - - = - - U mark @@ -5606,7 +5583,7 @@ Applicare la configurazione comunque? Name: - Nome: + Nome: Tags: @@ -5725,7 +5702,7 @@ Applicare la configurazione comunque? Options - Opzioni + Opzioni Scale @@ -5739,22 +5716,6 @@ Applicare la configurazione comunque? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -8270,7 +8231,7 @@ Vuoi salvare i cambiamenti? Internal path tool - + Strumento Tracciato Interno Save &As… @@ -9827,7 +9788,7 @@ Questa opzione sarà effettiva dopo il riavvio del programma. SavePlaceLabelOptions save place label options - + Salva opzioni di posizionamento etichetta @@ -10911,10 +10872,6 @@ Vuoi salvare le tue modifiche? Formula wizard Formula magica - - = - - Value Valore @@ -11451,7 +11408,7 @@ Vuoi salvare le tue modifiche? Can't open file %1: %2. - Impossibile aprire file %1: + Impossibile aprire file %1: %2. @@ -13251,7 +13208,7 @@ Vuoi salvare le tue modifiche? Flipping by axis - Ruotare sull'asse + Ruotare sull'asse @@ -15715,7 +15672,7 @@ Vuoi salvare le tue modifiche? Preferences - Preferenze + Preferenze Categories: %1. diff --git a/share/translations/valentina_nl_NL.ts b/share/translations/valentina_nl_NL.ts index c1f374f3b..cc4d93602 100644 --- a/share/translations/valentina_nl_NL.ts +++ b/share/translations/valentina_nl_NL.ts @@ -54,7 +54,7 @@ ChangeGroupOptions rename group - + hernoem groep @@ -2456,31 +2456,31 @@ Enable to create a visibility gropup from original objects - + Zet aan om een zichtbaarheidsgroep aan te maken vanuit de originele objecten Visibility Group - + Zichtbaarheid groep Name: - Naam: + Naam: Rotation - Rotatie + Rotatie Tags: - + Etiketten: Separate each tag with comma. - + Plaats een komma tussen ieder etiket. Add tags - + Etiket toevoegen @@ -2523,31 +2523,31 @@ Enable to create a visibility gropup from original objects - + Zet aan om een zichtbaarheidsgroep aan te maken vanuit de originele objecten Visibility Group - + Zichtbaarheid groep Name: - Naam: + Naam: Rotation - Rotatie + Rotatie Tags: - + Etiketten: Separate each tag with comma. - + Plaats een komma tussen ieder etiket. Add tags - + Etiket toevoegen @@ -2574,15 +2574,15 @@ Tags: - + Etiket: Separate each tag with comma. - + Plaats een komma tussen ieder etiket. Add tags - + Etiket toevoegen @@ -3127,59 +3127,43 @@ DialogLayoutScale Layout scale - + Schaal van de opmaak Margins - Marges + Marges Left: - Links: + Links: cm - cm + cm Right: - Rechts: + Rechts: Top: - Bovenaan: + Bovenaan: Bottom: - Onderaan: + Onderaan: Scale - + Schaal Horizontal: - + Horizontaal: Vertical: - - - - % - % - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - + Vertikaal: @@ -3451,10 +3435,6 @@ Toch de instellingen aanpassen? Time given for the algorithm to find best layout. Tijd toegekend aan het algoritme om de beste opmaak te vinden. - - min - min - Efficiency: Efficiëntie: @@ -3463,10 +3443,6 @@ Toch de instellingen aanpassen? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Bepaal de opmaak efficiëntie coëfficiënt. De opmaak efficiëntie coëfficiënt is de verhouding van het gebied door de stukken ingenomen ten opzichte van de rechthoek die alle objecten bevat. Als het aantal inpassingen het verwachte niveau bereikt, wordt het proces gestopt. Als de waarde 0 is, wordt er niet gechecked. - - % - % - Manual priority Manuele voorrang @@ -3484,12 +3460,17 @@ Toch de instellingen aanpassen? Automatisch inkorten van ongebruikte breedte - Enable this option to prefer getting one sheet solutions. - + Prefer one sheet solution + Verkies een 1-blad oplossing - Prefer one sheet solution - + min + minutes + min + + + Enable this option to prefer getting one sheet solutions. + Deze optie aanzetten om 1-blad oplossingen te verkrijgen. @@ -3905,31 +3886,31 @@ Toch de instellingen aanpassen? Enable to create a visibility gropup from original objects - + Zet aan om een zichtbaarheidsgroep aan te maken vanuit de originele objecten Visibility Group - + Zichtbaarheid groep Name: - Naam: + Naam: Rotation - Rotatie + Rotatie Tags: - + Etiket: Separate each tag with comma. - + Plaats een komma tussen ieder etiket. Add tags - + Etiket toevoegen @@ -4872,10 +4853,6 @@ Toch de instellingen aanpassen? Length: Lengte: - - = - = - U mark U markering @@ -5606,27 +5583,27 @@ Toch de instellingen aanpassen? Enable to create a visibility gropup from original objects - + Zet aan om een zichtbaarheidsgroep aan te maken vanuit de originele objecten Visibility Group - + Zichtbaarheid groep Name: - Naam: + Naam: Tags: - + Etiket: Separate each tag with comma. - + Plaats een komma tussen ieder etiket. Add tags - + Etiket toevoegen @@ -5733,35 +5710,19 @@ Toch de instellingen aanpassen? Options - Opties + Opties Scale - + Schaal Horizontal: - + Horizontaal: Vertical: - - - - % - % - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - + Vertikaal: @@ -8357,7 +8318,7 @@ Do you want to save your changes? Create new pattern piece to start working. - Maak een nieuw patroondeel om te gaan werken. + Start een nieuw patroondeel op. Changes applied. @@ -9365,7 +9326,7 @@ Deze optie wordt actief na een herstart.. QObject Create new pattern piece to start working. - Maak een nieuw patroondeel om te gaan werken. + Start een nieuw patroondeel op. mm @@ -9796,7 +9757,7 @@ Deze optie wordt actief na een herstart.. RenameGroup rename group - + hernoem groep @@ -10922,10 +10883,6 @@ Wil je deze veranderingen opslaan? Formula wizard Formule assistent - - = - = - Value Waarde @@ -11466,22 +11423,22 @@ Wil je deze veranderingen opslaan? Can't open file %1: %2. - kan bestand niet openen %1: + kan bestand niet openen %1: %2. Can't open schema file %1: %2. - Kan schema bestand niet openen %1: + Kan schema bestand niet openen %1: %2. Could not load schema file '%1'. - Kan schema bestand niet laden '%1". + Kan schema bestand niet laden '%1". Validation error file %3 in line %1 column %2 - Validatie fout bestand %3 op lijn %1 kolom %2 + Validatie fout bestand %3 op lijn %1 kolom %2 @@ -11573,15 +11530,15 @@ Wil je deze veranderingen opslaan? operation options - + bewerkingsopties delete operation - + verwijder bewerking Visibility group - + Zichtbaarheid groep @@ -11758,15 +11715,15 @@ Wil je deze veranderingen opslaan? VBank Preparing data for layout error: Detail '%1' square <= 0 - + Fout bij het voorbereiden van gegevens voor lay-out: Detail '%1' vierkant <= 0 Preparing data for layout error: Layout paper sheet <= 0 - + Fout bij het voorbereiden van gegevens voor lay-out: Lay-out blad papier <=0 Preparing data for layout error: List of details is empty - + Fout bij het voorbereiden van gegevens voor lay-out: Detail lijst is leeg @@ -12273,23 +12230,23 @@ Wil je deze veranderingen opslaan? Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode). - + Zet de horizontale schaal factor tussen 0.01 en 3.0 (standaard=1.0, export modus). Horizontal scale - + Horizontale schaal Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). - + Zet de vertikale schaal factor tussen 0.01 en 3.0 (standaard=1.0, export modus). Vertical scale - + Vertikale schaal Prefer one sheet layout solution (export mode). - + Verkies 1-blad opmaak oplossing (export modus). @@ -13016,11 +12973,11 @@ Wil je deze veranderingen opslaan? Reading final measurements error. - + Inlezen definitieve maten fout. Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. - + Waarde voor de definitieve maten '%1' is oneindig of NaN. Controlleer uw berekeningen. @@ -13341,7 +13298,7 @@ Wil je deze veranderingen opslaan? Flipping by axis - Kantelen via de aslijn + Kantelen via de aslijn @@ -13356,7 +13313,7 @@ Wil je deze veranderingen opslaan? flipping by line - + Kantelen langs een lijn @@ -13454,7 +13411,7 @@ Wil je deze veranderingen opslaan? move - + verplaats @@ -14058,7 +14015,7 @@ Wil je deze veranderingen opslaan? rotate - + draai @@ -15562,187 +15519,187 @@ Wil je deze veranderingen opslaan? converts degrees to radian functionm degTorad - + omzetten graden naar radialen converts radian to degrees function radTodeg - + omzetten radialen naar graden sine function working with radians function sin - + sinus gebruikt radialen cosine function working with radians function cos - + cosinus gebruikt radialen tangens function working with radians function tan - + tangens gebruikt radialen arcus sine function working with radians function asin - + boogsinus gebruikt radialen arcus cosine function working with radians function acos - + boogcosinus gebruikt radialen arcus tangens function working with radians function atan - + boogtanges gebruikt radialen hyperbolic sine function function sinh - + hyperbolische sine functie hyperbolic cosine function cosh - + hyperbolische cosinus hyperbolic tangens function function tanh - + hyperbolische tangens functie hyperbolic arcus sine function function asinh - + hyperbolische arcus sine functie hyperbolic arcus cosine function function acosh - + hyperbolische boogcosinus hyperbolic arcur tangens function function atanh - + hyperbolische arcus tangens functie sine function working with degrees function sinD - + sinus gebruikt graden cosine function working with degrees function cosD - + cosinus gebruikt graden tangens function working with degrees function tanD - + tangens gebruikt graden arcus sine function working with degrees function asinD - + boogsinus gebruikt graden arcus cosine function working with degrees function acosD - + boogcosinus gebruikt graden arcus tangens function working with degrees function atanD - + boogtangens gebruikt graden logarithm to the base 2 function log2 - + logaritme naar de basis 2 logarithm to the base 10 function log10 - + logaritme naar de basis 10 logarithm to the base 10 function log - + logaritme naar de basis 10 logarithm to base e (2.71828...) function ln - + logaritme naar basis e (2.71828...) e raised to the power of x function exp - + e tot de macht van x square root of a value function sqrt - + Kwadrant wortelgetal van een waarde sign function -1 if x<0; 1 if x>0 function sign - + Teken functie -1 als x<0; 1 als x>0 round to nearest integer function rint - + Rond het dichtbijzijnde gehele getal round to up to 1 decimal function r2cm - + afronden op 1 decimaal cut, split and rotate modeling operation. Takes cm units. function csrCm - + model snijden, splitsen en draaien operatie. Gebruikt cm. cut, split and rotate modeling operation. Takes inch units. function csrInch - + model snijden, splitsen en draaien operatie. Gebruikt inches. absolute value function abs - + absolute waarde min of all arguments function min - + min van alle argumenten max of all arguments function max - + max van alle argumenten sum of all arguments function sum - + som van alle argumenten mean value of all arguments function avg - + Gemiddelde waarde van alle argumenten Returns the floating-point remainder of numer/denom (rounded towards zero) function fmod - + Brengt het drijvende-punt restant van numerator/denominator terug ( afgerond naar nul) @@ -15807,15 +15764,15 @@ Wil je deze veranderingen opslaan? Piece options - + Werkstuk opties Delete piece - + Verwijder werkstuk Cannot find piece by id '%1' - + Kan werkstuk met id '%1' niet vinden @@ -15850,23 +15807,23 @@ Wil je deze veranderingen opslaan? Tags: - + Etiket: Separate each tag with comma. - + Plaats een komma tussen ieder etiket. Filter by tags - + Filter per etiket Preferences - Voorkeuren + Voorkeuren Categories: %1. - + Categoriëen: %1. diff --git a/share/translations/valentina_pl_PL.ts b/share/translations/valentina_pl_PL.ts index ab5590421..0b4cf98fa 100644 --- a/share/translations/valentina_pl_PL.ts +++ b/share/translations/valentina_pl_PL.ts @@ -2280,7 +2280,7 @@ Name: - Nazwa: + Nazwa: Rotation @@ -2347,7 +2347,7 @@ Name: - Nazwa: + Nazwa: Rotation @@ -2899,19 +2899,19 @@ Margins - Marginesy + Marginesy Left: - Lewy: + Lewy: cm - cm + cm Right: - Prawy: + Prawy: Top: @@ -2933,22 +2933,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3138,10 +3122,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3150,10 +3130,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3171,11 +3147,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3592,7 +3573,7 @@ Apply settings anyway? Name: - Nazwa: + Nazwa: Rotation @@ -4439,10 +4420,6 @@ Apply settings anyway? Length: Długość: - - = - - U mark @@ -5106,7 +5083,7 @@ Apply settings anyway? Name: - Nazwa: + Nazwa: Tags: @@ -5205,7 +5182,7 @@ Apply settings anyway? Options - Opcje + Opcje Scale @@ -5219,22 +5196,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -9890,10 +9851,6 @@ Do you want to save your changes? Formula wizard Kreator formuł - - = - - Value Wartość @@ -14419,7 +14376,7 @@ Do you want to save your changes? Preferences - Ustawienia + Ustawienia Categories: %1. diff --git a/share/translations/valentina_pt_BR.ts b/share/translations/valentina_pt_BR.ts index cc9d6ee7a..fa392ed72 100644 --- a/share/translations/valentina_pt_BR.ts +++ b/share/translations/valentina_pt_BR.ts @@ -2464,11 +2464,11 @@ Name: - Nome: + Nome: Rotation - Rotação + Rotação Tags: @@ -2531,11 +2531,11 @@ Name: - Nome: + Nome: Rotation - Rotação + Rotação Tags: @@ -3131,27 +3131,27 @@ Margins - Margens + Margens Left: - Esquerda: + Esquerda: cm - cm + cm Right: - Direita: + Direita: Top: - Topo: + Topo: Bottom: - Base: + Base: Scale @@ -3165,22 +3165,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3447,10 +3431,6 @@ Aplicar configurações de qualquer forma? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3459,10 +3439,6 @@ Aplicar configurações de qualquer forma? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3480,11 +3456,16 @@ Aplicar configurações de qualquer forma? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3909,11 +3890,11 @@ Aplicar configurações de qualquer forma? Name: - Nome: + Nome: Rotation - Rotação + Rotação Tags: @@ -4868,10 +4849,6 @@ Aplicar configurações de qualquer forma? Length: Comprimento: - - = - - U mark @@ -5610,7 +5587,7 @@ Aplicar configurações de qualquer forma? Name: - Nome: + Nome: Tags: @@ -5725,7 +5702,7 @@ Aplicar configurações de qualquer forma? Options - Opções + Opções Scale @@ -5739,22 +5716,6 @@ Aplicar configurações de qualquer forma? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -10899,10 +10860,6 @@ Deseja salvar suas mudanças? Formula wizard Assistente de fórmulas - - = - - Value Valor @@ -11439,13 +11396,13 @@ Deseja salvar suas mudanças? Can't open file %1: %2. - Impossível abrir o arquivo %1: + Impossível abrir o arquivo %1: %2. Can't open schema file %1: %2. - Impossível abrir o arquivo de esquema %1: + Impossível abrir o arquivo de esquema %1: %2. @@ -11454,7 +11411,7 @@ Deseja salvar suas mudanças? Validation error file %3 in line %1 column %2 - Arquivo de erro de validação %3 na linha %1 coluna %2 + Arquivo de erro de validação %3 na linha %1 coluna %2 @@ -13266,7 +13223,7 @@ Deseja salvar suas mudanças? Flipping by axis - Espelhar através do eixo + Espelhar através do eixo @@ -15742,7 +15699,7 @@ Deseja salvar suas mudanças? Preferences - Preferências + Preferências Categories: %1. diff --git a/share/translations/valentina_ro_RO.ts b/share/translations/valentina_ro_RO.ts index b3ca87679..97e21378f 100644 --- a/share/translations/valentina_ro_RO.ts +++ b/share/translations/valentina_ro_RO.ts @@ -2888,7 +2888,7 @@ cm - cm + cm Right: @@ -2914,22 +2914,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3123,10 +3107,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3135,10 +3115,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3156,11 +3132,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -4396,10 +4377,6 @@ Apply settings anyway? Length: Lungime: - - = - - U mark @@ -5158,7 +5135,7 @@ Apply settings anyway? Options - Opțiuni + Opțiuni Scale @@ -5172,22 +5149,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -9703,10 +9664,6 @@ Do you want to save your changes? Formula wizard Asistent Formulă - - = - - Value Valoare @@ -14113,7 +14070,7 @@ Do you want to save your changes? Preferences - Preferințe + Preferințe Categories: %1. diff --git a/share/translations/valentina_ru_RU.ts b/share/translations/valentina_ru_RU.ts index 61e8f5006..e54ecb08b 100644 --- a/share/translations/valentina_ru_RU.ts +++ b/share/translations/valentina_ru_RU.ts @@ -54,7 +54,7 @@ ChangeGroupOptions rename group - + переименовать группу @@ -2456,31 +2456,31 @@ Enable to create a visibility gropup from original objects - + Позволяет создать группу видимости из исходных объектов Visibility Group - + Группа видимости Name: - + Название: Rotation - Поворот + Поворот Tags: - + Категории: Separate each tag with comma. - + Разделяйте каждую категорию запятой. Add tags - + Добавить категории @@ -2523,31 +2523,31 @@ Enable to create a visibility gropup from original objects - + Позволяет создать группу видимости из исходных объектов Visibility Group - + Группа видимости Name: - + Название: Rotation - Поворот + Поворот Tags: - + Категории: Separate each tag with comma. - + Разделяйте каждую категорию запятой. Add tags - + Добавить категории @@ -2574,15 +2574,15 @@ Tags: - + Категории: Separate each tag with comma. - + Разделяйте каждую категорию запятой. Add tags - + Добавить категории @@ -3127,59 +3127,43 @@ DialogLayoutScale Layout scale - + Масштаб раскладки Margins - Поля + Поля Left: - Левое: + Левое: cm - см + см Right: - Правое: + Правое: Top: - Верхнее: + Верхнее: Bottom: - Нижнее: + Нижнее: Scale - + Масштаб Horizontal: - + По горизонтали: Vertical: - - - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - + По вертикали: @@ -3451,10 +3435,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. Время, данное алгоритму, чтобы найти лучшую раскладку. - - min - - Efficiency: Эффективность: @@ -3463,17 +3443,13 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Установите коэффициент эффективности раскладки. Коэффициент эффективности раскладки - это отношение площади, занимаемой деталями, к ограничивающему прямоугольнику всех деталей. Когда раскладка достигает установленного значения, процесс останавливается. Если значение равно 0, проверка не производится. - - % - - Manual priority Ручной приоритет Nest quantity of copies according to piece settings. - + Разложить согласно количеству копий в соответствии с настройками детали. Nest quantity @@ -3484,11 +3460,16 @@ Apply settings anyway? Автоматически обрезать неиспользуемую ширину - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution + Предпочесть решение с одним листом + + + min + minutes - Prefer one sheet solution + Enable this option to prefer getting one sheet solutions. @@ -3905,31 +3886,31 @@ Apply settings anyway? Enable to create a visibility gropup from original objects - + Позволяет создать группу видимости из исходных объектов Visibility Group - + Группа видимости Name: - + Название: Rotation - Поворот + Поворот Tags: - + Категории: Separate each tag with comma. - + Разделяйте каждую категорию запятой. Add tags - + Добавить категории @@ -4872,10 +4853,6 @@ Apply settings anyway? Length: Длина: - - = - - U mark U метка @@ -5603,7 +5580,31 @@ Apply settings anyway? This point cannot be origin point. Please, select another origin point - + Эта точка не может быть исходной точкой. Пожалуйста, выберите другую исходную точку + + + Enable to create a visibility gropup from original objects + Позволяет создать группу видимости из исходных объектов + + + Visibility Group + Группа видимости + + + Name: + Название: + + + Tags: + Категории: + + + Separate each tag with comma. + Разделяйте каждую категорию запятой. + + + Add tags + Добавить категории Enable to create a visibility gropup from original objects @@ -5734,35 +5735,19 @@ Apply settings anyway? Options - + Опции Scale - + Масштаб Horizontal: - + По горизонтали: Vertical: - - - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - + По вертикали: @@ -8371,7 +8356,7 @@ Do you want to save your changes? Ctrl+O - + Ctrl+O Cannot read settings from a malformed .INI file. @@ -8379,7 +8364,7 @@ Do you want to save your changes? Select path objects, <b>%1</b> - reverse direction curve - + Выберите объекты контура, <b>%1 </b>- кривая обратного направления Select one or more objects, hold <b>%1</b> - for multiple selection, <b>%2</b> - finish creation @@ -8686,7 +8671,7 @@ Do you want to save your changes? Process has been stoped because of exception. - + Процесс был остановлен из-за исключения. File error. @@ -9541,19 +9526,19 @@ This option will take an affect after restart. Cannot calculate seam allowance before for point '%1'. Reason: %2. - + Невозможно рассчитать припуск на шов перед точкой '%1'. Причина: %2. Cannot calculate seam allowance after for point '%1'. Reason: %2. - + Невозможно рассчитать припуск на шов после точки '%1'. Причина: %2. Cannot calculate seam allowance after for point '%1'. Reason: - + Невозможно рассчитать припуск на шов после точки '%1'. Причина: Cannot calculate passmark length for point '%1'. Reason: %2. - + Невозможно рассчитать длину надсечки для точки '%1'. Причина: %2. Passmark '%1' is not part of piece '%2'. @@ -9569,7 +9554,7 @@ This option will take an affect after restart. Invalid formula '%1' for tool with id '%2'. %3. - + Неверная формула '%1' для инструмента с идентификатором '%2'. %3. Can't convert toInt parameter @@ -9798,7 +9783,7 @@ This option will take an affect after restart. RenameGroup rename group - + переименовать группу @@ -10924,10 +10909,6 @@ Do you want to save your changes? Formula wizard Мастер формул - - = - - Value Значение @@ -10950,7 +10931,7 @@ Do you want to save your changes? List of all defined passmarks. To define a passmark return to the Main Path tab, call context menu for a point item and make it a passmark. - + Список всех установленных надсечек. Чтобы поставить надсечку, вернитесь во вкладку «Главный контур», вызовите контекстное меню у нужной точки и поставьте галочку в строке "Надсечка". @@ -11468,22 +11449,22 @@ Do you want to save your changes? Can't open file %1: %2. - Невозможно открыть файл %1: + Невозможно открыть файл %1: %2. Can't open schema file %1: %2. - Невозможно открыть файл схемы %1: + Невозможно открыть файл схемы %1: %2. Could not load schema file '%1'. - Не удалось открыть файл схемы '%1'. + Не удалось открыть файл схемы '%1'. Validation error file %3 in line %1 column %2 - Ошибка валидации файла %3 в строке %1 столбца %2 + Ошибка валидации файла %3 в строке %1 столбца %2 @@ -11560,7 +11541,7 @@ Do you want to save your changes? VAbstractNode This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. @@ -11575,15 +11556,15 @@ Do you want to save your changes? operation options - + параметры операции delete operation - + удалить операцию Visibility group - + Группа видимости @@ -11768,7 +11749,7 @@ Do you want to save your changes? Preparing data for layout error: List of details is empty - + Ошибка подготовки данных для раскладки: список деталей пуст @@ -12235,7 +12216,7 @@ Do you want to save your changes? Order detail to follow grainline direction (export mode). - + Получите детали в соответствии с направлением долевой (режим экспорта). <Time> in minutes given for the algorithm to find best layout. Time must be in range from 1 minute to 60 minutes. Default value 1 minute. @@ -12259,7 +12240,7 @@ Do you want to save your changes? Nest quantity copies of each piece (export mode). - + Разложить согласно количеству копий каждой детали (режим экспорта). Set layout efficiency <coefficient>. Layout efficiency coefficient is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. Coefficient must be in range from 0 to 100. Default value 0. @@ -12279,7 +12260,7 @@ Do you want to save your changes? Horizontal scale - + Масштаб по горизонтали Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode). @@ -12287,11 +12268,11 @@ Do you want to save your changes? Vertical scale - + Масштаб по вертикали Prefer one sheet layout solution (export mode). - + Предпочесть решение с одним листом раскладки (режим экспорта). @@ -12435,11 +12416,11 @@ Do you want to save your changes? Not unique id (%1) - + Не уникальный идентификатор (%1) This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. Couldn't get version information. @@ -12474,7 +12455,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. Add to group @@ -12512,7 +12493,7 @@ Do you want to save your changes? Result is infinite - + Результат бесконечен Result is NaN @@ -13006,14 +12987,22 @@ Do you want to save your changes? VPatternRecipe Invalid tag %1 - + Неправильная категория %1 Can't find element by id '%1' - + Не удается найти элемент с идентификатором '%1' Can't create history record for the tool. + Невозможно создать запись истории для инструмента. + + + Reading final measurements error. + Ошибка чтения финальных измерений. + + + Value for final measurtement '%1' is infinite or NaN. Please, check your calculations. @@ -13066,7 +13055,7 @@ Do you want to save your changes? Cannot open the watermark image. - + Не удается открыть изображение водяного знака. @@ -13343,7 +13332,7 @@ Do you want to save your changes? Flipping by axis - Отразить объект по оси + Отразить объект по оси @@ -14135,7 +14124,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. Tool was used after deleting. @@ -14176,7 +14165,7 @@ Do you want to save your changes? This id (%1) is not unique. - + Этот идентификатор (%1) не является уникальным. @@ -15569,42 +15558,42 @@ Do you want to save your changes? converts degrees to radian functionm degTorad - + Преобразует градусы в радианы converts radian to degrees function radTodeg - + Преобразует радианы в градусы sine function working with radians function sin - + Функция синуса, работающая с радианами cosine function working with radians function cos - + Функция косинуса, работающая с радианами tangens function working with radians function tan - + Функция тангенса, работающая с радианами arcus sine function working with radians function asin - + Функция арксинуса, работающая с радианами arcus cosine function working with radians function acos - + Функция арккосинуса, работающая с радианами arcus tangens function working with radians function atan - + Функция арктангенса, работающая с радианами hyperbolic sine function @@ -15639,32 +15628,32 @@ Do you want to save your changes? sine function working with degrees function sinD - + Функция синуса, работающая с градусами cosine function working with degrees function cosD - + Функция косинуса, работающая с градусами tangens function working with degrees function tanD - + Функция тангенса, работающая с градусами arcus sine function working with degrees function asinD - + Функция арксинуса, работающая с градусами arcus cosine function working with degrees function acosD - + Функция арккосинуса, работающая с градусами arcus tangens function working with degrees function atanD - + Функция арктангенса, работающая с градусами logarithm to the base 2 @@ -15694,7 +15683,7 @@ Do you want to save your changes? square root of a value function sqrt - + Квадратный корень из значения sign function -1 if x<0; 1 if x>0 @@ -15704,47 +15693,47 @@ Do you want to save your changes? round to nearest integer function rint - + Округление до целого числа round to up to 1 decimal function r2cm - + Округление до 1 десятичного знака cut, split and rotate modeling operation. Takes cm units. function csrCm - + Вырезать, разделить и повернуть операцию моделирования. Взять единицу измерения - см. cut, split and rotate modeling operation. Takes inch units. function csrInch - + Вырезать, разделить и повернуть операцию моделирования. Взять единицу измерения - дюйм. absolute value function abs - + Абсолютная величина (модуль) min of all arguments function min - + Минимальный из всех аргументов max of all arguments function max - + Максимальный из всех аргументов sum of all arguments function sum - + Сумма всех аргументов mean value of all arguments function avg - + Среднее значение всех аргументов Returns the floating-point remainder of numer/denom (rounded towards zero) @@ -15814,11 +15803,11 @@ Do you want to save your changes? Piece options - + Параметры детали Delete piece - + Удалить деталь Cannot find piece by id '%1' @@ -15857,23 +15846,23 @@ Do you want to save your changes? Tags: - + Категории: Separate each tag with comma. - + Разделяйте каждую категорию запятой. Filter by tags - + Фильтр по категориям Preferences - + Свойства Categories: %1. - + Категории: %1. @@ -15900,7 +15889,7 @@ Do you want to save your changes? <b>Curved path</b>: select seven or more points, <b>%1</b> - finish creation - + <b>Контур кривой</b>: выберите семь или более точек, <b>%1</b> - завершить создание @@ -15993,7 +15982,7 @@ Do you want to save your changes? <b>Curved path</b>: select three or more points, <b>%1</b> - finish creation - + <b>Контур кривой</b>: выберите три или более точек, <b>%1</b> - завершить создание Use <b>%1</b> for sticking angle! diff --git a/share/translations/valentina_uk_UA.ts b/share/translations/valentina_uk_UA.ts index 45c6231e7..dcb1b4f62 100644 --- a/share/translations/valentina_uk_UA.ts +++ b/share/translations/valentina_uk_UA.ts @@ -2464,11 +2464,11 @@ Name: - Імя: + Імя: Rotation - Поворот + Поворот Tags: @@ -2531,11 +2531,11 @@ Name: - Імя: + Імя: Rotation - Поворот + Поворот Tags: @@ -3135,23 +3135,23 @@ Left: - Ліве: + Ліве: cm - см + см Right: - Праве: + Праве: Top: - Верхнє: + Верхнє: Bottom: - Нижнє: + Нижнє: Scale @@ -3165,22 +3165,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -3449,10 +3433,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -3461,10 +3441,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -3482,11 +3458,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3911,11 +3892,11 @@ Apply settings anyway? Name: - Імя: + Імя: Rotation - Поворот + Поворот Tags: @@ -4870,10 +4851,6 @@ Apply settings anyway? Length: Довжина: - - = - - U mark @@ -5613,7 +5590,7 @@ Apply settings anyway? Name: - Імя: + Імя: Tags: @@ -5732,7 +5709,7 @@ Apply settings anyway? Options - Параметри + Параметри Scale @@ -5746,22 +5723,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - ... - ... - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -10917,10 +10878,6 @@ Do you want to save your changes? Formula wizard Мастер формул - - = - - Value Значення @@ -11461,21 +11418,21 @@ Do you want to save your changes? Can't open file %1: %2. - Не можу відкрити файл%1: + Не можу відкрити файл%1: %2. Can't open schema file %1: %2. - Не можу відкрити файл схеми %1:\n%2. + Не можу відкрити файл схеми %1:\n%2. Could not load schema file '%1'. - Не вдалося завантажити файл схеми '%1'. + Не вдалося завантажити файл схеми '%1'. Validation error file %3 in line %1 column %2 - Помилка валідації файлу %3 в рядку %1 стовпця %2 + Помилка валідації файлу %3 в рядку %1 стовпця %2 @@ -13334,7 +13291,7 @@ Do you want to save your changes? Flipping by axis - Відзеркалити по вісі + Відзеркалити по вісі @@ -15855,7 +15812,7 @@ Do you want to save your changes? Preferences - Властивості + Властивості Categories: %1. diff --git a/share/translations/valentina_zh_CN.ts b/share/translations/valentina_zh_CN.ts index b5acb1a29..e80848ef8 100644 --- a/share/translations/valentina_zh_CN.ts +++ b/share/translations/valentina_zh_CN.ts @@ -2442,18 +2442,6 @@ Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogLayoutSettings @@ -2627,10 +2615,6 @@ Apply settings anyway? Time given for the algorithm to find best layout. - - min - - Efficiency: @@ -2639,10 +2623,6 @@ Apply settings anyway? Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - - % - - Manual priority @@ -2660,11 +2640,16 @@ Apply settings anyway? - Enable this option to prefer getting one sheet solutions. + Prefer one sheet solution - Prefer one sheet solution + min + minutes + + + + Enable this option to prefer getting one sheet solutions. @@ -3777,10 +3762,6 @@ Apply settings anyway? Length: 长度: - - = - - U mark @@ -4479,18 +4460,6 @@ Apply settings anyway? Vertical: - - % - - - - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> - - - - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> - - DialogSaveLayout @@ -8799,10 +8768,6 @@ Do you want to save your changes? Formula wizard - - = - - Value diff --git a/src/app/valentina/dialogs/dialogincrements.cpp b/src/app/valentina/dialogs/dialogincrements.cpp index 856185b07..b626b416c 100644 --- a/src/app/valentina/dialogs/dialogincrements.cpp +++ b/src/app/valentina/dialogs/dialogincrements.cpp @@ -95,9 +95,8 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par qCDebug(vDialog, "Showing variables."); ShowUnits(); - const bool freshCall = true; - FillIncrements(freshCall); - FillPreviewCalculations(freshCall); + FillIncrements(); + FillPreviewCalculations(); FillLengthsLines(); FillLengthLinesAngles(); FillLengthsCurves(); @@ -182,15 +181,15 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par /** * @brief FillIncrementTable fill data for increment table */ -void DialogIncrements::FillIncrements(bool freshCall) +void DialogIncrements::FillIncrements() { - FillIncrementsTable(ui->tableWidgetIncrement, data->DataIncrementsWithSeparators(), false, freshCall); + FillIncrementsTable(ui->tableWidgetIncrement, data->DataIncrementsWithSeparators(), false); } //--------------------------------------------------------------------------------------------------------------------- -void DialogIncrements::FillPreviewCalculations(bool freshCall) +void DialogIncrements::FillPreviewCalculations() { - FillIncrementsTable(ui->tableWidgetPC, data->DataIncrementsWithSeparators(), true, freshCall); + FillIncrementsTable(ui->tableWidgetPC, data->DataIncrementsWithSeparators(), true); } //--------------------------------------------------------------------------------------------------------------------- @@ -302,6 +301,7 @@ QTableWidgetItem * DialogIncrements::AddCell(QTableWidget *table, const QString QTableWidgetItem *item = new QTableWidgetItem(text); item->setTextAlignment(aligment); + item->setToolTip(text); // set the item non-editable (view only), and non-selectable Qt::ItemFlags flags = item->flags(); @@ -869,7 +869,7 @@ void DialogIncrements::RefreshPattern() //--------------------------------------------------------------------------------------------------------------------- void DialogIncrements::FillIncrementsTable(QTableWidget *table, const QMap > &increments, - bool takePreviewCalculations, bool freshCall) + bool takePreviewCalculations) { SCASSERT(table != nullptr) @@ -920,11 +920,6 @@ void DialogIncrements::FillIncrementsTable(QTableWidget *table, } } - if (freshCall) - { - table->resizeColumnsToContents(); - table->resizeRowsToContents(); - } table->horizontalHeader()->setStretchLastSection(true); table->blockSignals(false); } diff --git a/src/app/valentina/dialogs/dialogincrements.h b/src/app/valentina/dialogs/dialogincrements.h index 97f17be60..eb80a056c 100644 --- a/src/app/valentina/dialogs/dialogincrements.h +++ b/src/app/valentina/dialogs/dialogincrements.h @@ -111,10 +111,10 @@ private: void FillIncrementsTable(QTableWidget *table, const QMap > &increments, - bool takePreviewCalculations, bool freshCall = false); + bool takePreviewCalculations); - void FillIncrements(bool freshCall = false); - void FillPreviewCalculations(bool freshCall = false); + void FillIncrements(); + void FillPreviewCalculations(); void FillLengthsLines(); void FillLengthLinesAngles(); void FillLengthsCurves(); diff --git a/src/app/valentina/dialogs/dialoglayoutscale.ui b/src/app/valentina/dialogs/dialoglayoutscale.ui index 86fd6db95..0cc38f3c5 100644 --- a/src/app/valentina/dialogs/dialoglayoutscale.ui +++ b/src/app/valentina/dialogs/dialoglayoutscale.ui @@ -158,7 +158,7 @@ - % + % 1 @@ -180,7 +180,7 @@ - % + % 1 @@ -220,7 +220,7 @@ - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> Qt::AlignCenter @@ -256,7 +256,7 @@ - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.ui b/src/app/valentina/dialogs/dialoglayoutsettings.ui index 94f63d258..d4407b8e6 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.ui +++ b/src/app/valentina/dialogs/dialoglayoutsettings.ui @@ -384,7 +384,7 @@ Time given for the algorithm to find best layout. - min + min 1 @@ -429,7 +429,7 @@ Set layout efficiency coefficient. Layout efficiency coefficientt is the ratio of the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the process stops. If value is 0 no check will be made. - % + % 1 @@ -451,7 +451,7 @@ - Enable this option to prefer getting one sheet solutions. + Enable this option to prefer getting one sheet solutions. Prefer one sheet solution diff --git a/src/app/valentina/dialogs/dialogsavelayout.ui b/src/app/valentina/dialogs/dialogsavelayout.ui index 90bf2ac81..7d648eee7 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.ui +++ b/src/app/valentina/dialogs/dialogsavelayout.ui @@ -174,7 +174,7 @@ - % + % 1 @@ -196,7 +196,7 @@ - % + % 1 @@ -236,7 +236,7 @@ - <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> + <html><head/><body><p><span style=" font-size:16pt;">┐</span></p></body></html> Qt::AlignCenter @@ -272,7 +272,7 @@ - <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> + <html><head/><body><p><span style=" font-size:16pt; font-weight:600;">┘</span></p></body></html> diff --git a/src/app/valentina/dialogs/vwidgetgroups.cpp b/src/app/valentina/dialogs/vwidgetgroups.cpp index 17d09e1a9..dfb5737cc 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.cpp +++ b/src/app/valentina/dialogs/vwidgetgroups.cpp @@ -311,7 +311,6 @@ void VWidgetGroups::UpdateGroups() //--------------------------------------------------------------------------------------------------------------------- void VWidgetGroups::FillTable(QMap groups) { - emit doc->UpdateToolTip(); ui->lineEditTags->SetCompletion(doc->GetGroupCategories()); groups = FilterGroups(groups); diff --git a/src/libs/vmisc/customevents.h b/src/libs/vmisc/customevents.h index f3d2fbc55..72638e16c 100644 --- a/src/libs/vmisc/customevents.h +++ b/src/libs/vmisc/customevents.h @@ -107,8 +107,6 @@ private: QtMsgType m_severity; }; -#endif // CUSTOMEVENTS_H - inline QString PatternMessageEvent::Message() const { return m_message; @@ -118,3 +116,5 @@ inline QtMsgType PatternMessageEvent::Severity() const { return m_severity; } + +#endif // CUSTOMEVENTS_H diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index ee514bfd0..79e6aab56 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -419,10 +419,10 @@ QString DialogTool::GetNodeName(const VPieceNode &node, bool showPassmarkDetails name += QLatin1Char('|'); break; case PassmarkLineType::TwoLines: - name += QLatin1Literal("||"); + name += QLatin1String("||"); break; case PassmarkLineType::ThreeLines: - name += QLatin1Literal("|||"); + name += QLatin1String("|||"); break; case PassmarkLineType::TMark: name += QStringLiteral("┴"); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.ui b/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.ui index 9ef8c80b0..abf5627fc 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.ui +++ b/src/libs/vtools/dialogs/tools/piece/dialogpiecepath.ui @@ -325,7 +325,7 @@ - + :/icon/24x24/equal.png @@ -561,7 +561,7 @@ - + :/icon/24x24/equal.png @@ -760,7 +760,7 @@ - + :/icon/24x24/equal.png @@ -1045,7 +1045,7 @@ - = + = Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -1527,7 +1527,7 @@ - + :/icon/24x24/equal.png diff --git a/src/libs/vtools/dialogs/tools/piece/tabs/tabpassmarks.ui b/src/libs/vtools/dialogs/tools/piece/tabs/tabpassmarks.ui index 7fd7e499d..fda806bec 100644 --- a/src/libs/vtools/dialogs/tools/piece/tabs/tabpassmarks.ui +++ b/src/libs/vtools/dialogs/tools/piece/tabs/tabpassmarks.ui @@ -172,7 +172,7 @@ - = + = Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp index e3b72e2fa..cda19cca6 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp @@ -530,7 +530,7 @@ VAbstractOperation::VAbstractOperation(VAbstractPattern *doc, VContainer *data, destination(destination), operatedObjects() { - connect(doc, &VAbstractPattern::UpdateToolTip, [this]() + connect(doc, &VAbstractPattern::UpdateToolTip, this, [this]() { QMapIterator i(operatedObjects); while (i.hasNext()) diff --git a/src/libs/vtools/undocommands/undogroup.cpp b/src/libs/vtools/undocommands/undogroup.cpp index 8b9def919..1ef1cec28 100644 --- a/src/libs/vtools/undocommands/undogroup.cpp +++ b/src/libs/vtools/undocommands/undogroup.cpp @@ -134,6 +134,7 @@ void RenameGroup::undo() qCDebug(vUndo, "Undo."); doc->SetGroupName(nodeId, oldName); emit UpdateGroups(); + emit doc->UpdateToolTip(); } //--------------------------------------------------------------------------------------------------------------------- @@ -143,6 +144,7 @@ void RenameGroup::redo() doc->SetGroupName(nodeId, newName); emit UpdateGroups(); + emit doc->UpdateToolTip(); } //ChangeGroupOptions @@ -166,6 +168,7 @@ void ChangeGroupOptions::undo() doc->SetGroupName(nodeId, oldName); doc->SetGroupTags(nodeId, oldTags); emit UpdateGroups(); + emit doc->UpdateToolTip(); } //--------------------------------------------------------------------------------------------------------------------- @@ -175,6 +178,7 @@ void ChangeGroupOptions::redo() doc->SetGroupName(nodeId, newName); doc->SetGroupTags(nodeId, newTags); emit UpdateGroups(); + emit doc->UpdateToolTip(); } //AddItemToGroup diff --git a/src/test/TranslationsTest/tst_tstranslation.cpp b/src/test/TranslationsTest/tst_tstranslation.cpp index e89bbc673..ac4103284 100644 --- a/src/test/TranslationsTest/tst_tstranslation.cpp +++ b/src/test/TranslationsTest/tst_tstranslation.cpp @@ -171,6 +171,34 @@ void TST_TSTranslation::CheckEllipsis() } } +//--------------------------------------------------------------------------------------------------------------------- +void TST_TSTranslation::CheckInvalidCharacter_data() +{ + PrepareOriginalStrings(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void TST_TSTranslation::CheckInvalidCharacter() +{ + QFETCH(QString, source); + QFETCH(QDomElement, message); + + if (source == QChar('=') or source == QChar('%')) + { + const QDomNode context = message.parentNode(); + if (context.isNull()) + { + QFAIL("Can't get context."); + } + + const QString contextName = context.firstChildElement(TagName).text(); + const QString error = QString("String contains invalid character '%1' in context '%2'. It should not be " + "marked for translation.") + .arg(source, contextName); + QFAIL(qUtf8Printable(error)); + } +} + //--------------------------------------------------------------------------------------------------------------------- void TST_TSTranslation::PrepareOriginalStrings() { diff --git a/src/test/TranslationsTest/tst_tstranslation.h b/src/test/TranslationsTest/tst_tstranslation.h index 06f1f2bdf..7ebe87971 100644 --- a/src/test/TranslationsTest/tst_tstranslation.h +++ b/src/test/TranslationsTest/tst_tstranslation.h @@ -44,6 +44,8 @@ private slots: void CheckEmptyToolButton(); void CheckEllipsis_data(); void CheckEllipsis(); + void CheckInvalidCharacter_data(); + void CheckInvalidCharacter(); private: Q_DISABLE_COPY(TST_TSTranslation) From 8aff83d2a20895e5a373c85c7b77b5adc0a949a7 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 10:43:47 +0200 Subject: [PATCH 011/321] icons and structure main window --- src/app/puzzle/puzzlemainwindow.h | 1 + src/app/puzzle/puzzlemainwindow.ui | 109 +++++++++++++++++- src/app/puzzle/share/resources/puzzleicon.qrc | 4 + .../puzzleicon/64x64/iconCurrentPiece.png | Bin 0 -> 1355 bytes .../resources/puzzleicon/64x64/iconLayers.png | Bin 0 -> 827 bytes .../resources/puzzleicon/64x64/iconLayout.png | Bin 0 -> 736 bytes .../resources/puzzleicon/64x64/iconTiles.png | Bin 0 -> 899 bytes 7 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLayout.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconTiles.png diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index ac1ba0cb6..6cf5977ee 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -51,6 +51,7 @@ private: void InitMenuBar(); +private slots: void New(); void Open(); void Save(); diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 0dee51b58..55b7f1b95 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -13,7 +13,86 @@ PuzzleMainWindow - + + + true + + + Qt::LeftToRight + + + + QLayout::SetDefaultConstraint + + + + + + + + + 0 + 0 + + + + + 320 + 0 + + + + QTabWidget::Rounded + + + 0 + + + + 32 + 32 + + + + + + :/puzzleicon/64x64/iconCurrentPiece.png:/puzzleicon/64x64/iconCurrentPiece.png + + + + + + + + + :/puzzleicon/64x64/iconLayout.png:/puzzleicon/64x64/iconLayout.png + + + + + + + + + :/puzzleicon/64x64/iconTiles.png:/puzzleicon/64x64/iconTiles.png + + + + + + + + + :/puzzleicon/64x64/iconLayers.png:/puzzleicon/64x64/iconLayers.png + + + + + + + + + @@ -69,6 +148,27 @@ + + + + 160 + 160 + + + + QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable + + + Qt::AllDockWidgetAreas + + + Piece Carrousel + + + 1 + + + Open @@ -108,7 +208,8 @@ true - + + .. E&xit @@ -137,6 +238,8 @@ - + + + diff --git a/src/app/puzzle/share/resources/puzzleicon.qrc b/src/app/puzzle/share/resources/puzzleicon.qrc index 871f678c4..563bb83a4 100644 --- a/src/app/puzzle/share/resources/puzzleicon.qrc +++ b/src/app/puzzle/share/resources/puzzleicon.qrc @@ -1,5 +1,9 @@ puzzleicon/64x64/logo.png + puzzleicon/64x64/iconLayout.png + puzzleicon/64x64/iconCurrentPiece.png + puzzleicon/64x64/iconLayers.png + puzzleicon/64x64/iconTiles.png diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece.png new file mode 100644 index 0000000000000000000000000000000000000000..0e12bb4433f7a051208c296444e31067a8e9b4b0 GIT binary patch literal 1355 zcmV-R1+@B!P)EX>4Tx04R}tkv&MmP!xqv(@Kk09PFUtkfAzR5EXIMDionYs1;guFnQ@8G-*g$ zTpR`0f`dPcRR6lU)^quLz(AA*w-{S;m|sCE>Zg?&0J6U5saW-}`g*syT}RK9P8q8D^DugLrzg zYH;2sj7IPWeK{ zWtH<5XRTagtv>k+!#RCrnd?-;NMI35kRU=q4JDLOMT~Zx6bmUjk9+us9KS>^g4!CxZD8-o($QP9m!86k8{ps& z7%foty2raiopby5PHTQY{daPB$6l&&00006VoOIv0Q3M$08806x7z>!010qNS#tmY z4c7nw4c7reD4Tcy000McNliru~>zvq3wJBS_g$Oha39sw@kGm_{g z@C--;qO^Vhm(Fw1H-M)=s;p?y)YK$eTU)iyOMv4%72O3yfiLAnd%a#UIyx%m=H|rV z;h{*U)1tY#S^NGKpwx5G*MUeW&!1cet!tWfiQ5V6rn4?W#B?-xs5LTF|biy zwA<|#fj~gSVlk1+<;4GLZEa2T_4SGJbN*pHsC4wyO0R*S)9GYzaFAdy$k5ObKA*4Z z6R)nWGCx1h%E}6xo15(H?2yf7IX*rnm&<8~g-Vndrd~k!e7=hAcBL8^7|;j^RdUg_ z?66C~r))Nhs;auVt|&@XwbXjV%mTz>G5xlWHd|G3uC)PifW^f{_V@RtB;YIXu}~ba!`4IR?i8Mn*=k+wIbg z!K=VMMNycTn2_>?$aBCR2n1+vZ`b>Uh~Wf`19x367tv@Gy<`>w?gK9YB9RDfZEd<4 zU^D@K;02%p&atsECMPG+Q$`XnTYBz)2q@ujn3&*c6MTvjEsQ&%mo;tY9psq`&$zkph#(ekr6PP0X8cF76BFkRuhz& z04oAk6V%xNo9sQnR*SuOJ@RK$NL&2d|M~P3?RNVw;%uj N002ovPDHLkV1m+PUVZ=o literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers.png new file mode 100644 index 0000000000000000000000000000000000000000..2f36eba4db6f39e1cc77ec0d51f188d0cd737184 GIT binary patch literal 827 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5h!1NUQ&4ukJ9JHwzw3SZEa~AX<1uOJt$b3el)igUXlkCYc^lF*2;zo0{#r zL)pdCV`XDl9Y3%iIeF3ZqN~>)ea$T$9}hmQo%8+N!+pOQ76zux5|v;#*_*XYsL*h7 ztZ4Ikjs@(Bs~l%W9-E`0`f%sIcMl)`j_paWy#KrS>nh7`M!Sg>(sZO$sV zr{1?=(Hf!o!u>O^D121DE;{|bg}97ZMcNUc<g~_hHN0)S0hC4tpdBdQVVra^zK=66o4fHdlmO)2hGvN4v~^7roXP zRf8g(1x&n~9<%>%zQ1|vr^&*3K^A-^dvAO@&LMDzbyn%^e|Fp6KI42)&$jN%w*8kF z((F9fZ{PYt@WOW9n3(ORsr))&`5c*w4D_`kkFy&lUb+ zSdtlbQu@II0SVoJZ@Z4~cAi`O`@3Iuo&DePqKe~js|tb9!j|Oi?!xee!JEPRrrGw} zKoQOYkH}(R3|H=O_9rad9I`qK)SEW}W75LY#WAGf*4taQS*;Ed ztq+Y2AH*>+nkOW`j0@V?7JX|*&T(6fNynU|J8z_LPkz<3HhG=#ol1U=s24o^_aB^J zJ~2f!?99~Wy&9kP+$(>zD{NY7oZ7|GxvN%v;+~K?vujbuI;KVOOhCIq;K1YuAJ@EI zb^Gl%{mBv2QtN*_wNmx;6W%l_=k~U59&L#mz85p!+^4^`q4w0KkXg&(yeej?eXXs3 zCAC~T;kMapZQsjtRx!MTnFcZPdxLkc}*5h!1NUQ&4ukJ9JHwzw3SZEa~AX<1uOJt$b3el)igUXlkCYc^lF*2;zo0{#r zL)pdCV`XDl9Y3%iIeF3ZqN~>)ea$T$9}hmQo%8+N!+pOQ76zux5|v;#*_*XYsL*h7 ztZ4Ikjs@(Bs~l%W9-E`0`f%sIcMl)`j_paWy#KrS>nh7`M!Sg>(sZO$sV zr{1?=(Hf!o!u>O^D121DE;{|bg}97ZMcNUc<g~_hHN0)S0hC4tpdBdQVVra^zK=66o4fHdlmO)2hGvN4v~^7roXP zRf8g(1x&n~9<%>%zQ1|vr^&*3K^A-^dvAO@&LMDzbyn%^e|Fp6KI42)&$jN%w*8kF z((F9fZ{PYt@WOW9n3(ORsr))&`5c*w4D_`kkFy&lUb+ zSdtlbQu@II0SVoJZ@Z4~cAi`O`@3Iuo&DePqKe~js|tb9!j|Oi?!xee!JEPRrrGw} zKoQOYkH}(R3|H=O_9rad96XlulwCZ5LU%n~978H@y}hl-cgR7Y z_2G6_*6WUn83GpPnw1tN?Bv^*DUiXp`NUkSn47**N4EU;zScW4|F~VIMX$>26T5kJ zcZR5ihHADb^cxy4olaxwnoB{jeU-8{8WVr7=;mK1zpCGL{x@$lwc)I$ztaD0e0s!j-ALRf5 literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconTiles.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconTiles.png new file mode 100644 index 0000000000000000000000000000000000000000..ee3099a77c9a1e3bc9df5cb1dd0a91469f1fe858 GIT binary patch literal 899 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5h!1NUQ&4ukJ9JHwzw3SZEa~AX<1uOJt$b3el)igUXlkCYc^lF*2;zo0{#r zL)pdCV`XDl9Y3%iIeF3ZqN~>)ea$T$9}hmQo%8+N!+pOQ76zux5|v;#*_*XYsL*h7 ztZ4Ikjs@(Bs~l%W9-E`0`f%sIcMl)`j_paWy#KrS>nh7`M!Sg>(sZO$sV zr{1?=(Hf!o!u>O^D121DE;{|bg}97ZMcNUc<g~_hHN0)S0hC4tpdBdQVVra^zK=66o4fHdlmO)2hGvN4v~^7roXP zRf8g(1x&n~9<%>%zQ1|vr^&*3K^A-^dvAO@&LMDzbyn%^e|Fp6KI42)&$jN%w*8kF z((F9fZ{PYt@WOW9n3(ORsr))&`5c*w4D_`kkFy&lUb+ zSdtlbQu@II0SVoJZ@Z4~cAi`O`@3Iuo&DePqKe~js|tb9!j|Oi?!xee!JEPRrrGw} zKoQOYkH}(R3|H=O_9rad9I|ZHbG%Z3G1=hh;uunK>+S80S%(~C zj(=Q#QNcoE*Hpfy3+*p1H2n&&^3djGt7ST9URbcwIXrw}z=i~KR~hL^e7P&P+-ja< zzU5zCK}*3&)$cneJmhC@zsx$R{?a=>U!!)#dCw=FOeqlj|M*AOY!y!@nd2+pzi09k zVCmd^pt^WU-1_uCOg4TtOacuIED8*a91aXfOm*>O-w#DrtzJjpM!%7^?@HLcRqETS ziyPQKEatfOddmIj>`Q}AEj{VDGlx~+=RVs5wR_KfO?i~|)PD8Z)l(-wls_bJEcq`p zrnw+1%97V`%+;N4ASL^KWg*Y(v)6wnJV+^e-rZ_@;Ajos;f1$TGq%s=iOx2A%Q$a! zXvWsMG7+u`=jGEM{jJ;edvm0Q7=M}lxwM28=~9gIvP@r;+*$X>?t$_XRi3ZHBG~-G z^kd%rGS~9P=;^bU$EK%$E@8OyX7{lOq0KjI|B8QNoBG7Cl Date: Sat, 11 Apr 2020 11:17:53 +0200 Subject: [PATCH 012/321] remove tab nos needed for mvp --- src/app/puzzle/puzzlemainwindow.cpp | 14 ++++++++++++++ src/app/puzzle/puzzlemainwindow.h | 1 + src/app/puzzle/puzzlemainwindow.ui | 26 +++++++++++++++++++------- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 2fec23266..a647d528d 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -36,6 +36,9 @@ PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : ui->setupUi(this); InitMenuBar(); + + InitPropertyTabs(); + } //--------------------------------------------------------------------------------------------------------------------- @@ -75,6 +78,17 @@ void PuzzleMainWindow::InitMenuBar() } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabs() +{ + // for the MVP we don't want the tiles and current layer tabs. + // we remove them. As soon as we need them, delete / update this code + ui->tabWidgetProperties->removeTab(3); // remove layers + ui->tabWidgetProperties->removeTab(2); // remove tiles + +} + + //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::New() { diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 6cf5977ee..73167d585 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -50,6 +50,7 @@ private: Ui::PuzzleMainWindow *ui; void InitMenuBar(); + void InitPropertyTabs(); private slots: void New(); diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 55b7f1b95..818dc3928 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -45,7 +45,7 @@ QTabWidget::Rounded - 0 + 1 @@ -61,6 +61,9 @@ + + Current piece properties + @@ -70,6 +73,9 @@ + + Layout properties + @@ -79,6 +85,9 @@ + + Tiles properties + @@ -88,6 +97,9 @@ + + Layers properties + @@ -171,7 +183,7 @@ - Open + &Open Ctrl+O @@ -179,7 +191,7 @@ - Save + &Save Ctrl+S @@ -187,7 +199,7 @@ - Save As + Save &As Ctrl+Shift+S @@ -195,12 +207,12 @@ - Close Layout + &Close Layout - Import Raw Layout Data + &Import Raw Layout Data @@ -220,7 +232,7 @@ - New + &New Ctrl+N From 234529f398146aa5cfba6ff13654d750f60d0445 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 11:40:02 +0200 Subject: [PATCH 013/321] about puzzle dialog --- Valentina.pro | 3 + src/app/puzzle/dialogs/dialogaboutpuzzle.cpp | 141 +++++++++ src/app/puzzle/dialogs/dialogaboutpuzzle.h | 61 ++++ src/app/puzzle/dialogs/dialogaboutpuzzle.ui | 296 +++++++++++++++++++ src/app/puzzle/puzzle.pri | 9 +- src/app/puzzle/puzzle.pro | 2 + src/app/puzzle/puzzlemainwindow.cpp | 10 +- 7 files changed, 513 insertions(+), 9 deletions(-) create mode 100644 src/app/puzzle/dialogs/dialogaboutpuzzle.cpp create mode 100644 src/app/puzzle/dialogs/dialogaboutpuzzle.h create mode 100644 src/app/puzzle/dialogs/dialogaboutpuzzle.ui diff --git a/Valentina.pro b/Valentina.pro index 81ed324c7..d78671c57 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -53,3 +53,6 @@ unix { TEMPLATE = subdirs SUBDIRS = src + +RESOURCES += \ + src/app/puzzle/share/resources/tapeicon.qrc diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp new file mode 100644 index 000000000..f4a19caa9 --- /dev/null +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp @@ -0,0 +1,141 @@ +/************************************************************************ + ** + ** @file dialogaboutpuzzle.cpp + ** @author Roman Telezhynskyi + ** @date 11 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "dialogaboutpuzzle.h" +#include "ui_dialogaboutpuzzle.h" +#include "../version.h" +#include "../vmisc/def.h" +#include "../fervor/fvupdater.h" + +#include +#include +#include +#include +#include +#include + +//--------------------------------------------------------------------------------------------------------------------- +DialogAboutPuzzle::DialogAboutPuzzle(QWidget *parent) + :QDialog(parent), + ui(new Ui::DialogAboutPuzzle), + isInitialized(false) +{ + ui->setupUi(this); + + //mApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + + RetranslateUi(); + connect(ui->pushButton_Web_Site, &QPushButton::clicked, this, []() + { + if ( not QDesktopServices::openUrl(QUrl(VER_COMPANYDOMAIN_STR))) + { + qWarning() << tr("Cannot open your default browser"); + } + }); + connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &DialogAboutPuzzle::close); + connect(ui->pushButtonCheckUpdate, &QPushButton::clicked, []() + { + // Set feed URL before doing anything else + FvUpdater::sharedUpdater()->SetFeedURL(FvUpdater::CurrentFeedURL()); + FvUpdater::sharedUpdater()->CheckForUpdatesNotSilent(); + }); + + // By default on Windows font point size 8 points we need 11 like on Linux. + FontPointSize(ui->label_Legal_Stuff, 11); + FontPointSize(ui->label_Puzzle_Built, 11); + FontPointSize(ui->label_QT_Version, 11); +} + +//--------------------------------------------------------------------------------------------------------------------- +DialogAboutPuzzle::~DialogAboutPuzzle() +{ + delete ui; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogAboutPuzzle::changeEvent(QEvent *event) +{ + if (event->type() == QEvent::LanguageChange) + { + // retranslate designer form (single inheritance approach) + ui->retranslateUi(this); + RetranslateUi(); + } + + // remember to call base class implementation + QDialog::changeEvent(event); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogAboutPuzzle::showEvent(QShowEvent *event) +{ + QDialog::showEvent( event ); + if ( event->spontaneous() ) + { + return; + } + + if (isInitialized) + { + return; + } + // do your init stuff here + + setMaximumSize(size()); + setMinimumSize(size()); + + isInitialized = true;//first show windows are held +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogAboutPuzzle::FontPointSize(QWidget *w, int pointSize) +{ + SCASSERT(w != nullptr) + + QFont font = w->font(); + font.setPointSize(pointSize); + w->setFont(font); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogAboutPuzzle::RetranslateUi() +{ + ui->label_Puzzle_Version->setText(QString("Tape %1").arg(APP_VERSION_STR)); + ui->labelBuildRevision->setText(tr("Build revision: %1").arg(BUILD_REVISION)); + ui->label_QT_Version->setText(buildCompatibilityString()); + + const QDate date = QLocale::c().toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy")); + ui->label_Puzzle_Built->setText(tr("Built on %1 at %2").arg(date.toString(), __TIME__)); + + ui->label_Legal_Stuff->setText(QApplication::translate("InternalStrings", + "The program is provided AS IS with NO WARRANTY OF ANY " + "KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY " + "AND FITNESS FOR A PARTICULAR PURPOSE.")); + + ui->pushButton_Web_Site->setText(tr("Web site : %1").arg(VER_COMPANYDOMAIN_STR)); +} diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.h b/src/app/puzzle/dialogs/dialogaboutpuzzle.h new file mode 100644 index 000000000..0367c5ace --- /dev/null +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.h @@ -0,0 +1,61 @@ +/************************************************************************ + ** + ** @file dialogaboutpuzzle.h + ** @author Roman Telezhynskyi + ** @date 11 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef DIALOGABOUTPUZZLE_H +#define DIALOGABOUTPUZZLE_H + +#include + +namespace Ui +{ + class DialogAboutPuzzle; +} + +class DialogAboutPuzzle : public QDialog +{ + Q_OBJECT + +public: + explicit DialogAboutPuzzle(QWidget *parent = nullptr); + virtual ~DialogAboutPuzzle(); + +protected: + virtual void changeEvent(QEvent* event) override; + virtual void showEvent(QShowEvent *event) override; + +private: + Q_DISABLE_COPY(DialogAboutPuzzle) + Ui::DialogAboutPuzzle *ui; + bool isInitialized; + + void FontPointSize(QWidget *w, int pointSize); + + void RetranslateUi(); +}; + +#endif // DIALOGABOUTPUZZLE_H diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.ui b/src/app/puzzle/dialogs/dialogaboutpuzzle.ui new file mode 100644 index 000000000..fdcb86428 --- /dev/null +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.ui @@ -0,0 +1,296 @@ + + + DialogAboutPuzzle + + + + 0 + 0 + 462 + 320 + + + + + 0 + 0 + + + + + 0 + 0 + + + + About Tape + + + + :/tapeicon/64x64/logo.png:/tapeicon/64x64/logo.png + + + + + + 4 + + + 0 + + + 9 + + + + + + 0 + 0 + + + + + + + :/puzzleicon/64x64/logo.png + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + 15 + 75 + true + + + + Puzzle version + + + Qt::AlignCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 75 + true + + + + Build revision: + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + This program is part of Valentina project. + + + + + + + + + + + + 0 + 0 + 255 + + + + + + + + + 0 + 0 + 255 + + + + + + + + + 120 + 120 + 120 + + + + + + + + + true + + + + PointingHandCursor + + + pushButton_Web_Site + + + false + + + true + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + label_Tape_Built + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + label_QT_Version + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + label_Legal_Stuff + + + true + + + + + + + + + + + + + Check For Updates + + + + + + + true + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + false + + + + + + + + + + + + + diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri index 101fff4e3..a4db72756 100644 --- a/src/app/puzzle/puzzle.pri +++ b/src/app/puzzle/puzzle.pri @@ -4,14 +4,17 @@ SOURCES += \ $$PWD/main.cpp \ $$PWD/puzzlemainwindow.cpp \ - $$PWD/puzzleapplication.cpp + $$PWD/puzzleapplication.cpp \ + $$PWD/dialogs/dialogaboutpuzzle.cpp *msvc*:SOURCES += $$PWD/stable.cpp HEADERS += \ $$PWD/puzzlemainwindow.h \ $$PWD/stable.h \ - $$PWD/puzzleapplication.h + $$PWD/puzzleapplication.h \ + $$PWD/dialogs/dialogaboutpuzzle.h FORMS += \ - $$PWD/puzzlemainwindow.ui + $$PWD/puzzlemainwindow.ui \ + $$PWD/dialogs/dialogaboutpuzzle.ui diff --git a/src/app/puzzle/puzzle.pro b/src/app/puzzle/puzzle.pro index 7463ba832..1a471e46a 100644 --- a/src/app/puzzle/puzzle.pro +++ b/src/app/puzzle/puzzle.pro @@ -333,3 +333,5 @@ CONFIG(release, debug|release){ QMAKE_POST_LINK += $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET}.app } } + +FORMS += diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index a647d528d..560fcb1b1 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -27,6 +27,7 @@ *************************************************************************/ #include "puzzlemainwindow.h" #include "ui_puzzlemainwindow.h" +#include "dialogs/dialogaboutpuzzle.h" //--------------------------------------------------------------------------------------------------------------------- PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : @@ -166,12 +167,9 @@ void PuzzleMainWindow::AboutQt() //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::AboutPuzzle() { - // just for test purpuses, to be removed: - QMessageBox msgBox; - msgBox.setText("TODO PuzzleMainWindow::AboutPuzzle"); - int ret = msgBox.exec(); - - // TODO + auto *aboutDialog = new DialogAboutPuzzle(this); + aboutDialog->setAttribute(Qt::WA_DeleteOnClose, true); + aboutDialog->show(); } From 3f9822d271b8c66f4c3f70d31e6ce3e2b24b26f8 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 12:52:26 +0200 Subject: [PATCH 014/321] property tabs and tab layout --- src/app/puzzle/puzzlemainwindow.ui | 382 +++++++++++++++++++++++++++++ 1 file changed, 382 insertions(+) diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 818dc3928..e26640467 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -54,6 +54,9 @@ + + + :/puzzleicon/64x64/iconCurrentPiece.png:/puzzleicon/64x64/iconCurrentPiece.png @@ -64,6 +67,80 @@ Current piece properties + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 316 + 779 + + + + + + + font-weight:bold; + + + Current piece + + + Qt::AutoText + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + @@ -76,6 +153,175 @@ Layout properties + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 316 + 779 + + + + + + + font-weight: bold; + + + Layout + + + Qt::AlignCenter + + + + + + + Format + + + + + + + Margins + + + + + + 0.100000000000000 + + + + + + + 0.100000000000000 + + + + + + + Left: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Right: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 0.100000000000000 + + + + + + + Top: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 0.100000000000000 + + + + + + + Bottom: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Control + + + + + + + Export + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + @@ -88,6 +334,74 @@ Tiles properties + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 316 + 779 + + + + + + + font-weight: bold; + + + Tiles + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + @@ -100,6 +414,74 @@ Layers properties + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 316 + 779 + + + + + + + font-weight:bold; + + + Layers + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + From 3b96605ef9a47476dcee1b9d3238cbf36ba2e122 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 13:28:01 +0200 Subject: [PATCH 015/321] layout property and icons --- src/app/puzzle/puzzlemainwindow.ui | 168 +++++++++++++++--- src/app/puzzle/share/resources/puzzleicon.qrc | 2 + .../puzzleicon/64x64/iconLandscape.png | Bin 0 -> 1042 bytes .../puzzleicon/64x64/iconPortrait.png | Bin 0 -> 980 bytes .../puzzleicon/svg/icon_current_piece.svg | 72 ++++++++ .../puzzleicon/svg/icon_landscape.svg | 75 ++++++++ .../resources/puzzleicon/svg/icon_layers.svg | 82 +++++++++ .../resources/puzzleicon/svg/icon_layout.svg | 75 ++++++++ .../puzzleicon/svg/icon_portrait.svg | 75 ++++++++ .../resources/puzzleicon/svg/icon_tiles.svg | 91 ++++++++++ 10 files changed, 612 insertions(+), 28 deletions(-) create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLandscape.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconPortrait.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_current_piece.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_landscape.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_layers.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_layout.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_portrait.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_tiles.svg diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index e26640467..9f991ae41 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -102,8 +102,8 @@ 0 0 - 316 - 779 + 115 + 41 @@ -208,6 +208,106 @@ Format + + + + + + + Unit + + + + + + + + + + Templates + + + + + + + + + + Width + + + + + + + + + + + + + Length + + + + + + + Orientation + + + + + + + + + Portrait + + + + + + + :/puzzleicon/64x64/iconPortrait.png:/puzzleicon/64x64/iconPortrait.png + + + + 32 + 32 + + + + true + + + + + + + Landscape + + + + + + + :/puzzleicon/64x64/iconLandscape.png:/puzzleicon/64x64/iconLandscape.png + + + + 32 + 32 + + + + + + + + + @@ -216,6 +316,26 @@ Margins + + + + Right: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Top: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + @@ -231,7 +351,7 @@ - + Left: @@ -240,16 +360,6 @@ - - - - Right: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - @@ -260,16 +370,6 @@ - - - - Top: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - @@ -278,7 +378,7 @@ - + Bottom: @@ -366,8 +466,8 @@ 0 0 - 316 - 779 + 98 + 41 @@ -446,8 +546,8 @@ 0 0 - 316 - 779 + 98 + 41 @@ -632,6 +732,18 @@ + + graphicsView + tabWidgetProperties + scrollAreaLayout + doubleSpinBoxLayoutMarginTop + doubleSpinBoxLayoutMarginLeft + doubleSpinBoxLayoutMarginRight + doubleSpinBoxLayoutMarginBottom + scrollAreaCurrentPiece + scrollAreaLayers + scrollAreaTiles + diff --git a/src/app/puzzle/share/resources/puzzleicon.qrc b/src/app/puzzle/share/resources/puzzleicon.qrc index 563bb83a4..0eb2506df 100644 --- a/src/app/puzzle/share/resources/puzzleicon.qrc +++ b/src/app/puzzle/share/resources/puzzleicon.qrc @@ -5,5 +5,7 @@ puzzleicon/64x64/iconCurrentPiece.png puzzleicon/64x64/iconLayers.png puzzleicon/64x64/iconTiles.png + puzzleicon/64x64/iconLandscape.png + puzzleicon/64x64/iconPortrait.png diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconLandscape.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconLandscape.png new file mode 100644 index 0000000000000000000000000000000000000000..666d96fa7fcaf8f1b96eff2c442839d362b8e6b6 GIT binary patch literal 1042 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5h!1NUQ&4ukJ9JHwzw3SZEa~AX<1uOJt$b3el)igUXlkCYc^lF*2;zo0{#r zL)pdCV`XDl9Y3%iIeF3ZqN~>)ea$T$9}hmQo%8+N!+pOQ76zux5|v;#*_*XYsL*h7 ztZ4Ikjs@(Bs~l%W9-E`0`f%sIcMl)`j_paWy#KrS>nh7`M!Sg>(sZO$sV zr{1?=(Hf!o!u>O^D121DE;{|bg}97ZMcNUc<g~_hHN0)S0hC4tpdBdQVVra^zK=66o4fHdlmO)2hGvN4v~^7roXP zRf8g(1x&n~9<%>%zQ1|vr^&*3K^A-^dvAO@&LMDzbyn%^e|Fp6KI42)&$jN%w*8kF z((F9fZ{PYt@WOW9n3(ORsr))&`5c*w4D_`kkFy&lUb+ zSdtlbQu@II0SVoJZ@Z4~cAi`O`@3Iuo&DePqKe~js|tb9!j|Oi?!xee!JEPRrrGw} zKoQOYkH}(R3|H=O_9rad+ydrvS9N(YFfj3Zx;TbZ+elplWLkCa0~3Qd(eI1=v7AHlS7>*_dGR!>xTuJHD`|tjOb}oDlE-3~Q z9l5vNTl&p;12jZfCLB%rc>X6l$NW4oh56^X6;40>l#^>ABPYo6qi8Zid3ib0iL9+v zCAB6}osTWtTh^PiPdNQ_9*cnBOuyxmeAN0m?#oI4?48T}uW!?}r^jccZ9Z9Hqc+ux zv4-szf3{hjKou9mf{PgjGkrXkUuJmUa4_?(IX^?d`s*KU_^+3;R&dv_&pE-sa3#ys z=KN-(nLG!)AFvCQ``l+01 z|Lw_sU$%RqR?YtV%c}*5h!1NUQ&4ukJ9JHwzw3SZEa~AX<1uOJt$b3el)igUXlkCYc^lF*2;zo0{#r zL)pdCV`XDl9Y3%iIeF3ZqN~>)ea$T$9}hmQo%8+N!+pOQ76zux5|v;#*_*XYsL*h7 ztZ4Ikjs@(Bs~l%W9-E`0`f%sIcMl)`j_paWy#KrS>nh7`M!Sg>(sZO$sV zr{1?=(Hf!o!u>O^D121DE;{|bg}97ZMcNUc<g~_hHN0)S0hC4tpdBdQVVra^zK=66o4fHdlmO)2hGvN4v~^7roXP zRf8g(1x&n~9<%>%zQ1|vr^&*3K^A-^dvAO@&LMDzbyn%^e|Fp6KI42)&$jN%w*8kF z((F9fZ{PYt@WOW9n3(ORsr))&`5c*w4D_`kkFy&lUb+ zSdtlbQu@II0SVoJZ@Z4~cAi`O`@3Iuo&DePqKe~js|tb9!j|Oi?!xee!JEPRrrGw} zKoQOYkH}(R3|H=O_9rad+yc_;i=M3n#^gm$7srr_TW@b0W(y}u zuz$FJmsKc3@riKCiRBt;x+$+h)U{g#Tv(cS99t-KQe|6{#=>I?x)y0#jQd^oJ1Q<_ z*;VqUfNxuJVD{?H?|&Xj{?{+JpZDU@n3h@~AD<_kxYAs~Q|Lm5$(5|F+AaOtf8Nn%3|JW=BQGBvAAkPhF%Hi}hEF!z zH*QQco2{CioqgfxY$ryC%{NWv`h{wVR1>#tU(hOpI7U%c>G z8PXJ95vRd$N&62P!w^X6n5Iq%CR2cvB?MHsf+&Sht359fIQVMhSN zg_k8gZptV74^`V}i7=Gxj{W`nx1PR-{D%!dxz}IcynP$H_c{xI-8Id%Ob3o0ZM}T? za{Q~D+}ubVv9`mBZRe*;v}^Mk%s+1`)jL~e;zQwm4_}{ROo?0;w%YS@$kwR8Z~rB2 zEU2rCJG6Hy%Zlr-&z(D$cSoMD{ny`r^&eedoD*VT6d)hDo>}+wXZ0Wd=czddOn>r; X`^rbUe&3w{jBf@{S3j3^P6 + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_landscape.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_landscape.svg new file mode 100644 index 000000000..444a54033 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_landscape.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_layers.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_layers.svg new file mode 100644 index 000000000..ab1385c2d --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_layers.svg @@ -0,0 +1,82 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_layout.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_layout.svg new file mode 100644 index 000000000..993a50de8 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_layout.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_portrait.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_portrait.svg new file mode 100644 index 000000000..cf7971065 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_portrait.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_tiles.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_tiles.svg new file mode 100644 index 000000000..5ee9a5d0d --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_tiles.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + From 132bc819b3cfb998c1ddf0af25c33f814f101322 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 14:23:17 +0200 Subject: [PATCH 016/321] grainline icons and layout property --- src/app/puzzle/puzzlemainwindow.ui | 165 +++++++++++++++--- src/app/puzzle/share/resources/puzzleicon.qrc | 2 + .../64x64/iconGrainlineHorizontal.png | Bin 0 -> 979 bytes .../64x64/iconGrainlineVertical.png | Bin 0 -> 984 bytes .../svg/icon_grainline_horizontal.svg | 64 +++++++ .../svg/icon_grainline_vertical.svg | 64 +++++++ 6 files changed, 275 insertions(+), 20 deletions(-) create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineVertical.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_horizontal.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_vertical.svg diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 9f991ae41..30bb49096 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -37,7 +37,7 @@ - 320 + 360 0 @@ -102,8 +102,8 @@ 0 0 - 115 - 41 + 356 + 779 @@ -185,7 +185,7 @@ 0 0 - 316 + 356 779 @@ -212,47 +212,47 @@ - + Unit - + - + - Templates + Template - + - + Width - + - + - + Length - + Orientation @@ -261,7 +261,7 @@ - + Portrait @@ -284,7 +284,7 @@ - + Landscape @@ -307,6 +307,13 @@ + + + + Remove unused length + + + @@ -395,6 +402,101 @@ Control + + + + + + + Follow grainline + + + + + + + + + No + + + + + + + Vertical grainline + + + + + + + :/puzzleicon/64x64/iconGrainlineVertical.png:/puzzleicon/64x64/iconGrainlineVertical.png + + + + 28 + 28 + + + + + + + + Horizontal grainline + + + + + + + :/puzzleicon/64x64/iconGrainlineHorizontal.png:/puzzleicon/64x64/iconGrainlineHorizontal.png + + + + 28 + 28 + + + + + + + + + + Pieces gap + + + + + + + + + + + + Wargnin superposition of pieces + + + + + + + Warning pieces out of bound + + + + + + + Sticky edges + + + + @@ -402,6 +504,29 @@ Export + + + + + + + Format + + + + + + + + + + + + Export Layout + + + + @@ -466,8 +591,8 @@ 0 0 - 98 - 41 + 356 + 779 @@ -546,8 +671,8 @@ 0 0 - 98 - 41 + 356 + 779 diff --git a/src/app/puzzle/share/resources/puzzleicon.qrc b/src/app/puzzle/share/resources/puzzleicon.qrc index 0eb2506df..fb33ba546 100644 --- a/src/app/puzzle/share/resources/puzzleicon.qrc +++ b/src/app/puzzle/share/resources/puzzleicon.qrc @@ -7,5 +7,7 @@ puzzleicon/64x64/iconTiles.png puzzleicon/64x64/iconLandscape.png puzzleicon/64x64/iconPortrait.png + puzzleicon/64x64/iconGrainlineVertical.png + puzzleicon/64x64/iconGrainlineHorizontal.png diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal.png new file mode 100644 index 0000000000000000000000000000000000000000..394d48fc0f3253915d3bc2d7afed89fec1d5d295 GIT binary patch literal 979 zcmV;^11$WBP)EX>4Tx04R}tkv&MmP!xqv(@Kk09PFUtkfAzR5EXIMDionYs1;guFnQ@8G-*g$ zTpR`0f`dPcRR6lU)^quLz(AA*w-{S;m|sCE>Zg?&0J6U5saW-}`g*syT}RK9P8q8D^DugLrzg zYH;2sj7IPWeK{ zWtH<5XRTagtv>k+!#RCrnd?-;NMI35kRU=q4JDLOMT~Zx6bmUjk9+us9KS>^g4!CxZD8-o($QP9m!86k8{ps& z7%foty2raiopby5PHTQY{daPB$6l&&00006VoOIv0Q3M$08806x7z>!010qNS#tmY z4c7nw4c7reD4Tcy000McNliruN@X!1~ z8bV4*QI=AYC1pX%pR%IZ*ibgg#%?HUB@04RBE?3Nl(AqZE3vS_f{lfmQlut{c{b$ zHA%o_ti_wz23mpUKu?df`f101m ze9_nPdlGlCqSpj$FC)Ke2J6LqOF+|cJjD8`5^xZYv1J;wr49*zJ$QnxRh>G4d!4eh z0A@hbwlcuG+ba&^JeGC|`T_4t(gxe^Ei0wfud)!$MQ7UIH;CnJ*P4qStShC;7o5fe zxLO`;EV43zGyQmuuZ!?xJAhTqPhc-@V?&n*#!LC%jjB4@cDmQ7_{>&gWtaDS!`ag3 zzjoklmnn0tMx%SbOFus2K&M^cRoMn#PV>+-A5|^B?@AxXsyg)%hw!ZC+u&q}YcH@5 zucsQ-aU90z0-6D%EX>4Tx04R}tkv&MmP!xqv(@Kk09PFUtkfAzR5EXIMDionYs1;guFnQ@8G-*g$ zTpR`0f`dPcRR6lU)^quLz(AA*w-{S;m|sCE>Zg?&0J6U5saW-}`g*syT}RK9P8q8D^DugLrzg zYH;2sj7IPWeK{ zWtH<5XRTagtv>k+!#RCrnd?-;NMI35kRU=q4JDLOMT~Zx6bmUjk9+us9KS>^g4!CxZD8-o($QP9m!86k8{ps& z7%foty2raiopby5PHTQY{daPB$6l&&00006VoOIv0Q3M$08806x7z>!010qNS#tmY z4c7nw4c7reD4Tcy000McNlirulixY#cf)-Th?;{ukBf!{8AM$&5p zACG|F!NXh}=yiOnz#m{LHyeHjn?(X% + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_vertical.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_vertical.svg new file mode 100644 index 000000000..22c7e42f6 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_vertical.svg @@ -0,0 +1,64 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + From 44bf83a089936a3dc40c8225f4aee7a349fffef4 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 16:25:23 +0200 Subject: [PATCH 017/321] slots for the layout properties --- src/app/puzzle/puzzlemainwindow.cpp | 243 +++++++++++++++++++++++++++- src/app/puzzle/puzzlemainwindow.h | 20 +++ src/app/puzzle/puzzlemainwindow.ui | 7 +- 3 files changed, 264 insertions(+), 6 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 560fcb1b1..b3d36e74d 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -82,14 +82,87 @@ void PuzzleMainWindow::InitMenuBar() //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::InitPropertyTabs() { - // for the MVP we don't want the tiles and current layer tabs. - // we remove them. As soon as we need them, delete / update this code - ui->tabWidgetProperties->removeTab(3); // remove layers - ui->tabWidgetProperties->removeTab(2); // remove tiles + InitPropertyTabCurrentPiece(); + InitPropertyTabLayout(); + InitPropertyTabLayers(); + InitPropertyTabTiles(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabCurrentPiece() +{ } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabLayout() +{ + // -------------------- init the unit combobox --------------------- + ui->comboBoxLayoutUnit->addItem(tr("Centimeters"), QVariant(UnitsToStr(Unit::Cm))); + ui->comboBoxLayoutUnit->addItem(tr("Millimiters"), QVariant(UnitsToStr(Unit::Mm))); + ui->comboBoxLayoutUnit->addItem(tr("Inches"), QVariant(UnitsToStr(Unit::Inch))); + + // set default unit - TODO when we have the setting for the unit + const qint32 indexUnit = -1;//ui->comboBoxLayoutUnit->findData(qApp->ValentinaSettings()->GetUnit()); + if (indexUnit != -1) + { + ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit); + } + + connect(ui->comboBoxLayoutUnit, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutUnitChanged); + + + // -------------------- init the template combobox --------------------- + + // TODO + + connect(ui->comboBoxLayoutTemplate, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutTemplateChanged); + + // -------------------- layout width, length, orientation ------------------------ + connect(ui->doubleSpinBoxLayoutWidth, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutSizeChanged); + connect(ui->doubleSpinBoxLayoutLength, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutSizeChanged); + connect(ui->radioButtonLayoutPortrait, QOverload::of(&QRadioButton::toggled), this, &PuzzleMainWindow::LayoutOrientationChanged); + connect(ui->radioButtonLayoutLandscape, QOverload::of(&QRadioButton::toggled), this, &PuzzleMainWindow::LayoutOrientationChanged); + connect(ui->pushButtonLayoutRemoveUnusedLength, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutRemoveUnusedLength); + + // -------------------- margins ------------------------ + connect(ui->doubleSpinBoxLayoutMarginTop, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginRight, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginBottom, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginLeft, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + + // ------------------- follow grainline ----------------------- + connect(ui->radioButtonLayoutFollowGrainlineNo, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineVertical, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineHorizontal, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); + + // -------------------- pieces gap and checkboxes --------------- + connect(ui->doubleSpinBoxLayoutPiecesGap, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutPiecesGapChanged); + connect(ui->checkBoxLayoutWarningPiecesSuperposition, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged); + connect(ui->checkBoxLayoutWarningPiecesOutOfBound, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged); + connect(ui->checkBoxLayoutStickyEdges, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutStickyEdgesChanged); + + // -------------------- export --------------------------- + connect(ui->pushButtonLayoutExport, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutExport); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabTiles() +{ + // for the MVP we don't want the tiles tab. + // we remove it. As soon as we need it, update this code + ui->tabWidgetProperties->removeTab(2); // remove tiles +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabLayers() +{ + // for the MVP we don't want the layers tab. + // we remove it. As soon as we need it, update this code + ui->tabWidgetProperties->removeTab(3); // remove layers +} + //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::New() { @@ -98,6 +171,8 @@ void PuzzleMainWindow::New() msgBox.setText("TODO PuzzleMainWindow::New"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO @@ -111,6 +186,8 @@ void PuzzleMainWindow::Open() msgBox.setText("TODO PuzzleMainWindow::Open"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -122,6 +199,8 @@ void PuzzleMainWindow::Save() msgBox.setText("TODO PuzzleMainWindow::Save"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -133,6 +212,8 @@ void PuzzleMainWindow::SaveAs() msgBox.setText("TODO PuzzleMainWindow::SaveAs"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -144,6 +225,8 @@ void PuzzleMainWindow::ImportRawLayout() msgBox.setText("TODO PuzzleMainWindow::ImportRawLayout"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -155,6 +238,8 @@ void PuzzleMainWindow::CloseLayout() msgBox.setText("TODO PuzzleMainWindow::CloseLayout"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -172,4 +257,154 @@ void PuzzleMainWindow::AboutPuzzle() aboutDialog->show(); } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutUnitChanged(int index) +{ + + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutUnitChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(index); + Q_UNUSED(ret); + + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutTemplateChanged(int index) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutTemplateChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(index); + Q_UNUSED(ret); + + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutSizeChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutSizeChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutOrientationChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutOrientationChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutRemoveUnusedLength() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutRemoveUnusedLength"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutMarginChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutMarginChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutFollowGrainlineChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutFollowGrainlineChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutPiecesGapChanged(double value) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutPieceGapChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(value); + Q_UNUSED(ret); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); + +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutStickyEdgesChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutStickyEdgesChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); +} + + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutExport() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutExport"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 73167d585..6eb86aaed 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -28,6 +28,8 @@ #ifndef PUZZLEMAINWINDOW_H #define PUZZLEMAINWINDOW_H +#include "../vmisc/def.h" + #include #include @@ -51,6 +53,11 @@ private: void InitMenuBar(); void InitPropertyTabs(); + void InitPropertyTabCurrentPiece(); + void InitPropertyTabLayout(); + void InitPropertyTabTiles(); + void InitPropertyTabLayers(); + private slots: void New(); @@ -63,6 +70,19 @@ private slots: void AboutQt(); void AboutPuzzle(); + void LayoutUnitChanged(int index); + void LayoutTemplateChanged(int index); + void LayoutSizeChanged(); + void LayoutOrientationChanged(); + void LayoutRemoveUnusedLength(); + void LayoutMarginChanged(); + void LayoutFollowGrainlineChanged(); + void LayoutPiecesGapChanged(double value); + void LayoutWarningPiecesSuperpositionChanged(bool checked); + void LayoutWarningPiecesOutOfBoundChanged(bool checked); + void LayoutStickyEdgesChanged(bool checked); + void LayoutExport(); + }; #endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 30bb49096..f98fe7ec3 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -419,6 +419,9 @@ No + + true + @@ -471,14 +474,14 @@ - + - Wargnin superposition of pieces + Warning superposition of pieces From e35e80a242a9edf379dcef3aad00f1c902078893 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 16:32:49 +0200 Subject: [PATCH 018/321] some comments --- src/app/puzzle/puzzlemainwindow.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index b3d36e74d..e2ee73152 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -144,6 +144,9 @@ void PuzzleMainWindow::InitPropertyTabLayout() connect(ui->checkBoxLayoutStickyEdges, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutStickyEdgesChanged); // -------------------- export --------------------------- + + // TODO init the file format export combobox + connect(ui->pushButtonLayoutExport, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutExport); } @@ -297,6 +300,8 @@ void PuzzleMainWindow::LayoutSizeChanged() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } //--------------------------------------------------------------------------------------------------------------------- @@ -308,6 +313,8 @@ void PuzzleMainWindow::LayoutOrientationChanged() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } //--------------------------------------------------------------------------------------------------------------------- @@ -319,6 +326,8 @@ void PuzzleMainWindow::LayoutRemoveUnusedLength() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } @@ -331,6 +340,8 @@ void PuzzleMainWindow::LayoutMarginChanged() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } @@ -343,6 +354,8 @@ void PuzzleMainWindow::LayoutFollowGrainlineChanged() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } @@ -356,6 +369,8 @@ void PuzzleMainWindow::LayoutPiecesGapChanged(double value) Q_UNUSED(value); Q_UNUSED(ret); + + // TODO } //--------------------------------------------------------------------------------------------------------------------- @@ -368,6 +383,8 @@ void PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged(bool checked) Q_UNUSED(checked); Q_UNUSED(ret); + + // TODO } //--------------------------------------------------------------------------------------------------------------------- @@ -381,6 +398,8 @@ void PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged(bool checked) Q_UNUSED(checked); Q_UNUSED(ret); + // TODO + } //--------------------------------------------------------------------------------------------------------------------- @@ -393,6 +412,10 @@ void PuzzleMainWindow::LayoutStickyEdgesChanged(bool checked) Q_UNUSED(checked); Q_UNUSED(ret); + + + // TODO + } @@ -406,5 +429,8 @@ void PuzzleMainWindow::LayoutExport() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO + } From 1b0b30eb7744f6830cfb9e05eec183f4d74efbbe Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 17:04:44 +0200 Subject: [PATCH 019/321] current piece property, slot and code format --- src/app/puzzle/puzzlemainwindow.cpp | 129 +++++++++++++++++++++++---- src/app/puzzle/puzzlemainwindow.h | 5 ++ src/app/puzzle/puzzlemainwindow.ui | 131 +++++++++++++++++++++++++++- 3 files changed, 245 insertions(+), 20 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index e2ee73152..4fc6ab236 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -91,6 +91,23 @@ void PuzzleMainWindow::InitPropertyTabs() //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::InitPropertyTabCurrentPiece() { + // ------------------------------ seamline ------------------------------------ + connect(ui->checkBoxCurrentPieceShowSeamline, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::CurrentPieceShowSeamlineChanged); + + // ------------------------------ geometry ------------------------------------ + connect(ui->checkBoxCurrentPieceMirrorPiece, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::CurrentPieceMirrorPieceChanged); + + // ------------------------------ rotation ------------------------------------ + connect(ui->doubleSpinBoxCurrentPieceAngle, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::CurrentPieceAngleChanged); + + // ------------------------------ placement ----------------------------------- + connect(ui->doubleSpinBoxCurrentPieceBoxPositionX, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::CurrentPiecePositionChanged); + connect(ui->doubleSpinBoxCurrentPieceBoxPositionY, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::CurrentPiecePositionChanged); } @@ -110,44 +127,63 @@ void PuzzleMainWindow::InitPropertyTabLayout() ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit); } - connect(ui->comboBoxLayoutUnit, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutUnitChanged); + connect(ui->comboBoxLayoutUnit, QOverload::of(&QComboBox::currentIndexChanged), this, + &PuzzleMainWindow::LayoutUnitChanged); // -------------------- init the template combobox --------------------- // TODO - connect(ui->comboBoxLayoutTemplate, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutTemplateChanged); + connect(ui->comboBoxLayoutTemplate, QOverload::of(&QComboBox::currentIndexChanged), this, + &PuzzleMainWindow::LayoutTemplateChanged); // -------------------- layout width, length, orientation ------------------------ - connect(ui->doubleSpinBoxLayoutWidth, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutSizeChanged); - connect(ui->doubleSpinBoxLayoutLength, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutSizeChanged); - connect(ui->radioButtonLayoutPortrait, QOverload::of(&QRadioButton::toggled), this, &PuzzleMainWindow::LayoutOrientationChanged); - connect(ui->radioButtonLayoutLandscape, QOverload::of(&QRadioButton::toggled), this, &PuzzleMainWindow::LayoutOrientationChanged); - connect(ui->pushButtonLayoutRemoveUnusedLength, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutRemoveUnusedLength); + connect(ui->doubleSpinBoxLayoutWidth, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutSizeChanged); + connect(ui->doubleSpinBoxLayoutLength, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutSizeChanged); + connect(ui->radioButtonLayoutPortrait, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutOrientationChanged); + connect(ui->radioButtonLayoutLandscape, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutOrientationChanged); + connect(ui->pushButtonLayoutRemoveUnusedLength, QOverload::of(&QPushButton::clicked), this, + &PuzzleMainWindow::LayoutRemoveUnusedLength); // -------------------- margins ------------------------ - connect(ui->doubleSpinBoxLayoutMarginTop, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); - connect(ui->doubleSpinBoxLayoutMarginRight, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); - connect(ui->doubleSpinBoxLayoutMarginBottom, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); - connect(ui->doubleSpinBoxLayoutMarginLeft, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginTop, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginRight, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginBottom, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginLeft, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutMarginChanged); // ------------------- follow grainline ----------------------- - connect(ui->radioButtonLayoutFollowGrainlineNo, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); - connect(ui->radioButtonLayoutFollowGrainlineVertical, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); - connect(ui->radioButtonLayoutFollowGrainlineHorizontal, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineNo, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineVertical, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineHorizontal, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutFollowGrainlineChanged); // -------------------- pieces gap and checkboxes --------------- - connect(ui->doubleSpinBoxLayoutPiecesGap, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutPiecesGapChanged); - connect(ui->checkBoxLayoutWarningPiecesSuperposition, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged); - connect(ui->checkBoxLayoutWarningPiecesOutOfBound, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged); - connect(ui->checkBoxLayoutStickyEdges, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutStickyEdgesChanged); + connect(ui->doubleSpinBoxLayoutPiecesGap, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutPiecesGapChanged); + connect(ui->checkBoxLayoutWarningPiecesSuperposition, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged); + connect(ui->checkBoxLayoutWarningPiecesOutOfBound, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged); + connect(ui->checkBoxLayoutStickyEdges, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::LayoutStickyEdgesChanged); // -------------------- export --------------------------- // TODO init the file format export combobox - connect(ui->pushButtonLayoutExport, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutExport); + connect(ui->pushButtonLayoutExport, QOverload::of(&QPushButton::clicked), this, + &PuzzleMainWindow::LayoutExport); } //--------------------------------------------------------------------------------------------------------------------- @@ -434,3 +470,58 @@ void PuzzleMainWindow::LayoutExport() } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CurrentPieceShowSeamlineChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CurrentPieceShowSeamlineChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CurrentPieceMirrorPieceChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CurrentPieceMirrorPieceChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CurrentPieceAngleChanged(double value) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CurrentPieceAngleChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(value); + Q_UNUSED(ret); + + // TODO +} + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CurrentPiecePositionChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CurrentPiecePositionChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); + + // TODO +} diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 6eb86aaed..b54bc0abd 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -83,6 +83,11 @@ private slots: void LayoutStickyEdgesChanged(bool checked); void LayoutExport(); + void CurrentPieceShowSeamlineChanged(bool checked); + void CurrentPieceMirrorPieceChanged(bool checked); + void CurrentPieceAngleChanged(double value); + void CurrentPiecePositionChanged(); + }; #endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index f98fe7ec3..e36180443 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -123,6 +123,136 @@ + + + + Infos + + + + + + DummyName + + + true + + + + + + + Name: + + + + + + + + + + Seamline + + + + + + Show Seamline + + + true + + + + + + + + + + Geometry + + + + + + Mirror piece + + + + + + + + + + Rotation + + + + + + Angle: + + + + + + + 360.000000000000000 + + + 0.100000000000000 + + + + + + + + + + Placement + + + + + + X: + + + + + + + 10000.000000000000000 + + + 0.100000000000000 + + + + + + + Y: + + + + + + + 10000.000000000000000 + + + 0.100000000000000 + + + + + + @@ -868,7 +998,6 @@ doubleSpinBoxLayoutMarginLeft doubleSpinBoxLayoutMarginRight doubleSpinBoxLayoutMarginBottom - scrollAreaCurrentPiece scrollAreaLayers scrollAreaTiles From ed6cc7f5d963df80a09a5c9dee54486ea4071577 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 23:34:58 +0200 Subject: [PATCH 020/321] corrections about puzzle dialog --- src/app/puzzle/dialogs/dialogaboutpuzzle.cpp | 2 +- src/app/puzzle/dialogs/dialogaboutpuzzle.ui | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp index f4a19caa9..bb60c9c6f 100644 --- a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp @@ -125,7 +125,7 @@ void DialogAboutPuzzle::FontPointSize(QWidget *w, int pointSize) //--------------------------------------------------------------------------------------------------------------------- void DialogAboutPuzzle::RetranslateUi() { - ui->label_Puzzle_Version->setText(QString("Tape %1").arg(APP_VERSION_STR)); + ui->label_Puzzle_Version->setText(QString("Puzzle %1").arg(APP_VERSION_STR)); ui->labelBuildRevision->setText(tr("Build revision: %1").arg(BUILD_REVISION)); ui->label_QT_Version->setText(buildCompatibilityString()); diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.ui b/src/app/puzzle/dialogs/dialogaboutpuzzle.ui index fdcb86428..9b4344117 100644 --- a/src/app/puzzle/dialogs/dialogaboutpuzzle.ui +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.ui @@ -7,7 +7,7 @@ 0 0 462 - 320 + 338 @@ -23,11 +23,11 @@ - About Tape + About Puzzle - - :/tapeicon/64x64/logo.png:/tapeicon/64x64/logo.png + + :/puzzleicon/64x64/logo.png:/puzzleicon/64x64/logo.png @@ -41,6 +41,9 @@ 9 + + 16 + @@ -261,6 +264,9 @@ + + 0 + @@ -290,7 +296,6 @@ - From e1c945d02c8b24bf30f080e7829ad0480adea7d5 Mon Sep 17 00:00:00 2001 From: vorzelmir Date: Sun, 12 Apr 2020 23:28:36 +0300 Subject: [PATCH 021/321] add VPuzzleCommandLine to Puzzleapplication --- src/app/puzzle/puzzle.pro | 2 +- src/app/puzzle/puzzleapplication.cpp | 51 ++++++++++++++++----------- src/app/puzzle/puzzleapplication.h | 5 ++- src/app/puzzle/vpuzzlecommandline.cpp | 43 ++++++++++++++-------- src/app/puzzle/vpuzzlecommandline.h | 11 ++++++ 5 files changed, 75 insertions(+), 37 deletions(-) diff --git a/src/app/puzzle/puzzle.pro b/src/app/puzzle/puzzle.pro index 818e299dd..7463ba832 100644 --- a/src/app/puzzle/puzzle.pro +++ b/src/app/puzzle/puzzle.pro @@ -7,7 +7,7 @@ # File with common stuff for whole project include(../../../common.pri) -QT += core gui widgets network xml xmlpatterns printsupport testlib +QT += core gui widgets network xml xmlpatterns printsupport # Name of binary file TARGET = puzzle diff --git a/src/app/puzzle/puzzleapplication.cpp b/src/app/puzzle/puzzleapplication.cpp index 9cb624b52..4c41359df 100644 --- a/src/app/puzzle/puzzleapplication.cpp +++ b/src/app/puzzle/puzzleapplication.cpp @@ -387,6 +387,8 @@ void PuzzleApplication::InitOptions() LoadTranslation(QLocale().name());// By default the console version uses system locale + VPuzzleCommandLine::Instance(*this); + static const char * GENERIC_ICON_TO_CHECK = "document-open"; if (QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK) == false) { @@ -442,24 +444,26 @@ void PuzzleApplication::ActivateDarkMode() //--------------------------------------------------------------------------------------------------------------------- void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, const QStringList &arguments) { - QCommandLineParser parser; - parser.setApplicationDescription(tr("Valentina's manual layout editor.")); - parser.addHelpOption(); - parser.addVersionOption(); - parser.addPositionalArgument("filename", tr("The raw layout file.")); - //----- - QCommandLineOption testOption(QStringList() << "test", - tr("Use for unit testing. Run the program and open a file without showing the main window.")); - parser.addOption(testOption); - //----- - QCommandLineOption scalingOption(QStringList() << LONG_OPTION_NO_HDPI_SCALING, - tr("Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). " - "Alternatively you can use the %1 environment variable.").arg("QT_AUTO_SCREEN_SCALE_FACTOR=0")); - parser.addOption(scalingOption); - //----- - parser.process(arguments); + std::shared_ptrcmd = CommandLine(); +// QCommandLineParser parser; +// parser.setApplicationDescription(tr("Valentina's manual layout editor.")); +// parser.addHelpOption(); +// parser.addVersionOption(); +// parser.addPositionalArgument("filename", tr("The raw layout file.")); +// //----- +// QCommandLineOption testOption(QStringList() << "test", +// tr("Use for unit testing. Run the program and open a file without showing the main window.")); +// parser.addOption(testOption); +// //----- +// QCommandLineOption scalingOption(QStringList() << LONG_OPTION_NO_HDPI_SCALING, +// tr("Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). " +// "Alternatively you can use the %1 environment variable.").arg("QT_AUTO_SCREEN_SCALE_FACTOR=0")); +// parser.addOption(scalingOption); +// //----- +// parser.process(arguments); - testMode = parser.isSet(testOption); +// testMode = parser.isSet(testOption); + testMode = cmd->IsTestModeEnabled(); if (not testMode && connection == SocketConnection::Client) { @@ -499,13 +503,14 @@ void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, con LoadTranslation(PuzzleSettings()->GetLocale()); } - const QStringList args = parser.positionalArguments(); +// const QStringList args = parser.positionalArguments(); + const QStringList args = cmd->OptionFileNames(); if (args.count() > 0) { if (testMode && args.count() > 1) { qCCritical(mApp, "%s\n", qPrintable(tr("Test mode doesn't support openning several files."))); - parser.showHelp(V_EX_USAGE); + cmd.get()->parser.showHelp(V_EX_USAGE); } for (auto &arg : args) @@ -531,7 +536,7 @@ void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, con else { qCCritical(mApp, "%s\n", qPrintable(tr("Please, provide one input file."))); - parser.showHelp(V_EX_USAGE); + cmd.get()->parser.showHelp(V_EX_USAGE); } } @@ -634,3 +639,9 @@ void PuzzleApplication::Clean() } } } + +//-------------------------------------------------------------------------------------------- +const std::shared_ptr PuzzleApplication::CommandLine() +{ + return VPuzzleCommandLine::instance; +} diff --git a/src/app/puzzle/puzzleapplication.h b/src/app/puzzle/puzzleapplication.h index 9f2b15760..780ea0617 100644 --- a/src/app/puzzle/puzzleapplication.h +++ b/src/app/puzzle/puzzleapplication.h @@ -31,6 +31,9 @@ #include "../vmisc/def.h" #include "../vmisc/vpuzzlesettings.h" #include "../vmisc/vabstractapplication.h" +#include "vpuzzlecommandline.h" + +#include class PuzzleApplication;// use in define class PuzzleMainWindow; @@ -68,7 +71,7 @@ public: void ActivateDarkMode(); void ParseCommandLine(const SocketConnection &connection, const QStringList &arguments); - + const std::shared_ptr CommandLine(); public slots: void ProcessCMD(); diff --git a/src/app/puzzle/vpuzzlecommandline.cpp b/src/app/puzzle/vpuzzlecommandline.cpp index 1c826e341..4b54e9ad9 100644 --- a/src/app/puzzle/vpuzzlecommandline.cpp +++ b/src/app/puzzle/vpuzzlecommandline.cpp @@ -1,8 +1,8 @@ #include "vpuzzlecommandline.h" #include "../vmisc/commandoptions.h" #include "../vmisc/vsysexits.h" +#include "../vmisc/literals.h" #include -#include std::shared_ptr VPuzzleCommandLine::instance = nullptr; @@ -57,6 +57,12 @@ QStringList VPuzzleCommandLine::OptionFileNames() const return parser.positionalArguments(); } +//------------------------------------------------------------------------------------------- +bool VPuzzleCommandLine::IsNoScalingEnabled() const +{ + return IsOptionSet(LONG_OPTION_NO_HDPI_SCALING); +} + //---------------------------------------------------------------------------------------------- VPuzzleCommandLine::VPuzzleCommandLine(): parser(), @@ -85,23 +91,30 @@ std::shared_ptr VPuzzleCommandLine::Instance(const QCoreAppl //------------------------------------------------------------------------------------------- void VPuzzleCommandLine::InitCommandLineOptions() { - if (IsExportEnabled()) - { - QStringList args = parser.positionalArguments(); - parser.setSingleDashWordOptionMode( - QCommandLineParser::SingleDashWordOptionMode(args.takeFirst().toInt())); - QString source = args.isEmpty() ? QString() : args.at(0); - QString destination = args.isEmpty() ? QString() : args.at(1); - parser.clearPositionalArguments(); - parser.addPositionalArgument(source, - translate("Puzzle", "The raw layout input file.")); - parser.addPositionalArgument(destination, - translate("Puzzle", "The destination folder")); - } + QStringList args = parser.positionalArguments(); + parser.setSingleDashWordOptionMode( + QCommandLineParser::SingleDashWordOptionMode(args.takeFirst().toInt())); + QString source = args.isEmpty() ? QString() : args.at(0); + QString destination = args.isEmpty() ? QString() : args.at(1); + parser.clearPositionalArguments(); + parser.addPositionalArgument(source, + translate("Puzzle", "The raw layout input file.")); + parser.addPositionalArgument(destination, + translate("Puzzle", "The destination folder")); QCommandLineOption forceOption(QStringList() << "f" << "force", translate("Puzzle", "Overwrite existing files.")); - parser.addOption(forceOption); + parser.addOption(forceOption); + + QCommandLineOption testOption(QStringList() << "test", + tr("Use for unit testing. Run the program and open a file without showing the main window.")); + parser.addOption(testOption); + + QCommandLineOption scalingOption(QStringList() << LONG_OPTION_NO_HDPI_SCALING, + tr("Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). " + "Alternatively you can use the %1 environment variable.").arg("QT_AUTO_SCREEN_SCALE_FACTOR=0")); + parser.addOption(scalingOption); + } //-------------------------------------------------------------------------------------------- diff --git a/src/app/puzzle/vpuzzlecommandline.h b/src/app/puzzle/vpuzzlecommandline.h index 2735e6487..d802e3c73 100644 --- a/src/app/puzzle/vpuzzlecommandline.h +++ b/src/app/puzzle/vpuzzlecommandline.h @@ -7,6 +7,7 @@ class VPuzzleCommandLine: public QObject { + friend class PuzzleApplication; Q_OBJECT public: virtual ~VPuzzleCommandLine() = default; @@ -15,24 +16,34 @@ public: * @brief if user enabled export from cmd */ bool IsExportEnabled() const; + /** * @brief the base name of layout file or empty string if not */ QString OptionBaseName() const; + /** * @brief if user enabled test mode from cmd */ bool IsTestModeEnabled() const; + /** * @brief if gui enabled or not */ bool IsGuiEnabled() const; + /** * @brief the file name which should be loaded */ QStringList OptionFileNames() const; + + /** + * @brief if high dpi scaling is enabled + */ + bool IsNoScalingEnabled() const; protected: VPuzzleCommandLine(); + /** * @brief create the single instance of the class inside puzzleapplication */ From aa81fa5ecfb0f5f0dfabc41c5f27959207359218 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Apr 2020 12:43:25 +0300 Subject: [PATCH 022/321] Improve code style. Use typedef. --- src/app/puzzle/puzzleapplication.cpp | 4 ++-- src/app/puzzle/puzzleapplication.h | 2 +- src/app/puzzle/vpuzzlecommandline.cpp | 2 +- src/app/puzzle/vpuzzlecommandline.h | 11 ++++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/puzzle/puzzleapplication.cpp b/src/app/puzzle/puzzleapplication.cpp index 4c41359df..abcbc4f08 100644 --- a/src/app/puzzle/puzzleapplication.cpp +++ b/src/app/puzzle/puzzleapplication.cpp @@ -444,7 +444,7 @@ void PuzzleApplication::ActivateDarkMode() //--------------------------------------------------------------------------------------------------------------------- void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, const QStringList &arguments) { - std::shared_ptrcmd = CommandLine(); + VPuzzleCommandLinePtr cmd = CommandLine(); // QCommandLineParser parser; // parser.setApplicationDescription(tr("Valentina's manual layout editor.")); // parser.addHelpOption(); @@ -641,7 +641,7 @@ void PuzzleApplication::Clean() } //-------------------------------------------------------------------------------------------- -const std::shared_ptr PuzzleApplication::CommandLine() +const VPuzzleCommandLinePtr PuzzleApplication::CommandLine() { return VPuzzleCommandLine::instance; } diff --git a/src/app/puzzle/puzzleapplication.h b/src/app/puzzle/puzzleapplication.h index 780ea0617..73d22c03b 100644 --- a/src/app/puzzle/puzzleapplication.h +++ b/src/app/puzzle/puzzleapplication.h @@ -71,7 +71,7 @@ public: void ActivateDarkMode(); void ParseCommandLine(const SocketConnection &connection, const QStringList &arguments); - const std::shared_ptr CommandLine(); + const VPuzzleCommandLinePtr CommandLine(); public slots: void ProcessCMD(); diff --git a/src/app/puzzle/vpuzzlecommandline.cpp b/src/app/puzzle/vpuzzlecommandline.cpp index 4b54e9ad9..bd34962d6 100644 --- a/src/app/puzzle/vpuzzlecommandline.cpp +++ b/src/app/puzzle/vpuzzlecommandline.cpp @@ -76,7 +76,7 @@ VPuzzleCommandLine::VPuzzleCommandLine(): } //------------------------------------------------------------------------------------------- -std::shared_ptr VPuzzleCommandLine::Instance(const QCoreApplication &app) +VPuzzleCommandLinePtr VPuzzleCommandLine::Instance(const QCoreApplication &app) { if (instance == nullptr) { diff --git a/src/app/puzzle/vpuzzlecommandline.h b/src/app/puzzle/vpuzzlecommandline.h index d802e3c73..737592e89 100644 --- a/src/app/puzzle/vpuzzlecommandline.h +++ b/src/app/puzzle/vpuzzlecommandline.h @@ -5,6 +5,9 @@ #include #include +class VPuzzleCommandLine; +using VPuzzleCommandLinePtr = std::shared_ptr; + class VPuzzleCommandLine: public QObject { friend class PuzzleApplication; @@ -44,13 +47,11 @@ public: protected: VPuzzleCommandLine(); - /** - * @brief create the single instance of the class inside puzzleapplication - */ - static std::shared_ptr Instance(const QCoreApplication &app); + /** @brief create the single instance of the class inside puzzleapplication */ + static VPuzzleCommandLinePtr Instance(const QCoreApplication &app); private: Q_DISABLE_COPY(VPuzzleCommandLine) - static std::shared_ptr instance; + static VPuzzleCommandLinePtr instance; QCommandLineParser parser; bool isGuiEnabled; From eba2ed695c7b0078d706880694def2573cb09d06 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Apr 2020 12:47:19 +0300 Subject: [PATCH 023/321] Better looking comments. --- src/app/puzzle/vpuzzlecommandline.h | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/src/app/puzzle/vpuzzlecommandline.h b/src/app/puzzle/vpuzzlecommandline.h index 737592e89..a7f403e80 100644 --- a/src/app/puzzle/vpuzzlecommandline.h +++ b/src/app/puzzle/vpuzzlecommandline.h @@ -15,34 +15,22 @@ class VPuzzleCommandLine: public QObject public: virtual ~VPuzzleCommandLine() = default; - /** - * @brief if user enabled export from cmd - */ + /** @brief if user enabled export from cmd */ bool IsExportEnabled() const; - /** - * @brief the base name of layout file or empty string if not - */ + /** @brief the base name of layout file or empty string if not */ QString OptionBaseName() const; - /** - * @brief if user enabled test mode from cmd - */ + /** @brief if user enabled test mode from cmd */ bool IsTestModeEnabled() const; - /** - * @brief if gui enabled or not - */ + /** @brief if gui enabled or not */ bool IsGuiEnabled() const; - /** - * @brief the file name which should be loaded - */ + /** @brief the file name which should be loaded */ QStringList OptionFileNames() const; - /** - * @brief if high dpi scaling is enabled - */ + /** @brief if high dpi scaling is enabled */ bool IsNoScalingEnabled() const; protected: VPuzzleCommandLine(); @@ -55,9 +43,7 @@ private: QCommandLineParser parser; bool isGuiEnabled; - /** - * @brief add options to the QCommandLineParser that there are in the cmd can be - */ + /** @brief add options to the QCommandLineParser that there are in the cmd can be */ void InitCommandLineOptions(); bool IsOptionSet(const QString &option)const; From 5e5199f9f6a92f5bc81c64ccac973e0bf30de58b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Apr 2020 12:48:09 +0300 Subject: [PATCH 024/321] Fix crash. Added more keys we will need in future. --- src/app/puzzle/puzzle.pri | 2 + src/app/puzzle/puzzlecommands.cpp | 88 +++++++++++++++++++++++++ src/app/puzzle/puzzlecommands.h | 63 ++++++++++++++++++ src/app/puzzle/vpuzzlecommandline.cpp | 94 ++++++++++++++++++--------- src/app/puzzle/vpuzzlecommandline.h | 9 ++- 5 files changed, 224 insertions(+), 32 deletions(-) create mode 100644 src/app/puzzle/puzzlecommands.cpp create mode 100644 src/app/puzzle/puzzlecommands.h diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri index c8db5a556..7cb2cf959 100644 --- a/src/app/puzzle/puzzle.pri +++ b/src/app/puzzle/puzzle.pri @@ -3,6 +3,7 @@ SOURCES += \ $$PWD/main.cpp \ + $$PWD/puzzlecommands.cpp \ $$PWD/puzzlemainwindow.cpp \ $$PWD/puzzleapplication.cpp \ $$PWD/vpuzzlecommandline.cpp @@ -10,6 +11,7 @@ SOURCES += \ *msvc*:SOURCES += $$PWD/stable.cpp HEADERS += \ + $$PWD/puzzlecommands.h \ $$PWD/puzzlemainwindow.h \ $$PWD/stable.h \ $$PWD/puzzleapplication.h \ diff --git a/src/app/puzzle/puzzlecommands.cpp b/src/app/puzzle/puzzlecommands.cpp new file mode 100644 index 000000000..57134ad2d --- /dev/null +++ b/src/app/puzzle/puzzlecommands.cpp @@ -0,0 +1,88 @@ +/************************************************************************ + ** + ** @file commands.cpp + ** @author Roman Telezhynskyi + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#include "puzzlecommands.h" + +#include + +const QString LONG_OPTION_EXPORT_FILE = QStringLiteral("exportFile"); +const QString SINGLE_OPTION_EXPORT_FILE = QStringLiteral("e"); + +const QString LONG_OPTION_TEST = QStringLiteral("test"); +const QString SINGLE_OPTION_TEST = QStringLiteral("t"); + +const QString LONG_OPTION_RAW_LAYOUT = QStringLiteral("rawLayout"); +const QString SINGLE_OPTION_RAW_LAYOUT = QStringLiteral("r"); + +const QString LONG_OPTION_EXP2FORMAT = QStringLiteral("format"); +const QString SINGLE_OPTION_EXP2FORMAT = QStringLiteral("f"); + +const QString LONG_OPTION_BINARYDXF = QStringLiteral("bdxf"); +const QString LONG_OPTION_TEXT2PATHS = QStringLiteral("text2paths"); + +const QString LONG_OPTION_CROP_LENGTH = QStringLiteral("crop"); +const QString SINGLE_OPTION_CROP_LENGTH = QStringLiteral("c"); + +const QString LONG_OPTION_CROP_WIDTH = QStringLiteral("cropWidth"); + +const QString LONG_OPTION_TILED_PDF_PAGE_TEMPLATE = QStringLiteral("tiledPageformat"); +const QString LONG_OPTION_TILED_PDF_LEFT_MARGIN = QStringLiteral("tiledlmargin"); +const QString LONG_OPTION_TILED_PDF_RIGHT_MARGIN = QStringLiteral("tiledrmargin"); +const QString LONG_OPTION_TILED_PDF_TOP_MARGIN = QStringLiteral("tiledtmargin"); +const QString LONG_OPTION_TILED_PDF_BOTTOM_MARGIN = QStringLiteral("tiledbmargin"); +const QString LONG_OPTION_TILED_PDF_LANDSCAPE = QStringLiteral("tiledLandscape"); + +//--------------------------------------------------------------------------------------------------------------------- +/** + * @brief AllKeys return list with all command line keys (short and long forms). Used for testing on conflicts. + * @return list with all command line keys + */ +QStringList AllKeys() +{ + return QStringList + { + LONG_OPTION_EXPORT_FILE, + SINGLE_OPTION_EXPORT_FILE, + LONG_OPTION_TEST, + SINGLE_OPTION_TEST, + LONG_OPTION_RAW_LAYOUT, + SINGLE_OPTION_RAW_LAYOUT, + LONG_OPTION_EXP2FORMAT, + SINGLE_OPTION_EXP2FORMAT, + LONG_OPTION_BINARYDXF, + LONG_OPTION_TEXT2PATHS, + LONG_OPTION_CROP_LENGTH, + SINGLE_OPTION_CROP_LENGTH, + LONG_OPTION_CROP_WIDTH, + LONG_OPTION_TILED_PDF_PAGE_TEMPLATE, + LONG_OPTION_TILED_PDF_LEFT_MARGIN, + LONG_OPTION_TILED_PDF_RIGHT_MARGIN, + LONG_OPTION_TILED_PDF_TOP_MARGIN, + LONG_OPTION_TILED_PDF_BOTTOM_MARGIN, + LONG_OPTION_TILED_PDF_LANDSCAPE + }; +} diff --git a/src/app/puzzle/puzzlecommands.h b/src/app/puzzle/puzzlecommands.h new file mode 100644 index 000000000..ae362b032 --- /dev/null +++ b/src/app/puzzle/puzzlecommands.h @@ -0,0 +1,63 @@ +/************************************************************************ + ** + ** @file commands.h + ** @author Roman Telezhynskyi + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef COMMANDS_H +#define COMMANDS_H + + +#include + +extern const QString LONG_OPTION_EXPORT_FILE; +extern const QString SINGLE_OPTION_EXPORT_FILE; + +extern const QString LONG_OPTION_TEST; +extern const QString SINGLE_OPTION_TEST; + +extern const QString LONG_OPTION_RAW_LAYOUT; +extern const QString SINGLE_OPTION_RAW_LAYOUT; + +extern const QString LONG_OPTION_EXP2FORMAT; +extern const QString SINGLE_OPTION_EXP2FORMAT; + +extern const QString LONG_OPTION_BINARYDXF; +extern const QString LONG_OPTION_TEXT2PATHS; + +extern const QString LONG_OPTION_CROP_LENGTH; +extern const QString SINGLE_OPTION_CROP_LENGTH; + +extern const QString LONG_OPTION_CROP_WIDTH; + +extern const QString LONG_OPTION_TILED_PDF_PAGE_TEMPLATE; +extern const QString LONG_OPTION_TILED_PDF_LEFT_MARGIN; +extern const QString LONG_OPTION_TILED_PDF_RIGHT_MARGIN; +extern const QString LONG_OPTION_TILED_PDF_TOP_MARGIN; +extern const QString LONG_OPTION_TILED_PDF_BOTTOM_MARGIN; +extern const QString LONG_OPTION_TILED_PDF_LANDSCAPE; + +QStringList AllKeys(); + +#endif // COMMANDS_H diff --git a/src/app/puzzle/vpuzzlecommandline.cpp b/src/app/puzzle/vpuzzlecommandline.cpp index bd34962d6..0242e1356 100644 --- a/src/app/puzzle/vpuzzlecommandline.cpp +++ b/src/app/puzzle/vpuzzlecommandline.cpp @@ -1,5 +1,5 @@ #include "vpuzzlecommandline.h" -#include "../vmisc/commandoptions.h" +#include "puzzlecommands.h" #include "../vmisc/vsysexits.h" #include "../vmisc/literals.h" #include @@ -11,7 +11,7 @@ std::shared_ptr VPuzzleCommandLine::instance = nullptr; //------------------------------------------------------------------------------------------------ bool VPuzzleCommandLine::IsExportEnabled() const { - const bool result = IsOptionSet(QStringLiteral("destination")); + const bool result = IsOptionSet(LONG_OPTION_EXPORT_FILE); int argSize = parser.positionalArguments().size(); if (result && argSize != 1) { @@ -22,21 +22,27 @@ bool VPuzzleCommandLine::IsExportEnabled() const } //---------------------------------------------------------------------------------------------- -QString VPuzzleCommandLine::OptionBaseName() const +QString VPuzzleCommandLine::OptionExportFile() const { QString path; if (IsExportEnabled()) { - path = OptionValue(QStringLiteral("destination")); + path = OptionValue(LONG_OPTION_EXPORT_FILE); } return path; } +//--------------------------------------------------------------------------------------------------------------------- +QStringList VPuzzleCommandLine::OptionRawLayouts() const +{ + return OptionValues(LONG_OPTION_RAW_LAYOUT); +} + //-------------------------------------------------------------------------------------------- bool VPuzzleCommandLine::IsTestModeEnabled() const { - const bool r = IsOptionSet(QStringLiteral("test")); + const bool r = IsOptionSet(LONG_OPTION_TEST); if (r && parser.positionalArguments().size() != 1) { qCritical() << translate("VCommandLine", "Test option can be used with single input file only.") << "/n"; @@ -71,6 +77,7 @@ VPuzzleCommandLine::VPuzzleCommandLine(): parser.setApplicationDescription(translate("Puzzle", "Valentina's manual layout editor.")); parser.addHelpOption(); parser.addVersionOption(); + parser.addPositionalArgument(QStringLiteral("filename"), translate("Puzzle", "The manual layout file.")); InitCommandLineOptions(); } @@ -91,30 +98,59 @@ VPuzzleCommandLinePtr VPuzzleCommandLine::Instance(const QCoreApplication &app) //------------------------------------------------------------------------------------------- void VPuzzleCommandLine::InitCommandLineOptions() { - QStringList args = parser.positionalArguments(); - parser.setSingleDashWordOptionMode( - QCommandLineParser::SingleDashWordOptionMode(args.takeFirst().toInt())); - QString source = args.isEmpty() ? QString() : args.at(0); - QString destination = args.isEmpty() ? QString() : args.at(1); - parser.clearPositionalArguments(); - parser.addPositionalArgument(source, - translate("Puzzle", "The raw layout input file.")); - parser.addPositionalArgument(destination, - translate("Puzzle", "The destination folder")); - - QCommandLineOption forceOption(QStringList() << "f" << "force", - translate("Puzzle", "Overwrite existing files.")); - parser.addOption(forceOption); - - QCommandLineOption testOption(QStringList() << "test", - tr("Use for unit testing. Run the program and open a file without showing the main window.")); - parser.addOption(testOption); - - QCommandLineOption scalingOption(QStringList() << LONG_OPTION_NO_HDPI_SCALING, - tr("Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). " - "Alternatively you can use the %1 environment variable.").arg("QT_AUTO_SCREEN_SCALE_FACTOR=0")); - parser.addOption(scalingOption); - + //keep in mind order here - that is how user will see it, so group-up for usability + //================================================================================================================= + parser.addOptions({ + {{SINGLE_OPTION_EXPORT_FILE, LONG_OPTION_EXPORT_FILE}, + translate("VCommandLine", "The filename of exported layout file. Use it to enable console export mode."), + translate("VCommandLine", "The filename of layout file")}, + {{SINGLE_OPTION_RAW_LAYOUT, LONG_OPTION_RAW_LAYOUT}, + translate("VCommandLine", "Load pattern pieces form the raw layout data file."), + translate("VCommandLine", "The raw layout data file")}, + {{SINGLE_OPTION_EXP2FORMAT, LONG_OPTION_EXP2FORMAT}, + translate("VCommandLine", "Number corresponding to output format (default = 0, export mode): "), + translate("VCommandLine", "Format number"), QChar('0')}, + {LONG_OPTION_BINARYDXF, translate("VCommandLine", "Export dxf in binary form.")}, + {LONG_OPTION_TEXT2PATHS, translate("VCommandLine", "Export text as paths.")}, + //================================================================================================================= + {{SINGLE_OPTION_CROP_LENGTH, LONG_OPTION_CROP_LENGTH}, + translate("VCommandLine", "Auto crop unused length (export mode).")}, + {{LONG_OPTION_CROP_WIDTH}, + translate("VCommandLine", "Auto crop unused width (export mode).")}, + //================================================================================================================= + {LONG_OPTION_TILED_PDF_PAGE_TEMPLATE, + translate("VCommandLine", "Number corresponding to tiled pdf page template (default = 0, export mode with " + "tiled pdf format): "), + translate("VCommandLine", "Template number"), QChar('0')}, + {LONG_OPTION_TILED_PDF_LEFT_MARGIN, + translate("VCommandLine","Tiled page left margin in current units like 3.0 (export mode). If not set will be " + "used default value 1 cm."), + translate("VCommandLine", "The left margin")}, + {LONG_OPTION_TILED_PDF_RIGHT_MARGIN, + translate("VCommandLine", "Tiled page right margin in current units like 3.0 (export mode). If not set will " + "be used default value 1 cm."), + translate("VCommandLine", "The right margin")}, + {LONG_OPTION_TILED_PDF_TOP_MARGIN, + translate("VCommandLine", "Tiled page top margin in current units like 3.0 (export mode). If not set will be " + "used value default value 1 cm."), + translate("VCommandLine", "The top margin")}, + {LONG_OPTION_TILED_PDF_BOTTOM_MARGIN, + translate("VCommandLine", "Tiled page bottom margin in current units like 3.0 (export mode). If not set will " + "be used value default value 1 cm."), + translate("VCommandLine", "The bottom margin")}, + {LONG_OPTION_TILED_PDF_LANDSCAPE, + translate("VCommandLine", "Set tiled page orienatation to landscape (export mode). Default value if not set " + "portrait.")}, + //================================================================================================================= + {{SINGLE_OPTION_TEST, LONG_OPTION_TEST}, + translate("VCommandLine", "Run the program in a test mode. The program in this mode loads a single layout " + "file and silently quit without showing the main window. The key have priority " + "before key '%1'.").arg(LONG_OPTION_EXPORT_FILE)}, + {LONG_OPTION_NO_HDPI_SCALING, + translate("VCommandLine", "Disable high dpi scaling. Call this option if has problem with scaling (by default " + "scaling enabled). Alternatively you can use the %1 environment variable.") + .arg(QStringLiteral("QT_AUTO_SCREEN_SCALE_FACTOR=0"))}, + }); } //-------------------------------------------------------------------------------------------- diff --git a/src/app/puzzle/vpuzzlecommandline.h b/src/app/puzzle/vpuzzlecommandline.h index a7f403e80..52d0e6836 100644 --- a/src/app/puzzle/vpuzzlecommandline.h +++ b/src/app/puzzle/vpuzzlecommandline.h @@ -10,7 +10,6 @@ using VPuzzleCommandLinePtr = std::shared_ptr; class VPuzzleCommandLine: public QObject { - friend class PuzzleApplication; Q_OBJECT public: virtual ~VPuzzleCommandLine() = default; @@ -18,8 +17,11 @@ public: /** @brief if user enabled export from cmd */ bool IsExportEnabled() const; - /** @brief the base name of layout file or empty string if not */ - QString OptionBaseName() const; + /** @brief path to export file or empty string if not */ + QString OptionExportFile() const; + + /** @brief list with paths to the raw layout data files */ + QStringList OptionRawLayouts() const; /** @brief if user enabled test mode from cmd */ bool IsTestModeEnabled() const; @@ -42,6 +44,7 @@ private: static VPuzzleCommandLinePtr instance; QCommandLineParser parser; bool isGuiEnabled; + friend class PuzzleApplication; /** @brief add options to the QCommandLineParser that there are in the cmd can be */ void InitCommandLineOptions(); From 95101b6ac3717b84b0308edfeda2c58aea2a818d Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 12:24:26 +0200 Subject: [PATCH 025/321] Piece carrousel --- src/app/puzzle/puzzlemainwindow.cpp | 51 +- src/app/puzzle/puzzlemainwindow.h | 8 +- src/app/puzzle/puzzlemainwindow.ui | 1705 ++++++++++++++------------- src/app/puzzle/vpiececarrousel.cpp | 128 ++ src/app/puzzle/vpiececarrousel.h | 31 + 5 files changed, 1091 insertions(+), 832 deletions(-) create mode 100644 src/app/puzzle/vpiececarrousel.cpp create mode 100644 src/app/puzzle/vpiececarrousel.h diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 4fc6ab236..84bfc2a66 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -32,20 +32,21 @@ //--------------------------------------------------------------------------------------------------------------------- PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : QMainWindow(parent), - ui(new Ui::PuzzleMainWindow) + ui(new Ui::PuzzleMainWindow), + pieceCarrousel(new VPieceCarrousel) { ui->setupUi(this); InitMenuBar(); - - InitPropertyTabs(); - + InitProperties(); + InitPieceCarrousel(); } //--------------------------------------------------------------------------------------------------------------------- PuzzleMainWindow::~PuzzleMainWindow() { delete ui; + delete pieceCarrousel; } //--------------------------------------------------------------------------------------------------------------------- @@ -58,7 +59,7 @@ bool PuzzleMainWindow::LoadFile(const QString &path) //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::InitMenuBar() { - // connects the actions for the file menu + // -------------------- connects the actions for the file menu connect(ui->actionNew, &QAction::triggered, this, &PuzzleMainWindow::New); connect(ui->actionOpen, &QAction::triggered, this, &PuzzleMainWindow::Open); connect(ui->actionSave, &QAction::triggered, this, &PuzzleMainWindow::Save); @@ -66,13 +67,17 @@ void PuzzleMainWindow::InitMenuBar() connect(ui->actionImportRawLayout, &QAction::triggered, this, &PuzzleMainWindow::ImportRawLayout); connect(ui->actionExit, &QAction::triggered, this, &PuzzleMainWindow::close); - // connects the actions for the edit menu + // -------------------- connects the actions for the edit menu // TODO : initialise the undo / redo - // connects the actions for the windows menu + // -------------------- connects the actions for the windows menu // TODO : initialise the entries for the different windows connect(ui->actionCloseLayout, &QAction::triggered, this, &PuzzleMainWindow::CloseLayout); + // Add dock properties action + QAction* actionDockWidgetToolOptions = ui->dockWidgetProperties->toggleViewAction(); + ui->menuWindows->addAction(actionDockWidgetToolOptions); + // connects the action for the Help Menu connect(ui->actionAboutQt, &QAction::triggered, this, &PuzzleMainWindow::AboutQt); connect(ui->actionAboutPuzzle, &QAction::triggered, this, &PuzzleMainWindow::AboutPuzzle); @@ -80,7 +85,7 @@ void PuzzleMainWindow::InitMenuBar() } //--------------------------------------------------------------------------------------------------------------------- -void PuzzleMainWindow::InitPropertyTabs() +void PuzzleMainWindow::InitProperties() { InitPropertyTabCurrentPiece(); InitPropertyTabLayout(); @@ -202,6 +207,18 @@ void PuzzleMainWindow::InitPropertyTabLayers() ui->tabWidgetProperties->removeTab(3); // remove layers } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPieceCarrousel() +{ + ui->dockWidgetPieceCarrousel->setWidget(pieceCarrousel); + + connect(ui->dockWidgetPieceCarrousel, QOverload::of(&QDockWidget::dockLocationChanged), this, + &PuzzleMainWindow::PieceCarrouselLocationChanged); +} + + + + //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::New() { @@ -525,3 +542,21 @@ void PuzzleMainWindow::CurrentPiecePositionChanged() // TODO } + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::PieceCarrouselLocationChanged(Qt::DockWidgetArea area) +{ + if(area == Qt::BottomDockWidgetArea || area == Qt::TopDockWidgetArea) + { + pieceCarrousel->setOrientation(Qt::Horizontal); + ui->dockWidgetPieceCarrousel->setMaximumHeight(208); + ui->dockWidgetPieceCarrousel->setMaximumWidth(10000); + } + else if (area == Qt::LeftDockWidgetArea || area == Qt::RightDockWidgetArea) + { + pieceCarrousel->setOrientation(Qt::Vertical); + ui->dockWidgetPieceCarrousel->setMaximumHeight(10000); + ui->dockWidgetPieceCarrousel->setMaximumWidth(160); + } +} + diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index b54bc0abd..9d2bdf70e 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -32,6 +32,7 @@ #include #include +#include "vpiececarrousel.h" namespace Ui { class PuzzleMainWindow; @@ -50,14 +51,15 @@ public: private: Q_DISABLE_COPY(PuzzleMainWindow) Ui::PuzzleMainWindow *ui; + VPieceCarrousel *pieceCarrousel; void InitMenuBar(); - void InitPropertyTabs(); + void InitProperties(); void InitPropertyTabCurrentPiece(); void InitPropertyTabLayout(); void InitPropertyTabTiles(); void InitPropertyTabLayers(); - + void InitPieceCarrousel(); private slots: void New(); @@ -88,6 +90,8 @@ private slots: void CurrentPieceAngleChanged(double value); void CurrentPiecePositionChanged(); + void PieceCarrouselLocationChanged(Qt::DockWidgetArea area); + }; #endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index e36180443..7855f9b00 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -20,829 +20,13 @@ Qt::LeftToRight - + QLayout::SetDefaultConstraint - - - - - 0 - 0 - - - - - 360 - 0 - - - - QTabWidget::Rounded - - - 1 - - - - 32 - 32 - - - - - - - - - :/puzzleicon/64x64/iconCurrentPiece.png:/puzzleicon/64x64/iconCurrentPiece.png - - - - - - Current piece properties - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - true - - - - - 0 - 0 - 356 - 779 - - - - - - - font-weight:bold; - - - Current piece - - - Qt::AutoText - - - Qt::AlignCenter - - - - - - - Infos - - - - - - DummyName - - - true - - - - - - - Name: - - - - - - - - - - Seamline - - - - - - Show Seamline - - - true - - - - - - - - - - Geometry - - - - - - Mirror piece - - - - - - - - - - Rotation - - - - - - Angle: - - - - - - - 360.000000000000000 - - - 0.100000000000000 - - - - - - - - - - Placement - - - - - - X: - - - - - - - 10000.000000000000000 - - - 0.100000000000000 - - - - - - - Y: - - - - - - - 10000.000000000000000 - - - 0.100000000000000 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - :/puzzleicon/64x64/iconLayout.png:/puzzleicon/64x64/iconLayout.png - - - - - - Layout properties - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - true - - - - - 0 - 0 - 356 - 779 - - - - - - - font-weight: bold; - - - Layout - - - Qt::AlignCenter - - - - - - - Format - - - - - - - - Unit - - - - - - - - - - Template - - - - - - - - - - Width - - - - - - - - - - - - - Length - - - - - - - Orientation - - - - - - - - - Portrait - - - - - - - :/puzzleicon/64x64/iconPortrait.png:/puzzleicon/64x64/iconPortrait.png - - - - 32 - 32 - - - - true - - - - - - - Landscape - - - - - - - :/puzzleicon/64x64/iconLandscape.png:/puzzleicon/64x64/iconLandscape.png - - - - 32 - 32 - - - - - - - - - - - - Remove unused length - - - - - - - - - - Margins - - - - - - Right: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Top: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 0.100000000000000 - - - - - - - 0.100000000000000 - - - - - - - Left: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - 0.100000000000000 - - - - - - - 0.100000000000000 - - - - - - - Bottom: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Control - - - - - - - - Follow grainline - - - - - - - - - No - - - true - - - - - - - Vertical grainline - - - - - - - :/puzzleicon/64x64/iconGrainlineVertical.png:/puzzleicon/64x64/iconGrainlineVertical.png - - - - 28 - 28 - - - - - - - - Horizontal grainline - - - - - - - :/puzzleicon/64x64/iconGrainlineHorizontal.png:/puzzleicon/64x64/iconGrainlineHorizontal.png - - - - 28 - 28 - - - - - - - - - - Pieces gap - - - - - - - - - - - - Warning superposition of pieces - - - - - - - Warning pieces out of bound - - - - - - - Sticky edges - - - - - - - - - - Export - - - - - - - - Format - - - - - - - - - - - - Export Layout - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - :/puzzleicon/64x64/iconTiles.png:/puzzleicon/64x64/iconTiles.png - - - - - - Tiles properties - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - true - - - - - 0 - 0 - 356 - 779 - - - - - - - font-weight: bold; - - - Tiles - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - :/puzzleicon/64x64/iconLayers.png:/puzzleicon/64x64/iconLayers.png - - - - - - Layers properties - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - true - - - - - 0 - 0 - 356 - 779 - - - - - - - font-weight:bold; - - - Layers - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - @@ -878,6 +62,7 @@ &Windows + @@ -900,15 +85,24 @@ - + + + + 0 + 0 + + 160 - 160 + 208 + + + - QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable + QDockWidget::DockWidgetMovable Qt::AllDockWidgetAreas @@ -919,7 +113,864 @@ 1 - + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 378 + 524287 + + + + QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable + + + Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea + + + Properties + + + 2 + + + + + 4 + + + + + + 0 + 0 + + + + + 360 + 0 + + + + QTabWidget::Rounded + + + 1 + + + + 32 + 32 + + + + + + + + + :/puzzleicon/64x64/iconCurrentPiece.png:/puzzleicon/64x64/iconCurrentPiece.png + + + + + + Current piece properties + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 356 + 760 + + + + + + + font-weight:bold; + + + Current piece + + + Qt::AutoText + + + Qt::AlignCenter + + + + + + + Infos + + + + + + DummyName + + + true + + + + + + + Name: + + + + + + + + + + Seamline + + + + + + Show Seamline + + + true + + + + + + + + + + Geometry + + + + + + Mirror piece + + + + + + + + + + Rotation + + + + + + Angle: + + + + + + + 360.000000000000000 + + + 0.100000000000000 + + + + + + + + + + Placement + + + + + + X: + + + + + + + 10000.000000000000000 + + + 0.100000000000000 + + + + + + + Y: + + + + + + + 10000.000000000000000 + + + 0.100000000000000 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + :/puzzleicon/64x64/iconLayout.png:/puzzleicon/64x64/iconLayout.png + + + + + + Layout properties + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 356 + 760 + + + + + + + font-weight: bold; + + + Layout + + + Qt::AlignCenter + + + + + + + Format + + + + + + + + Unit + + + + + + + + + + Template + + + + + + + + + + Width + + + + + + + + + + + + + Length + + + + + + + Orientation + + + + + + + + + Portrait + + + + + + + :/puzzleicon/64x64/iconPortrait.png:/puzzleicon/64x64/iconPortrait.png + + + + 32 + 32 + + + + true + + + + + + + Landscape + + + + + + + :/puzzleicon/64x64/iconLandscape.png:/puzzleicon/64x64/iconLandscape.png + + + + 32 + 32 + + + + + + + + + + + + Remove unused length + + + + + + + + + + Margins + + + + + + Right: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Top: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 0.100000000000000 + + + + + + + 0.100000000000000 + + + + + + + Left: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 0.100000000000000 + + + + + + + 0.100000000000000 + + + + + + + Bottom: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Control + + + + + + + + Follow grainline + + + + + + + + + No + + + true + + + + + + + Vertical grainline + + + + + + + :/puzzleicon/64x64/iconGrainlineVertical.png:/puzzleicon/64x64/iconGrainlineVertical.png + + + + 28 + 28 + + + + + + + + Horizontal grainline + + + + + + + :/puzzleicon/64x64/iconGrainlineHorizontal.png:/puzzleicon/64x64/iconGrainlineHorizontal.png + + + + 28 + 28 + + + + + + + + + + Pieces gap + + + + + + + + + + + + Warning superposition of pieces + + + + + + + Warning pieces out of bound + + + + + + + Sticky edges + + + + + + + + + + Export + + + + + + + + Format + + + + + + + + + + + + Export Layout + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + :/puzzleicon/64x64/iconTiles.png:/puzzleicon/64x64/iconTiles.png + + + + + + Tiles properties + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 356 + 760 + + + + + + + font-weight: bold; + + + Tiles + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + :/puzzleicon/64x64/iconLayers.png:/puzzleicon/64x64/iconLayers.png + + + + + + Layers properties + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 356 + 760 + + + + + + + font-weight:bold; + + + Layers + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + @@ -988,11 +1039,21 @@ About &Puzzle + + + true + + + true + + + Properties + + graphicsView - tabWidgetProperties scrollAreaLayout doubleSpinBoxLayoutMarginTop doubleSpinBoxLayoutMarginLeft diff --git a/src/app/puzzle/vpiececarrousel.cpp b/src/app/puzzle/vpiececarrousel.cpp new file mode 100644 index 000000000..11e90d577 --- /dev/null +++ b/src/app/puzzle/vpiececarrousel.cpp @@ -0,0 +1,128 @@ +#include "vpiececarrousel.h" +#include +#include +#include + +//--------------------------------------------------------------------------------------------------------------------- +VPieceCarrousel::VPieceCarrousel(QWidget *parent) : + QWidget(parent), + comboBoxLayer(new QComboBox), + mainScrollArea(new QScrollArea(this)), + layers(QList()) +{ + + QVBoxLayout *mainLayout = new QVBoxLayout(); + setLayout(mainLayout); + + setMinimumSize(140,140); + + mainLayout->addWidget(comboBoxLayer); + comboBoxLayer->addItem(tr("Unplaced pieces")); + comboBoxLayer->addItem(tr("Layout")); + comboBoxLayer->setCurrentIndex(0); + connect(comboBoxLayer, QOverload::of(&QComboBox::currentIndexChanged), this, + &VPieceCarrousel::ActiveLayerChanged); + + QWidget *widget = new QWidget(); + QVBoxLayout *mainScrollAreaLayout = new QVBoxLayout(); + mainScrollAreaLayout->setMargin(0); + widget->setLayout(mainScrollAreaLayout); + mainScrollArea->setWidget(widget); + + mainLayout->addWidget(mainScrollArea); +// mainScrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn ); + mainScrollArea->setWidgetResizable( true ); + + + // this code is for test purpuses, it needs to be updated when we have proper data! + + QWidget *unplacedPieces = new QWidget(); + QVBoxLayout *unplacedPiecesLayout = new QVBoxLayout(); + unplacedPiecesLayout->setMargin(0); + unplacedPieces->setLayout(unplacedPiecesLayout); + for(int i=0; i<=10; ++i) + { + QLabel *myLabel = new QLabel(); + myLabel->setText(QString ("Element A.%1").arg(i)); + myLabel->setFixedSize(120,120); + myLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); + if(i%2 ==0) + { + myLabel->setStyleSheet("background-color:white"); + } + else { + myLabel->setStyleSheet("background-color:red"); + } + unplacedPiecesLayout->addWidget(myLabel); + } + mainScrollAreaLayout->addWidget(unplacedPieces); + layers.append(unplacedPieces); + + QWidget *layoutPieces = new QWidget(); + QVBoxLayout *layoutPiecesLayout = new QVBoxLayout(); + layoutPiecesLayout->setMargin(0); + layoutPieces->setLayout(layoutPiecesLayout); + for(int i=0; i<=5; ++i) + { + QLabel *myLabel = new QLabel(); + myLabel->setText(QString ("Element B.%1").arg(i)); + myLabel->setFixedSize(120,120); + myLabel->sizePolicy(); + myLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); + myLabel->setStyleSheet("background-color:cornflowerblue"); + layoutPiecesLayout->addWidget(myLabel); + } + mainScrollAreaLayout->addWidget(layoutPieces); + layers.append(layoutPieces); + + QSpacerItem *spacer = new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Expanding); + mainScrollAreaLayout->addSpacerItem(spacer); + + // -------------------- init the layers combobox --------------------- + ActiveLayerChanged(0); +} + +//--------------------------------------------------------------------------------------------------------------------- +VPieceCarrousel::~VPieceCarrousel() +{ + delete comboBoxLayer; + delete mainScrollArea; +} + + +//--------------------------------------------------------------------------------------------------------------------- +void VPieceCarrousel::ActiveLayerChanged(int index) +{ + int j=0; + for (QWidget *widget: layers) { + widget->setVisible(j == index); + j++; + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPieceCarrousel::setOrientation(Qt::Orientation orientation) +{ + QBoxLayout::Direction direction = QBoxLayout::LeftToRight; + + if(orientation == Qt::Horizontal) + { + comboBoxLayer->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + } + else // Qt::Vertical + { + direction = QBoxLayout::TopToBottom; + comboBoxLayer->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + } + + QBoxLayout* mainScrollAreaLayout = qobject_cast(mainScrollArea->widget()->layout()); + mainScrollAreaLayout->setDirection(direction); + + for (QWidget *widget: layers) { + QBoxLayout* layerLayout = qobject_cast(widget->layout()); + layerLayout->setDirection(direction); + } +} + diff --git a/src/app/puzzle/vpiececarrousel.h b/src/app/puzzle/vpiececarrousel.h new file mode 100644 index 000000000..1de797ad2 --- /dev/null +++ b/src/app/puzzle/vpiececarrousel.h @@ -0,0 +1,31 @@ +#ifndef VPIECECARROUSEL_H +#define VPIECECARROUSEL_H + +#include +#include +#include + +class VPieceCarrousel : public QWidget +{ + Q_OBJECT +public: + explicit VPieceCarrousel(QWidget *parent = nullptr); + virtual ~VPieceCarrousel(); + + void setOrientation(Qt::Orientation orientation); +signals: + +public slots: + +private: + QComboBox *comboBoxLayer; + QScrollArea *mainScrollArea; + QList layers; + +private slots: + void ActiveLayerChanged(int index); + + +}; + +#endif // VPIECECARROUSEL_H From ee98cfb05fd6e60543f54a0b3b93994f71928513 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 12:43:27 +0200 Subject: [PATCH 026/321] Updated class comment --- src/app/puzzle/dialogs/dialogaboutpuzzle.cpp | 2 +- src/app/puzzle/dialogs/dialogaboutpuzzle.h | 2 +- src/app/puzzle/puzzle.pri | 6 +++-- src/app/puzzle/vpiececarrousel.cpp | 27 +++++++++++++++++++ src/app/puzzle/vpiececarrousel.h | 28 ++++++++++++++++++++ 5 files changed, 61 insertions(+), 4 deletions(-) diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp index bb60c9c6f..89328bfab 100644 --- a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp @@ -1,7 +1,7 @@ /************************************************************************ ** ** @file dialogaboutpuzzle.cpp - ** @author Roman Telezhynskyi + ** @author Ronan Le Tiec ** @date 11 4, 2020 ** ** @brief diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.h b/src/app/puzzle/dialogs/dialogaboutpuzzle.h index 0367c5ace..62d0d2498 100644 --- a/src/app/puzzle/dialogs/dialogaboutpuzzle.h +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.h @@ -1,7 +1,7 @@ /************************************************************************ ** ** @file dialogaboutpuzzle.h - ** @author Roman Telezhynskyi + ** @author Ronan Le Tiec ** @date 11 4, 2020 ** ** @brief diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri index a4db72756..c05dc0d69 100644 --- a/src/app/puzzle/puzzle.pri +++ b/src/app/puzzle/puzzle.pri @@ -5,7 +5,8 @@ SOURCES += \ $$PWD/main.cpp \ $$PWD/puzzlemainwindow.cpp \ $$PWD/puzzleapplication.cpp \ - $$PWD/dialogs/dialogaboutpuzzle.cpp + $$PWD/dialogs/dialogaboutpuzzle.cpp \ + $$PWD/vpiececarrousel.cpp *msvc*:SOURCES += $$PWD/stable.cpp @@ -13,7 +14,8 @@ HEADERS += \ $$PWD/puzzlemainwindow.h \ $$PWD/stable.h \ $$PWD/puzzleapplication.h \ - $$PWD/dialogs/dialogaboutpuzzle.h + $$PWD/dialogs/dialogaboutpuzzle.h \ + $$PWD/vpiececarrousel.h FORMS += \ $$PWD/puzzlemainwindow.ui \ diff --git a/src/app/puzzle/vpiececarrousel.cpp b/src/app/puzzle/vpiececarrousel.cpp index 11e90d577..3ef1962f3 100644 --- a/src/app/puzzle/vpiececarrousel.cpp +++ b/src/app/puzzle/vpiececarrousel.cpp @@ -1,3 +1,30 @@ +/************************************************************************ + ** + ** @file vpiececarrousel.cpp + ** @author Ronan Le Tiec + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ #include "vpiececarrousel.h" #include #include diff --git a/src/app/puzzle/vpiececarrousel.h b/src/app/puzzle/vpiececarrousel.h index 1de797ad2..bb6a248f8 100644 --- a/src/app/puzzle/vpiececarrousel.h +++ b/src/app/puzzle/vpiececarrousel.h @@ -1,3 +1,31 @@ +/************************************************************************ + ** + ** @file vpiececarrousel.h + ** @author Ronan Le Tiec + ** @date 13 04, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + #ifndef VPIECECARROUSEL_H #define VPIECECARROUSEL_H From 096f913d33f46be5aec4414499569f16313972e1 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 12:49:33 +0200 Subject: [PATCH 027/321] Corrections of .pro --- Valentina.pro | 2 +- src/app/puzzle/puzzle.pro | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index d78671c57..78c5ed24e 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -55,4 +55,4 @@ TEMPLATE = subdirs SUBDIRS = src RESOURCES += \ - src/app/puzzle/share/resources/tapeicon.qrc + src/app/puzzle/share/resources/puzzleicon.qrc diff --git a/src/app/puzzle/puzzle.pro b/src/app/puzzle/puzzle.pro index 1a471e46a..7463ba832 100644 --- a/src/app/puzzle/puzzle.pro +++ b/src/app/puzzle/puzzle.pro @@ -333,5 +333,3 @@ CONFIG(release, debug|release){ QMAKE_POST_LINK += $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET}.app } } - -FORMS += From e8b119a9598737fe49f7ccdbd992b0657a6a773f Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 12:56:25 +0200 Subject: [PATCH 028/321] Icons in high definition --- .../puzzleicon/64x64/iconCurrentPiece@2x.png | Bin 0 -> 2312 bytes .../64x64/iconGrainlineHorizontal@2x.png | Bin 0 -> 1498 bytes .../64x64/iconGrainlineVertical@2x.png | Bin 0 -> 1516 bytes .../puzzleicon/64x64/iconLandscape@2x.png | Bin 0 -> 1491 bytes .../resources/puzzleicon/64x64/iconLayers@2x.png | Bin 0 -> 1013 bytes .../resources/puzzleicon/64x64/iconLayout@2x.png | Bin 0 -> 872 bytes .../puzzleicon/64x64/iconPortrait@2x.png | Bin 0 -> 1505 bytes .../resources/puzzleicon/64x64/iconTiles@2x.png | Bin 0 -> 1008 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineVertical@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLandscape@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLayout@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconPortrait@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconTiles@2x.png diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c2df932453797a521ced866c2d6273a3bf0cf422 GIT binary patch literal 2312 zcmXw43pmr=A3wj1(QHD*TpA*`+(x=!h6!QzqP%oLMP%;gl2=A=MHf~`Zc9o^nnH+S zQm8~i#f-U>3b_`Q%lp&+`JdKNTCi_S~(eeGsp8Gmci z9}PS&rQLnz`pnR#S99n_gvT)FxyOTd9=}=3XNQxj%G>EV&2~PL4iYM)y-G4}J}Q*^ zdoQG5rZmi#ty8_!vK-lHx!s$oXV5QZ&#W~~2fsdg^sN(GBatP`Ta^<&6`gpXxvDWO zsE&>hVkPQ47%kh8nC<*lK}k1CXdwhC`(DXu5UCfuwskqMOW(#{{>JmIpSjyl+q!2)mq z4t*xoJXo?J)XpOUuHgH1f~+)iV_>03q`i}k$e0ioZER|JSZX^g5w<5=y2bQQC;UkVTIhAn3PU$L=>xwyR|B?E+m)raTlrrgEL%%{k|+DDj^d?O zK0Zw%i%Dq}N#~d*Y;O&E5aHYPjhy;3B5>S%C9L{q{d`rvPaSWbGc+T7V>;>>v2)`0 zDPre5pIE{)+zyat6NI;@Qk(poR>qJ)e3nUD#D=sXI9^@9Y%jfs4 z1twWKTM(($uP2unGThb|yZL6H3=utd6;2Emyoc~m!f~TF#2cMGy}jA|y6D`(!or2J zHB`p^gYy=TNu~zODVZY&4+i%0c(1u!2JY2heVkGJv`2y4;k<-@hx>#_d+ zen(AdLblY!=j~s6?;F+sP_Sg;Jy4a1l|J!b<-V^R0|W1WnV#O+rzVwhy`-eX(PF|@ zcVk4lI`?#eKF`vt{CG-VV?yJXi3y`Mb#rs`I~gYm2o&U?y3$M+P3+kp_y6x%J0Q` z{WYnWX1drvQ}x={^u2;OV#+}^B;R&{zP*F zq<$}s?hYSI&IHoZ(qoa1b25xwGueyJx^CIV&Il4Q0#N{NXpED=(_w=X9eGzEMT9_p zrecw7YkM9ekN~&KQqu4i6tgW^utwR}-gwt8J9qc2DbNO37-kLLfVD}3@_{Ja1_JDH zv#!OI0CXsZG0nN$(Lo93*A}V1Q2`z4H3{OR?VCp@`zi=IaYR!j{4)AX$sG~>T#mL@h-AD7k8K*VuXKp}T}a8s7vVJRRE0VZJt zu9K(mE)*%Px{JrtLBgCtktF6NNQIa#-?12s_a#Z#lIbEeSQnk9urt^n9V*H&FqkwC zTlqy_2W%nUn^2J)e)#8|NQo5kanK5Cz66nP{e|Ni0+&IGxv{bFDAX3JPeNT+i|%$u zY?dbh$Ez9pxovI9Ct+*5CnB_FU7uc%*5~CK$-;Q=2F`H`>gwtQ#xal)t58%_w9c80 z2eoG#*`naojMrbDn+spZFX3E{o&U4}oCh&bOiNs0ZLOy(oSo9|CfYhW*{0F#^|-Ku zEjc>^AF2>YQL&q2bkCkUhtdH|sN7*I)vN(WJ<#&&`$Uj13Dw5LesNzb^{AlbBaSmF z-O^(!dDikKH14%F;5r^3QtamDM)mRv!2$wz>>e1LV|^(16|=FiF;O6anDR}X*n*Lf zqg6q?b531^&=HO(XWaZz?7W|jNy2f)WVmSO%G%YdQl6fk4|TN>MkjP;Y8RjVnBrwy zBs9>$SgmM#E5~ZYwW$SP_|Urv5i#DOq=T0W`~J0eL1gdpXgPF5b+(e}Ql`2QPjvL~ z$j+<`#4Q=@;BF-C%X~jDKKKw=&IiY2Z3Yg2lZnxG1H*CKx_9=xe;+aV!O*Xh71X#& zKnf~;u9*#|TZ*C4ju8`XXIpgAk$vyDIdG8=#bxr{F#D?!middgmrR1mA!wq$H??BmjW{s90rCiT=Yf zAtA;E5>%kYl>#oo(|xC_on09iWuz#;k>GhjkWdo96NLs&5Q5~&fU773Yr(ck21ZaL ze0<%gh6W%(4P*?D6M|$@Pz3&79MhLcOv}nxtZy9+gS+N`U^Rz?(4aLd@eianLU{dJ z!6#|voMm#091ixx6ljr9Oz0128^}TYVeX1b!x0w&|E+fG7OK?$2en%daWNdr6$q4X zQriN+UR&Gw;iq|3k%T7eTalOWA$yF3HJ>QSLd;_NO*rg3>T8I)f(A*17W`Mj%ie}U JW?OkD{Re_E0UH1S literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..10620e97ac23fb6e21e9e86188483c36c2c46583 GIT binary patch literal 1498 zcmaKr`7_%I7{TKB9*ek- z#S)8EbyHN`t&(<~O-hi;rvE@^-sgR1p7)3Mo%zi3z`@Q!045Ft06@UX((F2C5`X9v zH>dX+`VRpB=w1j0<6wos$lz{A1cihJ0st~6AqQ>QYb@FCYh;GHC>SFgNp^UuLWW1a zRXSU4`V#JeSNn^>SEwbAQhk^l+S8NW|7S`@BSnysEW-qSSff?YuA%usucbLq0#D@FQ#)+gz zrJn{>QFu&av5u@uexZBuDcvwKH%}pzSxi_c<2!A1+dJkkD{9c+Xe?8FZrC6)*A0oU zU+Aw6d)epIr*1xtTrQ1rU+wI7ubFW_E@7pvCbu*U;|qH&{Y7kqWsR>&!JYkO?W(S( zKj7a|M6)mtedV8AqrgP<&pD*P2KQ3fJv-QufPhI`m?EhJF@GWojgKY$(%aIV9o~Tl zbCr;kYd+R$lM3u7C8RFKa4{kvh*>GyC5UP)u}9HcL*4>5&Ol^PkHr$4q($4HrlHt~ zt%PDj!2OF-0z^_0d_&=l&jBIUH#UM@5^`_=NwT|LJ+{B?!NI~EU}IqhFaR6CW=^Md zp5yT1EZw6x1ZRH;WQr^za7>ZE(OBHr>lQp@oV;z{|;a1Lch!)A>Z;<&4e#RINC5=sEo}?k;k?FhrWkXKR z!DvFyb@is|+@{Vo+VH-AE#zb5`LV8QbX4JCqF=9C)cU3od-?LlX7j$gjMZcLpH_v) zCurG#j+rjBtz|0XE}SWqAM7)+2-@Vv?(}_VC$^FdS5Dz7EVS(0%6A+X8~|$5S`T8(`GG0U$vFM^QlNu)98f|q*aeN3 zHWDi+j(TqveaqN9q!$6j(WmPwsShLuuF=!CNy%c8&>2_#)sa!>+o@!o*-bavvkXdTl$7578(5R8b9I-8=sSya#IkO zmmr2u#IkV8bFDGxtLu@XZu17>&mS#0Hke#E))Nf^7fexyNZCXl<*w#1Y~fKfqIf3I zcJcAKBniIEs@(-NoRTCSYvlP^Rc(5x5GK?$kc7hB==W-YjDeRYpVJOdG4z2VlW(4` zdwJ}H8Q_ih;Z3U@`EXe1U|^{wcIb literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineVertical@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineVertical@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1493af76fa43b4f452c4e3004d5722b27b8f837b GIT binary patch literal 1516 zcmVEX>4Tx04R}tkv&MmKpe$iKSU`l4t5Z6h)|s@h!t_vDionYs1;guFuC*#nlvOS zE{=k0!NHHks)LKOt`4q(Aou~|}?mh0_0sdx{sb+8jP&LcQ zq>@4|zbf>;B8Uh=NMJ-_ramW%X?TvWd-(Wz7w1{t=l&cKrC>6^ClJpv-LQx^h^IF# zo%23%l$9lg_?&p$pbHW|a$R=$jdRIiKhKOB*~~m~lvpTrvE0S1Y^cOj#4$zHDBquR zS>e3JS*_Mt`=0!T;exiZ%ypW>NMR965FtQD9TikzAx^7Ciir&ECq4W_j$b5~Os)zT zITlcZ3d!+<|H1EW&0=EGO$sN0o)_Ex7zKKFfmXw|zmILZbpiyQfh(=!uQh?0PtqG5 zEp`O-Zvz+C9ZlW?E_Z;zCtWfmM+(sN7mL9A8GTb87`O#OYi@7teVjf3S?Vf%0~{Oz zV!010qNS#tmY z4c7nw4c7reD4Tcy000McNliruIS9G8G;;4RQ$Il|&p zbmbSK@d8+9S;F8rFj^9RJe~q8El;*N1Psp*emw30O_nK}>;^vkBm8(=w^Z3<6Yy#d z;TM2O;EW~94r_qEIffsPJkVw7($5Ou(SL>?j}f5L5~i0Xpl6=p$KxZg!&0V?2H@5L z!;i-x&~8c7#bscsLIM<`HAI_bO$Xh;SOvq6M=#K9d6UgCAXkO(<8hPXLnKKc2Y|0t z48IWFRxViT@kA+v5-@~ zN{u04vr*KZB@`ds77{Q9qD~|=qLQb4^H~6Xi^g~02gT19JO*0QSjaT83OE?;$8*uv z42qxc8;xFL5{|XRn$aVlxfKcb`B2W~-@D;#CpaO^jxCm4L*8vJ(_zIu|3J^%Zb^x&hD1ZWZ z3s8V?uYNl~;4NMOL;+j`DuCfDK$yD#JAhq40SsRO+y*LuawvcjD1ZVeKv3I2Zvl1y z1+W7sK(JT89Y6^b!0;772^7G96~INH0)*B96u|qx0w{q3hyqv>CmUdkR{&7}w}A>E z3Sdo~tO7V$Q2@7r3Sdo~Y#<##+XKgQ011c1DgNJg0OCZM_O=gUh3Us`fyZ<*zN zw?@A|8>7Hf$=6fBfJ)VlZeR>3Bw&mICyk``Tmh!*9R3t=-YDv~hPhp50dBgps4p$R zgF1!ZJHy&T>cDECzsBMB0d1B(Icx@A*C_l!pxu%ukG;U>Du@3u+JZ_#ISPEQQurf4 zrzK84r-6wIhyN4kvb5>pY6Zie1kPI0bg>AyTOk2%xz|r8D}aX!48Mosvj#~iYk_C; z4F4&A9ym#g*#^A(&+wlE>n&Y&*ar;HG5j~cc1xB$x`6yF;eP@4TdM4GF51@36n+jk zW{I**1I0(U<>8M5rz}qxECKG932@D_gheaxBntly>Hd7A%##fiPYaiYT7ch~-6&p8 SLQqWr00003|jxC^ha@VwIT+^~?Qz65k$pgdG-!SLAd*6Har+dylw=^;$2#2x6003~o zR7#X~!~X$|)N-fK-aY`JqYQul$Y6he0xO-F#5kA;fI~%og*Ua6WZf0(OIf$UAj|L& zCz8LOV{+)Rqj4>{!DLsaYnuXl{s+5t&fMYy5=mLt)smAfLIYtjK?OaZdtLXMxK{15 z?k4B`%xzoQqW9u7q)y`fk;Kx8+|<`yS4noh@2I#(a*J+S=$!oSWF*aL8?{k>km!_uRn$;B)8}ub1de*1Y89jS_hfZ0J z^?MyU^Rq){(`1+6V8es$4>kroad=jfL7TnPMY}GgeXd?PHd`!e?$12mN!@D{YPg0J zh&PGeyC&jV;E7WG1$*xme{QVZ*)So-e6wj}38v?LiAEwz8;Fk|3CGwMRhvzy&GmA# zi*|O3?w6&uXX@xy7dc&jabr`_xve8s_zhXQ3MRtrDL#A};hYUi?CEZHL6~8M*-7zd zi~Q|2=C}382hx}e`4@cv?X6=z!rEGA-`d_iN_KW^Hd9m0P%06H5$S@VkBhssu^{6^ zgD5}&LP6-5N9%-E`G!TMWoQ$8`X3;&!v(fhL>&$e4?xZ7;xHciebOhj03e2gDSpxH z@r9|a)VV}!_SITj8@uHuhpS^!6 z$5nzc!9G})y(POo6jt9o>_|JaW5hY_6jLNPI)2ZmW}-hE`Ad#%fozLAhY(z8_hsr* z*22C;I?qmID6Qm<@^=CE&}QoAURVJXj%4K|!ih7-Gy|sPJqf$3+z)Hi`5%?a&h|po z9z?pCCCTmFoTLOL9I<#iKc7%gpssslOG3#{#*iKutXic>Rp>XO?<9b;?f{OONuDu5 z+_r=C4Gb!&c1tox=x?qM(ULTuo11Hn$9u0Uu7N%E2}@2SVntj^3a6=QBL>6W5VTSL z-Eb zx3z5!2?^;y`=ES0VDu2E6^T4dO-&t~oUlPPpvIDPG#QQz4aN5L^(C~7u@pw~a}ecE zy}1MX_s26BrAtdoEX5l6ONR6bs1^fYX=O!=jjg|W)zKOU?JH{+A?3P!h`hYKED#E# z=yW_c4e>3h7NTS!(e(QT{5<92wwM?z?mw^$CL%a2Y4;ymFi*jZd2+q8|;njwQnZ>F0 z$vZjj)_2*)ep7+Ni}}!z`?Y%=3BRTn)1Ln1bYk&j!7hvrir%Q zili(yI0G ewOLxOb6C*}RL>je_j=N`bqB!#5fmXguJ~VnK7>~Q literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..3019f872517b428844176fc2f850fa7741da9270 GIT binary patch literal 1013 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5j~)%+Yvz7foHhGJ(R5fVnyyqJ>wqL>4-&5RED|*!hKfmWhg{USCu8!Grxr zS2cHUUdOktN#O_MqbDzxyiij8r?0uCX$ zUE!3es;xifRNPs>Eo5I5TlTZJ_++B}`5vj8XKV_mL}-+5ymNF-&Wa*lifhBKiNV?P0}GW zbS-NF%MNy|wxL)J;_$D!{+0X8ruLe*_fLQPzzY(3$GGlDwczV5%qKqEtXkz|)UZkC zJd**_9cHl8KS=!eyCPuP)BW>G_Qpm3tma*??)7GORa{ zJ-^+5`Q;bif0wCTWtet)>0JXR0S3>WhFX`JdoN&Mbtj0r42=Q_B!)G(fV;rIU($Br)yK;Y@>=d#Wzp$Pz=A&mq8 literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayout@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayout@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..5691b26a976684ea8ca735b3472a212097ff689f GIT binary patch literal 872 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5j~)%+Yvz7foHhGJ(R5fVnyyqJ>wqL>4-&5RED|*!hKfmWhg{USCu8!Grxr zS2cHUUdOktN#O_MqbDzxyiij8r?0uCX$ zUE!3es;xifRNPs>Eo5I5TlTZJ_++B}`5vj8XKV_mL}-+5ymNF-&WagnPbQgQ3;HOH(&0U~V| z?H9$ojA+qY^gBL4UH8_?9}YgpbKSizEq^j6Q9{p<#Enh zKAZ3N`X>cjnFJV^92htl7!?>;8W`|$@JbSC1~rs5sJvb&f8$t6waE?3Egw0VX1sRY z2=qp<^t(OpkNfXi<+JJd%mrKTPdD?_`!C19|M(fh8isU+X>X)MMdY8^lr!2g0D-5g KpUXO@geCx|tv5md literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconPortrait@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconPortrait@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..95efe95ff96d9a9606db47b3915cc4f529c4c6fa GIT binary patch literal 1505 zcmcIjX;2eZ5PmrbBx=ejcMJ?jKnRCOK$8IB2#CR`v=9^sSkp2pM<9SlAmPv`a*0#{ zIkX2fVh`*C09V83+N70`B zr%Z-=iHT>zaGd7R?uG+3UAwxR{a)b4tCAS6?{qU7Uow^}Kjpm6Y`xLTDH8`o>jY_A zc=?+fghX2e*ZZG5v3kyi^vNeb%IfU4CX|uKT6z}h(fh0~B6(b2Ow0fcWy7yD99c2a zIGoD=PTYF0;NUMDD7=!tp>g8cCVuJm0aJ5_6u2TDW+*YIjluA#JdsU=ixn01RAHDa zTsG$J!Wgw{Q1-{g&vDO_0ppz=7iMM#-D~|gQkj+-l^Xx0GFGXCWdySu`WIy3Dq0XR zK~!I$06`#V$gOQe6+tEhFp^XZO1>(Df-6r`1vQfcX?~iM@HHp`nkdfc1pqb{=<6Ml zHas^X3bN+_;d^;gS^e$hpY(N960KtqwlVNJT_;cARD^wOlTt`M9vqR0oq6hz?WJpt zdVZ0qk;{=J^kayeS;rY1E{*XD9lm&_apCv+7ejKxJH5T}R2F%KRhnoy+Mv7kk5K78 zY1^_Qh)Rmz-k6U4<|e8-#T1^7sMPbCTOiKsXWiq^2 zEEdtmK`Z|-B-_ZVHpH?hps?p{z}4SGedBO9*|4*ra2Em;Zd*SzGP0M+#JW#LFhAqX zQz4%;0T>=0c6WEjmTc8H?f~5Y)$#zmg@u$4OT^C3PSFK9tZEf@5`d154xBzpp-{j> zx!|ZJuMh@iWHMGpM%9xiPo#AP`~tW(8vrhstB=ZI6LQHKWPPuP5TH;hi~FZz4}R{^ zo9O3Jq3zQEkH@cYdZkkA?LGP5yDSY-AyGh%lwu6>{HuOMEdHFlndVk*jVaL7If^9e zdj&W`B&Np37Ug{d0|UCmb*92C>L#B(+u>5Wnnt6El0F#Bw*m?pFxl+W6&2<&&4VAi zIYNnWw;EVmYpVk0<>h(9#}k&Uc7SLEa3YZ+(B80l^Z5>SA&YgavC-k(?7HPP{trAk zU!tC-rKROSeEeCTdDwiN8WtCq-`CfN&3v!{KB4}5Y3a~Qi6o0qUdD@%8bGqmfbjl( ziU+(;SRg#7E=f!*x^?T8^loKm88TA65_<=S<{LM3N28z*A&#R{EwiM&w#8W_arI_0 zd1_{+=3;YqOi^)h@kwRL*2`g$kt`19<6mzy_uM_T8EuBFer%4xxVXA1GURTew?_mM zLdQsGojWX~xwXC&Ysa%o*Q{aB5j?6Qp>Z3P>vi9bfx4QhsVOPc}*5j~)%+Yvz7foHhGJ(R5fVnyyqJ>wqL>4-&5RED|*!hKfmWhg{USCu8!Grxr zS2cHUUdOktN#O_MqbDzxyiij8r?0uCX$ zUE!3es;xifRNPs>Eo5I5TlTZJ_++B}`5vj8XKV_mL}-+5ymNF-&WadRw!T1^uwX#)3!x3)-UMW)M0Vw za})pdH+wlBoZWib!ozE2q53_`-?f(ynCI`l8z%4IrD-;sEpA`f>o>u^pY5(asgzrN z^^`6HqXGj<1A_nqlLG?>10yDf1*c@3ucmR~$DftAKZ|vD9A0?Kc;4B6bu|_>=l;@9=j>y=mCbDDErx$pSp<2=d#Wzp$PyS-G&4J literal 0 HcmV?d00001 From fe281120d5a7ee2a6cffd58f72693bd0bff0c14e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Apr 2020 15:02:55 +0300 Subject: [PATCH 029/321] Remove comments. --- src/app/puzzle/puzzleapplication.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/app/puzzle/puzzleapplication.cpp b/src/app/puzzle/puzzleapplication.cpp index abcbc4f08..b7ca164c9 100644 --- a/src/app/puzzle/puzzleapplication.cpp +++ b/src/app/puzzle/puzzleapplication.cpp @@ -445,24 +445,6 @@ void PuzzleApplication::ActivateDarkMode() void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, const QStringList &arguments) { VPuzzleCommandLinePtr cmd = CommandLine(); -// QCommandLineParser parser; -// parser.setApplicationDescription(tr("Valentina's manual layout editor.")); -// parser.addHelpOption(); -// parser.addVersionOption(); -// parser.addPositionalArgument("filename", tr("The raw layout file.")); -// //----- -// QCommandLineOption testOption(QStringList() << "test", -// tr("Use for unit testing. Run the program and open a file without showing the main window.")); -// parser.addOption(testOption); -// //----- -// QCommandLineOption scalingOption(QStringList() << LONG_OPTION_NO_HDPI_SCALING, -// tr("Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). " -// "Alternatively you can use the %1 environment variable.").arg("QT_AUTO_SCREEN_SCALE_FACTOR=0")); -// parser.addOption(scalingOption); -// //----- -// parser.process(arguments); - -// testMode = parser.isSet(testOption); testMode = cmd->IsTestModeEnabled(); if (not testMode && connection == SocketConnection::Client) @@ -503,7 +485,6 @@ void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, con LoadTranslation(PuzzleSettings()->GetLocale()); } -// const QStringList args = parser.positionalArguments(); const QStringList args = cmd->OptionFileNames(); if (args.count() > 0) { From 53bd9474be03dd7defc4401d3d4557b57f5b0c90 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Apr 2020 15:05:22 +0300 Subject: [PATCH 030/321] Cppcheck warning. --- src/app/puzzle/puzzlemainwindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 84bfc2a66..7d122e9a9 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -126,11 +126,11 @@ void PuzzleMainWindow::InitPropertyTabLayout() ui->comboBoxLayoutUnit->addItem(tr("Inches"), QVariant(UnitsToStr(Unit::Inch))); // set default unit - TODO when we have the setting for the unit - const qint32 indexUnit = -1;//ui->comboBoxLayoutUnit->findData(qApp->ValentinaSettings()->GetUnit()); - if (indexUnit != -1) - { - ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit); - } +// const qint32 indexUnit = -1;//ui->comboBoxLayoutUnit->findData(qApp->ValentinaSettings()->GetUnit()); +// if (indexUnit != -1) +// { +// ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit); +// } connect(ui->comboBoxLayoutUnit, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutUnitChanged); From dd68bd8d5ef94830ddd007643bb97acddd7c1116 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Apr 2020 15:27:52 +0300 Subject: [PATCH 031/321] qOverload was introduced in Qt 5.7. --- src/app/puzzle/vpiececarrousel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/puzzle/vpiececarrousel.cpp b/src/app/puzzle/vpiececarrousel.cpp index 3ef1962f3..02b85c0a1 100644 --- a/src/app/puzzle/vpiececarrousel.cpp +++ b/src/app/puzzle/vpiececarrousel.cpp @@ -30,6 +30,8 @@ #include #include +#include "../vmisc/backport/qoverload.h" + //--------------------------------------------------------------------------------------------------------------------- VPieceCarrousel::VPieceCarrousel(QWidget *parent) : QWidget(parent), From a258d5c7ed273d25ba9f9f96dc86205fa4477c77 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 13 Apr 2020 15:28:06 +0300 Subject: [PATCH 032/321] GCC warnings. --- src/app/puzzle/vpiececarrousel.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/puzzle/vpiececarrousel.h b/src/app/puzzle/vpiececarrousel.h index bb6a248f8..009d5348e 100644 --- a/src/app/puzzle/vpiececarrousel.h +++ b/src/app/puzzle/vpiececarrousel.h @@ -46,14 +46,13 @@ signals: public slots: private: + Q_DISABLE_COPY(VPieceCarrousel) QComboBox *comboBoxLayer; QScrollArea *mainScrollArea; QList layers; private slots: void ActiveLayerChanged(int index); - - }; #endif // VPIECECARROUSEL_H From d93e1ace92073fba39a7a132365fde65f58aa952 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 18:58:16 +0200 Subject: [PATCH 033/321] Add classes for layer,layout and piece --- src/app/puzzle/puzzle.pri | 10 +- src/app/puzzle/vpuzzlelayer.cpp | 33 ++++++ src/app/puzzle/vpuzzlelayer.h | 38 +++++++ src/app/puzzle/vpuzzlelayout.cpp | 188 +++++++++++++++++++++++++++++++ src/app/puzzle/vpuzzlelayout.h | 99 ++++++++++++++++ src/app/puzzle/vpuzzlepiece.cpp | 33 ++++++ src/app/puzzle/vpuzzlepiece.h | 38 +++++++ 7 files changed, 437 insertions(+), 2 deletions(-) create mode 100644 src/app/puzzle/vpuzzlelayer.cpp create mode 100644 src/app/puzzle/vpuzzlelayer.h create mode 100644 src/app/puzzle/vpuzzlelayout.cpp create mode 100644 src/app/puzzle/vpuzzlelayout.h create mode 100644 src/app/puzzle/vpuzzlepiece.cpp create mode 100644 src/app/puzzle/vpuzzlepiece.h diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri index 66396d8cc..6ca67a366 100644 --- a/src/app/puzzle/puzzle.pri +++ b/src/app/puzzle/puzzle.pri @@ -8,7 +8,10 @@ SOURCES += \ $$PWD/puzzleapplication.cpp \ $$PWD/vpuzzlecommandline.cpp \ $$PWD/dialogs/dialogaboutpuzzle.cpp \ - $$PWD/vpiececarrousel.cpp + $$PWD/vpiececarrousel.cpp \ + $$PWD/vpuzzlelayout.cpp \ + $$PWD/vpuzzlelayer.cpp \ + $$PWD/vpuzzlepiece.cpp *msvc*:SOURCES += $$PWD/stable.cpp @@ -19,7 +22,10 @@ HEADERS += \ $$PWD/puzzleapplication.h \ $$PWD/vpuzzlecommandline.h \ $$PWD/dialogs/dialogaboutpuzzle.h \ - $$PWD/vpiececarrousel.h + $$PWD/vpiececarrousel.h \ + $$PWD/vpuzzlelayout.h \ + $$PWD/vpuzzlelayer.h \ + $$PWD/vpuzzlepiece.h FORMS += \ $$PWD/puzzlemainwindow.ui \ diff --git a/src/app/puzzle/vpuzzlelayer.cpp b/src/app/puzzle/vpuzzlelayer.cpp new file mode 100644 index 000000000..f3265cf1b --- /dev/null +++ b/src/app/puzzle/vpuzzlelayer.cpp @@ -0,0 +1,33 @@ +/************************************************************************ + ** + ** @file vpuzzlelayer.cpp + ** @author Ronan Le Tiec + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#include "vpuzzlelayer.h" + +VPuzzleLayer::VPuzzleLayer() +{ + +} diff --git a/src/app/puzzle/vpuzzlelayer.h b/src/app/puzzle/vpuzzlelayer.h new file mode 100644 index 000000000..356cf1f13 --- /dev/null +++ b/src/app/puzzle/vpuzzlelayer.h @@ -0,0 +1,38 @@ +/************************************************************************ + ** + ** @file vpuzzlelayer.h + ** @author Ronan Le Tiec + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef VPUZZLELAYER_H +#define VPUZZLELAYER_H + + +class VPuzzleLayer +{ +public: + VPuzzleLayer(); +}; + +#endif // VPUZZLELAYER_H diff --git a/src/app/puzzle/vpuzzlelayout.cpp b/src/app/puzzle/vpuzzlelayout.cpp new file mode 100644 index 000000000..1d4631c98 --- /dev/null +++ b/src/app/puzzle/vpuzzlelayout.cpp @@ -0,0 +1,188 @@ +/************************************************************************ + ** + ** @file vpuzzlelayout.cpp + ** @author Ronan Le Tiec + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#include "vpuzzlelayout.h" + +//--------------------------------------------------------------------------------------------------------------------- +VPuzzleLayout::VPuzzleLayout() : + m_unplacedPiecesLayer(new VPuzzleLayer()), + m_layers(QList()), + m_layoutSize(QSizeF()), + m_layoutMargins(QMarginsF()), + m_followGrainLine(FollowGrainline::No), + m_piecesGap(0), + m_warningSuperpositionOfPieces(false), + m_warningPiecesOutOfBound(false), + m_stickyEdges(false) +{ + m_piecesGap = 0; +} + +//--------------------------------------------------------------------------------------------------------------------- +VPuzzleLayout::~VPuzzleLayout() +{ + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +VPuzzleLayer* VPuzzleLayout::GetUnplacedPiecesLayer() +{ + return m_unplacedPiecesLayer; +} + +//--------------------------------------------------------------------------------------------------------------------- +VPuzzleLayer* VPuzzleLayout::AddLayer() +{ + VPuzzleLayer *newLayer = new VPuzzleLayer(); + m_layers.append(newLayer); + return newLayer; +} + +//--------------------------------------------------------------------------------------------------------------------- +VPuzzleLayer* VPuzzleLayout::AddLayer(VPuzzleLayer *layer) +{ + m_layers.append(layer); + return layer; +} + +//--------------------------------------------------------------------------------------------------------------------- +QList VPuzzleLayout::GetLayers() +{ + return m_layers; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetUnit(Unit unit) +{ + m_layoutUnit = unit; +} + +//--------------------------------------------------------------------------------------------------------------------- +Unit VPuzzleLayout::getUnit() +{ + return m_layoutUnit; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetLayoutSize(qreal width, qreal height) +{ + m_layoutSize.setWidth(width); + m_layoutSize.setHeight(height); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetLayoutSize(QSizeF size) +{ + m_layoutSize = size; +} + +//--------------------------------------------------------------------------------------------------------------------- +QSizeF VPuzzleLayout::GetLayoutSize() +{ + return m_layoutSize; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetLayoutMargins(qreal left, qreal top, qreal right, qreal bottom) +{ + m_layoutMargins.setLeft(left); + m_layoutMargins.setTop(top); + m_layoutMargins.setRight(right); + m_layoutMargins.setRight(bottom); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetLayoutMargins(QMarginsF margins) +{ + m_layoutMargins = margins; +} + +//--------------------------------------------------------------------------------------------------------------------- +QMarginsF VPuzzleLayout::GetLayoutMargins() +{ + return m_layoutMargins; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetFollowGrainline(FollowGrainline state) +{ + m_followGrainLine = state; +} + +//--------------------------------------------------------------------------------------------------------------------- +FollowGrainline VPuzzleLayout::SetFollowGrainline() +{ + return m_followGrainLine; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetPiecesGap(qreal value) +{ + m_piecesGap = value; +} + +//--------------------------------------------------------------------------------------------------------------------- +qreal VPuzzleLayout::GetPiecesGap() +{ + return m_piecesGap; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetWarningSuperpositionOfPieces(bool state) +{ + m_warningSuperpositionOfPieces = state; +} + +//--------------------------------------------------------------------------------------------------------------------- +bool VPuzzleLayout::GetWarningSuperpositionOfPieces() +{ + return m_warningSuperpositionOfPieces; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetWarningPiecesOutOfBound(bool state) +{ + m_warningPiecesOutOfBound = state; +} + +//--------------------------------------------------------------------------------------------------------------------- +bool VPuzzleLayout::GetWarningPiecesOutOfBound() +{ + return m_warningPiecesOutOfBound; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleLayout::SetStickyEdges(bool state) +{ + m_stickyEdges = state; +} + +//--------------------------------------------------------------------------------------------------------------------- +bool VPuzzleLayout::GetStickyEdges() +{ + return m_stickyEdges; +} diff --git a/src/app/puzzle/vpuzzlelayout.h b/src/app/puzzle/vpuzzlelayout.h new file mode 100644 index 000000000..7c75fa6c8 --- /dev/null +++ b/src/app/puzzle/vpuzzlelayout.h @@ -0,0 +1,99 @@ +/************************************************************************ + ** + ** @file vpuzzlelayout.h + ** @author Ronan Le Tiec + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef VPUZZLELAYOUT_H +#define VPUZZLELAYOUT_H + +#include +#include +#include +#include "vpuzzlelayer.h" +#include "def.h" + +// is this the right place for the definition? +enum class FollowGrainline : qint8 { No = 0, Follow90 = 1, Follow180 = 2}; + +class VPuzzleLayout +{ + +public: + VPuzzleLayout(); + virtual ~VPuzzleLayout(); + + VPuzzleLayer* GetUnplacedPiecesLayer(); + + VPuzzleLayer* AddLayer(); + VPuzzleLayer* AddLayer(VPuzzleLayer *layer); + QList GetLayers(); + + void SetUnit(Unit unit); + Unit getUnit(); + + void SetLayoutSize(qreal width, qreal height); + void SetLayoutSize(QSizeF size); + QSizeF GetLayoutSize(); + + void SetLayoutMargins(qreal left, qreal top, qreal right, qreal bottom); + void SetLayoutMargins(QMarginsF margins); + QMarginsF GetLayoutMargins(); + + void SetFollowGrainline(FollowGrainline state); + FollowGrainline SetFollowGrainline(); + + void SetPiecesGap(qreal value); + qreal GetPiecesGap(); + + void SetWarningSuperpositionOfPieces(bool state); + bool GetWarningSuperpositionOfPieces(); + + void SetWarningPiecesOutOfBound(bool state); + bool GetWarningPiecesOutOfBound(); + + void SetStickyEdges(bool state); + bool GetStickyEdges(); + +private: + VPuzzleLayer *m_unplacedPiecesLayer; + QList m_layers; + + // format + Unit m_layoutUnit; + QSizeF m_layoutSize; + + // margins + QMarginsF m_layoutMargins; + + // control + FollowGrainline m_followGrainLine; + qreal m_piecesGap; + bool m_warningSuperpositionOfPieces; + bool m_warningPiecesOutOfBound; + bool m_stickyEdges; + +}; + +#endif // VPUZZLELAYOUT_H diff --git a/src/app/puzzle/vpuzzlepiece.cpp b/src/app/puzzle/vpuzzlepiece.cpp new file mode 100644 index 000000000..fd5974a65 --- /dev/null +++ b/src/app/puzzle/vpuzzlepiece.cpp @@ -0,0 +1,33 @@ +/************************************************************************ + ** + ** @file vpuzzlepiece.cpp + ** @author Ronan Le Tiec + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#include "vpuzzlepiece.h" + +VPuzzlePiece::VPuzzlePiece() +{ + +} diff --git a/src/app/puzzle/vpuzzlepiece.h b/src/app/puzzle/vpuzzlepiece.h new file mode 100644 index 000000000..177ee0cc1 --- /dev/null +++ b/src/app/puzzle/vpuzzlepiece.h @@ -0,0 +1,38 @@ +/************************************************************************ + ** + ** @file vpuzzlepiece.h + ** @author Ronan Le Tiec + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ +#ifndef VPUZZLEPIECE_H +#define VPUZZLEPIECE_H + + +class VPuzzlePiece +{ +public: + VPuzzlePiece(); +}; + +#endif // VPUZZLEPIECE_H From d12a9c2c0b0ec966104e77c1ca32a56de605a0ec Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 19:03:01 +0200 Subject: [PATCH 034/321] Cpp checks --- src/app/puzzle/vpuzzlelayout.cpp | 1 + src/app/puzzle/vpuzzlelayout.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/app/puzzle/vpuzzlelayout.cpp b/src/app/puzzle/vpuzzlelayout.cpp index 1d4631c98..0d3e4a1ae 100644 --- a/src/app/puzzle/vpuzzlelayout.cpp +++ b/src/app/puzzle/vpuzzlelayout.cpp @@ -31,6 +31,7 @@ VPuzzleLayout::VPuzzleLayout() : m_unplacedPiecesLayer(new VPuzzleLayer()), m_layers(QList()), + m_layoutUnit(Unit::Cm), m_layoutSize(QSizeF()), m_layoutMargins(QMarginsF()), m_followGrainLine(FollowGrainline::No), diff --git a/src/app/puzzle/vpuzzlelayout.h b/src/app/puzzle/vpuzzlelayout.h index 7c75fa6c8..d45ffed52 100644 --- a/src/app/puzzle/vpuzzlelayout.h +++ b/src/app/puzzle/vpuzzlelayout.h @@ -77,6 +77,7 @@ public: bool GetStickyEdges(); private: + Q_DISABLE_COPY(VPuzzleLayout) VPuzzleLayer *m_unplacedPiecesLayer; QList m_layers; From cc3d3e8021171366f854a6b4620bd1f351b900be Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 14 Apr 2020 11:36:21 +0300 Subject: [PATCH 035/321] Redesign command-line interface to support client server architecture. --- src/app/puzzle/puzzleapplication.cpp | 80 ++++++++++++++++----------- src/app/puzzle/puzzleapplication.h | 8 +-- src/app/puzzle/puzzlemainwindow.cpp | 6 ++ src/app/puzzle/puzzlemainwindow.h | 15 +++-- src/app/puzzle/vpuzzlecommandline.cpp | 10 +++- src/app/puzzle/vpuzzlecommandline.h | 3 +- 6 files changed, 77 insertions(+), 45 deletions(-) diff --git a/src/app/puzzle/puzzleapplication.cpp b/src/app/puzzle/puzzleapplication.cpp index b7ca164c9..e88f231d1 100644 --- a/src/app/puzzle/puzzleapplication.cpp +++ b/src/app/puzzle/puzzleapplication.cpp @@ -198,7 +198,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con if (type == QtWarningMsg || type == QtCriticalMsg || type == QtFatalMsg) { - if (not qApp->IsTestMode()) + if (qApp->IsAppInGUIMode()) { if (topWinAllowsPop) { @@ -235,8 +235,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con PuzzleApplication::PuzzleApplication(int &argc, char **argv) :VAbstractApplication(argc, argv), mainWindows(), - localServer(nullptr), - testMode(false) + localServer(nullptr) { setApplicationDisplayName(VER_PRODUCTNAME_STR); setApplicationName(VER_INTERNALNAME_STR); @@ -321,19 +320,13 @@ bool PuzzleApplication::notify(QObject *receiver, QEvent *event) return false; } -//--------------------------------------------------------------------------------------------------------------------- -bool PuzzleApplication::IsTestMode() const -{ - return testMode; -} - //--------------------------------------------------------------------------------------------------------------------- /** * @brief IsAppInGUIMode little hack that allow to have access to application state from VAbstractApplication class. */ bool PuzzleApplication::IsAppInGUIMode() const { - return IsTestMode(); + return CommandLine()->IsGuiEnabled(); } //--------------------------------------------------------------------------------------------------------------------- @@ -342,7 +335,9 @@ PuzzleMainWindow *PuzzleApplication::MainWindow() Clean(); if (mainWindows.isEmpty()) { - NewMainWindow(); + VPuzzleCommandLinePtr cmd; + VPuzzleCommandLine::ProcessInstance(cmd, QStringList()); + NewMainWindow(true); } return mainWindows[0]; } @@ -360,11 +355,11 @@ QList PuzzleApplication::MainWindows() } //--------------------------------------------------------------------------------------------------------------------- -PuzzleMainWindow *PuzzleApplication::NewMainWindow() +PuzzleMainWindow *PuzzleApplication::NewMainWindow(bool guiMode) { PuzzleMainWindow *puzzle = new PuzzleMainWindow(); mainWindows.prepend(puzzle); - if (not qApp->IsTestMode()) + if (guiMode) { puzzle->show(); } @@ -444,10 +439,10 @@ void PuzzleApplication::ActivateDarkMode() //--------------------------------------------------------------------------------------------------------------------- void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, const QStringList &arguments) { - VPuzzleCommandLinePtr cmd = CommandLine(); - testMode = cmd->IsTestModeEnabled(); + VPuzzleCommandLinePtr cmd; + VPuzzleCommandLine::ProcessInstance(cmd, arguments); - if (not testMode && connection == SocketConnection::Client) + if (cmd->IsGuiEnabled() && connection == SocketConnection::Client) { const QString serverName = QCoreApplication::applicationName(); QLocalSocket socket; @@ -456,7 +451,7 @@ void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, con { qCDebug(mApp, "Connected to the server '%s'", qUtf8Printable(serverName)); QTextStream stream(&socket); - stream << QCoreApplication::arguments().join(";;"); + stream << arguments.join(";;"); stream.flush(); socket.waitForBytesWritten(); qApp->exit(V_EX_OK); @@ -485,43 +480,65 @@ void PuzzleApplication::ParseCommandLine(const SocketConnection &connection, con LoadTranslation(PuzzleSettings()->GetLocale()); } + ProcessArguments(cmd); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleApplication::ProcessArguments(const VPuzzleCommandLinePtr &cmd) +{ + const QStringList rawLayouts = cmd->OptionRawLayouts(); const QStringList args = cmd->OptionFileNames(); if (args.count() > 0) { - if (testMode && args.count() > 1) + if (not cmd->IsGuiEnabled() && args.count() > 1) { - qCCritical(mApp, "%s\n", qPrintable(tr("Test mode doesn't support openning several files."))); + qCCritical(mApp, "%s\n", qPrintable(tr("Export mode doesn't support openning several files."))); + cmd.get()->parser.showHelp(V_EX_USAGE); + } + + if (args.count() > 1 && rawLayouts.size() > 0) + { + qCCritical(mApp, "%s\n", + qPrintable(tr("Import raw layout data does not support penning several layout files."))); cmd.get()->parser.showHelp(V_EX_USAGE); } for (auto &arg : args) { - NewMainWindow(); + NewMainWindow(cmd->IsGuiEnabled()); if (not MainWindow()->LoadFile(arg)) { - if (testMode) + if (not cmd->IsGuiEnabled()) { return; // process only one input file } delete MainWindow(); continue; } + +// if (rawLayouts.size() > 0) +// { +// MainWindow()->ImportRawLayouts(rawLayouts); +// } } } else { - if (not testMode) - { - NewMainWindow(); - } - else + if (cmd->IsTestModeEnabled()) { qCCritical(mApp, "%s\n", qPrintable(tr("Please, provide one input file."))); cmd.get()->parser.showHelp(V_EX_USAGE); } + + NewMainWindow(cmd->IsGuiEnabled()); +// if (rawLayouts.size() > 0) +// { +// MainWindow()->New(); // prepare layout settings +// MainWindow()->ImportRawLayouts(rawLayouts); +// } } - if (testMode) + if (cmd->IsGuiEnabled()) { qApp->exit(V_EX_OK); // close program after processing in console mode } @@ -591,19 +608,18 @@ void PuzzleApplication::AboutToQuit() //--------------------------------------------------------------------------------------------------------------------- void PuzzleApplication::NewLocalSocketConnection() { - QLocalSocket *socket = localServer->nextPendingConnection(); - if (not socket) + QScopedPointersocket(localServer->nextPendingConnection()); + if (socket.isNull()) { return; } socket->waitForReadyRead(1000); - QTextStream stream(socket); + QTextStream stream(socket.data()); const QString arg = stream.readAll(); if (not arg.isEmpty()) { ParseCommandLine(SocketConnection::Server, arg.split(";;")); } - delete socket; MainWindow()->raise(); MainWindow()->activateWindow(); } @@ -622,7 +638,7 @@ void PuzzleApplication::Clean() } //-------------------------------------------------------------------------------------------- -const VPuzzleCommandLinePtr PuzzleApplication::CommandLine() +VPuzzleCommandLinePtr PuzzleApplication::CommandLine() const { return VPuzzleCommandLine::instance; } diff --git a/src/app/puzzle/puzzleapplication.h b/src/app/puzzle/puzzleapplication.h index 73d22c03b..c0dcf24ed 100644 --- a/src/app/puzzle/puzzleapplication.h +++ b/src/app/puzzle/puzzleapplication.h @@ -55,15 +55,13 @@ public: virtual bool notify(QObject * receiver, QEvent * event) override; - bool IsTestMode() const; virtual bool IsAppInGUIMode() const override; PuzzleMainWindow *MainWindow(); QList MainWindows(); - PuzzleMainWindow *NewMainWindow(); + PuzzleMainWindow *NewMainWindow(bool guiMode); void InitOptions(); - virtual const VTranslateVars *TrVars() override; virtual void OpenSettings() override; @@ -71,7 +69,8 @@ public: void ActivateDarkMode(); void ParseCommandLine(const SocketConnection &connection, const QStringList &arguments); - const VPuzzleCommandLinePtr CommandLine(); + void ProcessArguments(const VPuzzleCommandLinePtr &cmd); + VPuzzleCommandLinePtr CommandLine() const; public slots: void ProcessCMD(); @@ -89,7 +88,6 @@ private: Q_DISABLE_COPY(PuzzleApplication) QList > mainWindows; QLocalServer *localServer; - bool testMode; void Clean(); }; diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 7d122e9a9..c663a6858 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -56,6 +56,12 @@ bool PuzzleMainWindow::LoadFile(const QString &path) return true; } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::ImportRawLayouts(const QStringList &layouts) +{ + Q_UNUSED(layouts) +} + //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::InitMenuBar() { diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 9d2bdf70e..86f786f2c 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -28,14 +28,15 @@ #ifndef PUZZLEMAINWINDOW_H #define PUZZLEMAINWINDOW_H -#include "../vmisc/def.h" - #include #include + +#include "../vmisc/def.h" #include "vpiececarrousel.h" -namespace Ui { -class PuzzleMainWindow; +namespace Ui +{ + class PuzzleMainWindow; } class PuzzleMainWindow : public QMainWindow @@ -48,6 +49,11 @@ public: bool LoadFile(const QString &path); + void ImportRawLayouts(const QStringList &layouts); + +public slots: + void New(); + private: Q_DISABLE_COPY(PuzzleMainWindow) Ui::PuzzleMainWindow *ui; @@ -62,7 +68,6 @@ private: void InitPieceCarrousel(); private slots: - void New(); void Open(); void Save(); void SaveAs(); diff --git a/src/app/puzzle/vpuzzlecommandline.cpp b/src/app/puzzle/vpuzzlecommandline.cpp index 0242e1356..6221808e2 100644 --- a/src/app/puzzle/vpuzzlecommandline.cpp +++ b/src/app/puzzle/vpuzzlecommandline.cpp @@ -84,15 +84,21 @@ VPuzzleCommandLine::VPuzzleCommandLine(): //------------------------------------------------------------------------------------------- VPuzzleCommandLinePtr VPuzzleCommandLine::Instance(const QCoreApplication &app) +{ + VPuzzleCommandLine::ProcessInstance(instance, app.arguments()); + return instance; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPuzzleCommandLine::ProcessInstance(VPuzzleCommandLinePtr &instance, const QStringList &arguments) { if (instance == nullptr) { instance.reset(new VPuzzleCommandLine); } - instance->parser.process(app); + instance->parser.process(arguments); instance->isGuiEnabled = not (instance->IsGuiEnabled() || instance->IsExportEnabled()); - return instance; } //------------------------------------------------------------------------------------------- diff --git a/src/app/puzzle/vpuzzlecommandline.h b/src/app/puzzle/vpuzzlecommandline.h index 52d0e6836..8eb7edac8 100644 --- a/src/app/puzzle/vpuzzlecommandline.h +++ b/src/app/puzzle/vpuzzlecommandline.h @@ -38,7 +38,8 @@ protected: VPuzzleCommandLine(); /** @brief create the single instance of the class inside puzzleapplication */ - static VPuzzleCommandLinePtr Instance(const QCoreApplication &app); + static VPuzzleCommandLinePtr Instance(const QCoreApplication &app); + static void ProcessInstance(VPuzzleCommandLinePtr &instance, const QStringList &arguments); private: Q_DISABLE_COPY(VPuzzleCommandLine) static VPuzzleCommandLinePtr instance; From 831a1caa41ded871b2e49cf0ce175c1a51ac086e Mon Sep 17 00:00:00 2001 From: vorzelmir Date: Thu, 16 Apr 2020 00:12:07 +0300 Subject: [PATCH 036/321] puzzle man page --- dist/debian/puzzle.1 | 59 +++++++++++++++++++++++++++ dist/debian/tape.1 | 0 dist/debian/valentina.1 | 0 src/app/puzzle/vpuzzlecommandline.cpp | 27 ++++++++++++ src/app/puzzle/vpuzzlecommandline.h | 27 ++++++++++++ 5 files changed, 113 insertions(+) create mode 100644 dist/debian/puzzle.1 mode change 100644 => 100755 dist/debian/tape.1 mode change 100644 => 100755 dist/debian/valentina.1 diff --git a/dist/debian/puzzle.1 b/dist/debian/puzzle.1 new file mode 100644 index 000000000..6a4a386b1 --- /dev/null +++ b/dist/debian/puzzle.1 @@ -0,0 +1,59 @@ +.\" Manpage for puzzle +.\" Contact dismine@gmail.com to correct errors. +.TH tape 1 "23 March, 2020" "puzzle man page" +.SH NAME +Puzzle \- Valentina's manual layout +.SH SYNOPSIS +puzzle [options] file +.SH DESCRIPTION +.B Valentina +Puzzle is the name of the new application to create manual layouts. Similar to "Tape", it is an application that is separated from Valentina and work on it's own, but is a part of the Valentina package and work closely together with Valentina. + +.B Puzzle +is a part of Valentina. And used for creating and editing manual layouts. +.IP "-h, --help" +Displays this help. +.IP "-v, --version" +Displays version information. +.IP "-e, --exportFile " +The filename of exported layout file. Use it to enable console export mode. +.IP "-r, --rawLayout " +Load pattern pieces form the raw layout data file. +.IP "-f, --format " +Number corresponding to tiled pdf page template (default = 0, export mode with tiled pdf format): +.IP "--bdxf" +Export dxf in binary form. +.IP "--text2paths" +Export text as paths. +.IP "-c, --crop" +Auto crop unused length (export mode). +.IP "--cropWidth" +Auto crop unused width (export mode). +.IP "--tiledPageformat