From 908297ef08dd39c82f2d4faeefbe8c14536da1c1 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 24 May 2013 11:31:25 +0200 Subject: [PATCH] removed teacher guide --- Sankore_3.1.pro | 1 - .../teacherGuide/indexingParameters.xml | 218 --- resources/images/duration1.png | Bin 795 -> 0 bytes resources/images/duration2.png | Bin 909 -> 0 bytes resources/images/duration3.png | Bin 1140 -> 0 bytes resources/images/licenses/ccby.png | Bin 4739 -> 0 bytes resources/images/licenses/ccbync.png | Bin 5145 -> 0 bytes resources/images/licenses/ccbyncnd.png | Bin 5281 -> 0 bytes resources/images/licenses/ccbyncsa.png | Bin 5460 -> 0 bytes resources/images/licenses/ccbynd.png | Bin 4880 -> 0 bytes resources/images/licenses/ccbysa.png | Bin 5083 -> 0 bytes resources/images/teacherGuide/audio_24x24.svg | 91 -- resources/images/teacherGuide/flash_24x24.svg | 33 - resources/images/teacherGuide/image_24x24.svg | 81 -- resources/images/teacherGuide/link_24x24.svg | 168 --- resources/images/teacherGuide/movie_24x24.svg | 40 - resources/images/teacherGuide/pencil.svg | 61 - resources/images/teacherGuide/w3c_24x24.svg | 112 -- resources/images/teacher_close.png | Bin 1043 -> 0 bytes resources/images/teacher_close_disabled.png | Bin 1043 -> 0 bytes resources/images/teacher_open.png | Bin 1034 -> 0 bytes resources/images/teacher_open_disabled.png | Bin 1030 -> 0 bytes resources/images/toque.svg | 131 -- resources/sankore.qrc | 21 - src/adaptors/UBImportDocument.cpp | 6 +- src/adaptors/UBMetadataDcSubsetAdaptor.cpp | 50 - src/adaptors/UBSvgSubsetAdaptor.cpp | 92 +- src/adaptors/UBSvgSubsetAdaptor.h | 9 - src/adaptors/UBThumbnailAdaptor.cpp | 24 +- src/adaptors/UBThumbnailAdaptor.h | 1 - src/board/UBBoardController.cpp | 13 +- src/board/UBBoardPaletteManager.cpp | 9 - src/board/UBBoardPaletteManager.h | 4 - src/board/UBBoardView.cpp | 8 +- src/board/UBBoardView.h | 1 - src/core/UBApplicationController.cpp | 4 +- src/core/UBPersistenceManager.cpp | 104 +- src/core/UBPersistenceManager.h | 4 - src/core/UBSettings.cpp | 10 - src/core/UBSettings.h | 11 - src/document/UBDocumentContainer.cpp | 4 - src/document/UBDocumentController.cpp | 10 +- src/document/UBDocumentProxy.cpp | 10 - src/domain/UBGraphicsScene.cpp | 50 - src/domain/UBGraphicsScene.h | 1 - src/gui/UBDockTeacherGuideWidget.cpp | 59 - src/gui/UBDockTeacherGuideWidget.h | 49 - src/gui/UBDocumentNavigator.cpp | 7 +- src/gui/UBTeacherGuideWidget.cpp | 1291 ----------------- src/gui/UBTeacherGuideWidget.h | 252 ---- src/gui/UBTeacherGuideWidgetsTools.cpp | 724 --------- src/gui/UBTeacherGuideWidgetsTools.h | 220 --- src/gui/gui.pri | 6 - src/interfaces/IDataStorage.h | 50 - src/interfaces/interfaces.pri | 2 - 55 files changed, 22 insertions(+), 4020 deletions(-) delete mode 100644 resources/customizations/teacherGuide/indexingParameters.xml delete mode 100644 resources/images/duration1.png delete mode 100644 resources/images/duration2.png delete mode 100644 resources/images/duration3.png delete mode 100644 resources/images/licenses/ccby.png delete mode 100644 resources/images/licenses/ccbync.png delete mode 100644 resources/images/licenses/ccbyncnd.png delete mode 100644 resources/images/licenses/ccbyncsa.png delete mode 100644 resources/images/licenses/ccbynd.png delete mode 100644 resources/images/licenses/ccbysa.png delete mode 100644 resources/images/teacherGuide/audio_24x24.svg delete mode 100644 resources/images/teacherGuide/flash_24x24.svg delete mode 100644 resources/images/teacherGuide/image_24x24.svg delete mode 100644 resources/images/teacherGuide/link_24x24.svg delete mode 100644 resources/images/teacherGuide/movie_24x24.svg delete mode 100644 resources/images/teacherGuide/pencil.svg delete mode 100644 resources/images/teacherGuide/w3c_24x24.svg delete mode 100644 resources/images/teacher_close.png delete mode 100644 resources/images/teacher_close_disabled.png delete mode 100644 resources/images/teacher_open.png delete mode 100644 resources/images/teacher_open_disabled.png delete mode 100644 resources/images/toque.svg delete mode 100644 src/gui/UBDockTeacherGuideWidget.cpp delete mode 100644 src/gui/UBDockTeacherGuideWidget.h delete mode 100644 src/gui/UBTeacherGuideWidget.cpp delete mode 100644 src/gui/UBTeacherGuideWidget.h delete mode 100644 src/gui/UBTeacherGuideWidgetsTools.cpp delete mode 100644 src/gui/UBTeacherGuideWidgetsTools.h delete mode 100644 src/interfaces/IDataStorage.h delete mode 100644 src/interfaces/interfaces.pri diff --git a/Sankore_3.1.pro b/Sankore_3.1.pro index 49dfb0de..772f2e4c 100644 --- a/Sankore_3.1.pro +++ b/Sankore_3.1.pro @@ -49,7 +49,6 @@ include(src/podcast/podcast.pri) include(src/tools/tools.pri) include(src/desktop/desktop.pri) include(src/web/web.pri) -include(src/interfaces/interfaces.pri) include(src/customWidgets/customWidgets.pri) DEPENDPATH += src/pdf-merger diff --git a/resources/customizations/teacherGuide/indexingParameters.xml b/resources/customizations/teacherGuide/indexingParameters.xml deleted file mode 100644 index 2a194515..00000000 --- a/resources/customizations/teacherGuide/indexingParameters.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/images/duration1.png b/resources/images/duration1.png deleted file mode 100644 index 5f1f83557afb6952748ea72cc2aad8364c6e5d55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 795 zcmV+$1LXXPP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iySz z4gm&y8%fjv000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0007ZNklMyqM!teAX(5tn}oHpFk>|`3^U0*?l^NFrwW8{Io~<=ze(l-FfL^G0^;UR zQR}_J){?K+mGAM_(o8z#ON)=*jF|9d#OtCr@p63h_CIj|a+%fwpry9wSUivt|M*|B z`x7I#|6C0~uW=&)iqASaAl1t6*KA+{Sz zd`w!|8ptX0H~>f*J3knj>Al%7^I5?u^EkE8+_gS@TDxL<18^J1)c{GIsn|*V)klw! zqf;O?bv6A8L|ft!&)M8^*pC$e3Fajo`#TygnmmW|OW|VMW&jBguIdZ+umB(_edTu0 zGZ+OL%}d&g8n#W*R^$fZA07 z&|ZJ}FqHpLVy*!I0B=R8k!b)KFREi5K!|AoX&)+Q8o-m+7hoE|ePN`8X#h-r5#j(8 z@;JHp`_ZdoYa`wO4uAvT05|}}<8fC06F>uth&O-(P}u@3Yy)}yc>_S>ju5RaP^Qlt z06A`n(bfXB^mzjy&pkm}TA-DFUH~*e$Yov^0Foi(GtXxL7`Q7;S_|}~ZwLTM5cHZi z48ZLmj2O2Bz>N^hn70JLO%TkQw+z5(5LS$11@PS diff --git a/resources/images/duration2.png b/resources/images/duration2.png deleted file mode 100644 index 37dcb1cacca0c1b080717f93e5119839e10852ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 909 zcmV;819JR{P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iySz z4h9EAUGIee000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0008$NklQnpIUj-{?_-MwA>MI3-mrrQB% zCx4aW9fGo97vs!#U$vzs&H?;kz&9O+vPAOS+b zJN6C>0Fp+(c{=DRj4X}jRlPnHT#Y8DZzcW_k{60uVx|Ni_j909#Et01dz@DP`yYc0dEL)RnFO05I2|Fc8f9 zs~oTWd=4%F4nf%fy$`U9a;hx=+NVLN!eyHqsz4>cS&|i0Fab|Suwjkvw3($Z@;ka1dsqBC~!F+e|X{Et)i&g zmzf9Q`jn2dTYPyh6W256vDAQJOG6}|4x2G=Isv$nK=hFr93Y54G}S8zYL3mB1wq}x jNuw}^;pps0BLUYR6#`p(YMH7l00000NkvXXu0mjfJIsLZ diff --git a/resources/images/duration3.png b/resources/images/duration3.png deleted file mode 100644 index 9c61f7f8d1f509bc18fa4d3e24cb3b32a9c1702e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1140 zcmV-)1dIELP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iySz z4hAL&H2>QG000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000BeNklc35vauMBiD^3r7+J zrXWT7A~cP8rip)o;WQ-2++s1LhAdEUzG!FC3!&|Lb>p13b(?3~-Q)Mw!JcD$KEK~R z_xAw+@*t=E2h{5aRJ7mHt1`pe1&6l1Y%<`J1*k2Iq&yf&Iiv^F>cbA#FTn|j1szR5 zv{dg9HieIxk^4iF-EFQPDJ_62csv4_F?oq;r8hMExXC$}QUc-yPgDT2E7b0gnGX?2 zGQdwNfKKBkF|P6idrop_AjyK~LjavltEHu{!TBnYebHpW^ORz@k77w0!2k;Hf zR|n8B`iKRcJy;*lsS_1y)!8zoz$oN4GYL713p*;Fj>O_WC3am76DAw zumFstJg^90vN8oYAQIp>CO~>Xt->OJ$$I4Vc-@9}c{U5ziy6Lphp<_S9c8T70SX^A zBlhY?G9D2i_lG9ME+CTe*cT#qK52TR-cWH^&25E zPKJ?_U(A~!wL4@MTlJ$cMg2;wX<0iqmWMZp0lsmQ7#}TjG{$v1tnvhV#8UlOERtwH zeEhJx-*uJTUb~!MD`faitEJ`9J(o3Z0RRB7`fk_RT)r=NUCP%95&rI%siEfv=aX1t zIDIL4`?Gd_N`Y4h3Et=<7T#WWRQ_umr$=Hsd$7LJKfNv#_)7ouy3QV~=Q38pWzgc> z?qN$o=FGW^-}T-Ld0D9rU%K+AwyVSSlQ#hX0I)Q-`}_Wt%!!Qi--w8y(&LXX9V%QxCPt(KNlI@KitpKu4z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bQ26iE`?lwYcrNlB z%Gamy+jol4G!2@jL6Rg$k_1r{q3b#mO+SM@Y~H?m?=B78Tq9~%%>4ZFk za=FZ649R2?`Fx(Kw_Gl>w!u087#bQvyWPf%-+vL;N>}l}^>vu$I!w!iXM&Vav&EHv33F;0IO!VCtPI{P4^Vux_qn z-85mDCQNGs;717fJgxzE4glNINv4JojYa_gg+ign_1R5YSy^GTbu=3F0`Y!m(t+dI zV&7amsfhyshdQurcOUK2<%^$cG5=__m(La$VDWA4Vb+xBPWvq&a~*ruwIpO%(iPD)*rQ!s927 zVIqG4-~LWCup1E!HzMS>`u}*c{K+Ty-PIE2tMmOGiUEj^gK5}t1orgsX`FfK3{HIa z1ilf8gk!j#YxUXcD()@b!|j{5`wsRitKg?;9{^KIpCyER@f5{@j41N|0RT*Tpbn^k RjS2t&002ovPDHLkV1k=~?l=Gd diff --git a/resources/images/licenses/ccbync.png b/resources/images/licenses/ccbync.png deleted file mode 100644 index 5f982147075ad08691e3b3c53e92633ca0ddcb2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5145 zcmV+!6z1!RP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7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& zPN$Q_y+|aoU?S5do{o-=MeDToZnqnKeSKJMT8;DX4q|q87PEy}6yyR51zAl76=h`q zmBRtw0j4EwHXCd<8_Z@iL{Vffy;_pya{e-&JK$$Yn$Hr4C3}W145O~D4!%7;M2+d(MPVMnTHaVGDo6|`aO~){ zk*;I}$C5)>wW<#1&z*$f;^Al z3JLiC_k=qSfNkm6TU%hUSO5S%pRZ!Sc~DMb(e@L^p>EtN_wE3;IdNfR6bNtaTT7>U!~{d?K(pQAGOPuEi}N~RJdtsvo^ z&1T8#_39Gt8#isF(f1@uN(t)m^n4!4C2qbb?e+Aa!y&+EG~%%TFkboND=XeI@;&2) zEXx=kj^l~Po~Y$Jf;s(I%Cr%cZH`v>e=(fJ+GzKvhOrb*rG8co5#^=V)1!Lwr4+p! z{ykYNmYUy~#bTl0kswKzQk0Yu^y2Scthw#{NY3 zD8T@*;pX+|_3T0YT1(k(M0vUqI^C*$crrCPiC-TI;M~Bu<$h{(MWLZuNLUUrpA^oL z1Z#GC%k5}uZ^O;sycu6MnM$8d%>@`D!gM~53&{&Oee(3OiT$)Z_-cs3H4*%Ut=u>w nx}M{>e}6&6r?9{v;{G=P#je}ohm3se00000NkvXXu0mjfV@n6v diff --git a/resources/images/licenses/ccbyncsa.png b/resources/images/licenses/ccbyncsa.png deleted file mode 100644 index 0f2a0f10722d3fabffe8af5d5eed09866e25909a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5460 zcmV-a6|3rrP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cn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+I7P{5ZD z9#pNL0&KAOFfRLXF%B#8o}C<=T&pQDqaC{Ppy zp->2Zzkgoc`1m+ol_g0+B9TBUl`?jKHei7gxFxT=q$`ujR9ws~<^}?RdG(e0EF|`} zH9U{@lP9sUww9KS-o8!q&ow+(wSF6ejSsbUXqz{0rVZNK+Nk}><#KeOgbPr26#DQwYBEB#s4%bosxJ6tXo z5{U%-em~V^_k;8KJp6t?`uqFga=CCKbYj^bUrGP=9ouoBwG{_iTj6PLUX^~zVC#kJ zTy>Z&%wl|eoHmF=BJ|;#Hf?eMXVqmgnR#`VSi0(5bs)sH9R`6lrsmzemwU?f6yg{A z@y^?QkYyRNEJGAUh@uEV5TGauCBsUBG3%|LuG^z`N3mhU21L7}kcVUlf`IAiX@_SJ zkH=|@!Rz%R5{Xdu#^Z6?)?Nnyjg5`S=ks{+M=#<+>^vUL&7oMFLs2cFSX7}|aS2_6 zuIV%gU%pfOHij!{u;=!jf1{>m13nx1458nI=(aE%4zKE^tpEuCoPGN&e!6Ej=8AKe zD;A*^izupP09Oe3eA@%=EC70>N6hVZllY(GBy&Ga?qtTudw+Rv)hr-{ zESk5Mtyce1&s;TwEeXF7!qHzGrKb=|au`>yTwV0oexI}tUT+IMYrAsgD$YjFu6~iI zz^=7oZuv7Ro%gMV#mr*+)~(yNpfl2i`X9J$rxEsWBOHFK^^Yf0laqM&d<-MQBWtq? z+dy1v)3DI97JKHJ0c^>xmR;DhcMrC0--hqIT+SG-=~{hNDB$j$ySQ=f#+m{9O)+>W x8^7)VKarISLkQW(FwB3SK(P)R3__Uy4FK>(yR3Yb!O;K!002ovPDHLkV1lxPh(-Va diff --git a/resources/images/teacherGuide/audio_24x24.svg b/resources/images/teacherGuide/audio_24x24.svg deleted file mode 100644 index fc5c2294..00000000 --- a/resources/images/teacherGuide/audio_24x24.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/images/teacherGuide/flash_24x24.svg b/resources/images/teacherGuide/flash_24x24.svg deleted file mode 100644 index 03c15458..00000000 --- a/resources/images/teacherGuide/flash_24x24.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/images/teacherGuide/image_24x24.svg b/resources/images/teacherGuide/image_24x24.svg deleted file mode 100644 index 5b197269..00000000 --- a/resources/images/teacherGuide/image_24x24.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/images/teacherGuide/link_24x24.svg b/resources/images/teacherGuide/link_24x24.svg deleted file mode 100644 index a2c47cd9..00000000 --- a/resources/images/teacherGuide/link_24x24.svg +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/images/teacherGuide/movie_24x24.svg b/resources/images/teacherGuide/movie_24x24.svg deleted file mode 100644 index d22e4470..00000000 --- a/resources/images/teacherGuide/movie_24x24.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/images/teacherGuide/pencil.svg b/resources/images/teacherGuide/pencil.svg deleted file mode 100644 index e7e6a2ce..00000000 --- a/resources/images/teacherGuide/pencil.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/images/teacherGuide/w3c_24x24.svg b/resources/images/teacherGuide/w3c_24x24.svg deleted file mode 100644 index 07a37ac0..00000000 --- a/resources/images/teacherGuide/w3c_24x24.svg +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/images/teacher_close.png b/resources/images/teacher_close.png deleted file mode 100644 index bee2ea0d948eb65c3d538ec6f28c3c00ea3f82d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1043 zcmV+u1nm2XP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipo0 z4G$4n!3pvJ00WarL_t(Y$F-MBPa9Vh$A9hJ!cxG-FCXTFPFovG((fsxMpL@A8+5Pc0!~kTqT6y4ky*X|vq-E8< zzbN52&SZk4tk!BZwzi&NS=RLgMerKDUg6NyCF-u`85T6tMA z5{XbQm&xUFW7EoUY~*se0qybe$)yLT$E{5&m11*qliAtNX*3!bVDS0Uu6I+1q=;`*-hgyEalvv{oo3ab1^#g9DC_ zKQJ>h!{Xu+>2z|4QUe6Q{@cHK{(O(a!$Vx#Mr(=I8jvUnxpY9i)Bmv7^Ef*ChqJRf z`Fx&I>E3`?1MEI~!S2p3t;QKb2$WL&q=MDCfSD}x0>SII!}fgN=j5b+onRp63&dhCdN5EtDwUo1s#v z^5#v2a`p%D!QE26SQ7_B2r2c3WbTq;zXlS!r?GlhsF?$E0U2W*<_fz=?q=h#rOU5 ze$*(XkWyldL5D+E&vLOK$)+W_q>GdRLI{KqgE|>waC;t+NR(o+I8?t23De;kQbH-; zWnsR+q1DE*+ZY2a3rO6j2ok}(&rgUiIURs=!NKa@gY`nyj(=p)4SD23?HG#G>cxwyFW z`$hdU@d}8=Vuz0&ZG541=r_Q-sh~Ljtq`_te^aei@|IQm;U*9Ge*r+ni?u^g;tv1- N002ovPDHLkV1iXi@X`PP diff --git a/resources/images/teacher_close_disabled.png b/resources/images/teacher_close_disabled.png deleted file mode 100644 index 8f3c988c8e240c89fd40ad271e04765365931c10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1043 zcmV+u1nm2XP)Px#24YJ`L;(K){{a7>y{D4^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LkV1g&Y>iPfx diff --git a/resources/images/teacher_open.png b/resources/images/teacher_open.png deleted file mode 100644 index 17469cc79ec9e6aa7f694d92459b597e2e45ecd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1034 zcmV+l1oiugP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipo0 z4G=Y`nB%}=nc6>_{$8t%i1PFmhg;cSobVWD( z1p1?jSi`pLks3C*u&4?Pgq_4~Q^!t8Y{&78?U^|&9Ovd#PU7%MXESHcqxZX>8DWeO zK)|-`#Y&|-U#~ZQaoqt|H4QB6@3%9h(zD;D0gX)BwjD2(p8a$kFaTMpls|FZL7ry-?YBo_D0SP$*0fJgFAIb=|AGeCb|3PQvss zV@?2tm>wv^|LO8|*~BalT$e^;2ha7$WKvhJL#Nm0<;&M>ZfvlqD5X&nk~e)?UGROMot?L|T5TGQw`8*!lF7u8Vhymd`HHo*U#V@q zMhJmY3Q%YTALM8ZOcB_S!9v|Hn%*}ug z{QXL@*U@MT0_tSl2|UlE+qLQU`^O6BlC#{q_XR5}?^CI45cOZ6rN{G%p?x4wT5xt) zJB~vl8E0`JPa-i(Fc>_Y6s;85Od72%I$ITf|Fg}$ZJ{lBN>Q)ZqucG`x*o-1k!&`N zIMHTfh3)wsp@5{{cWAfwahyIdbgk3r(CKvWeM2l3Lu);`4#V1Ex!9xGiqd(0tVk(| zWd#U_BZNXB0)fC`@+JX;7O|j1A|{x*8K>9p<9QxZ%EK~JNGUPKV4c%7V=m9$kj&iB zBx3`#9>z@wft2#7TnxjmNu^V#;&-mXh;E|gfNVO-XPPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipo0 z4HFF9usC)A00V|eL_t(Y$F-I_a~o9{hM#j;-6AEnB}-a4iLFtvNdW~6&M=dLf`SkV z$e$oTD)|MJp`?nb6q*cBFlcQnH(9c=C0W+4q}@Ff@?AEvE%VKsX3sg#yx;Y#05HZV z*L9PQQ@K&EH@@@z0arC)j7je9wiD&@tM4ZP9hh`oH(D;g`uaLx0Mc&>}9DJ9$6+ZR%G;@){1(P)&XPk-dmqi={rB9jA+F*KV^78jRz z^5h3>+nx+~V6NN67{lYo-}2zW@>sPODw`k(4%HTm#mRxk)dKjwe|48H-OEQwm>g!z zF`y8W1BLiMUA`_Go8^J;(`alG_yPHR_Ud)$_4>Sd^N#hkH8wVC2qBo8E3mMzK%rn0 zi^awRjWKlgx~#6Qv%0#*M(xA!kXBfhMXk2M&Q6nBt;X%!bL4V)VzKBb&;Z*zEh?1? ze^(spA8IHi&|0IEMoGxr3TbsA3_~_Iw`jH6G#XpjcAiWoeW+LitgXLgW#w0D@82PW zKq&<%w1SW4L+msRLcyQa(c$5`?*8zdC6mbvfvIGY`MY=U2YuSD7Fq^;a!)Wj1tIX) zTggsGqb-Q2<8>zpf`D$P6;dZ-8=K7)6+zw(UVEhN@3@7Xl>DX@9^6nZFXG?ZOIdgdc7XqZWrGVD3wasb`Ei@ z%|;442m@jfNx$#WZtvoGePHNXr_-U+=@5p7R4RqmdVC$mwZ~$qN3)fr^ZH1UQWDFG z5RWH_#bQJvk^SV214b=UQIB*=Fm-E&UcXNe1V}0O%Sa)m#2ABhM%RqEJbhC#byJf` z4bXZRHz5R4%ENLo47(+%E^4VHh9;BWv8)4}t(N!zZ9ry0@*hb$w4jJRa{Z zFMsiq*47roSuoi{wVz$#x~}awl~}#rnCJ)oU#csMpJ+*`8~^|S07*qoM6N<$f?F)w A_y7O^ diff --git a/resources/images/toque.svg b/resources/images/toque.svg deleted file mode 100644 index 146cddc5..00000000 --- a/resources/images/toque.svg +++ /dev/null @@ -1,131 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/sankore.qrc b/resources/sankore.qrc index b98a501b..c2e99561 100644 --- a/resources/sankore.qrc +++ b/resources/sankore.qrc @@ -339,32 +339,11 @@ images/closeDisabled.svg images/menuDisabled.svg images/moveUpDisabled.svg - images/teacher_close.png - images/teacher_open.png - images/teacher_close_disabled.png style.qss - images/teacher_open_disabled.png images/libpalette/WebSearchCategory.svg images/download_close.png images/download_open.png images/tab_mask.png - images/duration1.png - images/duration2.png - images/duration3.png - images/licenses/ccby.png - images/licenses/ccbync.png - images/licenses/ccbyncnd.png - images/licenses/ccbyncsa.png - images/licenses/ccbynd.png - images/licenses/ccbysa.png - images/teacherGuide/audio_24x24.svg - images/teacherGuide/image_24x24.svg - images/teacherGuide/link_24x24.svg - images/teacherGuide/movie_24x24.svg - images/teacherGuide/w3c_24x24.svg - images/teacherGuide/pencil.svg images/duplicateDisabled.svg - images/teacherGuide/flash_24x24.svg - images/toque.svg diff --git a/src/adaptors/UBImportDocument.cpp b/src/adaptors/UBImportDocument.cpp index f155385d..db88e77c 100644 --- a/src/adaptors/UBImportDocument.cpp +++ b/src/adaptors/UBImportDocument.cpp @@ -179,11 +179,7 @@ UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString& return NULL; } - bool addTitlePage = false; - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() && !QFile(documentRootFolder+"/page000.svg").exists()) - addTitlePage=true; - - UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup, "", false, addTitlePage); + UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup, "", false, false); UBApplication::showMessage(tr("Import successful.")); return newDocument; } diff --git a/src/adaptors/UBMetadataDcSubsetAdaptor.cpp b/src/adaptors/UBMetadataDcSubsetAdaptor.cpp index 676bbca8..8f59fb26 100644 --- a/src/adaptors/UBMetadataDcSubsetAdaptor.cpp +++ b/src/adaptors/UBMetadataDcSubsetAdaptor.cpp @@ -117,15 +117,6 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy) // introduced in UB 4.4 xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "updated-at", UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTimeUtc())); - // introduced in OpenSankore 1.40.00 - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionTitle,proxy->metaData(UBSettings::sessionTitle).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionAuthors,proxy->metaData(UBSettings::sessionAuthors).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionObjectives,proxy->metaData(UBSettings::sessionObjectives).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionKeywords,proxy->metaData(UBSettings::sessionKeywords).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionGradeLevel,proxy->metaData(UBSettings::sessionGradeLevel).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionSubjects,proxy->metaData(UBSettings::sessionSubjects).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionType,proxy->metaData(UBSettings::sessionType).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionLicence,proxy->metaData(UBSettings::sessionLicence).toString()); xmlWriter.writeEndElement(); //dc:Description xmlWriter.writeEndElement(); //RDF @@ -226,47 +217,6 @@ QMap UBMetadataDcSubsetAdaptor::load(QString pPath) metadata.insert(UBSettings::documentUpdatedAt, xml.readElementText()); updatedAtFound = true; } - else if (xml.name() == UBSettings::sessionTitle // introduced in OpenSankore 1.40.00 - && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) - { - metadata.insert(UBSettings::sessionTitle, xml.readElementText()); - } - else if (xml.name() == UBSettings::sessionAuthors // introduced in OpenSankore 1.40.00 - && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) - { - metadata.insert(UBSettings::sessionAuthors, xml.readElementText()); - } - else if (xml.name() == UBSettings::sessionObjectives // introduced in OpenSankore 1.40.00 - && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) - { - metadata.insert(UBSettings::sessionObjectives, xml.readElementText()); - } - else if (xml.name() == UBSettings::sessionKeywords // introduced in OpenSankore 1.40.00 - && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) - { - metadata.insert(UBSettings::sessionKeywords, xml.readElementText()); - } - else if (xml.name() == UBSettings::sessionGradeLevel // introduced in OpenSankore 1.40.00 - && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) - { - metadata.insert(UBSettings::sessionGradeLevel, xml.readElementText()); - } - else if (xml.name() == UBSettings::sessionSubjects // introduced in OpenSankore 1.40.00 - && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) - { - metadata.insert(UBSettings::sessionSubjects, xml.readElementText()); - } - else if (xml.name() == UBSettings::sessionType // introduced in OpenSankore 1.40.00 - && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) - { - metadata.insert(UBSettings::sessionType, xml.readElementText()); - } - else if (xml.name() == UBSettings::sessionLicence // introduced in OpenSankore 1.40.00 - && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) - { - metadata.insert(UBSettings::sessionLicence, xml.readElementText()); - } - metadata.insert(UBSettings::documentVersion, docVersion); } diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index 9af8626b..d2f9afac 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -63,11 +63,6 @@ #include "core/UBPersistenceManager.h" #include "core/UBApplication.h" -#include "gui/UBTeacherGuideWidget.h" -#include "gui/UBDockTeacherGuideWidget.h" - -#include "interfaces/IDataStorage.h" - #include "document/UBDocumentContainer.h" #include "pdf/PDFRenderer.h" @@ -92,8 +87,6 @@ const QString tStrokeGroup = "strokeGroup"; const QString tGroups = "groups"; const QString aId = "id"; -QMap UBSvgSubsetAdaptor::additionalElementToStore; - QString UBSvgSubsetAdaptor::toSvgTransform(const QMatrix& matrix) { return QString("matrix(%1, %2, %3, %4, %5, %6)") @@ -228,17 +221,6 @@ void UBSvgSubsetAdaptor::setSceneUuid(UBDocumentProxy* proxy, const int pageInde } } -bool UBSvgSubsetAdaptor::addElementToBeStored(QString domName, IDataStorage *dataStorageClass) -{ - if(domName.isEmpty() || additionalElementToStore.contains(domName)){ - qWarning() << "Error adding the element that should persist"; - return false; - } - - additionalElementToStore.insert(domName,dataStorageClass); - return true; -} - QString UBSvgSubsetAdaptor::uniboardDocumentNamespaceUriFromVersion(int mFileVersion) { return mFileVersion >= 40200 ? UBSettings::uniboardDocumentNamespaceUri : sFormerUniboardDocumentNamespaceUri; @@ -323,54 +305,6 @@ UBGraphicsScene* UBSvgSubsetAdaptor::loadScene(UBDocumentProxy* proxy, const QBy return reader.loadScene(); } - -QString UBSvgSubsetAdaptor::readTeacherGuideNode(int sceneIndex) -{ - QString result; - - QString fileName = UBApplication::boardController->selectedDocument()->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sceneIndex); - QFile file(fileName); - file.open(QIODevice::ReadOnly); - QByteArray fileByteArray=file.readAll(); - file.close(); - QXmlStreamReader mXmlReader(fileByteArray); - - while (!mXmlReader.atEnd()) - { - mXmlReader.readNext(); - if (mXmlReader.isStartElement()) - { - if (mXmlReader.name() == "teacherBar" || mXmlReader.name() == "teacherGuide"){ - result.clear(); - result += ""; - result += "\n"; - } - else if (mXmlReader.name() == "media" || mXmlReader.name() == "link" || mXmlReader.name() == "title" || mXmlReader.name() == "comment" || mXmlReader.name() == "action") - { - result += "<" + mXmlReader.name().toString() + " "; - foreach(QXmlStreamAttribute attribute, mXmlReader.attributes()) - result += attribute.name().toString() + "=\"" + attribute.value().toString() + "\" "; - result += " />\n"; - } - else - { - // NOOP - } - } - else if (mXmlReader.isEndElement() && (mXmlReader.name() == "teacherBar" || mXmlReader.name() == "teacherGuide")){ - result += ""; - } - } - - if (mXmlReader.hasError()) - { - qWarning() << "error parsing Sankore file " << mXmlReader.errorString(); - } - - return result; -} - - UBSvgSubsetAdaptor::UBSvgSubsetReader::UBSvgSubsetReader(UBDocumentProxy* pProxy, const QByteArray& pXmlData) : mXmlReader(pXmlData) , mProxy(pProxy) @@ -1070,7 +1004,8 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::writeSvgElement() bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) { - if (mScene->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified())) + Q_UNUSED(pageIndex); + if (mScene->isModified()) { //Creating dom structure to store information @@ -1347,29 +1282,6 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) openStroke = 0; } - QMap elements = getAdditionalElementToStore(); - QVector dataStorageItems; - - if(elements.value("teacherGuide")) - dataStorageItems = elements.value("teacherGuide")->save(pageIndex); - foreach(tIDataStorage* eachItem, dataStorageItems){ - if(eachItem->type == eElementType_START){ - mXmlWriter.writeStartElement(eachItem->name); - foreach(QString key,eachItem->attributes.keys()) - mXmlWriter.writeAttribute(key,eachItem->attributes.value(key)); - } - else if (eachItem->type == eElementType_END) - mXmlWriter.writeEndElement(); - else if (eachItem->type == eElementType_UNIQUE){ - mXmlWriter.writeStartElement(eachItem->name); - foreach(QString key,eachItem->attributes.keys()) - mXmlWriter.writeAttribute(key,eachItem->attributes.value(key)); - mXmlWriter.writeEndElement(); - } - else - qWarning() << "unknown type"; - } - //writing group data if (groupRoot.hasChildNodes()) { mXmlWriter.writeStartElement(tGroups); diff --git a/src/adaptors/UBSvgSubsetAdaptor.h b/src/adaptors/UBSvgSubsetAdaptor.h index cd241d7e..bff53db9 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.h +++ b/src/adaptors/UBSvgSubsetAdaptor.h @@ -48,7 +48,6 @@ class UBGraphicsStroke; class UBPersistenceManager; class UBGraphicsTriangle; class UBGraphicsCache; -class IDataStorage; class UBGraphicsGroupContainerItem; class UBGraphicsStrokesGroup; @@ -68,13 +67,9 @@ class UBSvgSubsetAdaptor static QUuid sceneUuid(UBDocumentProxy* proxy, const int pageIndex); static void setSceneUuid(UBDocumentProxy* proxy, const int pageIndex, QUuid pUuid); - static bool addElementToBeStored(QString domName,IDataStorage* dataStorageClass); - static void convertPDFObjectsToImages(UBDocumentProxy* proxy); static void convertSvgImagesToImages(UBDocumentProxy* proxy); - static QMap getAdditionalElementToStore() { return additionalElementToStore;} - static const QString nsSvg; static const QString nsXLink; static const QString nsXHtml; @@ -101,10 +96,6 @@ class UBSvgSubsetAdaptor static QString toSvgTransform(const QMatrix& matrix); static QMatrix fromSvgTransform(const QString& transform); - static QMap additionalElementToStore; - - - class UBSvgSubsetReader { diff --git a/src/adaptors/UBThumbnailAdaptor.cpp b/src/adaptors/UBThumbnailAdaptor.cpp index 97c53852..a3b83791 100644 --- a/src/adaptors/UBThumbnailAdaptor.cpp +++ b/src/adaptors/UBThumbnailAdaptor.cpp @@ -31,10 +31,6 @@ #include "core/UBApplication.h" #include "core/UBSettings.h" - -#include "gui/UBDockTeacherGuideWidget.h" -#include "gui/UBTeacherGuideWidget.h" - #include "board/UBBoardController.h" #include "board/UBBoardPaletteManager.h" @@ -104,20 +100,8 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex) return pix; } -void UBThumbnailAdaptor::updateDocumentToHandleZeroPage(UBDocumentProxy* proxy) -{ - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){ - QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", 0); - QFile file(fileName); - if(!file.exists()){ - UBPersistenceManager::persistenceManager()->persistDocumentScene(proxy,new UBGraphicsScene(proxy),0); - } - } -} - void UBThumbnailAdaptor::load(UBDocumentProxy* proxy, QList& list) { - updateDocumentToHandleZeroPage(proxy); generateMissingThumbnails(proxy); foreach(const QPixmap* pm, list){ @@ -135,7 +119,7 @@ void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* p QFile thumbFile(fileName); - if (pScene->isModified() || overrideModified || !thumbFile.exists() || UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()) + if (pScene->isModified() || overrideModified || !thumbFile.exists()) { qreal nominalWidth = pScene->nominalSize().width(); qreal nominalHeight = pScene->nominalSize().height(); @@ -167,12 +151,6 @@ void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* p pScene->render(&painter, imageRect, sceneRect, Qt::KeepAspectRatio); - if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()){ - QPixmap toque(":images/toque.svg"); - painter.setOpacity(0.6); - painter.drawPixmap(QPoint(width - toque.width(),0),toque); - } - pScene->setRenderingContext(UBGraphicsScene::Screen); pScene->setRenderingQuality(UBItem::RenderingQualityNormal); diff --git a/src/adaptors/UBThumbnailAdaptor.h b/src/adaptors/UBThumbnailAdaptor.h index 88c39bf7..92e03f13 100644 --- a/src/adaptors/UBThumbnailAdaptor.h +++ b/src/adaptors/UBThumbnailAdaptor.h @@ -44,7 +44,6 @@ public: private: static void generateMissingThumbnails(UBDocumentProxy* proxy); - static void updateDocumentToHandleZeroPage(UBDocumentProxy* proxy); UBThumbnailAdaptor() {} }; diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index 18e56145..ffb18864 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -48,8 +48,6 @@ #include "gui/UBKeyboardPalette.h" #include "gui/UBMagnifer.h" #include "gui/UBDockPaletteWidget.h" -#include "gui/UBDockTeacherGuideWidget.h" -#include "gui/UBTeacherGuideWidget.h" #include "domain/UBGraphicsPixmapItem.h" #include "domain/UBGraphicsItemUndoCommand.h" @@ -166,8 +164,6 @@ UBBoardController::~UBBoardController() int UBBoardController::currentPage() { - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) - return mActiveSceneIndex; return mActiveSceneIndex + 1; } @@ -1762,10 +1758,7 @@ void UBBoardController::lastWindowClosed() { if (!mCleanupDone) { - bool teacherGuideModified = false; - if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget()) - teacherGuideModified = UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified(); - if (selectedDocument()->pageCount() == 1 && (!mActiveScene || mActiveScene->isEmpty()) && !teacherGuideModified) + if (selectedDocument()->pageCount() == 1 && (!mActiveScene || mActiveScene->isEmpty())) { UBPersistenceManager::persistenceManager()->deleteDocument(selectedDocument()); } @@ -1860,7 +1853,7 @@ void UBBoardController::persistCurrentScene() if(UBPersistenceManager::persistenceManager() && selectedDocument() && mActiveScene && mActiveSceneIndex != mDeletingSceneIndex && (mActiveSceneIndex >= 0) && mActiveSceneIndex != mMovingSceneIndex - && (mActiveScene->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()))) + && (mActiveScene->isModified())) { UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex); updatePage(mActiveSceneIndex); @@ -1954,7 +1947,7 @@ void UBBoardController::notifyCache(bool visible) { if(visible) emit cacheEnabled(); - + mCacheWidgetIsEnabled = visible; } diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index cac33bde..140844c0 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -40,8 +40,6 @@ #include "gui/UBWebToolsPalette.h" #include "gui/UBActionPalette.h" #include "gui/UBFavoriteToolPalette.h" -#include "gui/UBDockTeacherGuideWidget.h" - #include "web/UBWebPage.h" #include "web/UBWebController.h" @@ -92,7 +90,6 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll , mpPageNavigWidget(NULL) , mpCachePropWidget(NULL) , mpDownloadWidget(NULL) - , mpTeacherGuideWidget(NULL) , mDownloadInProgress(false) { setupPalettes(); @@ -143,12 +140,6 @@ void UBBoardPaletteManager::setupDockPaletteWidgets() mLeftPalette->registerWidget(mpPageNavigWidget); mLeftPalette->addTab(mpPageNavigWidget); - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() || UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()){ - mpTeacherGuideWidget = new UBDockTeacherGuideWidget(); - mLeftPalette->registerWidget(mpTeacherGuideWidget); - mLeftPalette->addTab(mpTeacherGuideWidget); - } - mLeftPalette->connectSignals(); mLeftPalette->showTabWidget(0); diff --git a/src/board/UBBoardPaletteManager.h b/src/board/UBBoardPaletteManager.h index 5f05af11..990771cf 100644 --- a/src/board/UBBoardPaletteManager.h +++ b/src/board/UBBoardPaletteManager.h @@ -47,7 +47,6 @@ class UBServerXMLHttpRequest; class UBKeyboardPalette; class UBMainWindow; class UBApplicationController; -class UBDockTeacherGuideWidget; class UBBoardPaletteManager : public QObject { @@ -71,8 +70,6 @@ class UBBoardPaletteManager : public QObject void setCurrentWebToolsPalette(UBWebToolsPalette *palette) {mWebToolsCurrentPalette = palette;} UBWebToolsPalette* mWebToolsCurrentPalette; - UBDockTeacherGuideWidget* teacherGuideDockWidget() { return mpTeacherGuideWidget;} - void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode); void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false); void startDownloads(); @@ -142,7 +139,6 @@ class UBBoardPaletteManager : public QObject /** The download widget */ UBDockDownloadWidget* mpDownloadWidget; - UBDockTeacherGuideWidget* mpTeacherGuideWidget; bool mDownloadInProgress; diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index 31d1b277..2f218a03 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -47,7 +47,6 @@ #include "gui/UBResources.h" #include "gui/UBMainWindow.h" #include "gui/UBThumbnailWidget.h" -#include "gui/UBTeacherGuideWidgetsTools.h" #include "board/UBBoardController.h" #include "board/UBBoardPaletteManager.h" @@ -954,9 +953,6 @@ void UBBoardView::mousePressEvent (QMouseEvent *event) movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint())); - if (!movingItem) - emit clickOnBoard(); - if (event->button () == Qt::LeftButton && isInteractive ()) { @@ -1440,9 +1436,7 @@ void UBBoardView::dropEvent (QDropEvent *event) if (!event->source() || qobject_cast(event->source()) || qobject_cast(event->source()) - || qobject_cast(event->source()) - || qobject_cast(event->source()) - || qobject_cast(event->source())) { + || qobject_cast(event->source())) { mController->processMimeData (event->mimeData (), mapToScene (event->pos ())); event->acceptProposedAction(); } diff --git a/src/board/UBBoardView.h b/src/board/UBBoardView.h index ad2dcf6d..9e12a138 100644 --- a/src/board/UBBoardView.h +++ b/src/board/UBBoardView.h @@ -62,7 +62,6 @@ signals: void resized(QResizeEvent* event); void shown(); - void clickOnBoard(); protected: diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index 49b2f698..b2918089 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -51,8 +51,6 @@ #include "gui/UBScreenMirror.h" #include "gui/UBMainWindow.h" -#include "gui/UBDockTeacherGuideWidget.h" -#include "gui/UBTeacherGuideWidget.h" #include "domain/UBGraphicsPixmapItem.h" @@ -434,7 +432,7 @@ void UBApplicationController::showDocument() if (UBApplication::boardController) { - if (UBApplication::boardController->activeScene()->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified())) + if (UBApplication::boardController->activeScene()->isModified()) UBApplication::boardController->persistCurrentScene(); UBApplication::boardController->hide(); } diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 9001d17d..c6add622 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -33,9 +33,6 @@ #include "core/UBSettings.h" #include "core/UBSetting.h" -#include "gui/UBDockTeacherGuideWidget.h" -#include "gui/UBTeacherGuideWidget.h" - #include "document/UBDocumentProxy.h" #include "adaptors/UBExportPDF.h" @@ -46,8 +43,6 @@ #include "board/UBBoardController.h" #include "board/UBBoardPaletteManager.h" -#include "interfaces/IDataStorage.h" - #include "core/memcheck.h" const QString UBPersistenceManager::imageDirectory = "images"; // added to UBPersistenceManager::mAllDirectories @@ -55,7 +50,6 @@ const QString UBPersistenceManager::objectDirectory = "objects"; // added to UBP const QString UBPersistenceManager::widgetDirectory = "widgets"; // added to UBPersistenceManager::mAllDirectories const QString UBPersistenceManager::videoDirectory = "videos"; // added to UBPersistenceManager::mAllDirectories const QString UBPersistenceManager::audioDirectory = "audios"; // added to -const QString UBPersistenceManager::teacherGuideDirectory = "teacherGuideObjects"; UBPersistenceManager * UBPersistenceManager::sSingleton = 0; @@ -69,7 +63,6 @@ UBPersistenceManager::UBPersistenceManager(QObject *pParent) mDocumentSubDirectories << widgetDirectory; mDocumentSubDirectories << videoDirectory; mDocumentSubDirectories << audioDirectory; - mDocumentSubDirectories << teacherGuideDirectory; documentProxies = allDocumentProxies(); emit proxyListChanged(); @@ -589,10 +582,6 @@ UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy, return mSceneCache.value(proxy, sceneIndex); else { UBGraphicsScene* scene = UBSvgSubsetAdaptor::loadScene(proxy, sceneIndex); - if(!scene && UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){ - createDocumentSceneAt(proxy,0); - scene = UBSvgSubsetAdaptor::loadScene(proxy, 0); - } if (scene) mSceneCache.insert(proxy, sceneIndex, scene); @@ -612,15 +601,10 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, QDir dir(pDocumentProxy->persistencePath()); dir.mkpath(pDocumentProxy->persistencePath()); - UBBoardPaletteManager* paletteManager = UBApplication::boardController->paletteManager(); - bool teacherGuideModified = false; - if(UBApplication::app()->boardController->currentPage() == pSceneIndex && paletteManager->teacherGuideDockWidget()) - teacherGuideModified = paletteManager->teacherGuideDockWidget()->teacherGuideWidget()->isModified(); - - if (pDocumentProxy->isModified() || teacherGuideModified) + if (pDocumentProxy->isModified()) UBMetadataDcSubsetAdaptor::persist(pDocumentProxy); - if (pScene->isModified() || teacherGuideModified) + if (pScene->isModified()) { UBSvgSubsetAdaptor::persistScene(pDocumentProxy, pScene, pSceneIndex); @@ -680,21 +664,9 @@ int UBPersistenceManager::sceneCount(const UBDocumentProxy* proxy) QFile file(fileName); if (file.exists()) - { pageIndex++; - } else - { - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() && pageIndex == 0){ - // the document has no zero file but doesn't means that it hasn't any file - // at all. Just importing a document without the first page using a configuartion - // that enables zero page. - pageIndex++; - addedMissingZeroPage = true; - } - else - moreToProcess = false; - } + moreToProcess = false; } if(pageIndex == 1 && addedMissingZeroPage){ @@ -761,7 +733,7 @@ bool UBPersistenceManager::addDirectoryContentToDocument(const QString& document foreach(QString dir, mDocumentSubDirectories) { qDebug() << "copying " << documentRootFolder << "/" << dir << " to " << pDocument->persistencePath() << "/" + dir; - + QDir srcDir(documentRootFolder + "/" + dir); if (srcDir.exists()) if (!UBFileSystemUtils::copyDir(documentRootFolder + "/" + dir, pDocument->persistencePath() + "/" + dir)) @@ -865,66 +837,8 @@ void UBPersistenceManager::purgeEmptyDocuments() } } -QString UBPersistenceManager::teacherGuideAbsoluteObjectPath(UBDocumentProxy* pDocumentProxy) -{ - return pDocumentProxy->persistencePath() + "/" + teacherGuideDirectory; -} - -QString UBPersistenceManager::addObjectToTeacherGuideDirectory(UBDocumentProxy* pDocumentProxy, QString pPath) -{ - QString path = UBFileSystemUtils::removeLocalFilePrefix(pPath); - QFileInfo fi(path); - QString uuid = QUuid::createUuid(); - - if (!fi.exists() || !pDocumentProxy) - return ""; - - QString fileName = UBPersistenceManager::teacherGuideDirectory + "/" + uuid + "." + fi.suffix(); - - QString destPath = pDocumentProxy->persistencePath() + "/" + fileName; - - if (!QFile::exists(destPath)){ - QDir dir; - dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::teacherGuideDirectory); - - QFile source(path); - - source.copy(destPath); - } - - return destPath; -} - -QString UBPersistenceManager::addWidgetToTeacherGuideDirectory(UBDocumentProxy* pDocumentProxy, QString pPath) -{ - QString path = UBFileSystemUtils::removeLocalFilePrefix(pPath); - QFileInfo fi(path); - Q_ASSERT(fi.isDir()); - - int lastIndex = path.lastIndexOf("."); - QString extension(""); - if(lastIndex != -1) - extension = path.right(path.length() - lastIndex); - - QString uuid = QUuid::createUuid(); - - if (!fi.exists() || !pDocumentProxy) - return ""; - - QString directoryName = UBPersistenceManager::teacherGuideDirectory + "/" + uuid + extension; - QString destPath = pDocumentProxy->persistencePath() + "/" + directoryName; - - if (!QDir(destPath).exists()){ - QDir dir; - dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::teacherGuideDirectory); - UBFileSystemUtils::copyDir(path,destPath); - } - - return destPath; -} - -bool UBPersistenceManager::addFileToDocument(UBDocumentProxy* pDocumentProxy, - QString path, +bool UBPersistenceManager::addFileToDocument(UBDocumentProxy* pDocumentProxy, + QString path, const QString& subdir, QUuid objectUuid, QString& destinationPath, @@ -975,12 +889,12 @@ bool UBPersistenceManager::addFileToDocument(UBDocumentProxy* pDocumentProxy, } else { - return false; + return false; } } -bool UBPersistenceManager::addGraphicsWidgteToDocument(UBDocumentProxy *pDocumentProxy, - QString path, +bool UBPersistenceManager::addGraphicsWidgteToDocument(UBDocumentProxy *pDocumentProxy, + QString path, QUuid objectUuid, QString& destinationPath) { diff --git a/src/core/UBPersistenceManager.h b/src/core/UBPersistenceManager.h index a8e17bff..77dd0bb9 100644 --- a/src/core/UBPersistenceManager.h +++ b/src/core/UBPersistenceManager.h @@ -90,10 +90,6 @@ class UBPersistenceManager : public QObject QString generateUniqueDocumentPath(); QString generateUniqueDocumentPath(const QString& baseFolder); - QString teacherGuideAbsoluteObjectPath(UBDocumentProxy* pDocumentProxy); - QString addObjectToTeacherGuideDirectory(UBDocumentProxy* proxy, QString pPath); - QString addWidgetToTeacherGuideDirectory(UBDocumentProxy* pDocumentProxy, QString pPath); - bool addDirectoryContentToDocument(const QString& documentRootFolder, UBDocumentProxy* pDocument); virtual void upgradeDocumentIfNeeded(UBDocumentProxy* pDocumentProxy); diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 73ba20a5..3a226896 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -51,14 +51,6 @@ QString UBSettings::documentSize = QString("Size"); QString UBSettings::documentIdentifer = QString("ID"); QString UBSettings::documentVersion = QString("Version"); QString UBSettings::documentUpdatedAt = QString("UpdatedAt"); -QString UBSettings::sessionTitle = QString("sessionTitle"); -QString UBSettings::sessionAuthors = QString("sessionAuthors"); -QString UBSettings::sessionObjectives = QString("sessionObjectives"); -QString UBSettings::sessionKeywords = QString("sessionKeywords"); -QString UBSettings::sessionGradeLevel = QString("sessionGradeLevel"); -QString UBSettings::sessionSubjects = QString("sessionSubjects"); -QString UBSettings::sessionType = QString("sessionType"); -QString UBSettings::sessionLicence = QString("sessionLicence"); QString UBSettings::documentDate = QString("date"); QString UBSettings::trashedDocumentGroupNamePrefix = QString("_Trash:"); @@ -405,8 +397,6 @@ void UBSettings::init() angleTolerance = new UBSetting(this, "App", "AngleTolerance", 4); historyLimit = new UBSetting(this, "Web", "HistoryLimit", 15); - teacherGuidePageZeroActivated = new UBSetting(this,"DockPalette","TeacherGuideActivatePageZero",true); - teacherGuideLessonPagesActivated = new UBSetting(this,"DockPalette","TeacherGuideActivateLessonPages",true); libIconSize = new UBSetting(this, "Library", "LibIconSize", defaultLibraryIconSize); diff --git a/src/core/UBSettings.h b/src/core/UBSettings.h index 74e89691..029be013 100644 --- a/src/core/UBSettings.h +++ b/src/core/UBSettings.h @@ -179,15 +179,6 @@ class UBSettings : public QObject static QString documentVersion; static QString documentUpdatedAt; - static QString sessionTitle; - static QString sessionAuthors; - static QString sessionObjectives; - static QString sessionKeywords; - static QString sessionGradeLevel; - static QString sessionSubjects; - static QString sessionType; - static QString sessionLicence; - static QString documentDate; static QString trashedDocumentGroupNamePrefix; @@ -367,8 +358,6 @@ class UBSettings : public QObject UBSetting* angleTolerance; UBSetting* historyLimit; - UBSetting* teacherGuidePageZeroActivated; - UBSetting* teacherGuideLessonPagesActivated; UBSetting* libIconSize; diff --git a/src/document/UBDocumentContainer.cpp b/src/document/UBDocumentContainer.cpp index b2ba4664..6325d9c5 100644 --- a/src/document/UBDocumentContainer.cpp +++ b/src/document/UBDocumentContainer.cpp @@ -127,15 +127,11 @@ void UBDocumentContainer::reloadThumbnails() int UBDocumentContainer::pageFromSceneIndex(int sceneIndex) { - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) - return sceneIndex; return sceneIndex+1; } int UBDocumentContainer::sceneIndexFromPage(int page) { - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) - return page; return page-1; } diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index d24282a4..77432c67 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -1632,18 +1632,12 @@ int UBDocumentController::getSelectedItemIndex() bool UBDocumentController::pageCanBeMovedUp(int page) { - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) - return page >= 2; - else - return page >= 1; + return page >= 1; } bool UBDocumentController::pageCanBeMovedDown(int page) { - if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) - return page != 0 && page < selectedDocument()->pageCount() - 1; - else - return page < selectedDocument()->pageCount() - 1; + return page < selectedDocument()->pageCount() - 1; } bool UBDocumentController::pageCanBeDuplicated(int page) diff --git a/src/document/UBDocumentProxy.cpp b/src/document/UBDocumentProxy.cpp index 82145959..894adcc2 100644 --- a/src/document/UBDocumentProxy.cpp +++ b/src/document/UBDocumentProxy.cpp @@ -57,16 +57,6 @@ void UBDocumentProxy::init() setUuid(QUuid::createUuid()); setDefaultDocumentSize(UBSettings::settings()->pageSize->get().toSize()); - - //teacherGuide metadata - setMetaData(UBSettings::sessionTitle,""); - setMetaData(UBSettings::sessionAuthors,""); - setMetaData(UBSettings::sessionObjectives,""); - setMetaData(UBSettings::sessionKeywords,""); - setMetaData(UBSettings::sessionGradeLevel,""); - setMetaData(UBSettings::sessionSubjects,""); - setMetaData(UBSettings::sessionType,""); - setMetaData(UBSettings::sessionLicence,""); } diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 6c5f9f58..82583ce5 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -1486,56 +1486,6 @@ UBGraphicsTextItem* UBGraphicsScene::addText(const QString& pString, const QPoin , UBSettings::settings()->isItalicFont()); } -UBGraphicsTextItem* UBGraphicsScene::textForObjectName(const QString& pString, const QString& objectName) -{ - UBGraphicsTextItem* textItem = 0; - bool found = false; - //looking for a previous such item text - for(int i=0; i < mFastAccessItems.count() && !found ; i += 1){ - UBGraphicsTextItem* currentItem = dynamic_cast(mFastAccessItems.at(i)); - if(currentItem && (currentItem->objectName() == objectName || currentItem->toPlainText() == pString)){ - // The second condition is necessary because the object name isn't stored. On reopeining the file we - // need another rule than the objectName - textItem = currentItem; - found=true; - if(currentItem->objectName() != objectName) - textItem->setObjectName(objectName); - } - } - if(!textItem){ - textItem = addTextWithFont(pString,QPointF(0,0) ,72,UBSettings::settings()->fontFamily(),true,false); - textItem->setObjectName(objectName); - textItem->setData(UBGraphicsItemData::ItemEditable,QVariant(false)); - textItem->adjustSize(); - textItem->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); - textItem->setPlainText(pString); - } - else{ - textItem->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); - if (pString == textItem->toPlainText()) - return textItem; - - QTextCursor curCursor = textItem->textCursor(); - QFont font = textItem->font(); - QColor color = curCursor.charFormat().foreground().color(); - - textItem->setPlainText(pString); - textItem->clearFocus(); - textItem->setFont(font); - - - QTextCharFormat format; - format.setForeground(QBrush(color)); - curCursor.mergeCharFormat(format); - textItem->setTextCursor(curCursor); - textItem->contentsChanged(); - - } - - textItem->clearFocus(); - return textItem; -} - UBGraphicsTextItem* UBGraphicsScene::addTextWithFont(const QString& pString, const QPointF& pTopLeft , int pointSize, const QString& fontFamily, bool bold, bool italic) { diff --git a/src/domain/UBGraphicsScene.h b/src/domain/UBGraphicsScene.h index 84327c82..c09855a5 100644 --- a/src/domain/UBGraphicsScene.h +++ b/src/domain/UBGraphicsScene.h @@ -156,7 +156,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem UBGraphicsMediaItem* addAudio(const QUrl& pAudioFileUrl, bool shouldPlayAsap, const QPointF& pPos = QPointF(0, 0)); UBGraphicsSvgItem* addSvg(const QUrl& pSvgFileUrl, const QPointF& pPos = QPointF(0, 0), const QByteArray pData = QByteArray()); UBGraphicsTextItem* addText(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0)); - UBGraphicsTextItem* textForObjectName(const QString& pString, const QString &objectName = "UBTGZeroPageSessionTitle"); UBGraphicsTextItem* addTextWithFont(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0) , int pointSize = -1, const QString& fontFamily = "", bool bold = false, bool italic = false); diff --git a/src/gui/UBDockTeacherGuideWidget.cpp b/src/gui/UBDockTeacherGuideWidget.cpp deleted file mode 100644 index 7a1401a9..00000000 --- a/src/gui/UBDockTeacherGuideWidget.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA) - * - * This file is part of Open-Sankoré. - * - * Open-Sankoré 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, version 3 of the License, - * with a specific linking exception for the OpenSSL project's - * "OpenSSL" library (or with modified versions of it that use the - * same license as the "OpenSSL" library). - * - * Open-Sankoré 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 Open-Sankoré. If not, see . - */ - - - -#include "core/UBApplication.h" -#include "globals/UBGlobals.h" - -#include "UBDockTeacherGuideWidget.h" -#include "UBTeacherGuideWidget.h" - -#include "core/memcheck.h" - - -UBDockTeacherGuideWidget::UBDockTeacherGuideWidget(QWidget* parent, const char* name): - UBDockPaletteWidget(parent,name) - , mpTeacherGuideWidget(NULL) -{ - mName = "TeacherGuide"; - mVisibleState = true; - SET_STYLE_SHEET(); - - mIconToLeft = QPixmap(":images/teacher_open.png"); - mIconToRight = QPixmap(":images/teacher_close.png"); - - mpLayout = new QVBoxLayout(this); - setLayout(mpLayout); - mpTeacherGuideWidget = new UBTeacherGuideWidget(this); - mpLayout->addWidget(mpTeacherGuideWidget); -} - -UBDockTeacherGuideWidget::~UBDockTeacherGuideWidget() -{ - DELETEPTR(mpTeacherGuideWidget); - DELETEPTR(mpLayout); -} - -UBTeacherGuideWidget* UBDockTeacherGuideWidget::teacherGuideWidget() -{ - return mpTeacherGuideWidget; -} diff --git a/src/gui/UBDockTeacherGuideWidget.h b/src/gui/UBDockTeacherGuideWidget.h deleted file mode 100644 index fe33410c..00000000 --- a/src/gui/UBDockTeacherGuideWidget.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA) - * - * This file is part of Open-Sankoré. - * - * Open-Sankoré 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, version 3 of the License, - * with a specific linking exception for the OpenSSL project's - * "OpenSSL" library (or with modified versions of it that use the - * same license as the "OpenSSL" library). - * - * Open-Sankoré 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 Open-Sankoré. If not, see . - */ - - - -#ifndef UBDOCKTEACHERGUIDEWIDGET_H -#define UBDOCKTEACHERGUIDEWIDGET_H - -class QVBoxLayout; -class UBTeacherGuideWidget; - -#include "UBDockPaletteWidget.h" - - -class UBDockTeacherGuideWidget : public UBDockPaletteWidget -{ - Q_OBJECT -public: - UBDockTeacherGuideWidget(QWidget* parent=0, const char* name="UBDockTeacherGuideWidget"); - ~UBDockTeacherGuideWidget(); - - bool visibleInMode(eUBDockPaletteWidgetMode mode){ return mode == eUBDockPaletteWidget_BOARD; } - - UBTeacherGuideWidget* teacherGuideWidget(); - -private: - QVBoxLayout* mpLayout; - UBTeacherGuideWidget* mpTeacherGuideWidget; -}; - -#endif // UBDOCKTEACHERGUIDEWIDGET_H diff --git a/src/gui/UBDocumentNavigator.cpp b/src/gui/UBDocumentNavigator.cpp index ccf5d518..085203e2 100644 --- a/src/gui/UBDocumentNavigator.cpp +++ b/src/gui/UBDocumentNavigator.cpp @@ -78,9 +78,6 @@ UBDocumentNavigator::~UBDocumentNavigator() } } -#include "gui/UBDockTeacherGuideWidget.h" -#include "gui/UBTeacherGuideWidget.h" - /** * \brief Generate the thumbnails */ @@ -113,7 +110,7 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source) mScene->addItem(pixmapItem); mScene->addItem(labelItem); } - + // Draw the items refreshScene(); } @@ -255,7 +252,7 @@ void UBDocumentNavigator::mousePressEvent(QMouseEvent *event) { // If we fall here we may have clicked on the label instead of the thumbnail UBThumbnailTextItem* pTextItem = dynamic_cast(pClickedItem); - if(NULL != pTextItem) + if(NULL != pTextItem) { for(int i = 0; i < mThumbsWithLabels.size(); i++) { diff --git a/src/gui/UBTeacherGuideWidget.cpp b/src/gui/UBTeacherGuideWidget.cpp deleted file mode 100644 index 09520118..00000000 --- a/src/gui/UBTeacherGuideWidget.cpp +++ /dev/null @@ -1,1291 +0,0 @@ -/* - * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA) - * - * This file is part of Open-Sankoré. - * - * Open-Sankoré 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, version 3 of the License, - * with a specific linking exception for the OpenSSL project's - * "OpenSSL" library (or with modified versions of it that use the - * same license as the "OpenSSL" library). - * - * Open-Sankoré 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 Open-Sankoré. If not, see . - */ - - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "UBTeacherGuideWidget.h" - -#include "adaptors/UBSvgSubsetAdaptor.h" - -#include "core/UBApplication.h" -#include "core/UBPersistenceManager.h" -#include "core/UBSettings.h" - -#include "globals/UBGlobals.h" - -#include "board/UBBoardController.h" -#include "board/UBBoardView.h" -#include "board/UBBoardPaletteManager.h" - -#include "gui/UBStylusPalette.h" -#include "gui/UBActionPalette.h" -#include "gui/UBMainWindow.h" - -#include "web/UBWebController.h" - -#include "document/UBDocumentProxy.h" -#include "document/UBDocumentController.h" - -#include "domain/UBGraphicsTextItem.h" - -#include "core/memcheck.h" - -#define UBTG_SEPARATOR_FIXED_HEIGHT 3 - -typedef enum { - eUBTGAddSubItemWidgetType_None, - eUBTGAddSubItemWidgetType_Action, - eUBTGAddSubItemWidgetType_Media, - eUBTGAddSubItemWidgetType_Url -} eUBTGAddSubItemWidgetType; - -/*************************************************************************** - * class UBTeacherGuideEditionWidget * - ***************************************************************************/ - -UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const char* name) : - QWidget(parent) - , mpLayout(NULL) - , mpDocumentTitle(NULL) - , mpPageNumberLabel(NULL) - , mpPageTitle(NULL) - , mpComment(NULL) - , mpSeparator(NULL) - , mpTreeWidget(NULL) - , mpRootWidgetItem(NULL) - , mpAddAnActionItem(NULL) - , mpAddAMediaItem(NULL) - , mpAddALinkItem(NULL) -{ - setObjectName(name); - - mpLayout = new QVBoxLayout(this); - mpPageNumberLabel = new QLabel(this); - mpPageNumberLabel->setAlignment(Qt::AlignRight); - mpPageNumberLabel->setObjectName("UBTGPageNumberLabel"); - mpLayout->addWidget(mpPageNumberLabel); - // tree basic configuration - - if (UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) { - mpDocumentTitle = new QLabel(this); - mpDocumentTitle->setObjectName("UBTGPresentationDocumentTitle"); - mpLayout->addWidget(mpDocumentTitle); - } - - mpPageTitle = new UBTGAdaptableText(0, this); - mpPageTitle->setObjectName("UBTGEditionPageTitle"); - mpPageTitle->setPlaceHolderText(tr("Type title here ...")); - mpLayout->addWidget(mpPageTitle); - - mpComment = new UBTGAdaptableText(0, this); - mpComment->setObjectName("UBTGEditionComment"); - mpComment->setPlaceHolderText(tr("Type comment here ...")); - mpLayout->addWidget(mpComment); - - mpSeparator = new QFrame(this); - mpSeparator->setObjectName("UBTGSeparator"); - mpSeparator->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); - mpLayout->addWidget(mpSeparator); - - mpTreeWidget = new QTreeWidget(this); - mpTreeWidget->setStyleSheet("selection-background-color:transparent; padding-bottom:5px; padding-top:5px;"); - mpLayout->addWidget(mpTreeWidget); - - mpRootWidgetItem = mpTreeWidget->invisibleRootItem(); - mpTreeWidget->setRootIsDecorated(false); - mpTreeWidget->setIndentation(0); - mpTreeWidget->setDropIndicatorShown(false); - mpTreeWidget->header()->close(); - mpTreeWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - mpTreeWidget->setColumnCount(2); - mpTreeWidget->header()->setStretchLastSection(false); - mpTreeWidget->header()->setResizeMode(0, QHeaderView::Stretch); - mpTreeWidget->header()->setResizeMode(1, QHeaderView::Fixed); - mpTreeWidget->header()->setDefaultSectionSize(18); - mpTreeWidget->setSelectionMode(QAbstractItemView::NoSelection); - - connect(mpTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(onAddItemClicked(QTreeWidgetItem*,int))); - connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(onActiveSceneChanged())); - -#ifdef Q_WS_MAC - // on mac and with the custom qt the widget on the tree are not automatically relocated when using the vertical scrollbar. To relocate them we link the valueChange signal of the vertical scrollbar witht a local signal to trig a change and a repaint of the tree widget - connect(mpTreeWidget->verticalScrollBar(),SIGNAL(valueChanged(int)),this,SLOT(onSliderMoved(int))); -#endif - - mpAddAnActionItem = new UBAddItem(tr("Add an action"), eUBTGAddSubItemWidgetType_Action, mpTreeWidget); - mpAddAMediaItem = new UBAddItem(tr("Add a media"), eUBTGAddSubItemWidgetType_Media, mpTreeWidget); - mpAddALinkItem = new UBAddItem(tr("Add a link"), eUBTGAddSubItemWidgetType_Url, mpTreeWidget); - - mpRootWidgetItem->addChild(mpAddAnActionItem); - mpRootWidgetItem->addChild(mpAddAMediaItem); - mpRootWidgetItem->addChild(mpAddALinkItem); - - if (UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()) { - UBSvgSubsetAdaptor::addElementToBeStored(QString("teacherGuide"), this); - connect(UBApplication::boardController, SIGNAL(documentSet(UBDocumentProxy*)), this, SLOT(onActiveDocumentChanged())); - } -} - -UBTeacherGuideEditionWidget::~UBTeacherGuideEditionWidget() -{ - DELETEPTR(mpDocumentTitle); - DELETEPTR(mpPageNumberLabel); - DELETEPTR(mpPageTitle); - DELETEPTR(mpComment); - DELETEPTR(mpSeparator); - DELETEPTR(mpAddAnActionItem); - DELETEPTR(mpAddAMediaItem); - DELETEPTR(mpAddALinkItem); - DELETEPTR(mpTreeWidget); - DELETEPTR(mpLayout); -} - -#ifdef Q_WS_MAC -void UBTeacherGuideEditionWidget::onSliderMoved(int size) -{ - Q_UNUSED(size); - if(mpAddAMediaItem) - mpAddAMediaItem->setExpanded(true); -} -#endif -void UBTeacherGuideEditionWidget::showEvent(QShowEvent* event) -{ - setFocus(); - QWidget::showEvent(event); -} - -void UBTeacherGuideEditionWidget::onActiveDocumentChanged() -{ - int activeSceneIndex = UBApplication::boardController->activeSceneIndex(); - if (UBApplication::boardController->pageFromSceneIndex(activeSceneIndex) != 0) - load(UBSvgSubsetAdaptor::readTeacherGuideNode(activeSceneIndex)); -} - -void UBTeacherGuideEditionWidget::load(QString element) -{ - cleanData(); - QDomDocument doc("TeacherGuide"); - doc.setContent(element); - - for (QDomElement element = doc.documentElement().firstChildElement(); - !element.isNull(); element = element.nextSiblingElement()) { - QString tagName = element.tagName(); - if (tagName == "title") - mpPageTitle->setInitialText(element.attribute("value")); - else if (tagName == "comment") - mpComment->setInitialText(element.attribute("value")); - else if (tagName == "media") - onAddItemClicked(mpAddAMediaItem, 0, &element); - else if (tagName == "link") - onAddItemClicked(mpAddALinkItem, 0, &element); - else if (tagName == "action") - onAddItemClicked(mpAddAnActionItem, 0, &element); - } -} - -QVector UBTeacherGuideEditionWidget::save(int pageIndex) -{ - QVector result; - if (pageIndex != UBApplication::boardController->currentPage()) - return result; - tIDataStorage* data = new tIDataStorage(); - data->name = "teacherGuide"; - data->type = eElementType_START; - data->attributes.insert("version", "2.00"); - result << data; - - data = new tIDataStorage(); - data->name = "title"; - data->type = eElementType_UNIQUE; - data->attributes.insert("value", mpPageTitle->text()); - if (mpPageTitle->text().length()) - result << data; - - data = new tIDataStorage(); - data->name = "comment"; - data->type = eElementType_UNIQUE; - data->attributes.insert("value", mpComment->text()); - if (mpComment->text().length()) - result << data; - - QList children = getChildrenList(mpAddAnActionItem); - children << getChildrenList(mpAddAMediaItem); - children << getChildrenList(mpAddALinkItem); - - foreach(QTreeWidgetItem* widgetItem, children) { - tUBGEElementNode* node = dynamic_cast(mpTreeWidget->itemWidget( widgetItem, 0))->saveData(); - if (node) { - data = new tIDataStorage(); - data->name = node->name; - data->type = eElementType_UNIQUE; - foreach(QString currentKey, node->attributes.keys()) - data->attributes.insert(currentKey, node->attributes.value(currentKey)); - result << data; - } - } - - data = new tIDataStorage(); - data->name = "teacherGuide"; - data->type = eElementType_END; - result << data; - return result; -} - -void UBTeacherGuideEditionWidget::onActiveSceneChanged() -{ - int currentPage = UBApplication::boardController->currentPage(); - if (currentPage > 0) { - cleanData(); - load( UBSvgSubsetAdaptor::readTeacherGuideNode( UBApplication::boardController->activeSceneIndex())); - mpPageNumberLabel->setText(tr("Page: %0").arg(currentPage)); - UBDocumentProxy* documentProxy = UBApplication::boardController->selectedDocument(); - if (mpDocumentTitle) - mpDocumentTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString()); - } -} - -void UBTeacherGuideEditionWidget::cleanData() -{ - mpPageTitle->resetText(); - mpComment->resetText(); - QList children = mpAddAnActionItem->takeChildren(); - children << mpAddAMediaItem->takeChildren(); - children << mpAddALinkItem->takeChildren(); - - foreach(QTreeWidgetItem* item, children) { - DELETEPTR(item); - } -} - -QList UBTeacherGuideEditionWidget::getChildrenList( QTreeWidgetItem* widgetItem) -{ - QList result; - for (int i = 0; i < widgetItem->childCount(); i += 1) - result << widgetItem->child(i); - return result; -} - -QVector UBTeacherGuideEditionWidget::getPageAndCommentData() -{ - QVector result; - tUBGEElementNode* pageTitle = new tUBGEElementNode(); - pageTitle->name = "pageTitle"; - pageTitle->attributes.insert("value", mpPageTitle->text()); - result << pageTitle; - - tUBGEElementNode* comment = new tUBGEElementNode(); - comment->name = "comment"; - comment->attributes.insert("value", mpComment->text()); - result << comment; - return result; -} - -QVector UBTeacherGuideEditionWidget::getData() -{ - QVector result; - QList children = getChildrenList(mpAddAnActionItem); - children << getChildrenList(mpAddAMediaItem); - children << getChildrenList(mpAddALinkItem); - result << getPageAndCommentData(); - foreach(QTreeWidgetItem* widgetItem, children) { - tUBGEElementNode* node = dynamic_cast(mpTreeWidget->itemWidget( widgetItem, 0))->saveData(); - if (node) - result << node; - } - return result; -} - -void UBTeacherGuideEditionWidget::onAddItemClicked(QTreeWidgetItem* widget, int column, QDomElement *element) -{ - int addSubItemWidgetType = widget->data(column, Qt::UserRole).toInt(); - if (addSubItemWidgetType != eUBTGAddSubItemWidgetType_None) { - QTreeWidgetItem* newWidgetItem = new QTreeWidgetItem(widget); - newWidgetItem->setData(column, Qt::UserRole, eUBTGAddSubItemWidgetType_None); - newWidgetItem->setData(1, Qt::UserRole, eUBTGAddSubItemWidgetType_None); - newWidgetItem->setIcon(1, QIcon(":images/close.svg")); - - switch (addSubItemWidgetType) { - case eUBTGAddSubItemWidgetType_Action: { - UBTGActionWidget* actionWidget = new UBTGActionWidget(widget); - if (element) - actionWidget->initializeWithDom(*element); - mpTreeWidget->setItemWidget(newWidgetItem, 0, actionWidget); - break; - } - case eUBTGAddSubItemWidgetType_Media: { - UBTGMediaWidget* mediaWidget = new UBTGMediaWidget(widget); - if (element) - mediaWidget->initializeWithDom(*element); - mpTreeWidget->setItemWidget(newWidgetItem,0, mediaWidget); - break; - } - case eUBTGAddSubItemWidgetType_Url: { - UBTGUrlWidget* urlWidget = new UBTGUrlWidget(); - if (element) - urlWidget->initializeWithDom(*element); - mpTreeWidget->setItemWidget(newWidgetItem, 0, urlWidget); - break; - } - default: - delete newWidgetItem; - qCritical() << "onAddItemClicked no action set"; - return; - } - - if (addSubItemWidgetType != eUBTGAddSubItemWidgetType_None && !widget->isExpanded()) - widget->setExpanded(true); - else { - //to update the tree and subtrees - widget->setExpanded(false); - widget->setExpanded(true); - } - } - else if (column == 1 && addSubItemWidgetType == eUBTGAddSubItemWidgetType_None) { - UBTGMediaWidget* media = dynamic_cast(mpTreeWidget->itemWidget(widget, 0)); - if (media) - media->removeSource(); - int index = mpTreeWidget->currentIndex().row(); - QTreeWidgetItem* toBeDeletedWidgetItem = widget->parent()->takeChild(index); - delete toBeDeletedWidgetItem; - } -} - -bool UBTeacherGuideEditionWidget::isModified() -{ - bool result = false; - result |= mpPageTitle->text().length() > 0; - result |= mpComment->text().length() > 0; - result |= mpAddAnActionItem->childCount() > 0; - result |= mpAddAMediaItem->childCount() > 0; - result |= mpAddALinkItem->childCount() > 0; - return result; -} - -/*************************************************************************** - * class UBTeacherGuidePresentationWidget * - ***************************************************************************/ -typedef enum { - tUBTGActionAssociateOnClickItem_NONE, - tUBTGActionAssociateOnClickItem_URL, - tUBTGActionAssociateOnClickItem_MEDIA, - tUBTGActionAssociateOnClickItem_EXPAND -} tUBTGActionAssociateOnClickItem; - -typedef enum { - tUBTGTreeWidgetItemRole_HasAnAction = Qt::UserRole, - tUBTGTreeWidgetItemRole_HasAnUrl -} tUBTGTreeWidgetItemRole; - -UBTeacherGuidePresentationWidget::UBTeacherGuidePresentationWidget(QWidget *parent, const char *name) : - QWidget(parent) - , mpPageTitle(NULL) - , mpComment(NULL) - , mpLayout(NULL) - , mpButtonTitleLayout(NULL) - , mpDocumentTitle(NULL) - , mpPageNumberLabel(NULL) - , mpSeparator(NULL) - , mpModePushButton(NULL) - , mpTreeWidget(NULL) - , mpRootWidgetItem(NULL) - , mpMediaSwitchItem(NULL) -{ - setObjectName(name); - - mpLayout = new QVBoxLayout(this); - setLayout(mpLayout); - mpPageNumberLabel = new QLabel(this); - mpPageNumberLabel->setAlignment(Qt::AlignRight); - mpPageNumberLabel->setObjectName("UBTGPageNumberLabel"); - - mpLayout->addWidget(mpPageNumberLabel); - - mpButtonTitleLayout = new QHBoxLayout(0); - - mpModePushButton = new QPushButton(this); - mpModePushButton->setIcon(QIcon(":images/teacherGuide/pencil.svg")); - mpModePushButton->setMaximumWidth(32); - mpModePushButton->installEventFilter(this); - - connect(mpModePushButton, SIGNAL(clicked()), parentWidget(), SLOT(changeMode())); - mpButtonTitleLayout->addWidget(mpModePushButton); - - if (UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) { - mpDocumentTitle = new QLabel(this); - mpDocumentTitle->setObjectName("UBTGPresentationDocumentTitle"); - mpButtonTitleLayout->addWidget(mpDocumentTitle); - } - - mpLayout->addLayout(mpButtonTitleLayout); - - mpPageTitle = new UBTGAdaptableText(0, this); - mpPageTitle->setObjectName("UBTGPresentationPageTitle"); - mpPageTitle->setReadOnly(true); - mpPageTitle->setStyleSheet("background-color:transparent"); - mpLayout->addWidget(mpPageTitle); - - mpComment = new UBTGAdaptableText(0, this); - mpComment->setObjectName("UBTGPresentationComment"); - mpComment->setReadOnly(true); - mpComment->setStyleSheet("background-color:transparent"); - mpLayout->addWidget(mpComment); - - mpSeparator = new QFrame(this); - mpSeparator->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); - mpSeparator->setObjectName("UBTGSepartor"); - mpLayout->addWidget(mpSeparator); - - mpTreeWidget = new UBTGDraggableTreeItem(this); - mpLayout->addWidget(mpTreeWidget); - - mpRootWidgetItem = mpTreeWidget->invisibleRootItem(); - mpTreeWidget->setDragEnabled(true); - mpTreeWidget->setRootIsDecorated(false); - mpTreeWidget->setIndentation(0); - mpTreeWidget->setDropIndicatorShown(false); - mpTreeWidget->header()->close(); - mpTreeWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - mpTreeWidget->setStyleSheet("selection-background-color:transparent; padding-bottom:5px; padding-top:5px; "); - mpTreeWidget->setIconSize(QSize(24,24)); - connect(mpTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(onAddItemClicked(QTreeWidgetItem*,int))); - connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(onActiveSceneChanged())); -#ifdef Q_WS_MAC - // on mac and with the custom qt the widget on the tree are not automatically relocated when using the vertical scrollbar. To relocate them we link the valueChange signal of the vertical scrollbar witht a local signal to trig a change and a repaint of the tree widget - connect(mpTreeWidget->verticalScrollBar(),SIGNAL(valueChanged(int)),this,SLOT(onSliderMoved(int))); -#endif -} - -UBTeacherGuidePresentationWidget::~UBTeacherGuidePresentationWidget() -{ - DELETEPTR(mpComment); - DELETEPTR(mpPageTitle); - DELETEPTR(mpPageNumberLabel); - DELETEPTR(mpSeparator); - DELETEPTR(mpMediaSwitchItem); - DELETEPTR(mpModePushButton); - DELETEPTR(mpDocumentTitle); - DELETEPTR(mpButtonTitleLayout); - DELETEPTR(mpTreeWidget); - DELETEPTR(mpLayout); -} - -#ifdef Q_WS_MAC -void UBTeacherGuidePresentationWidget::onSliderMoved(int size) -{ - Q_UNUSED(size); - if(mpMediaSwitchItem) - mpMediaSwitchItem->setExpanded(true); -} -#endif - -bool UBTeacherGuidePresentationWidget::eventFilter(QObject* object, QEvent* event) -{ - Q_UNUSED(object); - if (event->type() == QEvent::HoverEnter || event->type() == QEvent::HoverMove || event->type() == QEvent::HoverLeave) - return true; - return false; -} - -void UBTeacherGuidePresentationWidget::cleanData() -{ - mpPageTitle->showText(""); - mpComment->showText(""); - //tree clean - QList itemToRemove = mpRootWidgetItem->takeChildren(); - foreach(QTreeWidgetItem* eachItem, itemToRemove) { - DELETEPTR(eachItem); - } - // the mpMediaSwitchItem is deleted by the previous loop but the pointer is not set to zero - mpMediaSwitchItem = NULL; -} - -void UBTeacherGuidePresentationWidget::onActiveSceneChanged() -{ - cleanData(); - mpPageNumberLabel->setText(tr("Page: %0").arg(UBApplication::boardController->currentPage())); - UBDocumentProxy* documentProxy = UBApplication::boardController->selectedDocument(); - if (mpDocumentTitle) - mpDocumentTitle->setText( documentProxy->metaData(UBSettings::sessionTitle).toString()); -} - -void UBTeacherGuidePresentationWidget::createMediaButtonItem() -{ - if (!mpMediaSwitchItem) { - mpMediaSwitchItem = new QTreeWidgetItem(mpRootWidgetItem); - mpMediaSwitchItem->setText(0, "+"); - mpMediaSwitchItem->setExpanded(false); - mpMediaSwitchItem->setData(0, tUBTGTreeWidgetItemRole_HasAnAction, tUBTGActionAssociateOnClickItem_EXPAND); - mpMediaSwitchItem->setData(0, Qt::BackgroundRole, QVariant(QColor(200, 200, 200))); - mpMediaSwitchItem->setData(0, Qt::FontRole, QVariant(QFont(QApplication::font().family(), 16))); - mpMediaSwitchItem->setData(0, Qt::TextAlignmentRole, QVariant(Qt::AlignCenter)); - mpRootWidgetItem->addChild(mpMediaSwitchItem); - } -} - -void UBTeacherGuidePresentationWidget::showData( QVector data) -{ - cleanData(); - - foreach(tUBGEElementNode* element, data) { - if (element->name == "pageTitle") - mpPageTitle->showText(element->attributes.value("value")); - else if (element->name == "comment") - mpComment->showText(element->attributes.value("value")); - else if (element->name == "action") { - QTreeWidgetItem* newWidgetItem = new QTreeWidgetItem(mpRootWidgetItem); - newWidgetItem->setText(0, element->attributes.value("task")); - newWidgetItem->setFlags(Qt::ItemIsEnabled); - QString colorString = element->attributes.value("owner").toInt() == 0 ? "blue" : "green"; - UBTGAdaptableText* textWidget = new UBTGAdaptableText(newWidgetItem, 0); - textWidget->bottomMargin(14); - textWidget->setStyleSheet( "QWidget {background: #EEEEEE; border:none; color:" + colorString + ";}"); - textWidget->showText(element->attributes.value("task")); - textWidget->document()->setDefaultFont( QFont(QApplication::font().family(), 11)); - mpTreeWidget->setItemWidget(newWidgetItem, 0, textWidget); - - mpRootWidgetItem->addChild(newWidgetItem); - } - else if (element->name == "media") { - createMediaButtonItem(); - QTreeWidgetItem* newWidgetItem = new QTreeWidgetItem(mpMediaSwitchItem); - newWidgetItem->setIcon(0, QIcon( ":images/teacherGuide/" + element->attributes.value("mediaType") + "_24x24.svg")); - newWidgetItem->setText(0, element->attributes.value("title")); - newWidgetItem->setData(0, tUBTGTreeWidgetItemRole_HasAnAction, tUBTGActionAssociateOnClickItem_MEDIA); - newWidgetItem->setData(0, Qt::FontRole, QVariant(QFont(QApplication::font().family(), 11))); - QString mimeTypeString; -#ifdef Q_WS_WIN - mimeTypeString = QUrl::fromLocalFile(UBApplication::boardController->selectedDocument()->persistencePath()+ "/" + element->attributes.value("relativePath")).toString(); -#else - mimeTypeString = UBApplication::boardController->selectedDocument()->persistencePath() + "/" + element->attributes.value("relativePath"); -#endif - newWidgetItem->setData(0, TG_USER_ROLE_MIME_TYPE, mimeTypeString); - newWidgetItem->setFlags( Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsSelectable); - mpRootWidgetItem->addChild(newWidgetItem); - - QTreeWidgetItem* mediaItem = new QTreeWidgetItem(newWidgetItem); - mediaItem->setData(0, tUBTGTreeWidgetItemRole_HasAnAction, tUBTGActionAssociateOnClickItem_NONE); - qDebug() << element->attributes.value("mediaType"); - UBTGMediaWidget* mediaWidget = new UBTGMediaWidget(element->attributes.value("relativePath"), newWidgetItem,0,element->attributes.value("mediaType").contains("flash")); - newWidgetItem->setExpanded(false); - mpTreeWidget->setItemWidget(mediaItem, 0, mediaWidget); - } - else if (element->name == "link") { - createMediaButtonItem(); - QTreeWidgetItem* newWidgetItem = new QTreeWidgetItem( mpMediaSwitchItem); - newWidgetItem->setIcon(0, QIcon(":images/teacherGuide/link_24x24.svg")); - newWidgetItem->setText(0, element->attributes.value("title")); - newWidgetItem->setData(0, tUBTGTreeWidgetItemRole_HasAnAction, tUBTGActionAssociateOnClickItem_URL); - newWidgetItem->setData(0, tUBTGTreeWidgetItemRole_HasAnUrl, QVariant(element->attributes.value("url"))); - newWidgetItem->setData(0, Qt::FontRole, QVariant(QFont(QApplication::font().family(), 11))); - newWidgetItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); - mpRootWidgetItem->addChild(newWidgetItem); - } - } -} - -void UBTeacherGuidePresentationWidget::onAddItemClicked(QTreeWidgetItem* widget, int column) -{ - int associateAction = widget->data(column, tUBTGTreeWidgetItemRole_HasAnAction).toInt(); - if (column == 0 && associateAction != tUBTGActionAssociateOnClickItem_NONE) { - switch (associateAction) { - case tUBTGActionAssociateOnClickItem_EXPAND: - widget->setExpanded(!widget->isExpanded()); - if (widget->isExpanded()) - mpMediaSwitchItem->setText(0, "-"); - else - mpMediaSwitchItem->setText(0, "+"); - break; - case tUBTGActionAssociateOnClickItem_URL: - widget->data(column, tUBTGTreeWidgetItemRole_HasAnUrl).toString(); - UBApplication::webController->loadUrl( QUrl( widget->data(column, tUBTGTreeWidgetItemRole_HasAnUrl).toString())); - break; - case tUBTGActionAssociateOnClickItem_MEDIA: - widget->setExpanded(!widget->isExpanded()); - break; - default: - qDebug() << "associateAction no action set " << associateAction; - } - } -} - -/*************************************************************************** - * class UBTeacherGuidePageZeroWidget * - ***************************************************************************/ -UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, const char* name) : - QWidget(parent) - , mpLayout(NULL) - , mpButtonTitleLayout(NULL) - , mpContainerWidgetLayout(NULL) - , mpModePushButton(NULL) - , mpPageNumberLabel(NULL) - , mpScrollArea(NULL) - , mpContainerWidget(NULL) - , mpSessionTitle(NULL) - , mpSeparatorSessionTitle(NULL) - , mpAuthorsLabel(NULL) - , mpAuthors(NULL) - , mpSeparatorAuthors(NULL) - , mpCreationLabel(NULL) - , mpLastModifiedLabel(NULL) - , mpObjectivesLabel(NULL) - , mpObjectives(NULL) - , mpSeparatorObjectives(NULL) - , mpIndexLabel(NULL) - , mpKeywordsLabel(NULL) - , mpKeywords(NULL) - , mpSchoolLevelItemLabel(NULL) - , mpSchoolLevelBox(NULL) - , mpSchoolLevelValueLabel(NULL) - , mpSchoolSubjectsItemLabel(NULL) - , mpSchoolSubjectsBox(NULL) - , mpSchoolSubjectsValueLabel(NULL) - , mpSchoolTypeItemLabel(NULL) - , mpSchoolTypeBox(NULL) - , mpSchoolTypeValueLabel(NULL) - , mpSeparatorIndex(NULL) - , mpLicenceLabel(NULL) - , mpLicenceBox( NULL) - , mpLicenceIcon(NULL) - , mpLicenceLayout(NULL) - , mpSceneItemSessionTitle(NULL) -{ - setObjectName(name); - QString chapterStyle("QLabel {font-size:16px; font-weight:bold;}"); - mpLayout = new QVBoxLayout(0); - setLayout(mpLayout); - mpPageNumberLabel = new QLabel(this); - mpPageNumberLabel->setAlignment(Qt::AlignRight); - mpPageNumberLabel->setObjectName("UBTGPageNumberLabel"); - mpPageNumberLabel->setText(tr("Title page")); - mpLayout->addWidget(mpPageNumberLabel); - - mpScrollArea = new QScrollArea(); - mpScrollArea->setFocusPolicy(Qt::NoFocus); - mpContainerWidget = new QWidget(); - mpContainerWidget->setFocusPolicy(Qt::NoFocus); - mpContainerWidgetLayout = new QVBoxLayout(); - - mpLayout->addWidget(mpScrollArea); - mpScrollArea->setWidget(mpContainerWidget); - mpScrollArea->setWidgetResizable(true); - mpScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - mpContainerWidget->setLayout(mpContainerWidgetLayout); - - mpButtonTitleLayout = new QHBoxLayout(0); - - mpModePushButton = new QPushButton(this); - mpModePushButton->setIcon(QIcon(":images/teacherGuide/pencil.svg")); - mpModePushButton->setMaximumWidth(32); - mpModePushButton->installEventFilter(this); - mpButtonTitleLayout->addWidget(mpModePushButton); - connect(mpModePushButton, SIGNAL(clicked()), this, SLOT(switchToMode())); - - mpSessionTitle = new UBTGAdaptableText(0, this, "UBTGSessionTitle"); - mpSessionTitle->setPlaceHolderText(tr("Type session title here ...")); - mpSessionTitle->setMaximumLength(1000); - mpButtonTitleLayout->addWidget(mpSessionTitle); - connect(this, SIGNAL(resized()), mpSessionTitle, SLOT(onTextChanged())); - - mpContainerWidgetLayout->addLayout(mpButtonTitleLayout); - - mpSeparatorSessionTitle = new QFrame(this); - mpSeparatorSessionTitle->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); - mpSeparatorSessionTitle->setObjectName("UBTGSeparator"); - mpContainerWidgetLayout->addWidget(mpSeparatorSessionTitle); - - mpAuthorsLabel = new QLabel(this); - mpAuthorsLabel->setObjectName("UBTGZeroPageEditionModeTitle"); - mpAuthorsLabel->setText(tr("Author(s)")); - mpAuthorsLabel->setStyleSheet(chapterStyle); - mpContainerWidgetLayout->addWidget(mpAuthorsLabel); - - mpAuthors = new UBTGAdaptableText(0, this); - mpAuthors->setObjectName("UBTGZeroPageInputText"); - mpAuthors->setPlaceHolderText(tr("Type authors here ...")); - mpContainerWidgetLayout->addWidget(mpAuthors); - connect(this, SIGNAL(resized()), mpAuthors, SLOT(onTextChanged())); - - mpCreationLabel = new QLabel(this); - mpCreationLabel->setObjectName("UBTGZeroPageDateLabel"); - mpContainerWidgetLayout->addWidget(mpCreationLabel); - - mpLastModifiedLabel = new QLabel(this); - mpLastModifiedLabel->setObjectName("UBTGZeroPageDateLabel"); - mpContainerWidgetLayout->addWidget(mpLastModifiedLabel); - - mpSeparatorAuthors = new QFrame(this); - mpSeparatorAuthors->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); - mpSeparatorAuthors->setObjectName("UBTGSeparator"); - mpContainerWidgetLayout->addWidget(mpSeparatorAuthors); - - mpObjectivesLabel = new QLabel(this); - mpObjectivesLabel->setObjectName("UBTGZeroPageEditionModeTitle"); - mpObjectivesLabel->setText(tr("Objective(s)")); - mpObjectivesLabel->setStyleSheet(chapterStyle); - mpContainerWidgetLayout->addWidget(mpObjectivesLabel); - - mpObjectives = new UBTGAdaptableText(0, this); - mpObjectives->setObjectName("UBTGZeroPageInputText"); - mpObjectives->setPlaceHolderText(tr("Type objectives here...")); - mpContainerWidgetLayout->addWidget(mpObjectives); - connect(this, SIGNAL(resized()), mpObjectives, SLOT(onTextChanged())); - - mpSeparatorObjectives = new QFrame(this); - mpSeparatorObjectives->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); - mpSeparatorObjectives->setObjectName("UBTGSeparator"); - mpContainerWidgetLayout->addWidget(mpSeparatorObjectives); - - mpIndexLabel = new QLabel(this); - mpIndexLabel->setObjectName("UBTGZeroPageEditionModeTitle"); - mpIndexLabel->setText(tr("Resource indexing")); - mpIndexLabel->setStyleSheet(chapterStyle); - mpContainerWidgetLayout->addWidget(mpIndexLabel); - - mpKeywordsLabel = new QLabel(this); - mpKeywordsLabel->setObjectName("UBTGZeroPageItemLabel"); - mpKeywordsLabel->setText(tr("Keywords:")); - mpKeywordsLabel->setStyleSheet(chapterStyle); - mpContainerWidgetLayout->addWidget(mpKeywordsLabel); - mpKeywords = new UBTGAdaptableText(0, this); - mpKeywords->setPlaceHolderText(tr("Type keywords here ...")); - mpContainerWidgetLayout->addWidget(mpKeywords); - connect(this, SIGNAL(resized()), mpKeywords, SLOT(onTextChanged())); - - mpSchoolLevelItemLabel = new QLabel(this); - mpSchoolLevelItemLabel->setObjectName("UBTGZeroPageItemLabel"); - mpSchoolLevelItemLabel->setText(tr("Level:")); - mpSchoolLevelItemLabel->setStyleSheet(chapterStyle); - mpContainerWidgetLayout->addWidget(mpSchoolLevelItemLabel); - mpSchoolLevelBox = new QComboBox(this); - mpSchoolLevelBox->setMinimumHeight(22); - mpSchoolLevelBox->setMinimumWidth(LOWER_RESIZE_WIDTH); - mpSchoolLevelBox->setObjectName("DockPaletteWidgetComboBox"); - connect(mpSchoolLevelBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(onSchoolLevelChanged(QString))); - mpContainerWidgetLayout->addWidget(mpSchoolLevelBox); - mpSchoolLevelValueLabel = new QLabel(this); - mpContainerWidgetLayout->addWidget(mpSchoolLevelValueLabel); - - mpSchoolSubjectsItemLabel = new QLabel(this); - mpSchoolSubjectsItemLabel->setObjectName("UBTGZeroPageItemLabel"); - mpSchoolSubjectsItemLabel->setText(tr("Subjects:")); - mpSchoolSubjectsItemLabel->setStyleSheet(chapterStyle); - mpContainerWidgetLayout->addWidget(mpSchoolSubjectsItemLabel); - mpSchoolSubjectsBox = new QComboBox(this); - mpSchoolSubjectsBox->setMinimumHeight(22); - mpSchoolSubjectsBox->setMinimumWidth(LOWER_RESIZE_WIDTH); - mpSchoolSubjectsBox->setObjectName("DockPaletteWidgetComboBox"); - mpContainerWidgetLayout->addWidget(mpSchoolSubjectsBox); - mpSchoolSubjectsValueLabel = new QLabel(this); - mpContainerWidgetLayout->addWidget(mpSchoolSubjectsValueLabel); - - mpSchoolTypeItemLabel = new QLabel(this); - mpSchoolTypeItemLabel->setObjectName("UBTGZeroPageItemLabel"); - mpSchoolTypeItemLabel->setText(tr("Type:")); - mpSchoolTypeItemLabel->setStyleSheet(chapterStyle); - mpContainerWidgetLayout->addWidget(mpSchoolTypeItemLabel); - mpSchoolTypeBox = new QComboBox(this); - mpSchoolTypeBox->setMinimumHeight(22); - mpSchoolTypeBox->setMinimumWidth(LOWER_RESIZE_WIDTH); - mpSchoolTypeBox->setObjectName("DockPaletteWidgetComboBox"); - mpContainerWidgetLayout->addWidget(mpSchoolTypeBox); - mpSchoolTypeValueLabel = new QLabel(this); - mpContainerWidgetLayout->addWidget(mpSchoolTypeValueLabel); - - mpSeparatorIndex = new QFrame(this); - mpSeparatorIndex->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); - mpSeparatorIndex->setObjectName("UBTGSeparator"); - mpContainerWidgetLayout->addWidget(mpSeparatorIndex); - - mpLicenceLabel = new QLabel(this); - mpLicenceLabel->setObjectName("UBTGZeroPageItemLabel"); - mpLicenceLabel->setText(tr("Licence")); - mpLicenceLabel->setStyleSheet(chapterStyle); - mpContainerWidgetLayout->addWidget(mpLicenceLabel); - mpLicenceBox = new QComboBox(this); - mpLicenceBox->setMinimumHeight(22); - mpLicenceBox->setMinimumWidth(LOWER_RESIZE_WIDTH); - mpLicenceBox->setObjectName("DockPaletteWidgetComboBox"); - mpContainerWidgetLayout->addWidget(mpLicenceBox); - mpLicenceLayout = new QHBoxLayout(0); - mpLicenceIcon = new QLabel(this); - mpLicenceIcon->setMinimumWidth(LOWER_RESIZE_WIDTH/2); - mpLicenceLayout->addWidget(mpLicenceIcon); - mpLicenceValueLabel = new QLabel(this); - mpLicenceValueLabel->setMinimumWidth(LOWER_RESIZE_WIDTH/2); - mpLicenceLayout->addWidget(mpLicenceValueLabel); - mpContainerWidgetLayout->addLayout(mpLicenceLayout); - mpContainerWidgetLayout->addStretch(1); - - connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(onActiveSceneChanged())); - fillComboBoxes(); -} - -UBTeacherGuidePageZeroWidget::~UBTeacherGuidePageZeroWidget() -{ - DELETEPTR(mpPageNumberLabel); - DELETEPTR(mpSessionTitle); - DELETEPTR(mpSeparatorSessionTitle); - DELETEPTR(mpAuthorsLabel); - DELETEPTR(mpAuthors); - DELETEPTR(mpSeparatorAuthors); - DELETEPTR(mpCreationLabel); - DELETEPTR(mpLastModifiedLabel); - DELETEPTR(mpObjectivesLabel); - DELETEPTR(mpObjectives); - DELETEPTR(mpSeparatorObjectives); - DELETEPTR(mpIndexLabel); - DELETEPTR(mpKeywordsLabel); - DELETEPTR(mpKeywords); - DELETEPTR(mpSchoolLevelItemLabel); - DELETEPTR(mpSchoolLevelBox); - DELETEPTR(mpSchoolSubjectsItemLabel); - DELETEPTR(mpSchoolSubjectsBox); - DELETEPTR(mpSchoolTypeItemLabel); - DELETEPTR(mpSchoolTypeBox); - DELETEPTR(mpSeparatorIndex); - DELETEPTR(mpLicenceLabel); - DELETEPTR(mpLicenceBox); - DELETEPTR(mpLicenceValueLabel); - DELETEPTR(mpLicenceIcon); - DELETEPTR(mpModePushButton); - DELETEPTR(mpLicenceLayout); - DELETEPTR(mpButtonTitleLayout); - DELETEPTR(mpContainerWidgetLayout); - DELETEPTR(mpContainerWidget); - DELETEPTR(mpScrollArea); - DELETEPTR(mpLayout); -} - -bool UBTeacherGuidePageZeroWidget::eventFilter(QObject* object, QEvent* event) -{ - Q_UNUSED(object); - if (event->type() == QEvent::HoverEnter || event->type() == QEvent::HoverMove || event->type() == QEvent::HoverLeave) - return true; - return false; -} - -void UBTeacherGuidePageZeroWidget::fillComboBoxes() -{ - QString parametersConfigFilePath = UBSettings::settings()->applicationCustomizationDirectory() + "/teacherGuide/indexingParameters.xml"; - QFile parametersFile(parametersConfigFilePath); - if (!parametersFile.exists()) { - qCritical() << "UBTeacherGuidePageZeroEditionWidget fillComboBoxes file not found " << parametersConfigFilePath; - return; - } - - parametersFile.open(QFile::ReadOnly); - - QDomDocument doc; - doc.setContent(parametersFile.readAll()); - QDomElement rootElement = doc.elementsByTagName("teacherGuide").at(0).toElement(); - - QDomNodeList subjects = rootElement.elementsByTagName("subjects"); - for (int baseLevelCounter = 0; baseLevelCounter < subjects.count(); baseLevelCounter += 1) { - QDomNode subjectsForBaseLevel = subjects.at(baseLevelCounter); - QDomNodeList subjectsList = subjectsForBaseLevel.childNodes(); - QStringList subjectsRelatedToBaseLevel; - for (int j = 0; j < subjectsList.count(); j += 1) { - subjectsRelatedToBaseLevel.append(subjectsList.at(j).toElement().attribute("label")); - } - mSubjects.insert( subjectsForBaseLevel.toElement().attribute("baseLevel"), subjectsRelatedToBaseLevel); - } - - QDomNodeList gradeLevels = rootElement.elementsByTagName("gradeLevels").at(0).childNodes(); - for (int i = 0; i < gradeLevels.count(); i += 1) { - mGradeLevelsMap.insert(gradeLevels.at(i).toElement().attribute("label"), gradeLevels.at(i).toElement().attribute("baseLevel")); - mpSchoolLevelBox->addItem( gradeLevels.at(i).toElement().attribute("label")); - } - - QDomNodeList types = rootElement.elementsByTagName("types").at(0).childNodes(); - for (int i = 0; i < types.count(); i += 1) - mpSchoolTypeBox->addItem(types.at(i).toElement().attribute("label")); - - parametersFile.close(); - - QStringList licences; - licences << tr("Attribution-ShareAlike CC BY-SA") - << tr("Attribution CC BY") - << tr("Attribution-NoDerivs CC BY-ND") - << tr("Attribution-NonCommercial CC BY-NC") - << tr("Attribution-NonCommercial-NoDerivs CC BY-NC-ND") - << tr("Attribution-NonCommercial-ShareAlike CC BY-NC-SA") - << tr("Public domain") - << tr("Copyright"); - mpLicenceBox->addItems(licences); - QStringList licenceIconList; - licenceIconList << ":images/licenses/ccbysa.png" - << ":images/licenses/ccby.png" - << ":images/licenses/ccbynd.png" - << ":images/licenses/ccbync.png" - << ":images/licenses/ccbyncnd.png" - << ":images/licenses/ccbyncsa.png"; - for (int i = 0; i < licenceIconList.count(); i += 1) - mpLicenceBox->setItemData(i, licenceIconList.at(i)); -} - -void UBTeacherGuidePageZeroWidget::onSchoolLevelChanged(QString schoolLevel) -{ - QStringList subjects = mSubjects.value(mGradeLevelsMap.value(schoolLevel)); - mpSchoolSubjectsBox->clear(); - if (subjects.count()) { - mpSchoolSubjectsItemLabel->setEnabled(true); - mpSchoolSubjectsBox->setEnabled(true); - mpSchoolSubjectsBox->addItems(subjects); - } - else { - mpSchoolSubjectsItemLabel->setDisabled(true); - mpSchoolSubjectsBox->setDisabled(true); - } -} - -void UBTeacherGuidePageZeroWidget::onActiveSceneChanged() -{ - UBDocumentProxy* documentProxy = UBApplication::boardController->selectedDocument(); - if (documentProxy && UBApplication::boardController->currentPage() == 0) { - QDateTime creationDate = documentProxy->documentDate(); - mpCreationLabel->setText( tr("Created the:\n") + creationDate.toString(Qt::DefaultLocaleShortDate)); - QDateTime updatedDate = documentProxy->lastUpdate(); - mpLastModifiedLabel->setText( tr("Updated the:\n") + updatedDate.toString(Qt::DefaultLocaleShortDate)); - loadData(); - updateSceneTitle(); - } -} - -void UBTeacherGuidePageZeroWidget::hideEvent(QHideEvent * event) -{ - persistData(); - QWidget::hideEvent(event); -} - -void UBTeacherGuidePageZeroWidget::loadData() -{ - UBDocumentProxy* documentProxy = UBApplication::boardController->selectedDocument(); - mpSessionTitle->setText( documentProxy->metaData(UBSettings::sessionTitle).toString()); - mpAuthors->setText( documentProxy->metaData(UBSettings::sessionAuthors).toString()); - mpObjectives->setText( documentProxy->metaData(UBSettings::sessionObjectives).toString()); - mpKeywords->setText( documentProxy->metaData(UBSettings::sessionKeywords).toString()); - - int currentIndex = mpSchoolLevelBox->findText(documentProxy->metaData(UBSettings::sessionGradeLevel).toString()); - mpSchoolLevelBox->setCurrentIndex((currentIndex != -1) ? currentIndex : 0); - - currentIndex = mpSchoolSubjectsBox->findText(documentProxy->metaData(UBSettings::sessionSubjects).toString()); - mpSchoolSubjectsBox->setCurrentIndex((currentIndex != -1) ? currentIndex : 0); - - currentIndex = mpSchoolTypeBox->findText(documentProxy->metaData(UBSettings::sessionType).toString()); - mpSchoolTypeBox->setCurrentIndex((currentIndex != -1) ? currentIndex : 0); - - currentIndex = documentProxy->metaData(UBSettings::sessionLicence).toInt(); - mpLicenceBox->setCurrentIndex((currentIndex != -1) ? currentIndex : 0); -} - -void UBTeacherGuidePageZeroWidget::persistData() -{ - // check necessary because at document closing hide event is send after boardcontroller set - // to NULL - if (UBApplication::boardController) { - UBDocumentProxy* documentProxy = UBApplication::boardController->selectedDocument(); - documentProxy->setMetaData(UBSettings::sessionTitle, mpSessionTitle->text()); - documentProxy->setMetaData(UBSettings::sessionAuthors, mpAuthors->text()); - documentProxy->setMetaData(UBSettings::sessionObjectives, mpObjectives->text()); - documentProxy->setMetaData(UBSettings::sessionKeywords, mpKeywords->text()); - documentProxy->setMetaData(UBSettings::sessionGradeLevel, mpSchoolLevelBox->currentText()); - documentProxy->setMetaData(UBSettings::sessionSubjects, mpSchoolSubjectsBox->currentText()); - documentProxy->setMetaData(UBSettings::sessionType, mpSchoolTypeBox->currentText()); - documentProxy->setMetaData(UBSettings::sessionLicence, mpLicenceBox->currentIndex()); - } -} - -void UBTeacherGuidePageZeroWidget::updateSceneTitle() -{ - QString sessionTitle = mpSessionTitle->text(); - if (!sessionTitle.isEmpty()) - UBApplication::boardController->activeScene()->textForObjectName(mpSessionTitle->text()); -} - -void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode) -{ - if (mode == tUBTGZeroPageMode_EDITION) { - QString inputStyleSheet("QTextEdit { background: white; border-radius: 10px; border: 2px;}"); - mpModePushButton->hide(); - mpSessionTitle->setReadOnly(false); - mpSessionTitle->managePlaceholder(true); - mpSessionTitle->setStyleSheet(inputStyleSheet); - QFont titleFont(QApplication::font().family(), 11, -1); - mpSessionTitle->document()->setDefaultFont(titleFont); - mpAuthors->setReadOnly(false); - mpAuthors->managePlaceholder(false); - mpAuthors->setStyleSheet(inputStyleSheet); - mpObjectives->setReadOnly(false); - mpObjectives->managePlaceholder(false); - mpObjectives->setStyleSheet(inputStyleSheet); - mpKeywords->setReadOnly(false); - mpKeywords->managePlaceholder(false); - mpKeywords->setStyleSheet(inputStyleSheet); - mpSchoolLevelValueLabel->hide(); - mpSchoolLevelBox->show(); - mpSchoolSubjectsValueLabel->hide(); - mpSchoolSubjectsBox->show(); - mpSchoolTypeValueLabel->hide(); - mpSchoolTypeBox->show(); - mpLicenceIcon->hide(); - mpLicenceValueLabel->hide(); - mpLicenceBox->show(); - } - else { - QString inputStyleSheet( "QTextEdit { background: transparent; border: none;}"); - mpModePushButton->show(); - mpSessionTitle->showText(mpSessionTitle->text()); - mpSessionTitle->setStyleSheet(inputStyleSheet); - updateSceneTitle(); - QFont titleFont(QApplication::font().family(), 14, 1); - mpSessionTitle->document()->setDefaultFont(titleFont); - mpAuthors->setStyleSheet(inputStyleSheet); - mpAuthors->setTextColor(QColor(Qt::black)); - mpAuthors->showText(mpAuthors->text()); - mpObjectives->setStyleSheet(inputStyleSheet); - mpObjectives->setTextColor(QColor(Qt::black)); - mpObjectives->showText(mpObjectives->text()); - mpKeywords->setStyleSheet(inputStyleSheet); - mpKeywords->setTextColor(QColor(Qt::black)); - mpKeywords->showText(mpKeywords->text()); - mpSchoolLevelValueLabel->setText(mpSchoolLevelBox->currentText()); - mpSchoolLevelValueLabel->show(); - mpSchoolLevelBox->hide(); - mpSchoolSubjectsValueLabel->setText(mpSchoolSubjectsBox->currentText()); - mpSchoolSubjectsValueLabel->show(); - mpSchoolSubjectsBox->hide(); - mpSchoolTypeValueLabel->setText(mpSchoolTypeBox->currentText()); - mpSchoolTypeValueLabel->show(); - mpSchoolTypeBox->hide(); - mpLicenceValueLabel->setText(mpLicenceBox->currentText()); - QString licenceIconPath = mpLicenceBox->itemData(mpLicenceBox->currentIndex()).toString(); - if (!licenceIconPath.isEmpty()) { - mpLicenceIcon->setPixmap(QPixmap(licenceIconPath)); - mpLicenceIcon->show(); - } - mpLicenceValueLabel->show(); - mpLicenceBox->hide(); - persistData(); - } - update(); -} - -QVector UBTeacherGuidePageZeroWidget::getData() -{ - QVector result; - tUBGEElementNode* elementNode = new tUBGEElementNode(); - elementNode->name = "sessionTitle"; - elementNode->attributes.insert("value", mpSessionTitle->text()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "authors"; - elementNode->attributes.insert("value", mpAuthors->text()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "creationDate"; - elementNode->attributes.insert("value", mpCreationLabel->text()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "lastModifiedDate"; - elementNode->attributes.insert("value", mpLastModifiedLabel->text()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "goals"; - elementNode->attributes.insert("value", mpObjectives->text()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "keywords"; - elementNode->attributes.insert("value", mpKeywords->text()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "schoolLevel"; - elementNode->attributes.insert("value", mpSchoolLevelBox->currentText()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "schoolBranch"; - elementNode->attributes.insert("value", mpSchoolSubjectsBox->currentText()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "schoolType"; - elementNode->attributes.insert("value", mpSchoolTypeBox->currentText()); - result << elementNode; - - elementNode = new tUBGEElementNode(); - elementNode->name = "licence"; - elementNode->attributes.insert("value", QString("%1").arg(mpLicenceBox->currentIndex())); - result << elementNode; - return result; -} - -bool UBTeacherGuidePageZeroWidget::isModified() -{ - bool result = false; - result |= mpSessionTitle->text().length() > 0; - result |= mpAuthors->text().length() > 0; - result |= mpObjectives->text().length() > 0; - result |= mpKeywords->text().length() > 0; - result |= mpSchoolLevelBox->currentIndex() > 0; - result |= mpSchoolSubjectsBox->currentIndex() > 0; - result |= mpSchoolTypeBox->currentIndex() > 0; - result |= mpLicenceBox->currentIndex() > 0; - return result; -} - -void UBTeacherGuidePageZeroWidget::resizeEvent(QResizeEvent* ev) -{ - emit resized(); - QWidget::resizeEvent(ev); -} - -/*************************************************************************** - * class UBTeacherGuideWidget * - ***************************************************************************/ -UBTeacherGuideWidget::UBTeacherGuideWidget(QWidget* parent, const char* name) : - QStackedWidget(parent) - , mpPageZeroWidget(NULL) - , mpEditionWidget(NULL) - , mpPresentationWidget(NULL) - , mKeyboardActionFired(false) -{ - setObjectName(name); - if (UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) { - mpPageZeroWidget = new UBTeacherGuidePageZeroWidget(this); - addWidget(mpPageZeroWidget); - } - if (UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()) { - mpEditionWidget = new UBTeacherGuideEditionWidget(this); - addWidget(mpEditionWidget); - mpPresentationWidget = new UBTeacherGuidePresentationWidget(this); - addWidget(mpPresentationWidget); - } - - connect(UBApplication::boardController->controlView(), SIGNAL(clickOnBoard()), this, SLOT(showPresentationMode())); - connectToStylusPalette(); - connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(onActiveSceneChanged())); -} - -UBTeacherGuideWidget::~UBTeacherGuideWidget() -{ - DELETEPTR(mpPageZeroWidget); - DELETEPTR(mpEditionWidget); - DELETEPTR(mpPresentationWidget); -} - -void UBTeacherGuideWidget::onActiveSceneChanged() -{ - if (UBApplication::boardController->currentPage() == 0) { - if(mpPageZeroWidget->isModified()) - mpPageZeroWidget->switchToMode(tUBTGZeroPageMode_PRESENTATION); - else - mpPageZeroWidget->switchToMode(tUBTGZeroPageMode_EDITION); - - setCurrentWidget(mpPageZeroWidget); - } - else{ - if(mpEditionWidget->isModified()){ - mCurrentData = mpEditionWidget->getData(); - mpPresentationWidget->showData(mCurrentData); - setCurrentWidget(mpPresentationWidget); - } - else - setCurrentWidget(mpEditionWidget); - } - -} - -void UBTeacherGuideWidget::onTriggeredAction(bool checked) -{ - Q_UNUSED(checked); - if(!mKeyboardActionFired) - showPresentationMode(); - mKeyboardActionFired=false; -} - -void UBTeacherGuideWidget::onTriggeredKeyboardAction(bool checked) -{ - Q_UNUSED(checked); - mKeyboardActionFired = true; -} - -void UBTeacherGuideWidget::connectToStylusPalette() -{ - connect(UBApplication::mainWindow->actionPen, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionEraser, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionMarker, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionPointer, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionPlay, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionZoomIn, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionZoomOut, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionCapture, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionHand, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionLine, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionText, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionSelector, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool))); - connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(onTriggeredKeyboardAction(bool))); -} - -void UBTeacherGuideWidget::showPresentationMode() -{ - if (currentWidget() == mpPageZeroWidget) { - mCurrentData = mpPageZeroWidget->getData(); - mpPageZeroWidget->switchToMode(tUBTGZeroPageMode_PRESENTATION); - } - else if (currentWidget() == mpEditionWidget) { - mCurrentData = mpEditionWidget->getData(); - mpPresentationWidget->showData(mCurrentData); - setCurrentWidget(mpPresentationWidget); - } -} - -void UBTeacherGuideWidget::changeMode() -{ - if (currentWidget() == mpEditionWidget) - setCurrentWidget(mpPresentationWidget); - else - setCurrentWidget(mpEditionWidget); - -} - -bool UBTeacherGuideWidget::isModified() -{ - if (currentWidget() == mpPageZeroWidget) - return mpPageZeroWidget->isModified(); - else - return mpEditionWidget->isModified(); -} - diff --git a/src/gui/UBTeacherGuideWidget.h b/src/gui/UBTeacherGuideWidget.h deleted file mode 100644 index 5c445cec..00000000 --- a/src/gui/UBTeacherGuideWidget.h +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA) - * - * This file is part of Open-Sankoré. - * - * Open-Sankoré 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, version 3 of the License, - * with a specific linking exception for the OpenSSL project's - * "OpenSSL" library (or with modified versions of it that use the - * same license as the "OpenSSL" library). - * - * Open-Sankoré 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 Open-Sankoré. If not, see . - */ - - - -#ifndef UBTEACHERGUIDEWIDGET_H -#define UBTEACHERGUIDEWIDGET_H - -class QTreeWidget; -class QHeaderView; -class QLabel; -class QVBoxLayout; -class QPushButton; -class UBDocumentProxy; -class UBGraphicsTextItem; -class QScrollArea; - -#include "UBTeacherGuideWidgetsTools.h" - -#include "interfaces/IDataStorage.h" - -typedef enum -{ - tUBTGZeroPageMode_EDITION, - tUBTGZeroPageMode_PRESENTATION -}tUBTGZeroPageMode; - -#define LOWER_RESIZE_WIDTH 50 - -/*************************************************************************** - * class UBTeacherGuideEditionWidget * - ***************************************************************************/ -class UBTeacherGuideEditionWidget : public QWidget , public IDataStorage -{ - Q_OBJECT -public: - explicit UBTeacherGuideEditionWidget(QWidget* parent = 0, const char* name="UBTeacherGuideEditionWidget"); - ~UBTeacherGuideEditionWidget(); - void cleanData(); - QVector getData(); - - void load(QString element); - QVector save(int pageIndex); - - bool isModified(); - -public slots: - void onAddItemClicked(QTreeWidgetItem* widget, int column, QDomElement* element = 0); - void onActiveSceneChanged(); - void showEvent(QShowEvent* event); - -private: - QList getChildrenList(QTreeWidgetItem* widgetItem); - QVector getPageAndCommentData(); - - QVBoxLayout* mpLayout; - QLabel* mpDocumentTitle; - QLabel* mpPageNumberLabel; - UBTGAdaptableText* mpPageTitle; - UBTGAdaptableText* mpComment; - QFrame* mpSeparator; - QTreeWidget* mpTreeWidget; - QTreeWidgetItem* mpRootWidgetItem; - UBAddItem* mpAddAnActionItem; - UBAddItem* mpAddAMediaItem; - UBAddItem* mpAddALinkItem; - -private slots: - void onActiveDocumentChanged(); -#ifdef Q_WS_MACX - void onSliderMoved(int size); -#endif -}; - - -/*************************************************************************** - * class UBTeacherGuidePresentationWidget * - ***************************************************************************/ -class UBTeacherGuidePresentationWidget : public QWidget -{ - Q_OBJECT -public: - explicit UBTeacherGuidePresentationWidget(QWidget* parent, const char* name = "UBTeacherGuidePresentationName"); - ~UBTeacherGuidePresentationWidget(); - void showData(QVectordata); - void cleanData(); - -public slots: - void onAddItemClicked(QTreeWidgetItem* widget, int column); - void onActiveSceneChanged(); - -private: - bool eventFilter(QObject* object, QEvent* event); - - void createMediaButtonItem(); - - UBTGAdaptableText* mpPageTitle; - UBTGAdaptableText* mpComment; - QVBoxLayout* mpLayout; - QHBoxLayout* mpButtonTitleLayout; - QLabel* mpDocumentTitle; - QLabel* mpPageNumberLabel; - QFrame* mpSeparator; - QPushButton* mpModePushButton; - UBTGDraggableTreeItem* mpTreeWidget; - QTreeWidgetItem* mpRootWidgetItem; - QTreeWidgetItem* mpMediaSwitchItem; - - -#ifdef Q_WS_MACX -private slots: - void onSliderMoved(int size); -#endif - -}; - -/*************************************************************************** - * class UBTeacherGuidePageZeroWidget * - ***************************************************************************/ -class UBTeacherGuidePageZeroWidget : public QWidget -{ - Q_OBJECT - -public: - explicit UBTeacherGuidePageZeroWidget(QWidget* parent, const char* name = "UBTeacherGuidePageZeroEditionWidget"); - ~UBTeacherGuidePageZeroWidget(); - - QVector getData(); - bool isModified(); - -signals: - void resized(); - -public slots: - void onActiveSceneChanged(); - void switchToMode(tUBTGZeroPageMode mode = tUBTGZeroPageMode_EDITION); - -protected: - void resizeEvent(QResizeEvent* ev); - -private: - void fillComboBoxes(); - void loadData(); - void hideEvent(QHideEvent* event); - bool eventFilter(QObject* object, QEvent* event); - void updateSceneTitle(); - - QVBoxLayout* mpLayout; - QHBoxLayout* mpButtonTitleLayout; - QVBoxLayout* mpContainerWidgetLayout; - QPushButton* mpModePushButton; - QLabel* mpPageNumberLabel; - - QScrollArea* mpScrollArea; - QWidget* mpContainerWidget; - - UBTGAdaptableText* mpSessionTitle; - QFrame* mpSeparatorSessionTitle; - - QLabel* mpAuthorsLabel; - UBTGAdaptableText* mpAuthors; - QFrame* mpSeparatorAuthors; - - QLabel* mpCreationLabel; - QLabel* mpLastModifiedLabel; - QLabel* mpObjectivesLabel; - UBTGAdaptableText* mpObjectives; - QFrame* mpSeparatorObjectives; - - QLabel* mpIndexLabel; - QLabel* mpKeywordsLabel; - UBTGAdaptableText* mpKeywords; - - QLabel* mpSchoolLevelItemLabel; - QComboBox* mpSchoolLevelBox; - QLabel* mpSchoolLevelValueLabel; - - QLabel* mpSchoolSubjectsItemLabel; - QComboBox* mpSchoolSubjectsBox; - QLabel* mpSchoolSubjectsValueLabel; - - QLabel* mpSchoolTypeItemLabel; - QComboBox* mpSchoolTypeBox; - QLabel* mpSchoolTypeValueLabel; - QFrame* mpSeparatorIndex; - - QLabel* mpLicenceLabel; - QComboBox* mpLicenceBox; - QLabel* mpLicenceValueLabel; - QLabel* mpLicenceIcon; - QHBoxLayout* mpLicenceLayout; - - UBGraphicsTextItem* mpSceneItemSessionTitle; - - QMap mGradeLevelsMap; - QMap mSubjects; - -private slots: - void onSchoolLevelChanged(QString schoolLevel); - void persistData(); -}; - -/*************************************************************************** - * class UBTeacherGuideWidget * - ***************************************************************************/ - -class UBTeacherGuideWidget : public QStackedWidget -{ - Q_OBJECT -public: - explicit UBTeacherGuideWidget(QWidget* parent = 0, const char* name="UBTeacherGuideWidget"); - ~UBTeacherGuideWidget(); - - bool isModified(); - -public slots: - void changeMode(); - void showPresentationMode(); - void connectToStylusPalette(); - void onActiveSceneChanged(); - -private: - UBTeacherGuidePageZeroWidget* mpPageZeroWidget; - UBTeacherGuideEditionWidget* mpEditionWidget; - UBTeacherGuidePresentationWidget* mpPresentationWidget; - QVectormCurrentData; - bool mKeyboardActionFired; - -private slots: - void onTriggeredAction(bool checked); - void onTriggeredKeyboardAction(bool checked); -}; - -#endif // UBTEACHERGUIDEWIDGET_H diff --git a/src/gui/UBTeacherGuideWidgetsTools.cpp b/src/gui/UBTeacherGuideWidgetsTools.cpp deleted file mode 100644 index 87c0c722..00000000 --- a/src/gui/UBTeacherGuideWidgetsTools.cpp +++ /dev/null @@ -1,724 +0,0 @@ -/* - * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA) - * - * This file is part of Open-Sankoré. - * - * Open-Sankoré 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, version 3 of the License, - * with a specific linking exception for the OpenSSL project's - * "OpenSSL" library (or with modified versions of it that use the - * same license as the "OpenSSL" library). - * - * Open-Sankoré 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 Open-Sankoré. If not, see . - */ - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "UBTeacherGuideWidgetsTools.h" - -#include "core/UBPersistenceManager.h" -#include "core/UBApplication.h" - -#include "board/UBBoardController.h" - -#include "domain/UBGraphicsWidgetItem.h" - -#include "globals/UBGlobals.h" - -#include "frameworks/UBFileSystemUtils.h" - -#include "customWidgets/UBMediaWidget.h" - -#include "core/memcheck.h" - - -/*************************************************************************** - * class UBAddItem * - ***************************************************************************/ -UBAddItem::UBAddItem(const QString &string, int addSubItemWidgetType, QTreeWidget* parent): QTreeWidgetItem(parent) -{ - setIcon(0,QIcon(":images/increase.svg")); - setText(0,string); - setData(0,Qt::UserRole,QVariant(addSubItemWidgetType)); - setData(1,Qt::UserRole,QVariant(addSubItemWidgetType)); - setData(0,Qt::BackgroundRole,QVariant(QColor(200,200,200))); - setData(1,Qt::BackgroundRole,QVariant(QColor(200,200,200))); - setData(0,Qt::FontRole,QVariant(QFont(QApplication::font().family(),12))); -} - -UBAddItem::~UBAddItem() -{ - //NOOP -} - -/*************************************************************************** - * class UBTGActionWidget * - ***************************************************************************/ -UBTGActionWidget::UBTGActionWidget(QTreeWidgetItem* widget, QWidget* parent, const char* name) : QWidget(parent) - , mpLayout(NULL) - , mpOwner(NULL) - , mpTask(NULL) -{ - setObjectName(name); - SET_STYLE_SHEET(); - mpLayout = new QVBoxLayout(this); - mpOwner = new QComboBox(this); - mpOwner->setObjectName("DockPaletteWidgetComboBox"); - mpOwner->setMinimumHeight(22); - QStringList qslOwner; - qslOwner << tr("Teacher") << tr("Student"); - mpOwner->insertItems(0,qslOwner); - mpOwner->setCurrentIndex(0); - mpTask = new UBTGAdaptableText(widget,this); - mpTask->setPlaceHolderText(tr("Type task here ...")); - mpTask->setAcceptRichText(true); - mpTask->setObjectName("ActionWidgetTaskTextEdit"); - mpLayout->addWidget(mpOwner); - mpLayout->addWidget(mpTask); -} - -UBTGActionWidget::~UBTGActionWidget() -{ - DELETEPTR(mpOwner); - DELETEPTR(mpTask); - DELETEPTR(mpLayout); -} - -void UBTGActionWidget::initializeWithDom(QDomElement element) -{ - mpOwner->setCurrentIndex(element.attribute("owner").toInt()); - mpTask->setInitialText(element.attribute("task")); -} - -tUBGEElementNode* UBTGActionWidget::saveData() -{ - tUBGEElementNode* result = new tUBGEElementNode(); - result->name = "action"; - result->attributes.insert("owner",QString("%0").arg(mpOwner->currentIndex())); - result->attributes.insert("task",mpTask->text()); - return result; -} - -/*************************************************************************** - * class UBTGAdaptableText * - ***************************************************************************/ -UBTGAdaptableText::UBTGAdaptableText(QTreeWidgetItem* widget, QWidget* parent, const char* name):QTextEdit(parent) - , mBottomMargin(5) - , mpTreeWidgetItem(widget) - , mMinimumHeight(0) - , mHasPlaceHolder(false) - , mIsUpdatingSize(false) - , mMaximumLength(0) -{ - setObjectName(name); - connect(this,SIGNAL(textChanged()),this,SLOT(onTextChanged())); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - - mMinimumHeight = document()->size().height() + mBottomMargin; - setMinimumHeight(mMinimumHeight); - -} - -void UBTGAdaptableText::setMaximumLength(int length) -{ - mMaximumLength = length; -} - -void UBTGAdaptableText::setPlaceHolderText(QString text) -{ - mHasPlaceHolder = true; - - // the space addition is to make this string unique and check against it to know - // if we are talking about a typed string or the placeholder string - mPlaceHolderText = text + " "; - setPlainText(mPlaceHolderText); -} - -void UBTGAdaptableText::keyReleaseEvent(QKeyEvent* e) -{ - QTextEdit::keyReleaseEvent(e); - - if(mMaximumLength && toPlainText().length()>mMaximumLength){ - setPlainText(toPlainText().left(mMaximumLength)); - QTextCursor tc(document()); - tc.setPosition(mMaximumLength); - setTextCursor(tc); - } -} - -void UBTGAdaptableText::showEvent(QShowEvent* e) -{ - Q_UNUSED(e); - if(!mIsUpdatingSize && !hasFocus() && mHasPlaceHolder && toPlainText().isEmpty() && !isReadOnly()){ - setTextColor(QColor(Qt::lightGray)); - setPlainText(mPlaceHolderText); - } - else - // If the teacherguide is collapsed, don't updated the size. Or set the size as the expanded size - onTextChanged(); -} - -QString UBTGAdaptableText::text() -{ - QString result = toPlainText(); - if(mHasPlaceHolder && result == mPlaceHolderText) - return ""; - - return result; -} - -void UBTGAdaptableText::onTextChanged() -{ - qreal documentSize = document()->size().height(); - if(height() == documentSize + mBottomMargin){ - return; - } - mIsUpdatingSize = true; - - - if(documentSize < mMinimumHeight){ - setFixedHeight(mMinimumHeight); - } - else{ - setFixedHeight(documentSize+mBottomMargin); - } - - updateGeometry(); - //to trig a resize on the tree widget item - if(mpTreeWidgetItem){ - mpTreeWidgetItem->setDisabled(true); - mpTreeWidgetItem->setExpanded(true); - mpTreeWidgetItem->setDisabled(false); - setFocus(); - } - mIsUpdatingSize = false; -} - -void UBTGAdaptableText::setInitialText(const QString& text) -{ - setText(text); - setReadOnly(false); - onTextChanged(); -} - -void UBTGAdaptableText::resetText() -{ - if(mHasPlaceHolder && !mPlaceHolderText.isEmpty()){ - setTextColor(QColor(Qt::lightGray)); - setText(mPlaceHolderText); - } - else{ - setText(""); - setTextColor(QColor(Qt::black)); - } - onTextChanged(); -} - -void UBTGAdaptableText::showText(const QString & text) -{ - setText(text); - setReadOnly(true); - onTextChanged(); -} - -void UBTGAdaptableText::bottomMargin(int newValue) -{ - mBottomMargin = newValue; - onTextChanged(); -} - -void UBTGAdaptableText::focusInEvent(QFocusEvent* e) -{ - if(isReadOnly()){ - e->ignore(); - } - managePlaceholder(true); - QTextEdit::focusInEvent(e); -} - -void UBTGAdaptableText::focusOutEvent(QFocusEvent* e) -{ - managePlaceholder(false); - QTextEdit::focusOutEvent(e); -} - -void UBTGAdaptableText::insertFromMimeData(const QMimeData *source) -{ - QMimeData editedMimeData; - QTextDocument textDoc; - QString plainText; - - if (source->hasHtml()) - { - textDoc.setHtml(source->html()); - plainText += textDoc.toPlainText(); - } - if (source->hasText()) - if (textDoc.toPlainText() != source->text()) - plainText += source->text(); - if (source->hasUrls()) - { - foreach(QUrl url, source->urls()) - { - plainText += url.toString(); - } - } - - editedMimeData.setText(plainText); - QTextEdit::insertFromMimeData(&editedMimeData); -} - -void UBTGAdaptableText::managePlaceholder(bool focus) -{ - if(focus){ - if(toPlainText() == mPlaceHolderText){ - setTextColor(QColor(Qt::black)); - setPlainText(""); - setCursorToTheEnd(); - } - } - else{ - if(toPlainText().isEmpty()){ - setTextColor(QColor(Qt::lightGray)); - setPlainText(mPlaceHolderText); - } - } -} - -void UBTGAdaptableText::setCursorToTheEnd() -{ - QTextDocument* doc = document(); - if(NULL != doc){ - QTextBlock block = doc->lastBlock(); - QTextCursor cursor(doc); - cursor.setPosition(block.position() + block.length() - 1); - setTextCursor(cursor); - } -} - -/*************************************************************************** - * class UBTGDraggableWeb * - ***************************************************************************/ -UBDraggableWeb::UBDraggableWeb(QString& relativePath, QWidget* parent): QWebView(parent) - , mDragStartPosition(QPoint(-1,-1)) - , mDragStarted(false) - -{ - if(!relativePath.startsWith("file://")) - mRelativePath = QUrl::fromLocalFile(relativePath).toString(); - else - mRelativePath = relativePath; - //NOOP -} - -void UBDraggableWeb::mousePressEvent(QMouseEvent* event) -{ - mDragStartPosition = event->pos(); - mDragStarted = true; - QWebView::mousePressEvent(event); -} - -void UBDraggableWeb::mouseReleaseEvent(QMouseEvent* event) -{ - mDragStarted = false; - QWebView::mouseReleaseEvent(event); -} - -void UBDraggableWeb::mouseMoveEvent(QMouseEvent* event) -{ - if(mDragStarted && (event->pos() - mDragStartPosition).manhattanLength() > QApplication::startDragDistance()){ - QDrag *drag = new QDrag(this); - QMimeData *mimeData = new QMimeData; - QList urlList; - urlList << QUrl(mRelativePath); - mimeData->setUrls(urlList); - drag->setMimeData(mimeData); - - drag->exec(); - event->accept(); - mDragStarted = false; - } - else - QWebView::mouseMoveEvent(event); - -} - -/*************************************************************************** - * class UBTGMediaWidget * - ***************************************************************************/ -UBTGMediaWidget::UBTGMediaWidget(QTreeWidgetItem* widget, QWidget* parent,const char* name): QStackedWidget(parent) - , mpTreeWidgetItem(widget) - , mpDropMeWidget(NULL) - , mpWorkWidget(NULL) - , mpLayout(NULL) - , mpMediaLayout(NULL) - , mpTitle(NULL) - , mpMediaLabelWidget(NULL) - , mpMediaWidget(NULL) - , mpWebView(NULL) - , mMediaPath(QString("")) - , mIsPresentationMode(false) - , mIsInitializationMode(false) - , mMediaWidgetHeight(150) -{ - setObjectName(name); - mpDropMeWidget = new QLabel(); - mpDropMeWidget->setObjectName("UBTGMediaDropMeLabel"); - mpDropMeWidget->setText(tr("drop media here ...")); - mpDropMeWidget->setAlignment(Qt::AlignCenter); - setAcceptDrops(true); - addWidget(mpDropMeWidget); - - setMinimumHeight(250); -} - -UBTGMediaWidget::UBTGMediaWidget(QString mediaPath, QTreeWidgetItem* widget, QWidget* parent,bool forceFlashMediaType,const char* name): QStackedWidget(parent) - , mpTreeWidgetItem(widget) - , mpDropMeWidget(NULL) - , mpWorkWidget(NULL) - , mpLayout(NULL) - , mpMediaLayout(NULL) - , mpTitle(NULL) - , mpMediaLabelWidget(NULL) - , mpMediaWidget(NULL) - , mpWebView(NULL) - , mIsPresentationMode(true) - , mMediaType("") - , mIsInitializationMode(false) - , mMediaWidgetHeight(150) -{ - setObjectName(name); - mMediaPath = UBApplication::boardController->selectedDocument()->persistencePath()+ "/" + mediaPath; - setAcceptDrops(false); - createWorkWidget(forceFlashMediaType); - setFixedHeight(200); -} - -UBTGMediaWidget::~UBTGMediaWidget() -{ - DELETEPTR(mpTitle); - DELETEPTR(mpMediaLabelWidget); - DELETEPTR(mpMediaWidget); - DELETEPTR(mpWebView); - DELETEPTR(mpMediaLayout); - DELETEPTR(mpLayout); - - removeWidget(mpDropMeWidget); - DELETEPTR(mpDropMeWidget); - removeWidget(mpWorkWidget); - DELETEPTR(mpWorkWidget); -} - -void UBTGMediaWidget::initializeWithDom(QDomElement element) -{ - mIsInitializationMode = true; - setAcceptDrops(false); - mMediaPath = UBApplication::boardController->selectedDocument()->persistencePath() + "/" + element.attribute("relativePath"); - createWorkWidget(element.attribute("mediaType").contains("flash")); - setFixedHeight(200); - mpTitle->setInitialText(element.attribute("title")); - mIsInitializationMode = false; -} - -void UBTGMediaWidget::removeSource() -{ - QFileInfo fileInfo(mMediaPath); - if(fileInfo.isFile()) - QFile(mMediaPath).remove(); - else - UBFileSystemUtils::deleteDir(mMediaPath); -} - -void UBTGMediaWidget::hideEvent(QHideEvent* event) -{ - if(mpWebView) - mpWebView->page()->mainFrame()->setContent(UBGraphicsW3CWidgetItem::freezedWidgetPage().toAscii()); - QWidget::hideEvent(event); -} - -void UBTGMediaWidget::showEvent(QShowEvent* event) -{ - QWidget::showEvent(event); - if(mpWebView){ - QString indexPath = mMediaPath+"/index.htm"; - if(!QFile::exists(indexPath)) - indexPath += "l"; - mpWebView->load(QUrl::fromLocalFile(indexPath)); - } -} - -tUBGEElementNode* UBTGMediaWidget::saveData() -{ - if(!mpTitle) - return 0; - tUBGEElementNode* result = new tUBGEElementNode(); - QString relativePath = mMediaPath; - relativePath = relativePath.replace(UBApplication::boardController->selectedDocument()->persistencePath()+"/",""); - result->name = "media"; - result->attributes.insert("title",mpTitle->text()); - result->attributes.insert("relativePath",relativePath); - result->attributes.insert("mediaType",mMediaType); - return result; -} - -void UBTGMediaWidget::dragEnterEvent(QDragEnterEvent *event) -{ - event->accept(); -} - -void UBTGMediaWidget::createWorkWidget(bool forceFlashMediaType) -{ - QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(mMediaPath); - bool setMedia = true; - UBDocumentProxy* proxyDocument = UBApplication::boardController->selectedDocument(); - if(mimeType.contains("audio") || mimeType.contains("video")){ - mMediaType = mimeType.contains("audio")? "audio":"movie"; - mpMediaWidget = new UBMediaWidget(mimeType.contains("audio")?eMediaType_Audio:eMediaType_Video); - if(mIsPresentationMode || mIsInitializationMode){ - mpMediaWidget->setFile(mMediaPath); - } - else{ - mMediaPath = UBPersistenceManager::persistenceManager()->addObjectToTeacherGuideDirectory(proxyDocument, mMediaPath); - mpMediaWidget->setFile(mMediaPath); - } - } - else if(mimeType.contains("image")){ - mMediaType = "image"; - if(!(mIsPresentationMode || mIsInitializationMode)) - mMediaPath = UBPersistenceManager::persistenceManager()->addObjectToTeacherGuideDirectory(proxyDocument, mMediaPath); - - mpMediaLabelWidget = new QLabel(); - QPixmap pixmap = QPixmap(mMediaPath); - pixmap = pixmap.scaledToHeight(mMediaWidgetHeight); - mpMediaLabelWidget->setPixmap(pixmap); - } - else if(mimeType.contains("widget") && !forceFlashMediaType){ - mMediaType = "w3c"; - if(!(mIsPresentationMode || mIsInitializationMode)){ - mMediaPath = UBPersistenceManager::persistenceManager()->addWidgetToTeacherGuideDirectory(proxyDocument, mMediaPath); - } - mpWebView = new UBDraggableWeb(mMediaPath); - mpWebView->setAcceptDrops(false); - mpWebView->settings()->setAttribute(QWebSettings::JavaEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true); - mpWebView->settings()->setAttribute(QWebSettings::DnsPrefetchEnabled, true); - QString indexPath = mMediaPath+"/index.htm"; - if(!QFile::exists(indexPath)) - indexPath += "l"; - mpWebView->load(QUrl::fromLocalFile(indexPath)); - } - else if(mimeType.contains("x-shockwave-flash") || forceFlashMediaType){ - mMediaType = "flash"; - if(!(mIsPresentationMode || mIsInitializationMode)){ - QDir baseW3CDirectory(UBPersistenceManager::persistenceManager()->teacherGuideAbsoluteObjectPath(proxyDocument)); - mMediaPath = UBGraphicsW3CWidgetItem::createNPAPIWrapperInDir(mMediaPath,baseW3CDirectory,mimeType,QSize(100,100),QUuid::createUuid()); - } - qDebug() << mMediaPath; - mpWebView = new UBDraggableWeb(mMediaPath); - mpWebView->setAcceptDrops(false); - mpWebView->settings()->setAttribute(QWebSettings::JavaEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true); - mpWebView->settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true); - mpWebView->settings()->setAttribute(QWebSettings::DnsPrefetchEnabled, true); - QString indexPath = mMediaPath+"/index.htm"; - if(!QFile::exists(indexPath)) - indexPath += "l"; - mpWebView->load(QUrl::fromLocalFile(indexPath)); - } - else{ - qDebug() << "createWorkWidget mime type not handled" << mimeType; - setMedia=false; - } - - if(setMedia){ - setAcceptDrops(false); - mpWorkWidget = new QWidget(this); - if(!mIsPresentationMode){ - mpLayout = new QVBoxLayout(mpWorkWidget); - mpTitle = new UBTGAdaptableText(mpTreeWidgetItem,mpWorkWidget); - mpTitle->setPlaceHolderText(tr("Type title here...")); - mpLayout->addWidget(mpTitle); - mpMediaLayout = new QHBoxLayout; - mpLayout->addLayout(mpMediaLayout); - mpWorkWidget->setLayout(mpLayout); - } - else{ - mpMediaLayout = new QHBoxLayout(mpWorkWidget); - mpWorkWidget->setLayout(mpMediaLayout); - } - - mpMediaLayout->addStretch(1); - - if(mpMediaLabelWidget){ - mpMediaLabelWidget->setFixedHeight(mMediaWidgetHeight); - mpMediaLabelWidget->setParent(mpWorkWidget); - mpMediaLayout->addWidget(mpMediaLabelWidget); - } - else if (mpMediaWidget){ - mpMediaWidget->setFixedHeight(mMediaWidgetHeight); - mpMediaWidget->setParent(mpWorkWidget); - mpMediaLayout->addWidget(mpMediaWidget); - } - else if (mpWebView){ - mpWebView->setFixedHeight(mMediaWidgetHeight); - mpWebView->setParent(mpWorkWidget); - mpMediaLayout->addWidget(mpWebView); - mpWebView->show(); - } - mpMediaLayout->addStretch(1); - addWidget(mpWorkWidget); - setCurrentWidget(mpWorkWidget); - mpWorkWidget->show(); - - } -} - -void UBTGMediaWidget::parseMimeData(const QMimeData* pMimeData) -{ - if(pMimeData){ - if(pMimeData->hasText()){ - mMediaPath = QUrl::fromLocalFile(pMimeData->text()).toString(); - } - else if(pMimeData->hasUrls()){ - mMediaPath = pMimeData->urls().at(0).toString(); - } - else if(pMimeData->hasImage()){ - qDebug() << "Not yet implemented"; - } - } - else - qDebug() << "No mime data present"; - - createWorkWidget(); -} - -void UBTGMediaWidget::dropEvent(QDropEvent* event) -{ - parseMimeData(event->mimeData()); - event->accept(); -} - -void UBTGMediaWidget::mousePressEvent(QMouseEvent *event) -{ - if (!mIsPresentationMode) - event->ignore(); - else{ - QDrag *drag = new QDrag(this); - QMimeData *mimeData = new QMimeData(); - QList urlList; -#ifdef Q_WS_WIN - urlList << QUrl::fromLocalFile(mMediaPath); -#else - urlList << QUrl(mMediaPath); -#endif - mimeData->setUrls(urlList); - drag->setMimeData(mimeData); - - drag->exec(); - event->accept(); - } -} - - - -/*************************************************************************** - * class UBTGUrlWidget * - ***************************************************************************/ -UBTGUrlWidget::UBTGUrlWidget(QWidget* parent, const char* name ):QWidget(parent) - , mpLayout(NULL) - , mpTitle(NULL) - , mpUrl(NULL) -{ - setObjectName(name); - SET_STYLE_SHEET(); - mpLayout = new QVBoxLayout(this); - setLayout(mpLayout); - mpTitle = new QLineEdit(this); - mpTitle->setObjectName("UBTGLineEdit"); - mpTitle->setPlaceholderText(tr("Insert link title here...")); - mpUrl = new QLineEdit(this); - connect(mpUrl,SIGNAL(editingFinished()),this,SLOT(onUrlEditionFinished())); - mpUrl->setObjectName("UBTGLineEdit"); - mpUrl->setPlaceholderText("http://"); - mpLayout->addWidget(mpTitle); - mpLayout->addWidget(mpUrl); -} - -UBTGUrlWidget::~UBTGUrlWidget() -{ - DELETEPTR(mpTitle); - DELETEPTR(mpUrl); - DELETEPTR(mpLayout); -} - -void UBTGUrlWidget::onUrlEditionFinished() -{ - QString url = mpUrl->text(); - if(url.length() && !url.startsWith("http://") && !url.startsWith("https://") && !url.startsWith("ftp://") && !url.startsWith("sftp://") && !url.startsWith("http://")){ - mpUrl->setText("http://" + mpUrl->text()); - setFocus(); - } -} - -void UBTGUrlWidget::initializeWithDom(QDomElement element) -{ - mpTitle->setText(element.attribute("title")); - mpUrl->setText(element.attribute("url")); -} - -tUBGEElementNode* UBTGUrlWidget::saveData() -{ - tUBGEElementNode* result = new tUBGEElementNode(); - result->name = "link"; - result->attributes.insert("title",mpTitle->text()); - result->attributes.insert("url",mpUrl->text()); - return result; -} - - -/*************************************************************************** - * class UBTGDraggableTreeItem * - ***************************************************************************/ -UBTGDraggableTreeItem::UBTGDraggableTreeItem(QWidget* parent, const char* name) : QTreeWidget(parent) -{ - setObjectName(name); -} - -QMimeData* UBTGDraggableTreeItem::mimeData(const QList items) const -{ - QMimeData* result = new QMimeData(); - QList urls; - urls << QUrl(items.at(0)->data(0,TG_USER_ROLE_MIME_TYPE).toString()); - result->setUrls(urls); - return result; -} diff --git a/src/gui/UBTeacherGuideWidgetsTools.h b/src/gui/UBTeacherGuideWidgetsTools.h deleted file mode 100644 index ba944ddd..00000000 --- a/src/gui/UBTeacherGuideWidgetsTools.h +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA) - * - * This file is part of Open-Sankoré. - * - * Open-Sankoré 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, version 3 of the License, - * with a specific linking exception for the OpenSSL project's - * "OpenSSL" library (or with modified versions of it that use the - * same license as the "OpenSSL" library). - * - * Open-Sankoré 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 Open-Sankoré. If not, see . - */ - - - -#ifndef UBTEACHERGUIDEWIDGETSTOOLS_H -#define UBTEACHERGUIDEWIDGETSTOOLS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "customWidgets/UBMediaWidget.h" - -#define TG_USER_ROLE_MIME_TYPE (Qt::UserRole+50) - - -class QTreeWidget; -class QVBoxLayout; -class QComboBox; -class QTextEdit; -class QWidget; -class UBTGAdaptableText; -class QDomElement; -class UBMediaWidget; - -typedef struct -{ - QString name; - QMap attributes; -}tUBGEElementNode; - - -class iUBTGSaveData -{ -public: - virtual tUBGEElementNode* saveData() = 0; -}; - - -class UBAddItem : public QTreeWidgetItem -{ -public: - explicit UBAddItem(const QString &strings, int addSubItemWidgetType, QTreeWidget* parent = 0); - ~UBAddItem(); - -signals: - -public slots: -}; - -class UBTGActionWidget : public QWidget, public iUBTGSaveData -{ - Q_OBJECT - -public: - explicit UBTGActionWidget(QTreeWidgetItem* widget, QWidget* parent = 0,const char* name = "UBTGActionWidget"); - ~UBTGActionWidget(); - void update(); - tUBGEElementNode* saveData(); - void initializeWithDom(QDomElement element); - -private: - QVBoxLayout* mpLayout; - QComboBox* mpOwner; - UBTGAdaptableText* mpTask; - -protected: - QTreeWidgetItem* mpTreeWidgetItem; -}; - - -class UBTGAdaptableText : public QTextEdit -{ - Q_OBJECT -public: - explicit UBTGAdaptableText(QTreeWidgetItem* widget = 0, QWidget *parent = 0, const char* name = "UBTGAdaptableText"); - void showText(const QString & text); - void resetText(); - void bottomMargin(int newValue); - void setPlaceHolderText(QString text); - QString text(); - void setInitialText(const QString& text); - void setMaximumLength(int length); - void managePlaceholder(bool focus); - -public slots: - void onTextChanged(); - -protected: - void keyReleaseEvent(QKeyEvent* e); - void showEvent(QShowEvent* e); - void focusInEvent(QFocusEvent* e); - void focusOutEvent(QFocusEvent* e); - virtual void insertFromMimeData(const QMimeData *source); - -private: - void setCursorToTheEnd(); - int mBottomMargin; - QTreeWidgetItem* mpTreeWidgetItem; - int mMinimumHeight; - bool mHasPlaceHolder; - QString mPlaceHolderText; - bool mIsUpdatingSize; - int mMaximumLength; -}; - - -class UBDraggableWeb : public QWebView -{ - Q_OBJECT -public: - explicit UBDraggableWeb(QString& relativePath, QWidget* parent = 0); - -private: - void mousePressEvent(QMouseEvent* event); - void mouseMoveEvent(QMouseEvent* event); - void mouseReleaseEvent(QMouseEvent* event); - - QString mRelativePath; - QPoint mDragStartPosition; - bool mDragStarted; -}; - -class UBTGMediaWidget : public QStackedWidget , public iUBTGSaveData -{ - Q_OBJECT -public: - UBTGMediaWidget(QTreeWidgetItem* widget = 0, QWidget* parent = 0, const char* name = "UBTGMediaWidget"); - UBTGMediaWidget(QString mediaPath, QTreeWidgetItem* widget = 0, QWidget* parent = 0, bool forceFlashMediaType = false, const char *name = "UBTGMediaWidget"); - ~UBTGMediaWidget(); - tUBGEElementNode* saveData(); - void initializeWithDom(QDomElement element); - void removeSource(); - -protected: - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - void mousePressEvent(QMouseEvent* event); - void hideEvent(QHideEvent* event); - void showEvent(QShowEvent* event); - -private: - void parseMimeData(const QMimeData* pMimeData); - void createWorkWidget(bool forceFlashMediaType = false); - void updateSize(); - - QTreeWidgetItem* mpTreeWidgetItem; - QLabel* mpDropMeWidget; - QWidget* mpWorkWidget; - QVBoxLayout* mpLayout; - QHBoxLayout* mpMediaLayout; - UBTGAdaptableText* mpTitle; - QLabel* mpMediaLabelWidget; - UBMediaWidget* mpMediaWidget; - UBDraggableWeb* mpWebView; - QString mMediaPath; - bool mIsPresentationMode; - QString mMediaType; - bool mIsInitializationMode; - int mMediaWidgetHeight; -}; - - -class UBTGUrlWidget : public QWidget , public iUBTGSaveData -{ - Q_OBJECT -public: - UBTGUrlWidget(QWidget* parent = 0, const char* name = "UBTGUrlWidget"); - ~UBTGUrlWidget(); - tUBGEElementNode* saveData(); - void initializeWithDom(QDomElement element); - -public slots: - void onUrlEditionFinished(); - -private: - QVBoxLayout* mpLayout; - QLineEdit* mpTitle; - QLineEdit* mpUrl; -}; - -class UBTGDraggableTreeItem : public QTreeWidget -{ - Q_OBJECT -public: - UBTGDraggableTreeItem(QWidget* parent = 0, const char* name = "UBTGDraggableTreeItem"); - -private: - QMimeData* mimeData(const QList items) const; -}; - -#endif // UBTEACHERGUIDEWIDGETSTOOLS_H diff --git a/src/gui/gui.pri b/src/gui/gui.pri index 56f457ad..50d2fdfe 100644 --- a/src/gui/gui.pri +++ b/src/gui/gui.pri @@ -40,9 +40,6 @@ HEADERS += src/gui/UBThumbnailView.h \ src/gui/UBDockDownloadWidget.h \ src/gui/UBFeaturesWidget.h \ src/gui/UBFeaturesActionBar.h \ - src/gui/UBDockTeacherGuideWidget.h \ - src/gui/UBTeacherGuideWidget.h \ - src/gui/UBTeacherGuideWidgetsTools.h \ src/gui/UBMessagesDialog.h SOURCES += src/gui/UBThumbnailView.cpp \ src/gui/UBFloatingPalette.cpp \ @@ -86,9 +83,6 @@ SOURCES += src/gui/UBThumbnailView.cpp \ src/gui/UBDockDownloadWidget.cpp \ src/gui/UBFeaturesWidget.cpp \ src/gui/UBFeaturesActionBar.cpp \ - src/gui/UBDockTeacherGuideWidget.cpp \ - src/gui/UBTeacherGuideWidget.cpp \ - src/gui/UBTeacherGuideWidgetsTools.cpp \ src/gui/UBMessagesDialog.cpp win32:SOURCES += src/gui/UBKeyboardPalette_win.cpp macx:SOURCES += src/gui/UBKeyboardPalette_mac.cpp diff --git a/src/interfaces/IDataStorage.h b/src/interfaces/IDataStorage.h deleted file mode 100644 index 35921dbc..00000000 --- a/src/interfaces/IDataStorage.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA) - * - * This file is part of Open-Sankoré. - * - * Open-Sankoré 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, version 3 of the License, - * with a specific linking exception for the OpenSSL project's - * "OpenSSL" library (or with modified versions of it that use the - * same license as the "OpenSSL" library). - * - * Open-Sankoré 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 Open-Sankoré. If not, see . - */ - - - -#ifndef IDATASTORAGE_H -#define IDATASTORAGE_H - -#include -#include - -typedef enum -{ - eElementType_START, - eElementType_END, - eElementType_UNIQUE -}eElementType; - -typedef struct -{ - QString name; - QMap attributes; - eElementType type; -}tIDataStorage; - -class IDataStorage -{ -public: - //virtual void load(QString element) = 0; - virtual QVectorsave(int pageIndex) = 0 ; -}; -#endif // IDATASTORAGE_H diff --git a/src/interfaces/interfaces.pri b/src/interfaces/interfaces.pri deleted file mode 100644 index bac61bda..00000000 --- a/src/interfaces/interfaces.pri +++ /dev/null @@ -1,2 +0,0 @@ -HEADERS += \ - src/interfaces/IDataStorage.h