diff --git a/resources/library/applications/Calculator.wgt/config.xml b/resources/library/applications/Calculatrice.wgt/config.xml similarity index 100% rename from resources/library/applications/Calculator.wgt/config.xml rename to resources/library/applications/Calculatrice.wgt/config.xml diff --git a/resources/library/applications/Calculator.wgt/css/ubwidget.css b/resources/library/applications/Calculatrice.wgt/css/ubwidget.css similarity index 100% rename from resources/library/applications/Calculator.wgt/css/ubwidget.css rename to resources/library/applications/Calculatrice.wgt/css/ubwidget.css diff --git a/resources/library/applications/Calculator.wgt/icon.png b/resources/library/applications/Calculatrice.wgt/icon.png similarity index 100% rename from resources/library/applications/Calculator.wgt/icon.png rename to resources/library/applications/Calculatrice.wgt/icon.png diff --git a/resources/library/applications/Calculator.wgt/images/arrows_out/bottom.png b/resources/library/applications/Calculatrice.wgt/images/arrows_out/bottom.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/arrows_out/bottom.png rename to resources/library/applications/Calculatrice.wgt/images/arrows_out/bottom.png diff --git a/resources/library/applications/Calculator.wgt/images/arrows_out/left.png b/resources/library/applications/Calculatrice.wgt/images/arrows_out/left.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/arrows_out/left.png rename to resources/library/applications/Calculatrice.wgt/images/arrows_out/left.png diff --git a/resources/library/applications/Calculator.wgt/images/arrows_out/right.png b/resources/library/applications/Calculatrice.wgt/images/arrows_out/right.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/arrows_out/right.png rename to resources/library/applications/Calculatrice.wgt/images/arrows_out/right.png diff --git a/resources/library/applications/Calculator.wgt/images/arrows_out/top.png b/resources/library/applications/Calculatrice.wgt/images/arrows_out/top.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/arrows_out/top.png rename to resources/library/applications/Calculatrice.wgt/images/arrows_out/top.png diff --git a/resources/library/applications/Calculator.wgt/images/arrows_over/button_arrow_bottom.png b/resources/library/applications/Calculatrice.wgt/images/arrows_over/button_arrow_bottom.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/arrows_over/button_arrow_bottom.png rename to resources/library/applications/Calculatrice.wgt/images/arrows_over/button_arrow_bottom.png diff --git a/resources/library/applications/Calculator.wgt/images/arrows_over/button_arrow_left.png b/resources/library/applications/Calculatrice.wgt/images/arrows_over/button_arrow_left.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/arrows_over/button_arrow_left.png rename to resources/library/applications/Calculatrice.wgt/images/arrows_over/button_arrow_left.png diff --git a/resources/library/applications/Calculator.wgt/images/arrows_over/button_arrow_right.png b/resources/library/applications/Calculatrice.wgt/images/arrows_over/button_arrow_right.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/arrows_over/button_arrow_right.png rename to resources/library/applications/Calculatrice.wgt/images/arrows_over/button_arrow_right.png diff --git a/resources/library/applications/Calculator.wgt/images/arrows_over/button_arrow_top.png b/resources/library/applications/Calculatrice.wgt/images/arrows_over/button_arrow_top.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/arrows_over/button_arrow_top.png rename to resources/library/applications/Calculatrice.wgt/images/arrows_over/button_arrow_top.png diff --git a/resources/library/applications/Calculator.wgt/images/back.png b/resources/library/applications/Calculatrice.wgt/images/back.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/back.png rename to resources/library/applications/Calculatrice.wgt/images/back.png diff --git a/resources/library/applications/Calculator.wgt/images/back_small.png b/resources/library/applications/Calculatrice.wgt/images/back_small.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/back_small.png rename to resources/library/applications/Calculatrice.wgt/images/back_small.png diff --git a/resources/library/applications/Calculator.wgt/images/button_out-copie.png b/resources/library/applications/Calculatrice.wgt/images/button_out-copie.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/button_out-copie.png rename to resources/library/applications/Calculatrice.wgt/images/button_out-copie.png diff --git a/resources/library/applications/Calculator.wgt/images/button_out.gif b/resources/library/applications/Calculatrice.wgt/images/button_out.gif similarity index 100% rename from resources/library/applications/Calculator.wgt/images/button_out.gif rename to resources/library/applications/Calculatrice.wgt/images/button_out.gif diff --git a/resources/library/applications/Calculator.wgt/images/button_out.png b/resources/library/applications/Calculatrice.wgt/images/button_out.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/button_out.png rename to resources/library/applications/Calculatrice.wgt/images/button_out.png diff --git a/resources/library/applications/Calculator.wgt/images/button_out_dark.gif b/resources/library/applications/Calculatrice.wgt/images/button_out_dark.gif similarity index 100% rename from resources/library/applications/Calculator.wgt/images/button_out_dark.gif rename to resources/library/applications/Calculatrice.wgt/images/button_out_dark.gif diff --git a/resources/library/applications/Calculator.wgt/images/button_out_dark.png b/resources/library/applications/Calculatrice.wgt/images/button_out_dark.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/button_out_dark.png rename to resources/library/applications/Calculatrice.wgt/images/button_out_dark.png diff --git a/resources/library/applications/Calculator.wgt/images/button_over.gif b/resources/library/applications/Calculatrice.wgt/images/button_over.gif similarity index 100% rename from resources/library/applications/Calculator.wgt/images/button_over.gif rename to resources/library/applications/Calculatrice.wgt/images/button_over.gif diff --git a/resources/library/applications/Calculator.wgt/images/button_toggle.png b/resources/library/applications/Calculatrice.wgt/images/button_toggle.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/button_toggle.png rename to resources/library/applications/Calculatrice.wgt/images/button_toggle.png diff --git a/resources/library/applications/Calculator.wgt/images/button_toggle_invert.png b/resources/library/applications/Calculatrice.wgt/images/button_toggle_invert.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/button_toggle_invert.png rename to resources/library/applications/Calculatrice.wgt/images/button_toggle_invert.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/back.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/back.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/back.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/back.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/bottom.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/bottom.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/bottom.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/bottom.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/cbottomleft.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/cbottomleft.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/cbottomleft.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/cbottomleft.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/cbottomright.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/cbottomright.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/cbottomright.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/cbottomright.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/ctopleft.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/ctopleft.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/ctopleft.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/ctopleft.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/ctopright.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/ctopright.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/ctopright.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/ctopright.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/left.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/left.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/left.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/left.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/right.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/right.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/right.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/right.png diff --git a/resources/library/applications/Calculator.wgt/images/buttons_shadow/top.png b/resources/library/applications/Calculatrice.wgt/images/buttons_shadow/top.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/buttons_shadow/top.png rename to resources/library/applications/Calculatrice.wgt/images/buttons_shadow/top.png diff --git a/resources/library/applications/Calculator.wgt/images/calculator/pi.png b/resources/library/applications/Calculatrice.wgt/images/calculator/pi.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/pi.png rename to resources/library/applications/Calculatrice.wgt/images/calculator/pi.png diff --git a/resources/library/applications/Calculator.wgt/images/calculator/pi.psd b/resources/library/applications/Calculatrice.wgt/images/calculator/pi.psd similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/pi.psd rename to resources/library/applications/Calculatrice.wgt/images/calculator/pi.psd diff --git a/resources/library/applications/Calculator.wgt/images/calculator/pi_click.png b/resources/library/applications/Calculatrice.wgt/images/calculator/pi_click.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/pi_click.png rename to resources/library/applications/Calculatrice.wgt/images/calculator/pi_click.png diff --git a/resources/library/applications/Calculator.wgt/images/calculator/pi_over.png b/resources/library/applications/Calculatrice.wgt/images/calculator/pi_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/pi_over.png rename to resources/library/applications/Calculatrice.wgt/images/calculator/pi_over.png diff --git a/resources/library/applications/Calculator.wgt/images/calculator/pow.png b/resources/library/applications/Calculatrice.wgt/images/calculator/pow.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/pow.png rename to resources/library/applications/Calculatrice.wgt/images/calculator/pow.png diff --git a/resources/library/applications/Calculator.wgt/images/calculator/pow.psd b/resources/library/applications/Calculatrice.wgt/images/calculator/pow.psd similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/pow.psd rename to resources/library/applications/Calculatrice.wgt/images/calculator/pow.psd diff --git a/resources/library/applications/Calculator.wgt/images/calculator/sq.png b/resources/library/applications/Calculatrice.wgt/images/calculator/sq.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/sq.png rename to resources/library/applications/Calculatrice.wgt/images/calculator/sq.png diff --git a/resources/library/applications/Calculator.wgt/images/calculator/sq.psd b/resources/library/applications/Calculatrice.wgt/images/calculator/sq.psd similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/sq.psd rename to resources/library/applications/Calculatrice.wgt/images/calculator/sq.psd diff --git a/resources/library/applications/Calculator.wgt/images/calculator/sq_click.png b/resources/library/applications/Calculatrice.wgt/images/calculator/sq_click.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/sq_click.png rename to resources/library/applications/Calculatrice.wgt/images/calculator/sq_click.png diff --git a/resources/library/applications/Calculator.wgt/images/calculator/sq_over.png b/resources/library/applications/Calculatrice.wgt/images/calculator/sq_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/calculator/sq_over.png rename to resources/library/applications/Calculatrice.wgt/images/calculator/sq_over.png diff --git a/resources/library/applications/Calculator.wgt/images/display copy.png b/resources/library/applications/Calculatrice.wgt/images/display copy.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/display copy.png rename to resources/library/applications/Calculatrice.wgt/images/display copy.png diff --git a/resources/library/applications/Calculator.wgt/images/display.png b/resources/library/applications/Calculatrice.wgt/images/display.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/display.png rename to resources/library/applications/Calculatrice.wgt/images/display.png diff --git a/resources/library/applications/Calculator.wgt/images/historyback.png b/resources/library/applications/Calculatrice.wgt/images/historyback.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/historyback.png rename to resources/library/applications/Calculatrice.wgt/images/historyback.png diff --git a/resources/library/applications/Calculator.wgt/images/historytab.png b/resources/library/applications/Calculatrice.wgt/images/historytab.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/historytab.png rename to resources/library/applications/Calculatrice.wgt/images/historytab.png diff --git a/resources/library/applications/Calculator.wgt/images/historytabOver.png b/resources/library/applications/Calculatrice.wgt/images/historytabOver.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/historytabOver.png rename to resources/library/applications/Calculatrice.wgt/images/historytabOver.png diff --git a/resources/library/applications/Calculator.wgt/images/inspector.png b/resources/library/applications/Calculatrice.wgt/images/inspector.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/inspector.png rename to resources/library/applications/Calculatrice.wgt/images/inspector.png diff --git a/resources/library/applications/Calculator.wgt/images/touche0.png b/resources/library/applications/Calculatrice.wgt/images/touche0.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche0.png rename to resources/library/applications/Calculatrice.wgt/images/touche0.png diff --git a/resources/library/applications/Calculator.wgt/images/touche0_over.png b/resources/library/applications/Calculatrice.wgt/images/touche0_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche0_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche0_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche0_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche0_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche0_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche0_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche1.png b/resources/library/applications/Calculatrice.wgt/images/touche1.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche1.png rename to resources/library/applications/Calculatrice.wgt/images/touche1.png diff --git a/resources/library/applications/Calculator.wgt/images/touche1_over.png b/resources/library/applications/Calculatrice.wgt/images/touche1_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche1_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche1_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche1_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche1_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche1_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche1_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche2.png b/resources/library/applications/Calculatrice.wgt/images/touche2.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche2.png rename to resources/library/applications/Calculatrice.wgt/images/touche2.png diff --git a/resources/library/applications/Calculator.wgt/images/touche2_over.png b/resources/library/applications/Calculatrice.wgt/images/touche2_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche2_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche2_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche2_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche2_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche2_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche2_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche3.png b/resources/library/applications/Calculatrice.wgt/images/touche3.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche3.png rename to resources/library/applications/Calculatrice.wgt/images/touche3.png diff --git a/resources/library/applications/Calculator.wgt/images/touche3_over.png b/resources/library/applications/Calculatrice.wgt/images/touche3_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche3_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche3_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche3_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche3_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche3_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche3_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche4.png b/resources/library/applications/Calculatrice.wgt/images/touche4.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche4.png rename to resources/library/applications/Calculatrice.wgt/images/touche4.png diff --git a/resources/library/applications/Calculator.wgt/images/touche4_over.png b/resources/library/applications/Calculatrice.wgt/images/touche4_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche4_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche4_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche4_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche4_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche4_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche4_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche5.png b/resources/library/applications/Calculatrice.wgt/images/touche5.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche5.png rename to resources/library/applications/Calculatrice.wgt/images/touche5.png diff --git a/resources/library/applications/Calculator.wgt/images/touche5_over.png b/resources/library/applications/Calculatrice.wgt/images/touche5_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche5_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche5_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche5_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche5_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche5_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche5_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche6.png b/resources/library/applications/Calculatrice.wgt/images/touche6.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche6.png rename to resources/library/applications/Calculatrice.wgt/images/touche6.png diff --git a/resources/library/applications/Calculator.wgt/images/touche6_over.png b/resources/library/applications/Calculatrice.wgt/images/touche6_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche6_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche6_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche6_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche6_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche6_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche6_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche7.png b/resources/library/applications/Calculatrice.wgt/images/touche7.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche7.png rename to resources/library/applications/Calculatrice.wgt/images/touche7.png diff --git a/resources/library/applications/Calculator.wgt/images/touche7_over.png b/resources/library/applications/Calculatrice.wgt/images/touche7_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche7_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche7_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche7_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche7_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche7_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche7_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche8.png b/resources/library/applications/Calculatrice.wgt/images/touche8.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche8.png rename to resources/library/applications/Calculatrice.wgt/images/touche8.png diff --git a/resources/library/applications/Calculator.wgt/images/touche8_over.png b/resources/library/applications/Calculatrice.wgt/images/touche8_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche8_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche8_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche8_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche8_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche8_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche8_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touche9.png b/resources/library/applications/Calculatrice.wgt/images/touche9.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche9.png rename to resources/library/applications/Calculatrice.wgt/images/touche9.png diff --git a/resources/library/applications/Calculator.wgt/images/touche9_over.png b/resources/library/applications/Calculatrice.wgt/images/touche9_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche9_over.png rename to resources/library/applications/Calculatrice.wgt/images/touche9_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touche9_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touche9_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touche9_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touche9_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touchec.png b/resources/library/applications/Calculatrice.wgt/images/touchec.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchec.png rename to resources/library/applications/Calculatrice.wgt/images/touchec.png diff --git a/resources/library/applications/Calculator.wgt/images/touchec_over.png b/resources/library/applications/Calculatrice.wgt/images/touchec_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchec_over.png rename to resources/library/applications/Calculatrice.wgt/images/touchec_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touchec_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touchec_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchec_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touchec_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touchediv.png b/resources/library/applications/Calculatrice.wgt/images/touchediv.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchediv.png rename to resources/library/applications/Calculatrice.wgt/images/touchediv.png diff --git a/resources/library/applications/Calculator.wgt/images/touchediv_over.png b/resources/library/applications/Calculatrice.wgt/images/touchediv_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchediv_over.png rename to resources/library/applications/Calculatrice.wgt/images/touchediv_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touchediv_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touchediv_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchediv_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touchediv_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touchedot.png b/resources/library/applications/Calculatrice.wgt/images/touchedot.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchedot.png rename to resources/library/applications/Calculatrice.wgt/images/touchedot.png diff --git a/resources/library/applications/Calculator.wgt/images/touchedot_over.png b/resources/library/applications/Calculatrice.wgt/images/touchedot_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchedot_over.png rename to resources/library/applications/Calculatrice.wgt/images/touchedot_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touchedot_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touchedot_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchedot_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touchedot_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/toucheeq.png b/resources/library/applications/Calculatrice.wgt/images/toucheeq.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/toucheeq.png rename to resources/library/applications/Calculatrice.wgt/images/toucheeq.png diff --git a/resources/library/applications/Calculator.wgt/images/toucheeq_over.png b/resources/library/applications/Calculatrice.wgt/images/toucheeq_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/toucheeq_over.png rename to resources/library/applications/Calculatrice.wgt/images/toucheeq_over.png diff --git a/resources/library/applications/Calculator.wgt/images/toucheeq_over_down.png b/resources/library/applications/Calculatrice.wgt/images/toucheeq_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/toucheeq_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/toucheeq_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touchef.png b/resources/library/applications/Calculatrice.wgt/images/touchef.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchef.png rename to resources/library/applications/Calculatrice.wgt/images/touchef.png diff --git a/resources/library/applications/Calculator.wgt/images/touchef_over.png b/resources/library/applications/Calculatrice.wgt/images/touchef_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchef_over.png rename to resources/library/applications/Calculatrice.wgt/images/touchef_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touchef_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touchef_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchef_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touchef_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touchem.png b/resources/library/applications/Calculatrice.wgt/images/touchem.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchem.png rename to resources/library/applications/Calculatrice.wgt/images/touchem.png diff --git a/resources/library/applications/Calculator.wgt/images/touchem_over.png b/resources/library/applications/Calculatrice.wgt/images/touchem_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchem_over.png rename to resources/library/applications/Calculatrice.wgt/images/touchem_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touchem_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touchem_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchem_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touchem_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touchep.png b/resources/library/applications/Calculatrice.wgt/images/touchep.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchep.png rename to resources/library/applications/Calculatrice.wgt/images/touchep.png diff --git a/resources/library/applications/Calculator.wgt/images/touchep_over.png b/resources/library/applications/Calculatrice.wgt/images/touchep_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchep_over.png rename to resources/library/applications/Calculatrice.wgt/images/touchep_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touchep_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touchep_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchep_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touchep_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touchepd.png b/resources/library/applications/Calculatrice.wgt/images/touchepd.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchepd.png rename to resources/library/applications/Calculatrice.wgt/images/touchepd.png diff --git a/resources/library/applications/Calculator.wgt/images/touchepd_over.png b/resources/library/applications/Calculatrice.wgt/images/touchepd_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchepd_over.png rename to resources/library/applications/Calculatrice.wgt/images/touchepd_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touchepd_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touchepd_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchepd_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touchepd_over_down.png diff --git a/resources/library/applications/Calculator.wgt/images/touchepg.png b/resources/library/applications/Calculatrice.wgt/images/touchepg.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchepg.png rename to resources/library/applications/Calculatrice.wgt/images/touchepg.png diff --git a/resources/library/applications/Calculator.wgt/images/touchepg_over.png b/resources/library/applications/Calculatrice.wgt/images/touchepg_over.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchepg_over.png rename to resources/library/applications/Calculatrice.wgt/images/touchepg_over.png diff --git a/resources/library/applications/Calculator.wgt/images/touchepg_over_down.png b/resources/library/applications/Calculatrice.wgt/images/touchepg_over_down.png similarity index 100% rename from resources/library/applications/Calculator.wgt/images/touchepg_over_down.png rename to resources/library/applications/Calculatrice.wgt/images/touchepg_over_down.png diff --git a/resources/library/applications/Calculator.wgt/index.html b/resources/library/applications/Calculatrice.wgt/index.html similarity index 100% rename from resources/library/applications/Calculator.wgt/index.html rename to resources/library/applications/Calculatrice.wgt/index.html diff --git a/resources/library/applications/Calculator.wgt/js/DD_roundies_0.0.2a.js b/resources/library/applications/Calculatrice.wgt/js/DD_roundies_0.0.2a.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/DD_roundies_0.0.2a.js rename to resources/library/applications/Calculatrice.wgt/js/DD_roundies_0.0.2a.js diff --git a/resources/library/applications/Calculator.wgt/js/calculate.js b/resources/library/applications/Calculatrice.wgt/js/calculate.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/calculate.js rename to resources/library/applications/Calculatrice.wgt/js/calculate.js diff --git a/resources/library/applications/Anyembed.wgt/js/jquery-1.3.2.min.js b/resources/library/applications/Calculatrice.wgt/js/jquery-1.3.2.min.js similarity index 100% rename from resources/library/applications/Anyembed.wgt/js/jquery-1.3.2.min.js rename to resources/library/applications/Calculatrice.wgt/js/jquery-1.3.2.min.js diff --git a/resources/library/applications/Calculator.wgt/js/jquery-ui-1.7.2.custom.min.js b/resources/library/applications/Calculatrice.wgt/js/jquery-ui-1.7.2.custom.min.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/jquery-ui-1.7.2.custom.min.js rename to resources/library/applications/Calculatrice.wgt/js/jquery-ui-1.7.2.custom.min.js diff --git a/resources/library/applications/Calculator.wgt/js/jquery.center.js b/resources/library/applications/Calculatrice.wgt/js/jquery.center.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/jquery.center.js rename to resources/library/applications/Calculatrice.wgt/js/jquery.center.js diff --git a/resources/library/applications/Anyembed.wgt/js/jquery.disable.text.select.js b/resources/library/applications/Calculatrice.wgt/js/jquery.disable.text.select.js similarity index 100% rename from resources/library/applications/Anyembed.wgt/js/jquery.disable.text.select.js rename to resources/library/applications/Calculatrice.wgt/js/jquery.disable.text.select.js diff --git a/resources/library/applications/Calculator.wgt/js/jquery.easing.1.2.js b/resources/library/applications/Calculatrice.wgt/js/jquery.easing.1.2.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/jquery.easing.1.2.js rename to resources/library/applications/Calculatrice.wgt/js/jquery.easing.1.2.js diff --git a/resources/library/applications/Calculator.wgt/js/jquery.ubwidget.js b/resources/library/applications/Calculatrice.wgt/js/jquery.ubwidget.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/jquery.ubwidget.js rename to resources/library/applications/Calculatrice.wgt/js/jquery.ubwidget.js diff --git a/resources/library/applications/Calculator.wgt/js/ubw-main.js b/resources/library/applications/Calculatrice.wgt/js/ubw-main.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/ubw-main.js rename to resources/library/applications/Calculatrice.wgt/js/ubw-main.js diff --git a/resources/library/applications/iCell.wgt/config.xml b/resources/library/applications/Cellule.wgt/config.xml similarity index 100% rename from resources/library/applications/iCell.wgt/config.xml rename to resources/library/applications/Cellule.wgt/config.xml diff --git a/resources/library/applications/iCell.wgt/icon.png b/resources/library/applications/Cellule.wgt/icon.png similarity index 100% rename from resources/library/applications/iCell.wgt/icon.png rename to resources/library/applications/Cellule.wgt/icon.png diff --git a/resources/library/applications/iCell.wgt/icon_old.png b/resources/library/applications/Cellule.wgt/icon_old.png similarity index 100% rename from resources/library/applications/iCell.wgt/icon_old.png rename to resources/library/applications/Cellule.wgt/icon_old.png diff --git a/resources/library/applications/iCell.wgt/images/ADN.gif b/resources/library/applications/Cellule.wgt/images/ADN.gif similarity index 100% rename from resources/library/applications/iCell.wgt/images/ADN.gif rename to resources/library/applications/Cellule.wgt/images/ADN.gif diff --git a/resources/library/applications/iCell.wgt/images/ADN.jpg b/resources/library/applications/Cellule.wgt/images/ADN.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/ADN.jpg rename to resources/library/applications/Cellule.wgt/images/ADN.jpg diff --git a/resources/library/applications/iCell.wgt/images/ADN_zoom.jpg b/resources/library/applications/Cellule.wgt/images/ADN_zoom.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/ADN_zoom.jpg rename to resources/library/applications/Cellule.wgt/images/ADN_zoom.jpg diff --git a/resources/library/applications/iCell.wgt/images/ARN_in.jpg b/resources/library/applications/Cellule.wgt/images/ARN_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/ARN_in.jpg rename to resources/library/applications/Cellule.wgt/images/ARN_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/ARN_zoom.jpg b/resources/library/applications/Cellule.wgt/images/ARN_zoom.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/ARN_zoom.jpg rename to resources/library/applications/Cellule.wgt/images/ARN_zoom.jpg diff --git a/resources/library/applications/iCell.wgt/images/Golgi_aura.png b/resources/library/applications/Cellule.wgt/images/Golgi_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/Golgi_aura.png rename to resources/library/applications/Cellule.wgt/images/Golgi_aura.png diff --git a/resources/library/applications/iCell.wgt/images/Lys_aura.png b/resources/library/applications/Cellule.wgt/images/Lys_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/Lys_aura.png rename to resources/library/applications/Cellule.wgt/images/Lys_aura.png diff --git a/resources/library/applications/iCell.wgt/images/Mitoch_aura.png b/resources/library/applications/Cellule.wgt/images/Mitoch_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/Mitoch_aura.png rename to resources/library/applications/Cellule.wgt/images/Mitoch_aura.png diff --git a/resources/library/applications/iCell.wgt/images/Noy_aura.png b/resources/library/applications/Cellule.wgt/images/Noy_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/Noy_aura.png rename to resources/library/applications/Cellule.wgt/images/Noy_aura.png diff --git a/resources/library/applications/iCell.wgt/images/REL_aura.png b/resources/library/applications/Cellule.wgt/images/REL_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/REL_aura.png rename to resources/library/applications/Cellule.wgt/images/REL_aura.png diff --git a/resources/library/applications/iCell.wgt/images/RER_aura.png b/resources/library/applications/Cellule.wgt/images/RER_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/RER_aura.png rename to resources/library/applications/Cellule.wgt/images/RER_aura.png diff --git a/resources/library/applications/iCell.wgt/images/Vesic_aura.png b/resources/library/applications/Cellule.wgt/images/Vesic_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/Vesic_aura.png rename to resources/library/applications/Cellule.wgt/images/Vesic_aura.png diff --git a/resources/library/applications/iCell.wgt/images/centriole_aura.png b/resources/library/applications/Cellule.wgt/images/centriole_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/centriole_aura.png rename to resources/library/applications/Cellule.wgt/images/centriole_aura.png diff --git a/resources/library/applications/iCell.wgt/images/centriole_in.jpg b/resources/library/applications/Cellule.wgt/images/centriole_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/centriole_in.jpg rename to resources/library/applications/Cellule.wgt/images/centriole_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/fond_ADN.png b/resources/library/applications/Cellule.wgt/images/fond_ADN.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/fond_ADN.png rename to resources/library/applications/Cellule.wgt/images/fond_ADN.png diff --git a/resources/library/applications/iCell.wgt/images/golgi_in.jpg b/resources/library/applications/Cellule.wgt/images/golgi_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/golgi_in.jpg rename to resources/library/applications/Cellule.wgt/images/golgi_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/index.png b/resources/library/applications/Cellule.wgt/images/index.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/index.png rename to resources/library/applications/Cellule.wgt/images/index.png diff --git a/resources/library/applications/iCell.wgt/images/lys_in.jpg b/resources/library/applications/Cellule.wgt/images/lys_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/lys_in.jpg rename to resources/library/applications/Cellule.wgt/images/lys_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/mitoch_in.jpg b/resources/library/applications/Cellule.wgt/images/mitoch_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/mitoch_in.jpg rename to resources/library/applications/Cellule.wgt/images/mitoch_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/noy_in.jpg b/resources/library/applications/Cellule.wgt/images/noy_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/noy_in.jpg rename to resources/library/applications/Cellule.wgt/images/noy_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/nucl_aura.png b/resources/library/applications/Cellule.wgt/images/nucl_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/nucl_aura.png rename to resources/library/applications/Cellule.wgt/images/nucl_aura.png diff --git a/resources/library/applications/iCell.wgt/images/nucl_in.jpg b/resources/library/applications/Cellule.wgt/images/nucl_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/nucl_in.jpg rename to resources/library/applications/Cellule.wgt/images/nucl_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/rel_in.jpg b/resources/library/applications/Cellule.wgt/images/rel_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/rel_in.jpg rename to resources/library/applications/Cellule.wgt/images/rel_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/rer_in.jpg b/resources/library/applications/Cellule.wgt/images/rer_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/rer_in.jpg rename to resources/library/applications/Cellule.wgt/images/rer_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/rib_aura.png b/resources/library/applications/Cellule.wgt/images/rib_aura.png similarity index 100% rename from resources/library/applications/iCell.wgt/images/rib_aura.png rename to resources/library/applications/Cellule.wgt/images/rib_aura.png diff --git a/resources/library/applications/iCell.wgt/images/rib_in.jpg b/resources/library/applications/Cellule.wgt/images/rib_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/rib_in.jpg rename to resources/library/applications/Cellule.wgt/images/rib_in.jpg diff --git a/resources/library/applications/iCell.wgt/images/vesic_in.jpg b/resources/library/applications/Cellule.wgt/images/vesic_in.jpg similarity index 100% rename from resources/library/applications/iCell.wgt/images/vesic_in.jpg rename to resources/library/applications/Cellule.wgt/images/vesic_in.jpg diff --git a/resources/library/applications/iCell.wgt/js/script.js b/resources/library/applications/Cellule.wgt/js/script.js similarity index 100% rename from resources/library/applications/iCell.wgt/js/script.js rename to resources/library/applications/Cellule.wgt/js/script.js diff --git a/resources/library/applications/iCell.wgt/js/textes_descriptifs.js b/resources/library/applications/Cellule.wgt/js/textes_descriptifs.js similarity index 100% rename from resources/library/applications/iCell.wgt/js/textes_descriptifs.js rename to resources/library/applications/Cellule.wgt/js/textes_descriptifs.js diff --git a/resources/library/applications/iCell.wgt/js/textes_descriptifs.js0 b/resources/library/applications/Cellule.wgt/js/textes_descriptifs.js0 similarity index 100% rename from resources/library/applications/iCell.wgt/js/textes_descriptifs.js0 rename to resources/library/applications/Cellule.wgt/js/textes_descriptifs.js0 diff --git a/resources/library/applications/iCell.wgt/readme.txt b/resources/library/applications/Cellule.wgt/readme.txt similarity index 100% rename from resources/library/applications/iCell.wgt/readme.txt rename to resources/library/applications/Cellule.wgt/readme.txt diff --git a/resources/library/applications/iCell.wgt/style/style.css b/resources/library/applications/Cellule.wgt/style/style.css similarity index 100% rename from resources/library/applications/iCell.wgt/style/style.css rename to resources/library/applications/Cellule.wgt/style/style.css diff --git a/resources/library/applications/iCell.wgt/widget.html b/resources/library/applications/Cellule.wgt/widget.html similarity index 100% rename from resources/library/applications/iCell.wgt/widget.html rename to resources/library/applications/Cellule.wgt/widget.html diff --git a/resources/library/applications/Anyembed.wgt/config.xml b/resources/library/applications/Composant Web.wgt/config.xml similarity index 100% rename from resources/library/applications/Anyembed.wgt/config.xml rename to resources/library/applications/Composant Web.wgt/config.xml diff --git a/resources/library/applications/Anyembed.wgt/css/ubwidget.css b/resources/library/applications/Composant Web.wgt/css/ubwidget.css similarity index 100% rename from resources/library/applications/Anyembed.wgt/css/ubwidget.css rename to resources/library/applications/Composant Web.wgt/css/ubwidget.css diff --git a/resources/library/applications/Anyembed.wgt/icon.png b/resources/library/applications/Composant Web.wgt/icon.png similarity index 100% rename from resources/library/applications/Anyembed.wgt/icon.png rename to resources/library/applications/Composant Web.wgt/icon.png diff --git a/resources/library/applications/Anyembed.wgt/index.html b/resources/library/applications/Composant Web.wgt/index.html similarity index 100% rename from resources/library/applications/Anyembed.wgt/index.html rename to resources/library/applications/Composant Web.wgt/index.html diff --git a/resources/library/applications/Calculator.wgt/js/jquery-1.3.2.min.js b/resources/library/applications/Composant Web.wgt/js/jquery-1.3.2.min.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/jquery-1.3.2.min.js rename to resources/library/applications/Composant Web.wgt/js/jquery-1.3.2.min.js diff --git a/resources/library/applications/Calculator.wgt/js/jquery.disable.text.select.js b/resources/library/applications/Composant Web.wgt/js/jquery.disable.text.select.js similarity index 100% rename from resources/library/applications/Calculator.wgt/js/jquery.disable.text.select.js rename to resources/library/applications/Composant Web.wgt/js/jquery.disable.text.select.js diff --git a/resources/library/applications/Anyembed.wgt/js/languages.js b/resources/library/applications/Composant Web.wgt/js/languages.js similarity index 100% rename from resources/library/applications/Anyembed.wgt/js/languages.js rename to resources/library/applications/Composant Web.wgt/js/languages.js diff --git a/resources/library/applications/Anyembed.wgt/js/ubw-main.js b/resources/library/applications/Composant Web.wgt/js/ubw-main.js similarity index 100% rename from resources/library/applications/Anyembed.wgt/js/ubw-main.js rename to resources/library/applications/Composant Web.wgt/js/ubw-main.js diff --git a/resources/library/applications/Html.wgt/config.xml b/resources/library/applications/Edit Html.wgt/config.xml similarity index 100% rename from resources/library/applications/Html.wgt/config.xml rename to resources/library/applications/Edit Html.wgt/config.xml diff --git a/resources/library/applications/Html.wgt/icon.png b/resources/library/applications/Edit Html.wgt/icon.png similarity index 100% rename from resources/library/applications/Html.wgt/icon.png rename to resources/library/applications/Edit Html.wgt/icon.png diff --git a/resources/library/applications/Html.wgt/images/bts.png b/resources/library/applications/Edit Html.wgt/images/bts.png similarity index 100% rename from resources/library/applications/Html.wgt/images/bts.png rename to resources/library/applications/Edit Html.wgt/images/bts.png diff --git a/resources/library/applications/Html.wgt/images/style.css b/resources/library/applications/Edit Html.wgt/images/style.css similarity index 100% rename from resources/library/applications/Html.wgt/images/style.css rename to resources/library/applications/Edit Html.wgt/images/style.css diff --git a/resources/library/applications/Html.wgt/index.html b/resources/library/applications/Edit Html.wgt/index.html similarity index 100% rename from resources/library/applications/Html.wgt/index.html rename to resources/library/applications/Edit Html.wgt/index.html diff --git a/resources/library/applications/Html.wgt/jquery.pack.js b/resources/library/applications/Edit Html.wgt/jquery.pack.js similarity index 100% rename from resources/library/applications/Html.wgt/jquery.pack.js rename to resources/library/applications/Edit Html.wgt/jquery.pack.js diff --git a/resources/library/applications/Html.wgt/languages.js b/resources/library/applications/Edit Html.wgt/languages.js similarity index 100% rename from resources/library/applications/Html.wgt/languages.js rename to resources/library/applications/Edit Html.wgt/languages.js diff --git a/resources/library/applications/Html.wgt/markitup/jquery.markitup.js b/resources/library/applications/Edit Html.wgt/markitup/jquery.markitup.js similarity index 100% rename from resources/library/applications/Html.wgt/markitup/jquery.markitup.js rename to resources/library/applications/Edit Html.wgt/markitup/jquery.markitup.js diff --git a/resources/library/applications/Html.wgt/markitup/jquery.markitup.pack.js b/resources/library/applications/Edit Html.wgt/markitup/jquery.markitup.pack.js similarity index 100% rename from resources/library/applications/Html.wgt/markitup/jquery.markitup.pack.js rename to resources/library/applications/Edit Html.wgt/markitup/jquery.markitup.pack.js diff --git a/resources/library/applications/Html.wgt/markitup/readme.txt b/resources/library/applications/Edit Html.wgt/markitup/readme.txt similarity index 100% rename from resources/library/applications/Html.wgt/markitup/readme.txt rename to resources/library/applications/Edit Html.wgt/markitup/readme.txt diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/images/bold.png b/resources/library/applications/Edit Html.wgt/markitup/sets/default/images/bold.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/images/bold.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/images/bold.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/images/clean.png b/resources/library/applications/Edit Html.wgt/markitup/sets/default/images/clean.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/images/clean.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/images/clean.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/images/image.png b/resources/library/applications/Edit Html.wgt/markitup/sets/default/images/image.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/images/image.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/images/image.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/images/italic.png b/resources/library/applications/Edit Html.wgt/markitup/sets/default/images/italic.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/images/italic.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/images/italic.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/images/link.png b/resources/library/applications/Edit Html.wgt/markitup/sets/default/images/link.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/images/link.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/images/link.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/images/picture.png b/resources/library/applications/Edit Html.wgt/markitup/sets/default/images/picture.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/images/picture.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/images/picture.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/images/preview.png b/resources/library/applications/Edit Html.wgt/markitup/sets/default/images/preview.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/images/preview.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/images/preview.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/images/stroke.png b/resources/library/applications/Edit Html.wgt/markitup/sets/default/images/stroke.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/images/stroke.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/images/stroke.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/set.js b/resources/library/applications/Edit Html.wgt/markitup/sets/default/set.js similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/set.js rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/set.js diff --git a/resources/library/applications/Html.wgt/markitup/sets/default/style.css b/resources/library/applications/Edit Html.wgt/markitup/sets/default/style.css similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/default/style.css rename to resources/library/applications/Edit Html.wgt/markitup/sets/default/style.css diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/bold.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/bold.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/bold.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/bold.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/clean.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/clean.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/clean.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/clean.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/h1.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h1.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/h1.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h1.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/h2.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h2.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/h2.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h2.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/h3.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h3.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/h3.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h3.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/h4.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h4.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/h4.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h4.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/h5.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h5.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/h5.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h5.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/h6.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h6.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/h6.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/h6.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/image.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/image.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/image.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/image.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/italic.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/italic.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/italic.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/italic.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/link.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/link.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/link.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/link.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/list-bullet.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/list-bullet.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/list-bullet.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/list-bullet.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/list-item.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/list-item.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/list-item.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/list-item.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/list-numeric.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/list-numeric.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/list-numeric.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/list-numeric.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/paragraph.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/paragraph.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/paragraph.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/paragraph.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/picture.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/picture.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/picture.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/picture.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/preview.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/preview.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/preview.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/preview.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/images/stroke.png b/resources/library/applications/Edit Html.wgt/markitup/sets/html/images/stroke.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/images/stroke.png rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/images/stroke.png diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/readme.txt b/resources/library/applications/Edit Html.wgt/markitup/sets/html/readme.txt similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/readme.txt rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/readme.txt diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/set.js b/resources/library/applications/Edit Html.wgt/markitup/sets/html/set.js similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/set.js rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/set.js diff --git a/resources/library/applications/Html.wgt/markitup/sets/html/style.css b/resources/library/applications/Edit Html.wgt/markitup/sets/html/style.css similarity index 100% rename from resources/library/applications/Html.wgt/markitup/sets/html/style.css rename to resources/library/applications/Edit Html.wgt/markitup/sets/html/style.css diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-container-white.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-container-white.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-container-white.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-container-white.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-container.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-container.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-container.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-container.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-footer-white.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-footer-white.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-footer-white.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-footer-white.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-footer.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-footer.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-footer.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-footer.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-header-white.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-header-white.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-header-white.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-header-white.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-header.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-header.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/bg-header.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/bg-header.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/handle.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/handle.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/handle.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/handle.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/menu.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/menu.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/menu.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/menu.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/spacer.gif b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/spacer.gif similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/spacer.gif rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/spacer.gif diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/images/submenu.png b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/submenu.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/images/submenu.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/images/submenu.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/readme.txt b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/readme.txt similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/readme.txt rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/readme.txt diff --git a/resources/library/applications/Html.wgt/markitup/skins/macosx/style.css b/resources/library/applications/Edit Html.wgt/markitup/skins/macosx/style.css similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/macosx/style.css rename to resources/library/applications/Edit Html.wgt/markitup/skins/macosx/style.css diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-container.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-container.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-container.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-container.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-bbcode.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-bbcode.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-bbcode.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-bbcode.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-dotclear.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-dotclear.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-dotclear.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-dotclear.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-html.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-html.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-html.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-html.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-json.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-json.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-json.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-json.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-markdown.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-markdown.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-markdown.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-markdown.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-textile.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-textile.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-textile.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-textile.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-wiki.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-wiki.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-wiki.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-wiki.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-xml.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-xml.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor-xml.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor-xml.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/bg-editor.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/bg-editor.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/handle.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/handle.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/handle.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/handle.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/menu.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/menu.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/menu.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/menu.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/images/submenu.png b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/submenu.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/images/submenu.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/images/submenu.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/markitup/style.css b/resources/library/applications/Edit Html.wgt/markitup/skins/markitup/style.css similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/markitup/style.css rename to resources/library/applications/Edit Html.wgt/markitup/skins/markitup/style.css diff --git a/resources/library/applications/Html.wgt/markitup/skins/simple/images/handle.png b/resources/library/applications/Edit Html.wgt/markitup/skins/simple/images/handle.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/simple/images/handle.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/simple/images/handle.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/simple/images/menu.png b/resources/library/applications/Edit Html.wgt/markitup/skins/simple/images/menu.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/simple/images/menu.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/simple/images/menu.png diff --git a/resources/library/applications/Html.wgt/markitup/skins/simple/images/submenu.png b/resources/library/applications/Edit Html.wgt/markitup/skins/simple/images/submenu.png similarity index 100% rename from resources/library/applications/Html.wgt/markitup/skins/simple/images/submenu.png rename to resources/library/applications/Edit Html.wgt/markitup/skins/simple/images/submenu.png diff --git a/resources/library/applications/Html.wgt/markitup/templates/preview.css b/resources/library/applications/Edit Html.wgt/markitup/templates/preview.css similarity index 100% rename from resources/library/applications/Html.wgt/markitup/templates/preview.css rename to resources/library/applications/Edit Html.wgt/markitup/templates/preview.css diff --git a/resources/library/applications/Html.wgt/markitup/templates/preview.html b/resources/library/applications/Edit Html.wgt/markitup/templates/preview.html similarity index 100% rename from resources/library/applications/Html.wgt/markitup/templates/preview.html rename to resources/library/applications/Edit Html.wgt/markitup/templates/preview.html diff --git a/resources/library/applications/GeoInfo.wgt/js/languages.js b/resources/library/applications/GeoInfo.wgt/js/languages.js index 53bc8839..04d86daf 100644 --- a/resources/library/applications/GeoInfo.wgt/js/languages.js +++ b/resources/library/applications/GeoInfo.wgt/js/languages.js @@ -1418,19 +1418,19 @@ var sankoreLang = { "city":"Сана", "country":"Йемен" } - }, + }, "fr":{ - "capital":"Capital ville", - "europe":"l'Europe", - "asia":"l'Asie", - "north_america":"l'Amérique du Nord", - "south_america":"l'Amérique du Sud", - "oceania":"l'Océanie", - "africa":"l'Afrique", + "capital":"Capitale", + "europe":"Europe", + "asia":"Asie", + "north_america":"Amérique du Nord", + "south_america":"Amérique du Sud", + "oceania":"Océanie", + "africa":"Afrique", "eurasia": "Eurasie", "MA":{ "city":"Rabat", - "country":"le Maroc" + "country":"Maroc" }, "DZ":{ "city":"Alger", @@ -1438,15 +1438,15 @@ var sankoreLang = { }, "TN":{ "city":"Tunis", - "country":"la Tunisie" + "country":"Tunisie" }, "LY":{ "city":"Tripoli", - "country":"La Libye" + "country":"Libye" }, "EG":{ "city":"Le Caire", - "country":"l'Égypte" + "country":"Égypte" }, "Sahara_occidental":{ "city":"", @@ -1481,12 +1481,12 @@ var sankoreLang = { "country":"Djibouti" }, "ET":{ - "city":"Addis Ababa", + "city":"Addis-Abeba", "country":"Ethiopie" }, "SO":{ "city":"Mogadiscio", - "country":"Somalia" + "country":"Somalie" }, "KE":{ "city":"Nairobi", @@ -1494,7 +1494,7 @@ var sankoreLang = { }, "UG":{ "city":"Kampala", - "country":"l'Ouganda" + "country":"Ouganda" }, "CD":{ "city":"Kinshasa", @@ -1510,10 +1510,10 @@ var sankoreLang = { }, "NG":{ "city":"Abuja", - "country":"Nigeria" + "country":"Nigéria" }, "BJ":{ - "city":"Porto Novo", + "city":"Porto-Novo", "country":"Bénin" }, "TG":{ @@ -1526,15 +1526,15 @@ var sankoreLang = { }, "CI":{ "city":"Yamoussoukro", - "country":"La Côte d'Ivoire" + "country":"Côte d'Ivoire" }, "BF":{ "city":"Ouagadougou", "country":"Burkina Faso" }, "LR":{ - "city":"Monravia", - "country":"Le Libéria" + "city":"Monrovia", + "country":"Libéria" }, "SL":{ "city":"Freetown", @@ -1546,7 +1546,7 @@ var sankoreLang = { }, "GW":{ "city":"Bissau", - "country":"La Guinée-Bissau" + "country":"Guinée-Bissau" }, "SN":{ "city":"Dakar", @@ -1574,7 +1574,7 @@ var sankoreLang = { }, "GQ":{ "city":"Malabo", - "country":"La Guinée Equatoriale" + "country":"Guinée Equatoriale" }, "TZ":{ "city":"Dodoma", @@ -1605,12 +1605,12 @@ var sankoreLang = { "country":"Botswana" }, "NA":{ - "city":"Windhoec", + "city":"Windhoek", "country":"Namibie" }, "ZA":{ "city":"Pretoria", - "country":"l'Afrique du Sud" + "country":"Afrique du Sud" }, "LS":{ "city":"Maseru", @@ -1641,7 +1641,7 @@ var sankoreLang = { "country":"Paraguay" }, "BO":{ - "city":"La Paz", + "city":"Sucre", "country":"Bolivie" }, "BR":{ @@ -1654,7 +1654,7 @@ var sankoreLang = { }, "EC":{ "city":"Quito", - "country":"L'Equateur" + "country":"Equateur" }, "CO":{ "city":"Bogota", @@ -1662,7 +1662,7 @@ var sankoreLang = { }, "VE":{ "city":"Caracas", - "country":"Venezuela" + "country":"Vénézuéla" }, "GY":{ "city":"Georgetown", @@ -1673,7 +1673,7 @@ var sankoreLang = { "country":"Suriname" }, "GF":{ - "city":"Paris", + "city":"Cayenne", "country":"Guyane française" }, "CA":{ @@ -1682,14 +1682,14 @@ var sankoreLang = { }, "GL":{ "city":"Nuuk", - "country":"Greenland" + "country":"Groënland" }, "US":{ "city":"Washington", - "country":"Les États-Unis d'Amérique" + "country":"États-Unis d'Amérique" }, "MX":{ - "city":"Mexique", + "city":"Mexico", "country":"Mexique" }, "CU":{ @@ -1701,7 +1701,7 @@ var sankoreLang = { "country":"Haïti" }, "DO":{ - "city":"Santo Domingo", + "city":"Saint-Domingue", "country":"République Dominicaine" }, "JM":{ @@ -1721,8 +1721,8 @@ var sankoreLang = { "country":"Belize" }, "SV":{ - "city":"Salvador", - "country":"San Salvador" + "city":"San Salvador", + "country":"Salvador" }, "HN":{ "city":"Tegucigalpa", @@ -1734,7 +1734,7 @@ var sankoreLang = { }, "CR":{ "city":"San José", - "country":"Costa-Rica" + "country":"Costa Rica" }, "PA":{ "city":"Panama", @@ -1746,11 +1746,11 @@ var sankoreLang = { }, "NZ":{ "city":"Wellington", - "country":"New Zealand" + "country":"Nouvelle-Zélande" }, "PG":{ "city":"Port Moresby", - "country":"La Papouasie-Nouvelle-Guinée" + "country":"Papouasie-Nouvelle-Guinée" }, "ID":{ "city":"Jakarta", @@ -1765,7 +1765,7 @@ var sankoreLang = { "country":"Vanuatu" }, "NC":{ - "city":"Paris", + "city":"Nouméa", "country":"Nouvelle-Calédonie" }, "AL":{ @@ -1774,10 +1774,10 @@ var sankoreLang = { }, "DE":{ "city":"Berlin", - "country":"l'Allemagne" + "country":"Allemagne" }, "AD":{ - "city":"Andorre la Vieille", + "city":"Andorre-la-Vieille", "country":"Andorre" }, "AM":{ @@ -1785,7 +1785,7 @@ var sankoreLang = { "country":"Arménie" }, "AT":{ - "city":"Vienna", + "city":"Vienne", "country":"Autriche" }, "AZ":{ @@ -1802,11 +1802,11 @@ var sankoreLang = { }, "BA":{ "city":"Sarajevo", - "country":"Bosnie" + "country":"Bosnie-Herzégovine" }, "BG":{ "city":"Sofia", - "country":"La Bulgarie" + "country":"Bulgarie" }, "CY":{ "city":"Nicosie", @@ -1817,16 +1817,16 @@ var sankoreLang = { "country":"Croatie" }, "DK":{ - "city":"De Copenhague", + "city":"Copenhague", "country":"Danemark" }, "ES":{ "city":"Madrid", - "country":"L'Espagne" + "country":"Espagne" }, "EE":{ "city":"Tallinn", - "country":"Estonia" + "country":"Estonie" }, "FI":{ "city":"Helsinki", @@ -1838,7 +1838,7 @@ var sankoreLang = { }, "GE":{ "city":"Tbilissi", - "country":"Georgia" + "country":"Géorgie" }, "EL":{ "city":"Athènes", @@ -1850,11 +1850,11 @@ var sankoreLang = { }, "IE":{ "city":"Dublin", - "country":"L'Irlande" + "country":"Irlande" }, "IS":{ "city":"Reykjavik", - "country":"L'île" + "country":"Islande" }, "IT":{ "city":"Rome", @@ -1878,7 +1878,7 @@ var sankoreLang = { }, "MK":{ "city":"Skopje", - "country":"Macedoine" + "country":"Macédoine" }, "MT":{ "city":"La Valette", @@ -1886,7 +1886,7 @@ var sankoreLang = { }, "MD":{ "city":"Chisinau", - "country":"La Moldavie" + "country":"Moldavie" }, "MC":{ "city":"Monaco", @@ -1902,14 +1902,14 @@ var sankoreLang = { }, "NL":{ "city":"Amsterdam", - "country":"Pays Bas" + "country":"Pays-Bas" }, "PL":{ "city":"Varsovie", - "country":"La Pologne" + "country":"Pologne" }, "PT":{ - "city":"De Lisbonne", + "city":"Lisbonne", "country":"Portugal" }, "CZ":{ @@ -1921,7 +1921,7 @@ var sankoreLang = { "country":"Roumanie" }, "UK":{ - "city":"London", + "city":"Londres", "country":"Royaume-Uni" }, "SM":{ @@ -1934,7 +1934,7 @@ var sankoreLang = { }, "SK":{ "city":"Bratislava", - "country":"Slovakia" + "country":"Slovaquie" }, "SI":{ "city":"Ljubljana", @@ -1946,18 +1946,18 @@ var sankoreLang = { }, "CH":{ "city":"Berne", - "country":"La Suisse" + "country":"Suisse" }, "TR":{ "city":"Ankara", - "country":"La Turquie" + "country":"Turquie" }, "UA":{ "city":"Kiev", "country":"Ukraine" }, "VA":{ - "city":"Vatican", + "city":"Cité du Vatican", "country":"Vatican" }, "AF":{ @@ -1966,23 +1966,23 @@ var sankoreLang = { }, "SA":{ "city":"Riyad", - "country":"L'Arabie Saoudite" + "country":"Arabie Saoudite" }, "BH":{ "city":"Manama", - "country":"Bahrein" + "country":"Bahreïn" }, "BD":{ "city":"Dacca", "country":"Bangladesh" }, "BT":{ - "city":"Thimphu", + "city":"Thimphou", "country":"Bhoutan" }, "BN":{ - "city":"Andar Seri Begawan", - "country":"Brunei" + "city":"Bandar Seri Begawan", + "country":"Bruneï" }, "KH":{ "city":"Phnom Penh", @@ -1994,27 +1994,27 @@ var sankoreLang = { }, "KP":{ "city":"Pyongyang", - "country":"La Corée du Nord" + "country":"Corée du Nord" }, "KR":{ - "city":"Seoul", - "country":"La Corée du Sud" + "city":"Séoul", + "country":"Corée du Sud" }, "AE":{ - "city":"Abu Dhabi", + "city":"Abou Dabi", "country":"Emirats Arabes Unis" }, "IN":{ - "city":"Delhi", - "country":"L'Inde" + "city":"New Delhi", + "country":"Inde" }, "IR":{ "city":"Téhéran", - "country":"L'Iran" + "country":"Iran" }, "IQ":{ "city":"Bagdad", - "country":"L'Irak" + "country":"Irak" }, "IL":{ "city":"Jérusalem", @@ -2026,23 +2026,23 @@ var sankoreLang = { }, "JO":{ "city":"Amman", - "country":"Jordan" + "country":"Jordanie" }, "KZ":{ "city":"Astana", "country":"Kazakhstan" }, "KG":{ - "city":"Bishkek", - "country":"Kirghizstan" + "city":"Bichkek", + "country":"Kirghizistan" }, "KW":{ - "city":"Koweit", - "country":"Koweit" + "city":"Koweït", + "country":"Koweït" }, "LA":{ - "city":"Laos", - "country":"Vientiane" + "city":"Vientiane", + "country":"Laos" }, "LB":{ "city":"Beyrouth", @@ -2050,10 +2050,10 @@ var sankoreLang = { }, "MY":{ "city":"Kuala Lumpur", - "country":"La Malaisie" + "country":"Malaisie" }, "MV":{ - "city":"Male", + "city":"Malé", "country":"Maldives" }, "MN":{ @@ -2062,14 +2062,14 @@ var sankoreLang = { }, "MM":{ "city":"Naypyidaw", - "country":"Myanmar" + "country":"Birmanie" }, "NP":{ "city":"Katmandou", "country":"Népal" }, "OM":{ - "city":"Muscat", + "city":"Mascate", "country":"Oman" }, "UZ":{ @@ -2078,56 +2078,55 @@ var sankoreLang = { }, "PK":{ "city":"Islamabad", - "country":"Le Pakistan" + "country":"Pakistan" }, "PH":{ "city":"Manille", "country":"Philippines" }, "QA":{ - "city":"De Doha", + "city":"Doha", "country":"Qatar" }, "RU":{ "city":"Moscou", - "country":"La Russie" + "country":"Russie" }, "SG":{ "city":"Singapour", "country":"Singapour" }, "LK":{ - "city":"Colombo", + "city":"Sri Jayawardenapura", "country":"Sri Lanka" }, "SY":{ - "city":"Damask", - "country":"La Syrie" + "city":"Damas", + "country":"Syrie" }, "TJ":{ "city":"Douchanbé", - "country":"Tajikistan" + "country":"Tadjikistan" }, "TH":{ "city":"Bangkok", - "country":"Thailande" + "country":"Thaïlande" }, "TL":{ "city":"Dili", - "country":"Le Timor-oriental" + "country":"Timor-oriental" }, "TM":{ - "city":"Achkhabad", + "city":"Achgabat", "country":"Turkménistan" }, "VN":{ "city":"Hanoï", - "country":"Viet Nam" + "country":"Vietnam" }, "YE":{ - "city":"Sana", + "city":"Sanaa", "country":"Yémen" } } }; - diff --git a/resources/library/applications/Graphme.wgt/Grapheur.xhtml b/resources/library/applications/Grapheur 3D.wgt/Grapheur.xhtml similarity index 100% rename from resources/library/applications/Graphme.wgt/Grapheur.xhtml rename to resources/library/applications/Grapheur 3D.wgt/Grapheur.xhtml diff --git a/resources/library/applications/Graphme.wgt/Guide_Utilisateur.html b/resources/library/applications/Grapheur 3D.wgt/Guide_Utilisateur.html similarity index 100% rename from resources/library/applications/Graphme.wgt/Guide_Utilisateur.html rename to resources/library/applications/Grapheur 3D.wgt/Guide_Utilisateur.html diff --git a/resources/library/applications/Graphme.wgt/Images/.directory b/resources/library/applications/Grapheur 3D.wgt/Images/.directory similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/.directory rename to resources/library/applications/Grapheur 3D.wgt/Images/.directory diff --git a/resources/library/applications/Graphme.wgt/Images/GraphMe.png b/resources/library/applications/Grapheur 3D.wgt/Images/GraphMe.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/GraphMe.png rename to resources/library/applications/Grapheur 3D.wgt/Images/GraphMe.png diff --git a/resources/library/applications/Graphme.wgt/Images/Guide_AjouterWidget.png b/resources/library/applications/Grapheur 3D.wgt/Images/Guide_AjouterWidget.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/Guide_AjouterWidget.png rename to resources/library/applications/Grapheur 3D.wgt/Images/Guide_AjouterWidget.png diff --git a/resources/library/applications/Graphme.wgt/Images/Guide_Deplacement.png b/resources/library/applications/Grapheur 3D.wgt/Images/Guide_Deplacement.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/Guide_Deplacement.png rename to resources/library/applications/Grapheur 3D.wgt/Images/Guide_Deplacement.png diff --git a/resources/library/applications/Graphme.wgt/Images/Guide_Navigateur.png b/resources/library/applications/Grapheur 3D.wgt/Images/Guide_Navigateur.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/Guide_Navigateur.png rename to resources/library/applications/Grapheur 3D.wgt/Images/Guide_Navigateur.png diff --git a/resources/library/applications/Graphme.wgt/Images/Guide_Options.png b/resources/library/applications/Grapheur 3D.wgt/Images/Guide_Options.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/Guide_Options.png rename to resources/library/applications/Grapheur 3D.wgt/Images/Guide_Options.png diff --git a/resources/library/applications/Graphme.wgt/Images/Guide_Plus.png b/resources/library/applications/Grapheur 3D.wgt/Images/Guide_Plus.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/Guide_Plus.png rename to resources/library/applications/Grapheur 3D.wgt/Images/Guide_Plus.png diff --git a/resources/library/applications/Graphme.wgt/Images/Guide_Presentation.png b/resources/library/applications/Grapheur 3D.wgt/Images/Guide_Presentation.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/Guide_Presentation.png rename to resources/library/applications/Grapheur 3D.wgt/Images/Guide_Presentation.png diff --git a/resources/library/applications/Graphme.wgt/Images/Guide_Uniboard.png b/resources/library/applications/Grapheur 3D.wgt/Images/Guide_Uniboard.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/Guide_Uniboard.png rename to resources/library/applications/Grapheur 3D.wgt/Images/Guide_Uniboard.png diff --git a/resources/library/applications/Graphme.wgt/Images/fond1.png b/resources/library/applications/Grapheur 3D.wgt/Images/fond1.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/fond1.png rename to resources/library/applications/Grapheur 3D.wgt/Images/fond1.png diff --git a/resources/library/applications/Graphme.wgt/Images/fond2.png b/resources/library/applications/Grapheur 3D.wgt/Images/fond2.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/fond2.png rename to resources/library/applications/Grapheur 3D.wgt/Images/fond2.png diff --git a/resources/library/applications/Graphme.wgt/Images/fond3.png b/resources/library/applications/Grapheur 3D.wgt/Images/fond3.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/fond3.png rename to resources/library/applications/Grapheur 3D.wgt/Images/fond3.png diff --git a/resources/library/applications/Graphme.wgt/Images/fond4.png b/resources/library/applications/Grapheur 3D.wgt/Images/fond4.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/fond4.png rename to resources/library/applications/Grapheur 3D.wgt/Images/fond4.png diff --git a/resources/library/applications/Graphme.wgt/Images/fond5.png b/resources/library/applications/Grapheur 3D.wgt/Images/fond5.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/fond5.png rename to resources/library/applications/Grapheur 3D.wgt/Images/fond5.png diff --git a/resources/library/applications/Graphme.wgt/Images/gauche1.png b/resources/library/applications/Grapheur 3D.wgt/Images/gauche1.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/gauche1.png rename to resources/library/applications/Grapheur 3D.wgt/Images/gauche1.png diff --git a/resources/library/applications/Graphme.wgt/Images/gauche2.png b/resources/library/applications/Grapheur 3D.wgt/Images/gauche2.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/gauche2.png rename to resources/library/applications/Grapheur 3D.wgt/Images/gauche2.png diff --git a/resources/library/applications/Graphme.wgt/Images/gauche3.png b/resources/library/applications/Grapheur 3D.wgt/Images/gauche3.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/gauche3.png rename to resources/library/applications/Grapheur 3D.wgt/Images/gauche3.png diff --git a/resources/library/applications/Graphme.wgt/Images/onglet1.png b/resources/library/applications/Grapheur 3D.wgt/Images/onglet1.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/onglet1.png rename to resources/library/applications/Grapheur 3D.wgt/Images/onglet1.png diff --git a/resources/library/applications/Graphme.wgt/Images/onglet2.png b/resources/library/applications/Grapheur 3D.wgt/Images/onglet2.png similarity index 100% rename from resources/library/applications/Graphme.wgt/Images/onglet2.png rename to resources/library/applications/Grapheur 3D.wgt/Images/onglet2.png diff --git a/resources/library/applications/Graphme.wgt/JavaScript/Affichage3D.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/Affichage3D.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/Affichage3D.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/Affichage3D.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/AffichageStandard.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/AffichageStandard.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/AffichageStandard.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/AffichageStandard.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/AffichageUniboard.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/AffichageUniboard.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/AffichageUniboard.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/AffichageUniboard.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/AffichageXPM.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/AffichageXPM.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/AffichageXPM.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/AffichageXPM.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/ColorPicker.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/ColorPicker.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/ColorPicker.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/ColorPicker.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/Etude.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/Etude.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/Etude.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/Etude.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/Interface.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/Interface.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/Interface.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/Interface.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/Outils.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/Outils.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/Outils.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/Outils.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/Sauvegardes.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/Sauvegardes.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/Sauvegardes.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/Sauvegardes.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/jquery-1.3.2.min.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/jquery-1.3.2.min.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/jquery-1.3.2.min.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/jquery-1.3.2.min.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/jquery.disable.text.select.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/jquery.disable.text.select.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/jquery.disable.text.select.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/jquery.disable.text.select.js diff --git a/resources/library/applications/Graphme.wgt/JavaScript/languages.js b/resources/library/applications/Grapheur 3D.wgt/JavaScript/languages.js similarity index 100% rename from resources/library/applications/Graphme.wgt/JavaScript/languages.js rename to resources/library/applications/Grapheur 3D.wgt/JavaScript/languages.js diff --git a/resources/library/applications/Graphme.wgt/Style/Guide_Utilisateur.css b/resources/library/applications/Grapheur 3D.wgt/Style/Guide_Utilisateur.css similarity index 100% rename from resources/library/applications/Graphme.wgt/Style/Guide_Utilisateur.css rename to resources/library/applications/Grapheur 3D.wgt/Style/Guide_Utilisateur.css diff --git a/resources/library/applications/Graphme.wgt/Style/default.css b/resources/library/applications/Grapheur 3D.wgt/Style/default.css similarity index 100% rename from resources/library/applications/Graphme.wgt/Style/default.css rename to resources/library/applications/Grapheur 3D.wgt/Style/default.css diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/._Grapheur.xhtml b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/._Grapheur.xhtml similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/._Grapheur.xhtml rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/._Grapheur.xhtml diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/._Guide_Utilisateur.html b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/._Guide_Utilisateur.html similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/._Guide_Utilisateur.html rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/._Guide_Utilisateur.html diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/._Images b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/._Images similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/._Images rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/._Images diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/._JavaScript b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/._JavaScript similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/._JavaScript rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/._JavaScript diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/._Style b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/._Style similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/._Style rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/._Style diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/._config.xml b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/._config.xml similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/._config.xml rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/._config.xml diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/._icon.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/._icon.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/._icon.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/._icon.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/._version.html b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/._version.html similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/._version.html rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/._version.html diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._.directory b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._.directory similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._.directory rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._.directory diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._GraphMe.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._GraphMe.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._GraphMe.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._GraphMe.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_AjouterWidget.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_AjouterWidget.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_AjouterWidget.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_AjouterWidget.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Deplacement.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Deplacement.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Deplacement.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Deplacement.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Navigateur.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Navigateur.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Navigateur.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Navigateur.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Options.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Options.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Options.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Options.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Plus.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Plus.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Plus.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Plus.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Presentation.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Presentation.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Presentation.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Presentation.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Uniboard.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Uniboard.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._Guide_Uniboard.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._Guide_Uniboard.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond1.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond1.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond1.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond1.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond2.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond2.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond2.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond2.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond3.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond3.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond3.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond3.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond4.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond4.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond4.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond4.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond5.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond5.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._fond5.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._fond5.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._gauche1.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._gauche1.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._gauche1.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._gauche1.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._gauche2.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._gauche2.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._gauche2.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._gauche2.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._gauche3.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._gauche3.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._gauche3.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._gauche3.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._onglet1.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._onglet1.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._onglet1.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._onglet1.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Images/._onglet2.png b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._onglet2.png similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Images/._onglet2.png rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Images/._onglet2.png diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._.directory b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._.directory similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._.directory rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._.directory diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Affichage3D.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Affichage3D.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Affichage3D.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Affichage3D.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._AffichageStandard.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._AffichageStandard.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._AffichageStandard.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._AffichageStandard.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._AffichageUniboard.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._AffichageUniboard.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._AffichageUniboard.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._AffichageUniboard.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._AffichageXPM.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._AffichageXPM.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._AffichageXPM.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._AffichageXPM.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._ColorPicker.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._ColorPicker.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._ColorPicker.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._ColorPicker.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Etude.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Etude.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Etude.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Etude.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Interface.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Interface.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Interface.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Interface.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Outils.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Outils.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Outils.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Outils.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Sauvegardes.js b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Sauvegardes.js similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/JavaScript/._Sauvegardes.js rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/JavaScript/._Sauvegardes.js diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Style/._Guide_Utilisateur.css b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Style/._Guide_Utilisateur.css similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Style/._Guide_Utilisateur.css rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Style/._Guide_Utilisateur.css diff --git a/resources/library/applications/Graphme.wgt/__MACOSX/Style/._default.css b/resources/library/applications/Grapheur 3D.wgt/__MACOSX/Style/._default.css similarity index 100% rename from resources/library/applications/Graphme.wgt/__MACOSX/Style/._default.css rename to resources/library/applications/Grapheur 3D.wgt/__MACOSX/Style/._default.css diff --git a/resources/library/applications/Graphme.wgt/config.xml b/resources/library/applications/Grapheur 3D.wgt/config.xml similarity index 100% rename from resources/library/applications/Graphme.wgt/config.xml rename to resources/library/applications/Grapheur 3D.wgt/config.xml diff --git a/resources/library/applications/Graphme.wgt/icon.png b/resources/library/applications/Grapheur 3D.wgt/icon.png similarity index 100% rename from resources/library/applications/Graphme.wgt/icon.png rename to resources/library/applications/Grapheur 3D.wgt/icon.png diff --git a/resources/library/applications/Graphme.wgt/version.html b/resources/library/applications/Grapheur 3D.wgt/version.html similarity index 100% rename from resources/library/applications/Graphme.wgt/version.html rename to resources/library/applications/Grapheur 3D.wgt/version.html diff --git a/resources/library/applications/Stopwatch.wgt/beep.wav b/resources/library/applications/Minuteur.wgt/beep.wav similarity index 100% rename from resources/library/applications/Stopwatch.wgt/beep.wav rename to resources/library/applications/Minuteur.wgt/beep.wav diff --git a/resources/library/applications/Stopwatch.wgt/config.xml b/resources/library/applications/Minuteur.wgt/config.xml similarity index 100% rename from resources/library/applications/Stopwatch.wgt/config.xml rename to resources/library/applications/Minuteur.wgt/config.xml diff --git a/resources/library/applications/Stopwatch.wgt/css/ubwidget.css b/resources/library/applications/Minuteur.wgt/css/ubwidget.css similarity index 100% rename from resources/library/applications/Stopwatch.wgt/css/ubwidget.css rename to resources/library/applications/Minuteur.wgt/css/ubwidget.css diff --git a/resources/library/applications/Stopwatch.wgt/finalbeep.wav b/resources/library/applications/Minuteur.wgt/finalbeep.wav similarity index 100% rename from resources/library/applications/Stopwatch.wgt/finalbeep.wav rename to resources/library/applications/Minuteur.wgt/finalbeep.wav diff --git a/resources/library/applications/Stopwatch.wgt/icon.png b/resources/library/applications/Minuteur.wgt/icon.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/icon.png rename to resources/library/applications/Minuteur.wgt/icon.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_out/bottom.png b/resources/library/applications/Minuteur.wgt/images/arrows_out/bottom.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_out/bottom.png rename to resources/library/applications/Minuteur.wgt/images/arrows_out/bottom.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_out/left.png b/resources/library/applications/Minuteur.wgt/images/arrows_out/left.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_out/left.png rename to resources/library/applications/Minuteur.wgt/images/arrows_out/left.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_out/right.png b/resources/library/applications/Minuteur.wgt/images/arrows_out/right.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_out/right.png rename to resources/library/applications/Minuteur.wgt/images/arrows_out/right.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_out/top.png b/resources/library/applications/Minuteur.wgt/images/arrows_out/top.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_out/top.png rename to resources/library/applications/Minuteur.wgt/images/arrows_out/top.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_over/bottom.png b/resources/library/applications/Minuteur.wgt/images/arrows_over/bottom.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_over/bottom.png rename to resources/library/applications/Minuteur.wgt/images/arrows_over/bottom.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_over/button_arrow_bottom.png b/resources/library/applications/Minuteur.wgt/images/arrows_over/button_arrow_bottom.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_over/button_arrow_bottom.png rename to resources/library/applications/Minuteur.wgt/images/arrows_over/button_arrow_bottom.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_over/button_arrow_left.png b/resources/library/applications/Minuteur.wgt/images/arrows_over/button_arrow_left.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_over/button_arrow_left.png rename to resources/library/applications/Minuteur.wgt/images/arrows_over/button_arrow_left.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_over/button_arrow_right.png b/resources/library/applications/Minuteur.wgt/images/arrows_over/button_arrow_right.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_over/button_arrow_right.png rename to resources/library/applications/Minuteur.wgt/images/arrows_over/button_arrow_right.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_over/button_arrow_top.png b/resources/library/applications/Minuteur.wgt/images/arrows_over/button_arrow_top.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_over/button_arrow_top.png rename to resources/library/applications/Minuteur.wgt/images/arrows_over/button_arrow_top.png diff --git a/resources/library/applications/Stopwatch.wgt/images/arrows_over/top.png b/resources/library/applications/Minuteur.wgt/images/arrows_over/top.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/arrows_over/top.png rename to resources/library/applications/Minuteur.wgt/images/arrows_over/top.png diff --git a/resources/library/applications/Stopwatch.wgt/images/back.png b/resources/library/applications/Minuteur.wgt/images/back.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/back.png rename to resources/library/applications/Minuteur.wgt/images/back.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_out-copie.png b/resources/library/applications/Minuteur.wgt/images/button_out-copie.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_out-copie.png rename to resources/library/applications/Minuteur.wgt/images/button_out-copie.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_out.gif b/resources/library/applications/Minuteur.wgt/images/button_out.gif similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_out.gif rename to resources/library/applications/Minuteur.wgt/images/button_out.gif diff --git a/resources/library/applications/Stopwatch.wgt/images/button_out.png b/resources/library/applications/Minuteur.wgt/images/button_out.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_out.png rename to resources/library/applications/Minuteur.wgt/images/button_out.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_out_dark.png b/resources/library/applications/Minuteur.wgt/images/button_out_dark.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_out_dark.png rename to resources/library/applications/Minuteur.wgt/images/button_out_dark.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_pause.png b/resources/library/applications/Minuteur.wgt/images/button_pause.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_pause.png rename to resources/library/applications/Minuteur.wgt/images/button_pause.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_pause_invert.png b/resources/library/applications/Minuteur.wgt/images/button_pause_invert.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_pause_invert.png rename to resources/library/applications/Minuteur.wgt/images/button_pause_invert.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_pause_invertxov.png b/resources/library/applications/Minuteur.wgt/images/button_pause_invertxov.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_pause_invertxov.png rename to resources/library/applications/Minuteur.wgt/images/button_pause_invertxov.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_play.png b/resources/library/applications/Minuteur.wgt/images/button_play.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_play.png rename to resources/library/applications/Minuteur.wgt/images/button_play.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_play_invert.png b/resources/library/applications/Minuteur.wgt/images/button_play_invert.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_play_invert.png rename to resources/library/applications/Minuteur.wgt/images/button_play_invert.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_play_invertxov.png b/resources/library/applications/Minuteur.wgt/images/button_play_invertxov.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_play_invertxov.png rename to resources/library/applications/Minuteur.wgt/images/button_play_invertxov.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_reset_invert.png b/resources/library/applications/Minuteur.wgt/images/button_reset_invert.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_reset_invert.png rename to resources/library/applications/Minuteur.wgt/images/button_reset_invert.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_toggle.png b/resources/library/applications/Minuteur.wgt/images/button_toggle.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_toggle.png rename to resources/library/applications/Minuteur.wgt/images/button_toggle.png diff --git a/resources/library/applications/Stopwatch.wgt/images/button_toggle_invert.png b/resources/library/applications/Minuteur.wgt/images/button_toggle_invert.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/button_toggle_invert.png rename to resources/library/applications/Minuteur.wgt/images/button_toggle_invert.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/back.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/back.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/back.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/back.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/bottom.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/bottom.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/bottom.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/bottom.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/cbottomleft.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/cbottomleft.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/cbottomleft.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/cbottomleft.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/cbottomright.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/cbottomright.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/cbottomright.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/cbottomright.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/ctopleft.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/ctopleft.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/ctopleft.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/ctopleft.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/ctopright.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/ctopright.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/ctopright.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/ctopright.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/left.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/left.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/left.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/left.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/right.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/right.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/right.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/right.png diff --git a/resources/library/applications/Stopwatch.wgt/images/buttons_shadow/top.png b/resources/library/applications/Minuteur.wgt/images/buttons_shadow/top.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/buttons_shadow/top.png rename to resources/library/applications/Minuteur.wgt/images/buttons_shadow/top.png diff --git a/resources/library/applications/Stopwatch.wgt/images/inspector.png b/resources/library/applications/Minuteur.wgt/images/inspector.png similarity index 100% rename from resources/library/applications/Stopwatch.wgt/images/inspector.png rename to resources/library/applications/Minuteur.wgt/images/inspector.png diff --git a/resources/library/applications/Stopwatch.wgt/index.html b/resources/library/applications/Minuteur.wgt/index.html similarity index 100% rename from resources/library/applications/Stopwatch.wgt/index.html rename to resources/library/applications/Minuteur.wgt/index.html diff --git a/resources/library/applications/Stopwatch.wgt/js/DD_roundies_0.0.2a.js b/resources/library/applications/Minuteur.wgt/js/DD_roundies_0.0.2a.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/DD_roundies_0.0.2a.js rename to resources/library/applications/Minuteur.wgt/js/DD_roundies_0.0.2a.js diff --git a/resources/library/applications/Stopwatch.wgt/js/calculate.js b/resources/library/applications/Minuteur.wgt/js/calculate.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/calculate.js rename to resources/library/applications/Minuteur.wgt/js/calculate.js diff --git a/resources/library/applications/Stopwatch.wgt/js/jquery-1.3.2.min.js b/resources/library/applications/Minuteur.wgt/js/jquery-1.3.2.min.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/jquery-1.3.2.min.js rename to resources/library/applications/Minuteur.wgt/js/jquery-1.3.2.min.js diff --git a/resources/library/applications/Stopwatch.wgt/js/jquery-ui-1.7.2.custom.min.js b/resources/library/applications/Minuteur.wgt/js/jquery-ui-1.7.2.custom.min.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/jquery-ui-1.7.2.custom.min.js rename to resources/library/applications/Minuteur.wgt/js/jquery-ui-1.7.2.custom.min.js diff --git a/resources/library/applications/Stopwatch.wgt/js/jquery.center.js b/resources/library/applications/Minuteur.wgt/js/jquery.center.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/jquery.center.js rename to resources/library/applications/Minuteur.wgt/js/jquery.center.js diff --git a/resources/library/applications/Stopwatch.wgt/js/jquery.disable.text.select.js b/resources/library/applications/Minuteur.wgt/js/jquery.disable.text.select.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/jquery.disable.text.select.js rename to resources/library/applications/Minuteur.wgt/js/jquery.disable.text.select.js diff --git a/resources/library/applications/Stopwatch.wgt/js/jquery.easing.1.2.js b/resources/library/applications/Minuteur.wgt/js/jquery.easing.1.2.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/jquery.easing.1.2.js rename to resources/library/applications/Minuteur.wgt/js/jquery.easing.1.2.js diff --git a/resources/library/applications/Stopwatch.wgt/js/jquery.ubwidget.js b/resources/library/applications/Minuteur.wgt/js/jquery.ubwidget.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/jquery.ubwidget.js rename to resources/library/applications/Minuteur.wgt/js/jquery.ubwidget.js diff --git a/resources/library/applications/Stopwatch.wgt/js/ubw-main.js b/resources/library/applications/Minuteur.wgt/js/ubw-main.js similarity index 100% rename from resources/library/applications/Stopwatch.wgt/js/ubw-main.js rename to resources/library/applications/Minuteur.wgt/js/ubw-main.js diff --git a/resources/library/applications/WebBrowser.wgt/config.xml b/resources/library/applications/Navigateur Web.wgt/config.xml similarity index 100% rename from resources/library/applications/WebBrowser.wgt/config.xml rename to resources/library/applications/Navigateur Web.wgt/config.xml diff --git a/resources/library/applications/VideoPicker.wgt/css/howto.css b/resources/library/applications/Navigateur Web.wgt/css/howto.css similarity index 100% rename from resources/library/applications/VideoPicker.wgt/css/howto.css rename to resources/library/applications/Navigateur Web.wgt/css/howto.css diff --git a/resources/library/applications/WebBrowser.wgt/css/main.css b/resources/library/applications/Navigateur Web.wgt/css/main.css similarity index 100% rename from resources/library/applications/WebBrowser.wgt/css/main.css rename to resources/library/applications/Navigateur Web.wgt/css/main.css diff --git a/resources/library/applications/WebBrowser.wgt/icon.png b/resources/library/applications/Navigateur Web.wgt/icon.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/icon.png rename to resources/library/applications/Navigateur Web.wgt/icon.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/arrow.png b/resources/library/applications/Navigateur Web.wgt/imgs/arrow.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/arrow.png rename to resources/library/applications/Navigateur Web.wgt/imgs/arrow.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/button.png b/resources/library/applications/Navigateur Web.wgt/imgs/button.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/button.png rename to resources/library/applications/Navigateur Web.wgt/imgs/button.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/button_anim.gif b/resources/library/applications/Navigateur Web.wgt/imgs/button_anim.gif similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/button_anim.gif rename to resources/library/applications/Navigateur Web.wgt/imgs/button_anim.gif diff --git a/resources/library/applications/VideoPicker.wgt/imgs/button_over.png b/resources/library/applications/Navigateur Web.wgt/imgs/button_over.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/button_over.png rename to resources/library/applications/Navigateur Web.wgt/imgs/button_over.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/button_show.png b/resources/library/applications/Navigateur Web.wgt/imgs/button_show.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/button_show.png rename to resources/library/applications/Navigateur Web.wgt/imgs/button_show.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/capture_youtube.jpg b/resources/library/applications/Navigateur Web.wgt/imgs/capture_youtube.jpg similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/capture_youtube.jpg rename to resources/library/applications/Navigateur Web.wgt/imgs/capture_youtube.jpg diff --git a/resources/library/applications/VideoPicker.wgt/imgs/center.png b/resources/library/applications/Navigateur Web.wgt/imgs/center.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/center.png rename to resources/library/applications/Navigateur Web.wgt/imgs/center.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/howto_back.png b/resources/library/applications/Navigateur Web.wgt/imgs/howto_back.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/howto_back.png rename to resources/library/applications/Navigateur Web.wgt/imgs/howto_back.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/info_ico.png b/resources/library/applications/Navigateur Web.wgt/imgs/info_ico.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/info_ico.png rename to resources/library/applications/Navigateur Web.wgt/imgs/info_ico.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/inputfield_back.png b/resources/library/applications/Navigateur Web.wgt/imgs/inputfield_back.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/inputfield_back.png rename to resources/library/applications/Navigateur Web.wgt/imgs/inputfield_back.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/keys_copy.jpg b/resources/library/applications/Navigateur Web.wgt/imgs/keys_copy.jpg similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/keys_copy.jpg rename to resources/library/applications/Navigateur Web.wgt/imgs/keys_copy.jpg diff --git a/resources/library/applications/VideoPicker.wgt/imgs/keys_paste.jpg b/resources/library/applications/Navigateur Web.wgt/imgs/keys_paste.jpg similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/keys_paste.jpg rename to resources/library/applications/Navigateur Web.wgt/imgs/keys_paste.jpg diff --git a/resources/library/applications/VideoPicker.wgt/imgs/left.png b/resources/library/applications/Navigateur Web.wgt/imgs/left.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/left.png rename to resources/library/applications/Navigateur Web.wgt/imgs/left.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/logos_web.jpg b/resources/library/applications/Navigateur Web.wgt/imgs/logos_web.jpg similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/logos_web.jpg rename to resources/library/applications/Navigateur Web.wgt/imgs/logos_web.jpg diff --git a/resources/library/applications/VideoPicker.wgt/imgs/right.png b/resources/library/applications/Navigateur Web.wgt/imgs/right.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/right.png rename to resources/library/applications/Navigateur Web.wgt/imgs/right.png diff --git a/resources/library/applications/WebBrowser.wgt/index.html b/resources/library/applications/Navigateur Web.wgt/index.html similarity index 100% rename from resources/library/applications/WebBrowser.wgt/index.html rename to resources/library/applications/Navigateur Web.wgt/index.html diff --git a/resources/library/applications/VideoPicker.wgt/locales/en/capture_widget.jpg b/resources/library/applications/Navigateur Web.wgt/locales/en/capture_widget.jpg similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/en/capture_widget.jpg rename to resources/library/applications/Navigateur Web.wgt/locales/en/capture_widget.jpg diff --git a/resources/library/applications/WebBrowser.wgt/locales/en/error.html b/resources/library/applications/Navigateur Web.wgt/locales/en/error.html similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/en/error.html rename to resources/library/applications/Navigateur Web.wgt/locales/en/error.html diff --git a/resources/library/applications/WebBrowser.wgt/locales/en/howto.html b/resources/library/applications/Navigateur Web.wgt/locales/en/howto.html similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/en/howto.html rename to resources/library/applications/Navigateur Web.wgt/locales/en/howto.html diff --git a/resources/library/applications/VideoPicker.wgt/locales/fr/capture_widget.jpg b/resources/library/applications/Navigateur Web.wgt/locales/fr/capture_widget.jpg similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/fr/capture_widget.jpg rename to resources/library/applications/Navigateur Web.wgt/locales/fr/capture_widget.jpg diff --git a/resources/library/applications/VideoPicker.wgt/locales/fr/error.html b/resources/library/applications/Navigateur Web.wgt/locales/fr/error.html similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/fr/error.html rename to resources/library/applications/Navigateur Web.wgt/locales/fr/error.html diff --git a/resources/library/applications/WebBrowser.wgt/locales/fr/howto.html b/resources/library/applications/Navigateur Web.wgt/locales/fr/howto.html similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/fr/howto.html rename to resources/library/applications/Navigateur Web.wgt/locales/fr/howto.html diff --git a/resources/library/applications/VideoPicker.wgt/locales/ru/capture_widget.jpg b/resources/library/applications/Navigateur Web.wgt/locales/ru/capture_widget.jpg similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/ru/capture_widget.jpg rename to resources/library/applications/Navigateur Web.wgt/locales/ru/capture_widget.jpg diff --git a/resources/library/applications/WebBrowser.wgt/locales/ru/error.html b/resources/library/applications/Navigateur Web.wgt/locales/ru/error.html similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/ru/error.html rename to resources/library/applications/Navigateur Web.wgt/locales/ru/error.html diff --git a/resources/library/applications/WebBrowser.wgt/locales/ru/howto.html b/resources/library/applications/Navigateur Web.wgt/locales/ru/howto.html similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/ru/howto.html rename to resources/library/applications/Navigateur Web.wgt/locales/ru/howto.html diff --git a/resources/library/applications/VideoPicker.wgt/scripts/jquery-1.3.2.min.js b/resources/library/applications/Navigateur Web.wgt/scripts/jquery-1.3.2.min.js similarity index 100% rename from resources/library/applications/VideoPicker.wgt/scripts/jquery-1.3.2.min.js rename to resources/library/applications/Navigateur Web.wgt/scripts/jquery-1.3.2.min.js diff --git a/resources/library/applications/WebBrowser.wgt/scripts/languages.js b/resources/library/applications/Navigateur Web.wgt/scripts/languages.js similarity index 100% rename from resources/library/applications/WebBrowser.wgt/scripts/languages.js rename to resources/library/applications/Navigateur Web.wgt/scripts/languages.js diff --git a/resources/library/applications/ColorPicker.wgt/Default.png b/resources/library/applications/Nuancier.wgt/Default.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/Default.png rename to resources/library/applications/Nuancier.wgt/Default.png diff --git a/resources/library/applications/ColorPicker.wgt/config.xml b/resources/library/applications/Nuancier.wgt/config.xml similarity index 100% rename from resources/library/applications/ColorPicker.wgt/config.xml rename to resources/library/applications/Nuancier.wgt/config.xml diff --git a/resources/library/applications/ColorPicker.wgt/css/colorpicker.css b/resources/library/applications/Nuancier.wgt/css/colorpicker.css similarity index 100% rename from resources/library/applications/ColorPicker.wgt/css/colorpicker.css rename to resources/library/applications/Nuancier.wgt/css/colorpicker.css diff --git a/resources/library/applications/ColorPicker.wgt/css/layout.css b/resources/library/applications/Nuancier.wgt/css/layout.css similarity index 100% rename from resources/library/applications/ColorPicker.wgt/css/layout.css rename to resources/library/applications/Nuancier.wgt/css/layout.css diff --git a/resources/library/applications/ColorPicker.wgt/icon.png b/resources/library/applications/Nuancier.wgt/icon.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/icon.png rename to resources/library/applications/Nuancier.wgt/icon.png diff --git a/resources/library/applications/ColorPicker.wgt/images/blank.png b/resources/library/applications/Nuancier.wgt/images/blank.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/blank.png rename to resources/library/applications/Nuancier.wgt/images/blank.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_background.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_background.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_background.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_background.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_hex.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_hex.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_hex.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_hex.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_hsb_b.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_hsb_b.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_hsb_b.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_hsb_b.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_hsb_h.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_hsb_h.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_hsb_h.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_hsb_h.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_hsb_s.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_hsb_s.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_hsb_s.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_hsb_s.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_indic.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_indic.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_indic.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_indic.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_overlay.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_overlay.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_overlay.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_overlay.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_rgb_b.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_rgb_b.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_rgb_b.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_rgb_b.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_rgb_g.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_rgb_g.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_rgb_g.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_rgb_g.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_rgb_r.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_rgb_r.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_rgb_r.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_rgb_r.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_select.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_select.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_select.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_select.png diff --git a/resources/library/applications/ColorPicker.wgt/images/colorpicker_submit.png b/resources/library/applications/Nuancier.wgt/images/colorpicker_submit.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/colorpicker_submit.png rename to resources/library/applications/Nuancier.wgt/images/colorpicker_submit.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_background.png b/resources/library/applications/Nuancier.wgt/images/custom_background.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_background.png rename to resources/library/applications/Nuancier.wgt/images/custom_background.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_hex.png b/resources/library/applications/Nuancier.wgt/images/custom_hex.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_hex.png rename to resources/library/applications/Nuancier.wgt/images/custom_hex.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_hsb_b.png b/resources/library/applications/Nuancier.wgt/images/custom_hsb_b.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_hsb_b.png rename to resources/library/applications/Nuancier.wgt/images/custom_hsb_b.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_hsb_h.png b/resources/library/applications/Nuancier.wgt/images/custom_hsb_h.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_hsb_h.png rename to resources/library/applications/Nuancier.wgt/images/custom_hsb_h.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_hsb_s.png b/resources/library/applications/Nuancier.wgt/images/custom_hsb_s.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_hsb_s.png rename to resources/library/applications/Nuancier.wgt/images/custom_hsb_s.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_indic.png b/resources/library/applications/Nuancier.wgt/images/custom_indic.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_indic.png rename to resources/library/applications/Nuancier.wgt/images/custom_indic.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_rgb_b.png b/resources/library/applications/Nuancier.wgt/images/custom_rgb_b.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_rgb_b.png rename to resources/library/applications/Nuancier.wgt/images/custom_rgb_b.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_rgb_g.png b/resources/library/applications/Nuancier.wgt/images/custom_rgb_g.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_rgb_g.png rename to resources/library/applications/Nuancier.wgt/images/custom_rgb_g.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_rgb_r.png b/resources/library/applications/Nuancier.wgt/images/custom_rgb_r.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_rgb_r.png rename to resources/library/applications/Nuancier.wgt/images/custom_rgb_r.png diff --git a/resources/library/applications/ColorPicker.wgt/images/custom_submit.png b/resources/library/applications/Nuancier.wgt/images/custom_submit.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/custom_submit.png rename to resources/library/applications/Nuancier.wgt/images/custom_submit.png diff --git a/resources/library/applications/ColorPicker.wgt/images/select.png b/resources/library/applications/Nuancier.wgt/images/select.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/select.png rename to resources/library/applications/Nuancier.wgt/images/select.png diff --git a/resources/library/applications/ColorPicker.wgt/images/select2.png b/resources/library/applications/Nuancier.wgt/images/select2.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/select2.png rename to resources/library/applications/Nuancier.wgt/images/select2.png diff --git a/resources/library/applications/ColorPicker.wgt/images/slider.png b/resources/library/applications/Nuancier.wgt/images/slider.png similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/slider.png rename to resources/library/applications/Nuancier.wgt/images/slider.png diff --git a/resources/library/applications/ColorPicker.wgt/images/tools.jpg b/resources/library/applications/Nuancier.wgt/images/tools.jpg similarity index 100% rename from resources/library/applications/ColorPicker.wgt/images/tools.jpg rename to resources/library/applications/Nuancier.wgt/images/tools.jpg diff --git a/resources/library/applications/ColorPicker.wgt/index.html b/resources/library/applications/Nuancier.wgt/index.html similarity index 100% rename from resources/library/applications/ColorPicker.wgt/index.html rename to resources/library/applications/Nuancier.wgt/index.html diff --git a/resources/library/applications/ColorPicker.wgt/js/colorpicker.js b/resources/library/applications/Nuancier.wgt/js/colorpicker.js similarity index 100% rename from resources/library/applications/ColorPicker.wgt/js/colorpicker.js rename to resources/library/applications/Nuancier.wgt/js/colorpicker.js diff --git a/resources/library/applications/ColorPicker.wgt/js/eye.js b/resources/library/applications/Nuancier.wgt/js/eye.js similarity index 100% rename from resources/library/applications/ColorPicker.wgt/js/eye.js rename to resources/library/applications/Nuancier.wgt/js/eye.js diff --git a/resources/library/applications/ColorPicker.wgt/js/jquery.js b/resources/library/applications/Nuancier.wgt/js/jquery.js similarity index 100% rename from resources/library/applications/ColorPicker.wgt/js/jquery.js rename to resources/library/applications/Nuancier.wgt/js/jquery.js diff --git a/resources/library/applications/ColorPicker.wgt/js/layout.js b/resources/library/applications/Nuancier.wgt/js/layout.js similarity index 100% rename from resources/library/applications/ColorPicker.wgt/js/layout.js rename to resources/library/applications/Nuancier.wgt/js/layout.js diff --git a/resources/library/applications/ColorPicker.wgt/js/utils.js b/resources/library/applications/Nuancier.wgt/js/utils.js similarity index 100% rename from resources/library/applications/ColorPicker.wgt/js/utils.js rename to resources/library/applications/Nuancier.wgt/js/utils.js diff --git a/resources/library/applications/VideoPicker.wgt/config.xml b/resources/library/applications/Sél vidéo.wgt/config.xml similarity index 100% rename from resources/library/applications/VideoPicker.wgt/config.xml rename to resources/library/applications/Sél vidéo.wgt/config.xml diff --git a/resources/library/applications/WebBrowser.wgt/css/howto.css b/resources/library/applications/Sél vidéo.wgt/css/howto.css similarity index 100% rename from resources/library/applications/WebBrowser.wgt/css/howto.css rename to resources/library/applications/Sél vidéo.wgt/css/howto.css diff --git a/resources/library/applications/VideoPicker.wgt/css/main.css b/resources/library/applications/Sél vidéo.wgt/css/main.css similarity index 100% rename from resources/library/applications/VideoPicker.wgt/css/main.css rename to resources/library/applications/Sél vidéo.wgt/css/main.css diff --git a/resources/library/applications/VideoPicker.wgt/icon.png b/resources/library/applications/Sél vidéo.wgt/icon.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/icon.png rename to resources/library/applications/Sél vidéo.wgt/icon.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/arrow.png b/resources/library/applications/Sél vidéo.wgt/imgs/arrow.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/arrow.png rename to resources/library/applications/Sél vidéo.wgt/imgs/arrow.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/bts.png b/resources/library/applications/Sél vidéo.wgt/imgs/bts.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/bts.png rename to resources/library/applications/Sél vidéo.wgt/imgs/bts.png diff --git a/resources/library/applications/VideoPicker.wgt/imgs/btson.png b/resources/library/applications/Sél vidéo.wgt/imgs/btson.png similarity index 100% rename from resources/library/applications/VideoPicker.wgt/imgs/btson.png rename to resources/library/applications/Sél vidéo.wgt/imgs/btson.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/button.png b/resources/library/applications/Sél vidéo.wgt/imgs/button.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/button.png rename to resources/library/applications/Sél vidéo.wgt/imgs/button.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/button_anim.gif b/resources/library/applications/Sél vidéo.wgt/imgs/button_anim.gif similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/button_anim.gif rename to resources/library/applications/Sél vidéo.wgt/imgs/button_anim.gif diff --git a/resources/library/applications/WebBrowser.wgt/imgs/button_over.png b/resources/library/applications/Sél vidéo.wgt/imgs/button_over.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/button_over.png rename to resources/library/applications/Sél vidéo.wgt/imgs/button_over.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/button_show.png b/resources/library/applications/Sél vidéo.wgt/imgs/button_show.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/button_show.png rename to resources/library/applications/Sél vidéo.wgt/imgs/button_show.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/capture_youtube.jpg b/resources/library/applications/Sél vidéo.wgt/imgs/capture_youtube.jpg similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/capture_youtube.jpg rename to resources/library/applications/Sél vidéo.wgt/imgs/capture_youtube.jpg diff --git a/resources/library/applications/WebBrowser.wgt/imgs/center.png b/resources/library/applications/Sél vidéo.wgt/imgs/center.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/center.png rename to resources/library/applications/Sél vidéo.wgt/imgs/center.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/howto_back.png b/resources/library/applications/Sél vidéo.wgt/imgs/howto_back.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/howto_back.png rename to resources/library/applications/Sél vidéo.wgt/imgs/howto_back.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/info_ico.png b/resources/library/applications/Sél vidéo.wgt/imgs/info_ico.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/info_ico.png rename to resources/library/applications/Sél vidéo.wgt/imgs/info_ico.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/inputfield_back.png b/resources/library/applications/Sél vidéo.wgt/imgs/inputfield_back.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/inputfield_back.png rename to resources/library/applications/Sél vidéo.wgt/imgs/inputfield_back.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/keys_copy.jpg b/resources/library/applications/Sél vidéo.wgt/imgs/keys_copy.jpg similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/keys_copy.jpg rename to resources/library/applications/Sél vidéo.wgt/imgs/keys_copy.jpg diff --git a/resources/library/applications/WebBrowser.wgt/imgs/keys_paste.jpg b/resources/library/applications/Sél vidéo.wgt/imgs/keys_paste.jpg similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/keys_paste.jpg rename to resources/library/applications/Sél vidéo.wgt/imgs/keys_paste.jpg diff --git a/resources/library/applications/WebBrowser.wgt/imgs/left.png b/resources/library/applications/Sél vidéo.wgt/imgs/left.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/left.png rename to resources/library/applications/Sél vidéo.wgt/imgs/left.png diff --git a/resources/library/applications/WebBrowser.wgt/imgs/logos_web.jpg b/resources/library/applications/Sél vidéo.wgt/imgs/logos_web.jpg similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/logos_web.jpg rename to resources/library/applications/Sél vidéo.wgt/imgs/logos_web.jpg diff --git a/resources/library/applications/WebBrowser.wgt/imgs/right.png b/resources/library/applications/Sél vidéo.wgt/imgs/right.png similarity index 100% rename from resources/library/applications/WebBrowser.wgt/imgs/right.png rename to resources/library/applications/Sél vidéo.wgt/imgs/right.png diff --git a/resources/library/applications/VideoPicker.wgt/index.html b/resources/library/applications/Sél vidéo.wgt/index.html similarity index 100% rename from resources/library/applications/VideoPicker.wgt/index.html rename to resources/library/applications/Sél vidéo.wgt/index.html diff --git a/resources/library/applications/WebBrowser.wgt/locales/en/capture_widget.jpg b/resources/library/applications/Sél vidéo.wgt/locales/en/capture_widget.jpg similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/en/capture_widget.jpg rename to resources/library/applications/Sél vidéo.wgt/locales/en/capture_widget.jpg diff --git a/resources/library/applications/VideoPicker.wgt/locales/en/error.html b/resources/library/applications/Sél vidéo.wgt/locales/en/error.html similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/en/error.html rename to resources/library/applications/Sél vidéo.wgt/locales/en/error.html diff --git a/resources/library/applications/VideoPicker.wgt/locales/en/howto.html b/resources/library/applications/Sél vidéo.wgt/locales/en/howto.html similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/en/howto.html rename to resources/library/applications/Sél vidéo.wgt/locales/en/howto.html diff --git a/resources/library/applications/WebBrowser.wgt/locales/fr/capture_widget.jpg b/resources/library/applications/Sél vidéo.wgt/locales/fr/capture_widget.jpg similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/fr/capture_widget.jpg rename to resources/library/applications/Sél vidéo.wgt/locales/fr/capture_widget.jpg diff --git a/resources/library/applications/WebBrowser.wgt/locales/fr/error.html b/resources/library/applications/Sél vidéo.wgt/locales/fr/error.html similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/fr/error.html rename to resources/library/applications/Sél vidéo.wgt/locales/fr/error.html diff --git a/resources/library/applications/VideoPicker.wgt/locales/fr/howto.html b/resources/library/applications/Sél vidéo.wgt/locales/fr/howto.html similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/fr/howto.html rename to resources/library/applications/Sél vidéo.wgt/locales/fr/howto.html diff --git a/resources/library/applications/WebBrowser.wgt/locales/ru/capture_widget.jpg b/resources/library/applications/Sél vidéo.wgt/locales/ru/capture_widget.jpg similarity index 100% rename from resources/library/applications/WebBrowser.wgt/locales/ru/capture_widget.jpg rename to resources/library/applications/Sél vidéo.wgt/locales/ru/capture_widget.jpg diff --git a/resources/library/applications/VideoPicker.wgt/locales/ru/error.html b/resources/library/applications/Sél vidéo.wgt/locales/ru/error.html similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/ru/error.html rename to resources/library/applications/Sél vidéo.wgt/locales/ru/error.html diff --git a/resources/library/applications/VideoPicker.wgt/locales/ru/howto.html b/resources/library/applications/Sél vidéo.wgt/locales/ru/howto.html similarity index 100% rename from resources/library/applications/VideoPicker.wgt/locales/ru/howto.html rename to resources/library/applications/Sél vidéo.wgt/locales/ru/howto.html diff --git a/resources/library/applications/WebBrowser.wgt/scripts/jquery-1.3.2.min.js b/resources/library/applications/Sél vidéo.wgt/scripts/jquery-1.3.2.min.js similarity index 100% rename from resources/library/applications/WebBrowser.wgt/scripts/jquery-1.3.2.min.js rename to resources/library/applications/Sél vidéo.wgt/scripts/jquery-1.3.2.min.js diff --git a/resources/library/applications/VideoPicker.wgt/scripts/jquery.oembed.js b/resources/library/applications/Sél vidéo.wgt/scripts/jquery.oembed.js similarity index 100% rename from resources/library/applications/VideoPicker.wgt/scripts/jquery.oembed.js rename to resources/library/applications/Sél vidéo.wgt/scripts/jquery.oembed.js diff --git a/resources/library/applications/VideoPicker.wgt/scripts/languages.js b/resources/library/applications/Sél vidéo.wgt/scripts/languages.js similarity index 100% rename from resources/library/applications/VideoPicker.wgt/scripts/languages.js rename to resources/library/applications/Sél vidéo.wgt/scripts/languages.js diff --git a/resources/library/applications/Wiktionary.wgt/config.xml b/resources/library/applications/Wiktionnaire.wgt/config.xml similarity index 100% rename from resources/library/applications/Wiktionary.wgt/config.xml rename to resources/library/applications/Wiktionnaire.wgt/config.xml diff --git a/resources/library/applications/Wiktionary.wgt/css/master.css b/resources/library/applications/Wiktionnaire.wgt/css/master.css similarity index 100% rename from resources/library/applications/Wiktionary.wgt/css/master.css rename to resources/library/applications/Wiktionnaire.wgt/css/master.css diff --git a/resources/library/applications/Wiktionary.wgt/css/superfish.css b/resources/library/applications/Wiktionnaire.wgt/css/superfish.css similarity index 100% rename from resources/library/applications/Wiktionary.wgt/css/superfish.css rename to resources/library/applications/Wiktionnaire.wgt/css/superfish.css diff --git a/resources/library/applications/Wiktionary.wgt/icon.png b/resources/library/applications/Wiktionnaire.wgt/icon.png similarity index 100% rename from resources/library/applications/Wiktionary.wgt/icon.png rename to resources/library/applications/Wiktionnaire.wgt/icon.png diff --git a/resources/library/applications/Wiktionary.wgt/images/toolbarBody.png b/resources/library/applications/Wiktionnaire.wgt/images/toolbarBody.png similarity index 100% rename from resources/library/applications/Wiktionary.wgt/images/toolbarBody.png rename to resources/library/applications/Wiktionnaire.wgt/images/toolbarBody.png diff --git a/resources/library/applications/Wiktionary.wgt/images/toolbarButtonBack.png b/resources/library/applications/Wiktionnaire.wgt/images/toolbarButtonBack.png similarity index 100% rename from resources/library/applications/Wiktionary.wgt/images/toolbarButtonBack.png rename to resources/library/applications/Wiktionnaire.wgt/images/toolbarButtonBack.png diff --git a/resources/library/applications/Wiktionary.wgt/images/toolbarButtonForward.png b/resources/library/applications/Wiktionnaire.wgt/images/toolbarButtonForward.png similarity index 100% rename from resources/library/applications/Wiktionary.wgt/images/toolbarButtonForward.png rename to resources/library/applications/Wiktionnaire.wgt/images/toolbarButtonForward.png diff --git a/resources/library/applications/Wiktionary.wgt/images/toolbarButtonLanguages.png b/resources/library/applications/Wiktionnaire.wgt/images/toolbarButtonLanguages.png similarity index 100% rename from resources/library/applications/Wiktionary.wgt/images/toolbarButtonLanguages.png rename to resources/library/applications/Wiktionnaire.wgt/images/toolbarButtonLanguages.png diff --git a/resources/library/applications/Wiktionary.wgt/images/toolbarButtonSearch.png b/resources/library/applications/Wiktionnaire.wgt/images/toolbarButtonSearch.png similarity index 100% rename from resources/library/applications/Wiktionary.wgt/images/toolbarButtonSearch.png rename to resources/library/applications/Wiktionnaire.wgt/images/toolbarButtonSearch.png diff --git a/resources/library/applications/Wiktionary.wgt/images/toolbarLoading.jpg b/resources/library/applications/Wiktionnaire.wgt/images/toolbarLoading.jpg similarity index 100% rename from resources/library/applications/Wiktionary.wgt/images/toolbarLoading.jpg rename to resources/library/applications/Wiktionnaire.wgt/images/toolbarLoading.jpg diff --git a/resources/library/applications/Wiktionary.wgt/index.html b/resources/library/applications/Wiktionnaire.wgt/index.html similarity index 100% rename from resources/library/applications/Wiktionary.wgt/index.html rename to resources/library/applications/Wiktionnaire.wgt/index.html diff --git a/resources/library/applications/Wiktionary.wgt/script/jquery.min.js b/resources/library/applications/Wiktionnaire.wgt/script/jquery.min.js similarity index 100% rename from resources/library/applications/Wiktionary.wgt/script/jquery.min.js rename to resources/library/applications/Wiktionnaire.wgt/script/jquery.min.js diff --git a/resources/library/applications/Wiktionary.wgt/script/languages.js b/resources/library/applications/Wiktionnaire.wgt/script/languages.js similarity index 100% rename from resources/library/applications/Wiktionary.wgt/script/languages.js rename to resources/library/applications/Wiktionnaire.wgt/script/languages.js diff --git a/resources/library/applications/Wiktionary.wgt/script/superfish.js b/resources/library/applications/Wiktionnaire.wgt/script/superfish.js similarity index 100% rename from resources/library/applications/Wiktionary.wgt/script/superfish.js rename to resources/library/applications/Wiktionnaire.wgt/script/superfish.js diff --git a/resources/library/interactivities/associer_images.wgt/js/script.js b/resources/library/interactivities/associer_images.wgt/js/script.js index 633d943f..339cc3e3 100644 --- a/resources/library/interactivities/associer_images.wgt/js/script.js +++ b/resources/library/interactivities/associer_images.wgt/js/script.js @@ -632,7 +632,6 @@ function onDropTarget(obj, event) { } textData = stringToXML(textData); var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; - tmp = tmp.substr(1, tmp.length); var tmp_img = $("").attr("src", tmp); $(obj).append(tmp_img); setTimeout(function(){ diff --git a/resources/library/interactivities/associer_sounds.wgt/js/script.js b/resources/library/interactivities/associer_sounds.wgt/js/script.js index 8b9716af..d81a293d 100644 --- a/resources/library/interactivities/associer_sounds.wgt/js/script.js +++ b/resources/library/interactivities/associer_sounds.wgt/js/script.js @@ -717,7 +717,6 @@ function onDropTarget(obj, event) { } textData = stringToXML(textData); var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; - tmp = tmp.substr(1, tmp.length); var tmp_img = $("").attr("src", tmp); $(obj).append(tmp_img); setTimeout(function(){ @@ -782,4 +781,4 @@ if (window.widget) { $(this).parent().find(":first-child").removeClass("stop").addClass("play"); }); } -} \ No newline at end of file +} diff --git a/resources/library/interactivities/categoriser_images.wgt/js/script.js b/resources/library/interactivities/categoriser_images.wgt/js/script.js index 79e1647e..8ec8462a 100644 --- a/resources/library/interactivities/categoriser_images.wgt/js/script.js +++ b/resources/library/interactivities/categoriser_images.wgt/js/script.js @@ -623,7 +623,6 @@ function onDropTarget(obj, event) { textData = stringToXML(textData); if(textData.getElementsByTagName("ready")[0].firstChild.textContent == "true"){ var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; - tmp = tmp.substr(1, tmp.length); var img_block = $("
"); $("
").appendTo(img_block); $("").appendTo(img_block); @@ -668,4 +667,4 @@ function onDropTarget(obj, event) { event.cancelBubble = true; } return false; -} \ No newline at end of file +} diff --git a/resources/library/interactivities/etudier.wgt/js/script.js b/resources/library/interactivities/etudier.wgt/js/script.js index 074b169b..1ce3fb3e 100644 --- a/resources/library/interactivities/etudier.wgt/js/script.js +++ b/resources/library/interactivities/etudier.wgt/js/script.js @@ -472,7 +472,6 @@ function onDropTarget(obj, event) { textData = stringToXML(textData); var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; - tmp = tmp.substr(1, tmp.length); if(tmp_type.substr(0, 5) == "audio"){ var audio_block = $("
").draggable().appendTo($(obj)); audio_block.css("position","absolute").css("top",event.clientY).css("left",event.clientX); @@ -530,4 +529,4 @@ $(window).resize(function(){ $(this).width(slider.width()).height(slider.height()); }); slider.setSize(slider.width(), slider.height()); -}) \ No newline at end of file +}) diff --git a/resources/library/interactivities/ordonner_des_images.wgt/js/script.js b/resources/library/interactivities/ordonner_des_images.wgt/js/script.js index 71c0c26f..5f04b2a0 100644 --- a/resources/library/interactivities/ordonner_des_images.wgt/js/script.js +++ b/resources/library/interactivities/ordonner_des_images.wgt/js/script.js @@ -399,7 +399,6 @@ function onDropTarget(obj, event) { } textData = stringToXML(textData); var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; - tmp = tmp.substr(1, tmp.length); //alert(textData.getElementsByTagName("type")[0].firstChild.textContent + " | " + textData.getElementsByTagName("path")[0].firstChild.textContent); var tmp_img = $("").attr("src", tmp); //alert(1) diff --git a/resources/library/interactivities/ordonner_des_letters.wgt/js/script.js b/resources/library/interactivities/ordonner_des_letters.wgt/js/script.js index 0cfaee8f..25c4c92d 100644 --- a/resources/library/interactivities/ordonner_des_letters.wgt/js/script.js +++ b/resources/library/interactivities/ordonner_des_letters.wgt/js/script.js @@ -381,7 +381,6 @@ function onDropAudio(obj, event) { var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; if(tmp_type.substr(0, 5) == "audio"){ var audio_block = $(obj).find(".audio_block"); - tmp = tmp.substr(1, tmp.length); $(obj).find("audio").remove(); audio_block.find(":first-child").removeClass("stop").addClass("play"); var source = $("").attr("src", tmp); @@ -409,4 +408,4 @@ if (window.widget) { $(this).parent().find(":first-child").removeClass("stop").addClass("play"); }); } -} \ No newline at end of file +} diff --git a/resources/library/interactivities/selectionner.wgt/js/script.js b/resources/library/interactivities/selectionner.wgt/js/script.js index 010bc214..dc2c9d7d 100644 --- a/resources/library/interactivities/selectionner.wgt/js/script.js +++ b/resources/library/interactivities/selectionner.wgt/js/script.js @@ -359,7 +359,6 @@ function onDropTarget(obj, event) { textData = stringToXML(textData); var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; - tmp = tmp.substr(1, tmp.length); if(tmp_type.substr(0, 5) == "audio"){ var img_tmp = $("
").insertBefore($(obj).find(".add_img")); var audio_block = $("
").appendTo(img_tmp) diff --git a/resources/library/search/ImgSearch.wgs/config.xml b/resources/library/search/Google images.wgs/config.xml similarity index 100% rename from resources/library/search/ImgSearch.wgs/config.xml rename to resources/library/search/Google images.wgs/config.xml diff --git a/resources/library/search/ImgSearch.wgs/css/basic.css b/resources/library/search/Google images.wgs/css/basic.css similarity index 100% rename from resources/library/search/ImgSearch.wgs/css/basic.css rename to resources/library/search/Google images.wgs/css/basic.css diff --git a/resources/library/search/ImgSearch.wgs/icon.png b/resources/library/search/Google images.wgs/icon.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/icon.png rename to resources/library/search/Google images.wgs/icon.png diff --git a/resources/library/search/ImgSearch.wgs/icon.thumbnail.png b/resources/library/search/Google images.wgs/icon.thumbnail.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/icon.thumbnail.png rename to resources/library/search/Google images.wgs/icon.thumbnail.png diff --git a/resources/library/search/ImgSearch.wgs/images/down.png b/resources/library/search/Google images.wgs/images/down.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/images/down.png rename to resources/library/search/Google images.wgs/images/down.png diff --git a/resources/library/search/ImgSearch.wgs/images/greySquare.png b/resources/library/search/Google images.wgs/images/greySquare.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/images/greySquare.png rename to resources/library/search/Google images.wgs/images/greySquare.png diff --git a/resources/library/search/ImgSearch.wgs/images/icon-close.png b/resources/library/search/Google images.wgs/images/icon-close.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/images/icon-close.png rename to resources/library/search/Google images.wgs/images/icon-close.png diff --git a/resources/library/search/ImgSearch.wgs/images/popupBack.png b/resources/library/search/Google images.wgs/images/popupBack.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/images/popupBack.png rename to resources/library/search/Google images.wgs/images/popupBack.png diff --git a/resources/library/search/ImgSearch.wgs/images/search.png b/resources/library/search/Google images.wgs/images/search.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/images/search.png rename to resources/library/search/Google images.wgs/images/search.png diff --git a/resources/library/search/ImgSearch.wgs/images/trgDown.png b/resources/library/search/Google images.wgs/images/trgDown.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/images/trgDown.png rename to resources/library/search/Google images.wgs/images/trgDown.png diff --git a/resources/library/search/ImgSearch.wgs/images/trgUp.png b/resources/library/search/Google images.wgs/images/trgUp.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/images/trgUp.png rename to resources/library/search/Google images.wgs/images/trgUp.png diff --git a/resources/library/search/ImgSearch.wgs/images/up.png b/resources/library/search/Google images.wgs/images/up.png similarity index 100% rename from resources/library/search/ImgSearch.wgs/images/up.png rename to resources/library/search/Google images.wgs/images/up.png diff --git a/resources/library/search/ImgSearch.wgs/index.html b/resources/library/search/Google images.wgs/index.html similarity index 100% rename from resources/library/search/ImgSearch.wgs/index.html rename to resources/library/search/Google images.wgs/index.html diff --git a/resources/library/search/ImgSearch.wgs/scripts/jquery-1.6.2.min.js b/resources/library/search/Google images.wgs/scripts/jquery-1.6.2.min.js similarity index 100% rename from resources/library/search/ImgSearch.wgs/scripts/jquery-1.6.2.min.js rename to resources/library/search/Google images.wgs/scripts/jquery-1.6.2.min.js diff --git a/resources/library/shape/white_bubble_speak_left.svg b/resources/library/shape/bulle blanche gauche.svg similarity index 100% rename from resources/library/shape/white_bubble_speak_left.svg rename to resources/library/shape/bulle blanche gauche.svg diff --git a/resources/library/shape/white_bubble_think.svg b/resources/library/shape/bulle blanche idée.svg similarity index 100% rename from resources/library/shape/white_bubble_think.svg rename to resources/library/shape/bulle blanche idée.svg diff --git a/resources/library/shape/white_bubble_speak.svg b/resources/library/shape/bulle blanche.svg similarity index 100% rename from resources/library/shape/white_bubble_speak.svg rename to resources/library/shape/bulle blanche.svg diff --git a/resources/library/shape/blue_bubble_speak_left.svg b/resources/library/shape/bulle bleue gauche.svg similarity index 100% rename from resources/library/shape/blue_bubble_speak_left.svg rename to resources/library/shape/bulle bleue gauche.svg diff --git a/resources/library/shape/blue_bubble_think.svg b/resources/library/shape/bulle bleue idée.svg similarity index 100% rename from resources/library/shape/blue_bubble_think.svg rename to resources/library/shape/bulle bleue idée.svg diff --git a/resources/library/shape/blue_bubble_speak.svg b/resources/library/shape/bulle bleue.svg similarity index 100% rename from resources/library/shape/blue_bubble_speak.svg rename to resources/library/shape/bulle bleue.svg diff --git a/resources/library/shape/grey_bubble_speak_left.svg b/resources/library/shape/bulle grise gauche.svg similarity index 100% rename from resources/library/shape/grey_bubble_speak_left.svg rename to resources/library/shape/bulle grise gauche.svg diff --git a/resources/library/shape/grey_bubble_think.svg b/resources/library/shape/bulle grise idée.svg similarity index 100% rename from resources/library/shape/grey_bubble_think.svg rename to resources/library/shape/bulle grise idée.svg diff --git a/resources/library/shape/grey_bubble_speak.svg b/resources/library/shape/bulle grise.svg similarity index 100% rename from resources/library/shape/grey_bubble_speak.svg rename to resources/library/shape/bulle grise.svg diff --git a/resources/library/shape/red_bubble_speak_left.svg b/resources/library/shape/bulle rouge gauche.svg similarity index 100% rename from resources/library/shape/red_bubble_speak_left.svg rename to resources/library/shape/bulle rouge gauche.svg diff --git a/resources/library/shape/red_bubble_think.svg b/resources/library/shape/bulle rouge idée.svg similarity index 100% rename from resources/library/shape/red_bubble_think.svg rename to resources/library/shape/bulle rouge idée.svg diff --git a/resources/library/shape/red_bubble_speak.svg b/resources/library/shape/bulle rouge.svg similarity index 100% rename from resources/library/shape/red_bubble_speak.svg rename to resources/library/shape/bulle rouge.svg diff --git a/resources/library/shape/nofill_bubble_speak_left.svg b/resources/library/shape/bulle vide gauche.svg similarity index 100% rename from resources/library/shape/nofill_bubble_speak_left.svg rename to resources/library/shape/bulle vide gauche.svg diff --git a/resources/library/shape/nofill_bubble_think.svg b/resources/library/shape/bulle vide idée.svg similarity index 100% rename from resources/library/shape/nofill_bubble_think.svg rename to resources/library/shape/bulle vide idée.svg diff --git a/resources/library/shape/nofill_bubble_speak.svg b/resources/library/shape/bulle vide.svg similarity index 100% rename from resources/library/shape/nofill_bubble_speak.svg rename to resources/library/shape/bulle vide.svg diff --git a/resources/library/shape/white_square_rnd.svg b/resources/library/shape/carré blanc arr.svg similarity index 100% rename from resources/library/shape/white_square_rnd.svg rename to resources/library/shape/carré blanc arr.svg diff --git a/resources/library/shape/white_square.svg b/resources/library/shape/carré blanc.svg similarity index 100% rename from resources/library/shape/white_square.svg rename to resources/library/shape/carré blanc.svg diff --git a/resources/library/shape/blue_square_rnd.svg b/resources/library/shape/carré bleu arr.svg similarity index 100% rename from resources/library/shape/blue_square_rnd.svg rename to resources/library/shape/carré bleu arr.svg diff --git a/resources/library/shape/blue_square.svg b/resources/library/shape/carré bleu.svg similarity index 100% rename from resources/library/shape/blue_square.svg rename to resources/library/shape/carré bleu.svg diff --git a/resources/library/shape/grey_square_rnd.svg b/resources/library/shape/carré gris arr.svg similarity index 100% rename from resources/library/shape/grey_square_rnd.svg rename to resources/library/shape/carré gris arr.svg diff --git a/resources/library/shape/grey_square.svg b/resources/library/shape/carré gris.svg similarity index 100% rename from resources/library/shape/grey_square.svg rename to resources/library/shape/carré gris.svg diff --git a/resources/library/shape/red_square_rnd.svg b/resources/library/shape/carré rouge arr.svg similarity index 100% rename from resources/library/shape/red_square_rnd.svg rename to resources/library/shape/carré rouge arr.svg diff --git a/resources/library/shape/red_square.svg b/resources/library/shape/carré rouge.svg similarity index 100% rename from resources/library/shape/red_square.svg rename to resources/library/shape/carré rouge.svg diff --git a/resources/library/shape/nofill_square_rnd.svg b/resources/library/shape/carré vide arr.svg similarity index 100% rename from resources/library/shape/nofill_square_rnd.svg rename to resources/library/shape/carré vide arr.svg diff --git a/resources/library/shape/nofill_square.svg b/resources/library/shape/carré vide.svg similarity index 100% rename from resources/library/shape/nofill_square.svg rename to resources/library/shape/carré vide.svg diff --git a/resources/library/shape/carré blanc arr.svg b/resources/library/shape/carré blanc arr.svg new file mode 100644 index 00000000..a1721d4f --- /dev/null +++ b/resources/library/shape/carré blanc arr.svg @@ -0,0 +1,106 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/library/shape/carré blanc.svg b/resources/library/shape/carré blanc.svg new file mode 100644 index 00000000..9bbb6959 --- /dev/null +++ b/resources/library/shape/carré blanc.svg @@ -0,0 +1,113 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/library/shape/white_cylinder.svg b/resources/library/shape/cylindre blanc.svg similarity index 100% rename from resources/library/shape/white_cylinder.svg rename to resources/library/shape/cylindre blanc.svg diff --git a/resources/library/shape/blue_cylinder.svg b/resources/library/shape/cylindre bleu.svg similarity index 100% rename from resources/library/shape/blue_cylinder.svg rename to resources/library/shape/cylindre bleu.svg diff --git a/resources/library/shape/grey_cylinder.svg b/resources/library/shape/cylindre gris.svg similarity index 100% rename from resources/library/shape/grey_cylinder.svg rename to resources/library/shape/cylindre gris.svg diff --git a/resources/library/shape/red_cylinder.svg b/resources/library/shape/cylindre rouge.svg similarity index 100% rename from resources/library/shape/red_cylinder.svg rename to resources/library/shape/cylindre rouge.svg diff --git a/resources/library/shape/nofill_cylinder.svg b/resources/library/shape/cylindre vide.svg similarity index 100% rename from resources/library/shape/nofill_cylinder.svg rename to resources/library/shape/cylindre vide.svg diff --git a/resources/library/shape/white_disk.svg b/resources/library/shape/disque blanc.svg similarity index 100% rename from resources/library/shape/white_disk.svg rename to resources/library/shape/disque blanc.svg diff --git a/resources/library/shape/blue_disk.svg b/resources/library/shape/disque bleu.svg similarity index 100% rename from resources/library/shape/blue_disk.svg rename to resources/library/shape/disque bleu.svg diff --git a/resources/library/shape/grey_disk.svg b/resources/library/shape/disque gris.svg similarity index 100% rename from resources/library/shape/grey_disk.svg rename to resources/library/shape/disque gris.svg diff --git a/resources/library/shape/red_disk.svg b/resources/library/shape/disque rouge.svg similarity index 100% rename from resources/library/shape/red_disk.svg rename to resources/library/shape/disque rouge.svg diff --git a/resources/library/shape/nofill_disk.svg b/resources/library/shape/disque vide.svg similarity index 100% rename from resources/library/shape/nofill_disk.svg rename to resources/library/shape/disque vide.svg diff --git a/resources/library/shape/white_star_rnd.svg b/resources/library/shape/étoile blanche arr.svg similarity index 100% rename from resources/library/shape/white_star_rnd.svg rename to resources/library/shape/étoile blanche arr.svg diff --git a/resources/library/shape/white_star.svg b/resources/library/shape/étoile blanche.svg similarity index 100% rename from resources/library/shape/white_star.svg rename to resources/library/shape/étoile blanche.svg diff --git a/resources/library/shape/blue_star_rnd.svg b/resources/library/shape/étoile bleue arr.svg similarity index 100% rename from resources/library/shape/blue_star_rnd.svg rename to resources/library/shape/étoile bleue arr.svg diff --git a/resources/library/shape/blue_star.svg b/resources/library/shape/étoile bleue.svg similarity index 100% rename from resources/library/shape/blue_star.svg rename to resources/library/shape/étoile bleue.svg diff --git a/resources/library/shape/grey_star_rnd.svg b/resources/library/shape/étoile grise arr.svg similarity index 100% rename from resources/library/shape/grey_star_rnd.svg rename to resources/library/shape/étoile grise arr.svg diff --git a/resources/library/shape/grey_star.svg b/resources/library/shape/étoile grise.svg similarity index 100% rename from resources/library/shape/grey_star.svg rename to resources/library/shape/étoile grise.svg diff --git a/resources/library/shape/red_star_rnd.svg b/resources/library/shape/étoile rouge arr.svg similarity index 100% rename from resources/library/shape/red_star_rnd.svg rename to resources/library/shape/étoile rouge arr.svg diff --git a/resources/library/shape/red_star.svg b/resources/library/shape/étoile rouge.svg similarity index 100% rename from resources/library/shape/red_star.svg rename to resources/library/shape/étoile rouge.svg diff --git a/resources/library/shape/nofill_star_rnd.svg b/resources/library/shape/étoile vide arr.svg similarity index 100% rename from resources/library/shape/nofill_star_rnd.svg rename to resources/library/shape/étoile vide arr.svg diff --git a/resources/library/shape/nofill_star.svg b/resources/library/shape/étoile vide.svg similarity index 100% rename from resources/library/shape/nofill_star.svg rename to resources/library/shape/étoile vide.svg diff --git a/resources/library/shape/white_arrow_down.svg b/resources/library/shape/flèche blanche bas.svg similarity index 100% rename from resources/library/shape/white_arrow_down.svg rename to resources/library/shape/flèche blanche bas.svg diff --git a/resources/library/shape/white_arrow_right.svg b/resources/library/shape/flèche blanche droite.svg similarity index 100% rename from resources/library/shape/white_arrow_right.svg rename to resources/library/shape/flèche blanche droite.svg diff --git a/resources/library/shape/white_arrow_left.svg b/resources/library/shape/flèche blanche gauche.svg similarity index 100% rename from resources/library/shape/white_arrow_left.svg rename to resources/library/shape/flèche blanche gauche.svg diff --git a/resources/library/shape/white_arrow_up.svg b/resources/library/shape/flèche blanche haut.svg similarity index 100% rename from resources/library/shape/white_arrow_up.svg rename to resources/library/shape/flèche blanche haut.svg diff --git a/resources/library/shape/blue_arrow_down.svg b/resources/library/shape/flèche bleue bas.svg similarity index 100% rename from resources/library/shape/blue_arrow_down.svg rename to resources/library/shape/flèche bleue bas.svg diff --git a/resources/library/shape/blue_arrow_right.svg b/resources/library/shape/flèche bleue droite.svg similarity index 100% rename from resources/library/shape/blue_arrow_right.svg rename to resources/library/shape/flèche bleue droite.svg diff --git a/resources/library/shape/blue_arrow_left.svg b/resources/library/shape/flèche bleue gauche.svg similarity index 100% rename from resources/library/shape/blue_arrow_left.svg rename to resources/library/shape/flèche bleue gauche.svg diff --git a/resources/library/shape/blue_arrow_up.svg b/resources/library/shape/flèche bleue haut.svg similarity index 100% rename from resources/library/shape/blue_arrow_up.svg rename to resources/library/shape/flèche bleue haut.svg diff --git a/resources/library/shape/grey_arrow_down.svg b/resources/library/shape/flèche grise bas.svg similarity index 100% rename from resources/library/shape/grey_arrow_down.svg rename to resources/library/shape/flèche grise bas.svg diff --git a/resources/library/shape/grey_arrow_right.svg b/resources/library/shape/flèche grise droite.svg similarity index 100% rename from resources/library/shape/grey_arrow_right.svg rename to resources/library/shape/flèche grise droite.svg diff --git a/resources/library/shape/grey_arrow_left.svg b/resources/library/shape/flèche grise gauche.svg similarity index 100% rename from resources/library/shape/grey_arrow_left.svg rename to resources/library/shape/flèche grise gauche.svg diff --git a/resources/library/shape/grey_arrow_up.svg b/resources/library/shape/flèche grise haut.svg similarity index 100% rename from resources/library/shape/grey_arrow_up.svg rename to resources/library/shape/flèche grise haut.svg diff --git a/resources/library/shape/red_arrow_down.svg b/resources/library/shape/flèche rouge bas.svg similarity index 100% rename from resources/library/shape/red_arrow_down.svg rename to resources/library/shape/flèche rouge bas.svg diff --git a/resources/library/shape/red_arrow_right.svg b/resources/library/shape/flèche rouge droite.svg similarity index 100% rename from resources/library/shape/red_arrow_right.svg rename to resources/library/shape/flèche rouge droite.svg diff --git a/resources/library/shape/red_arrow_left.svg b/resources/library/shape/flèche rouge gauche.svg similarity index 100% rename from resources/library/shape/red_arrow_left.svg rename to resources/library/shape/flèche rouge gauche.svg diff --git a/resources/library/shape/red_arrow_up.svg b/resources/library/shape/flèche rouge haut.svg similarity index 100% rename from resources/library/shape/red_arrow_up.svg rename to resources/library/shape/flèche rouge haut.svg diff --git a/resources/library/shape/nofill_arrow_down.svg b/resources/library/shape/flèche vide bas.svg similarity index 100% rename from resources/library/shape/nofill_arrow_down.svg rename to resources/library/shape/flèche vide bas.svg diff --git a/resources/library/shape/nofill_arrow_right.svg b/resources/library/shape/flèche vide droite.svg similarity index 100% rename from resources/library/shape/nofill_arrow_right.svg rename to resources/library/shape/flèche vide droite.svg diff --git a/resources/library/shape/nofill_arrow_left.svg b/resources/library/shape/flèche vide gauche.svg similarity index 100% rename from resources/library/shape/nofill_arrow_left.svg rename to resources/library/shape/flèche vide gauche.svg diff --git a/resources/library/shape/nofill_arrow_up.svg b/resources/library/shape/flèche vide haut.svg similarity index 100% rename from resources/library/shape/nofill_arrow_up.svg rename to resources/library/shape/flèche vide haut.svg diff --git a/resources/library/shape/flèche blanche bas.svg b/resources/library/shape/flèche blanche bas.svg new file mode 100644 index 00000000..e4270523 --- /dev/null +++ b/resources/library/shape/flèche blanche bas.svg @@ -0,0 +1,102 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/library/shape/flèche blanche droite.svg b/resources/library/shape/flèche blanche droite.svg new file mode 100644 index 00000000..593b5c67 --- /dev/null +++ b/resources/library/shape/flèche blanche droite.svg @@ -0,0 +1,103 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/library/shape/flèche blanche gauche.svg b/resources/library/shape/flèche blanche gauche.svg new file mode 100644 index 00000000..90e42e31 --- /dev/null +++ b/resources/library/shape/flèche blanche gauche.svg @@ -0,0 +1,102 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/library/shape/flèche blanche haut.svg b/resources/library/shape/flèche blanche haut.svg new file mode 100644 index 00000000..b13c8774 --- /dev/null +++ b/resources/library/shape/flèche blanche haut.svg @@ -0,0 +1,103 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/library/shape/flèche bleue bas.svg b/resources/library/shape/flèche bleue bas.svg new file mode 100644 index 00000000..7613a3f2 --- /dev/null +++ b/resources/library/shape/flèche bleue bas.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche bleue droite.svg b/resources/library/shape/flèche bleue droite.svg new file mode 100644 index 00000000..cd147f73 --- /dev/null +++ b/resources/library/shape/flèche bleue droite.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche bleue gauche.svg b/resources/library/shape/flèche bleue gauche.svg new file mode 100644 index 00000000..64cf0f8a --- /dev/null +++ b/resources/library/shape/flèche bleue gauche.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche bleue haut.svg b/resources/library/shape/flèche bleue haut.svg new file mode 100644 index 00000000..331c491c --- /dev/null +++ b/resources/library/shape/flèche bleue haut.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche grise bas.svg b/resources/library/shape/flèche grise bas.svg new file mode 100644 index 00000000..d68b5218 --- /dev/null +++ b/resources/library/shape/flèche grise bas.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche grise droite.svg b/resources/library/shape/flèche grise droite.svg new file mode 100644 index 00000000..32f50aa2 --- /dev/null +++ b/resources/library/shape/flèche grise droite.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche grise gauche.svg b/resources/library/shape/flèche grise gauche.svg new file mode 100644 index 00000000..a895bb88 --- /dev/null +++ b/resources/library/shape/flèche grise gauche.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche grise haut.svg b/resources/library/shape/flèche grise haut.svg new file mode 100644 index 00000000..d4db8052 --- /dev/null +++ b/resources/library/shape/flèche grise haut.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche rouge bas.svg b/resources/library/shape/flèche rouge bas.svg new file mode 100644 index 00000000..96d38b83 --- /dev/null +++ b/resources/library/shape/flèche rouge bas.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche rouge droite.svg b/resources/library/shape/flèche rouge droite.svg new file mode 100644 index 00000000..d2fbc359 --- /dev/null +++ b/resources/library/shape/flèche rouge droite.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche rouge gauche.svg b/resources/library/shape/flèche rouge gauche.svg new file mode 100644 index 00000000..336a1e11 --- /dev/null +++ b/resources/library/shape/flèche rouge gauche.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche rouge haut.svg b/resources/library/shape/flèche rouge haut.svg new file mode 100644 index 00000000..6dd21956 --- /dev/null +++ b/resources/library/shape/flèche rouge haut.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/flèche vide bas.svg b/resources/library/shape/flèche vide bas.svg new file mode 100644 index 00000000..07ce46d0 --- /dev/null +++ b/resources/library/shape/flèche vide bas.svg @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/resources/library/shape/flèche vide droite.svg b/resources/library/shape/flèche vide droite.svg new file mode 100644 index 00000000..ee87f755 --- /dev/null +++ b/resources/library/shape/flèche vide droite.svg @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/resources/library/shape/flèche vide gauche.svg b/resources/library/shape/flèche vide gauche.svg new file mode 100644 index 00000000..198f69da --- /dev/null +++ b/resources/library/shape/flèche vide gauche.svg @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/resources/library/shape/flèche vide haut.svg b/resources/library/shape/flèche vide haut.svg new file mode 100644 index 00000000..54433be6 --- /dev/null +++ b/resources/library/shape/flèche vide haut.svg @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/resources/library/shape/white_exagon.svg b/resources/library/shape/hexagone blanc.svg similarity index 100% rename from resources/library/shape/white_exagon.svg rename to resources/library/shape/hexagone blanc.svg diff --git a/resources/library/shape/blue_exagon.svg b/resources/library/shape/hexagone bleu.svg similarity index 100% rename from resources/library/shape/blue_exagon.svg rename to resources/library/shape/hexagone bleu.svg diff --git a/resources/library/shape/grey_exagon.svg b/resources/library/shape/hexagone gris.svg similarity index 100% rename from resources/library/shape/grey_exagon.svg rename to resources/library/shape/hexagone gris.svg diff --git a/resources/library/shape/red_exagon.svg b/resources/library/shape/hexagone rouge.svg similarity index 100% rename from resources/library/shape/red_exagon.svg rename to resources/library/shape/hexagone rouge.svg diff --git a/resources/library/shape/nofill_exagon.svg b/resources/library/shape/hexagone vide.svg similarity index 100% rename from resources/library/shape/nofill_exagon.svg rename to resources/library/shape/hexagone vide.svg diff --git a/resources/library/shape/white_pentagon.svg b/resources/library/shape/pentagone blanc.svg similarity index 100% rename from resources/library/shape/white_pentagon.svg rename to resources/library/shape/pentagone blanc.svg diff --git a/resources/library/shape/blue_pentagon.svg b/resources/library/shape/pentagone bleu.svg similarity index 100% rename from resources/library/shape/blue_pentagon.svg rename to resources/library/shape/pentagone bleu.svg diff --git a/resources/library/shape/grey_pentagon.svg b/resources/library/shape/pentagone gris.svg similarity index 100% rename from resources/library/shape/grey_pentagon.svg rename to resources/library/shape/pentagone gris.svg diff --git a/resources/library/shape/red_pentagon.svg b/resources/library/shape/pentagone rouge.svg similarity index 100% rename from resources/library/shape/red_pentagon.svg rename to resources/library/shape/pentagone rouge.svg diff --git a/resources/library/shape/nofill_pentagon.svg b/resources/library/shape/pentagone vide.svg similarity index 100% rename from resources/library/shape/nofill_pentagon.svg rename to resources/library/shape/pentagone vide.svg diff --git a/resources/library/shape/white_rectangle_rnd.svg b/resources/library/shape/rectangle blanc arr.svg similarity index 100% rename from resources/library/shape/white_rectangle_rnd.svg rename to resources/library/shape/rectangle blanc arr.svg diff --git a/resources/library/shape/white_rectangle.svg b/resources/library/shape/rectangle blanc.svg similarity index 100% rename from resources/library/shape/white_rectangle.svg rename to resources/library/shape/rectangle blanc.svg diff --git a/resources/library/shape/blue_rectangle_rnd.svg b/resources/library/shape/rectangle bleu arr.svg similarity index 100% rename from resources/library/shape/blue_rectangle_rnd.svg rename to resources/library/shape/rectangle bleu arr.svg diff --git a/resources/library/shape/blue_rectangle.svg b/resources/library/shape/rectangle bleu.svg similarity index 100% rename from resources/library/shape/blue_rectangle.svg rename to resources/library/shape/rectangle bleu.svg diff --git a/resources/library/shape/grey_rectangle_rnd.svg b/resources/library/shape/rectangle gris arr.svg similarity index 100% rename from resources/library/shape/grey_rectangle_rnd.svg rename to resources/library/shape/rectangle gris arr.svg diff --git a/resources/library/shape/grey_rectangle.svg b/resources/library/shape/rectangle gris.svg similarity index 100% rename from resources/library/shape/grey_rectangle.svg rename to resources/library/shape/rectangle gris.svg diff --git a/resources/library/shape/red_rectangle_rnd.svg b/resources/library/shape/rectangle rouge arr.svg similarity index 100% rename from resources/library/shape/red_rectangle_rnd.svg rename to resources/library/shape/rectangle rouge arr.svg diff --git a/resources/library/shape/red_rectangle.svg b/resources/library/shape/rectangle rouge.svg similarity index 100% rename from resources/library/shape/red_rectangle.svg rename to resources/library/shape/rectangle rouge.svg diff --git a/resources/library/shape/nofill_rectangle_rnd.svg b/resources/library/shape/rectangle vide arr.svg similarity index 100% rename from resources/library/shape/nofill_rectangle_rnd.svg rename to resources/library/shape/rectangle vide arr.svg diff --git a/resources/library/shape/nofill_rectangle.svg b/resources/library/shape/rectangle vide.svg similarity index 100% rename from resources/library/shape/nofill_rectangle.svg rename to resources/library/shape/rectangle vide.svg diff --git a/resources/library/shape/white_triangle_rnd.svg b/resources/library/shape/triangle blanc arr.svg similarity index 100% rename from resources/library/shape/white_triangle_rnd.svg rename to resources/library/shape/triangle blanc arr.svg diff --git a/resources/library/shape/white_triangle.svg b/resources/library/shape/triangle blanc.svg similarity index 100% rename from resources/library/shape/white_triangle.svg rename to resources/library/shape/triangle blanc.svg diff --git a/resources/library/shape/blue_triangle_rnd.svg b/resources/library/shape/triangle bleu arr.svg similarity index 100% rename from resources/library/shape/blue_triangle_rnd.svg rename to resources/library/shape/triangle bleu arr.svg diff --git a/resources/library/shape/blue_triangle.svg b/resources/library/shape/triangle bleu.svg similarity index 100% rename from resources/library/shape/blue_triangle.svg rename to resources/library/shape/triangle bleu.svg diff --git a/resources/library/shape/grey_triangle_rnd.svg b/resources/library/shape/triangle gris arr.svg similarity index 100% rename from resources/library/shape/grey_triangle_rnd.svg rename to resources/library/shape/triangle gris arr.svg diff --git a/resources/library/shape/grey_triangle.svg b/resources/library/shape/triangle gris.svg similarity index 100% rename from resources/library/shape/grey_triangle.svg rename to resources/library/shape/triangle gris.svg diff --git a/resources/library/shape/red_triangle_rnd.svg b/resources/library/shape/triangle rouge arr.svg similarity index 100% rename from resources/library/shape/red_triangle_rnd.svg rename to resources/library/shape/triangle rouge arr.svg diff --git a/resources/library/shape/red_triangle.svg b/resources/library/shape/triangle rouge.svg similarity index 100% rename from resources/library/shape/red_triangle.svg rename to resources/library/shape/triangle rouge.svg diff --git a/resources/library/shape/nofill_triangle_rnd.svg b/resources/library/shape/triangle vide arr.svg similarity index 100% rename from resources/library/shape/nofill_triangle_rnd.svg rename to resources/library/shape/triangle vide arr.svg diff --git a/resources/library/shape/nofill_triangle.svg b/resources/library/shape/triangle vide.svg similarity index 100% rename from resources/library/shape/nofill_triangle.svg rename to resources/library/shape/triangle vide.svg diff --git a/resources/library/shape/étoile blanche arr.svg b/resources/library/shape/étoile blanche arr.svg new file mode 100644 index 00000000..ccc1232e --- /dev/null +++ b/resources/library/shape/étoile blanche arr.svg @@ -0,0 +1,140 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/library/shape/étoile blanche.svg b/resources/library/shape/étoile blanche.svg new file mode 100644 index 00000000..728fe939 --- /dev/null +++ b/resources/library/shape/étoile blanche.svg @@ -0,0 +1,124 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/library/shape/étoile bleue arr.svg b/resources/library/shape/étoile bleue arr.svg new file mode 100644 index 00000000..da45d59b --- /dev/null +++ b/resources/library/shape/étoile bleue arr.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/étoile bleue.svg b/resources/library/shape/étoile bleue.svg new file mode 100644 index 00000000..516b7180 --- /dev/null +++ b/resources/library/shape/étoile bleue.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/shape/étoile vide arr.svg b/resources/library/shape/étoile vide arr.svg new file mode 100644 index 00000000..5980afe0 --- /dev/null +++ b/resources/library/shape/étoile vide arr.svg @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/resources/library/shape/étoile vide.svg b/resources/library/shape/étoile vide.svg new file mode 100644 index 00000000..fcc08260 --- /dev/null +++ b/resources/library/shape/étoile vide.svg @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/resources/style.qss b/resources/style.qss index 31f1e671..29505cea 100644 --- a/resources/style.qss +++ b/resources/style.qss @@ -26,6 +26,13 @@ QWidget#UBLibWebView border: 2px solid #999999; } +QWidget#UBFeaturesWebView +{ + background: #EEEEEE; + border-radius : 10px; + border: 2px solid #999999; +} + QListView { background: #EEEEEE; diff --git a/src/adaptors/UBCFFSubsetAdaptor.cpp b/src/adaptors/UBCFFSubsetAdaptor.cpp index 19e8a016..a82b2fec 100644 --- a/src/adaptors/UBCFFSubsetAdaptor.cpp +++ b/src/adaptors/UBCFFSubsetAdaptor.cpp @@ -52,6 +52,8 @@ static QString tIwb = "iwb"; static QString tMeta = "meta"; static QString tPage = "page"; static QString tPageset = "pageset"; +static QString tG = "g"; +static QString tSwitch = "switch"; static QString tPolygon = "polygon"; static QString tPolyline = "polyline"; static QString tRect = "rect"; @@ -62,7 +64,7 @@ static QString tTspan = "tspan"; static QString tBreak = "tbreak"; static QString tImage = "image"; static QString tFlash = "flash"; -static QString tAudio = "audio"; +static QString tAudio = "a"; static QString tVideo = "video"; //attribute names definition @@ -161,6 +163,31 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parse() return result; } + +bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseGSection(const QDomElement &element) +{ + QDomElement currentSvgElement = element.firstChildElement(); + while (!currentSvgElement.isNull()) { + if (!parseSvgElement(currentSvgElement)) + return false; + + currentSvgElement = currentSvgElement.nextSiblingElement(); + } + + return true; +} +bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgSwitchSection(const QDomElement &element) +{ + + QDomElement currentSvgElement = element.firstChildElement(); + while (!currentSvgElement.isNull()) { + if (parseSvgElement(currentSvgElement)) + return true; + } + + return false; +} + bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgRect(const QDomElement &element) { qreal x1 = element.attribute(aX).toDouble(); @@ -175,7 +202,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgRect(const QDomElement &elem QColor fillColor = !textFillColor.isNull() ? colorFromString(textFillColor) : QColor(); QColor strokeColor = !textStrokeColor.isNull() ? colorFromString(textStrokeColor) : QColor(); - int strokeWidth = !textStrokeWidth.isNull() ? textStrokeWidth.toInt() : 0; + int strokeWidth = textStrokeWidth.toInt(); + + x1 -= strokeWidth/2; + y1 -= strokeWidth/2; + width += strokeWidth; + height += strokeWidth; //init svg generator with temp file QSvgGenerator *generator = createSvgGenerator(width, height); @@ -204,13 +236,13 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgRect(const QDomElement &elem UBGraphicsSvgItem *svgItem = mCurrentScene->addSvg(QUrl::fromLocalFile(generator->fileName())); QTransform transform; QString textTransform = element.attribute(aTransform); - bool hastransform = false; + + svgItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); - hastransform = true; + transform = transformFromString(textTransform, svgItem); } - repositionSvgItem(svgItem, width, height, x1, y1, hastransform, transform); + repositionSvgItem(svgItem, width, height, x1, y1, transform); hashSceneItem(element, svgItem); delete generator; @@ -249,13 +281,14 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgEllipse(const QDomElement &e UBGraphicsSvgItem *svgItem = mCurrentScene->addSvg(QUrl::fromLocalFile(generator->fileName())); QTransform transform; QString textTransform = element.attribute(aTransform); - bool hastransform = false; + + svgItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); - hastransform = true; + transform = transformFromString(textTransform, svgItem); } - repositionSvgItem(svgItem, rx * 2, ry * 2, cx - rx , cy - ry, hastransform, transform); + + repositionSvgItem(svgItem, rx * 2, ry * 2, cx - 2*rx, cy+ry, transform); hashSceneItem(element, svgItem); delete generator; @@ -306,7 +339,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolygon(const QDomElement &e QColor strokeColor = !strokeColorText.isEmpty() ? colorFromString(strokeColorText) : QColor(); QColor fillColor = !fillColorText.isEmpty() ? colorFromString(fillColorText) : QColor(); - int strokeWidth = strokeWidthText.toInt() > 0 ? strokeWidthText.toInt() : 0; + int strokeWidth = strokeWidthText.toDouble(); QPen pen; pen.setColor(strokeColor); @@ -332,12 +365,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolygon(const QDomElement &e UBGraphicsSvgItem *svgItem = mCurrentScene->addSvg(QUrl::fromLocalFile(generator->fileName())); QTransform transform; QString textTransform = element.attribute(aTransform); - bool hastransform = false; + + svgItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); - hastransform = true; + transform = transformFromString(textTransform, svgItem); } - repositionSvgItem(svgItem, width + 10, height + 10, x1 - 5, y1 - 5, hastransform, transform); + repositionSvgItem(svgItem, width +strokeWidth, height + strokeWidth, x1 - strokeWidth/2 + transform.m31(), y1 + strokeWidth/2 + transform.m32(), transform); hashSceneItem(element, svgItem); delete generator; @@ -387,7 +420,10 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolyline(const QDomElement & QString strokeWidthText = element.attribute(aStrokewidth); QColor strokeColor = !strokeColorText.isEmpty() ? colorFromString(strokeColorText) : QColor(); - int strokeWidth = strokeWidthText.toInt() > 0 ? strokeWidthText.toInt() : 0; + int strokeWidth = strokeWidthText.toDouble(); + + width += strokeWidth; + height += strokeWidth; QPen pen; pen.setColor(strokeColor); @@ -398,7 +434,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolyline(const QDomElement & painter.begin(generator); //drawing to svg tmp file - painter.translate(pen.widthF() / 2 - x1, pen.widthF() / 2 - y1); + painter.translate(pen.widthF()/2 - x1, pen.widthF()/2- y1); painter.setPen(pen); painter.drawPolyline(polygon); @@ -408,12 +444,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolyline(const QDomElement & UBGraphicsSvgItem *svgItem = mCurrentScene->addSvg(QUrl::fromLocalFile(generator->fileName())); QTransform transform; QString textTransform = element.attribute(aTransform); - bool hastransform = false; + + svgItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); - hastransform = true; + transform = transformFromString(textTransform, svgItem); } - repositionSvgItem(svgItem, width + 10, height + 10, x1 - 5, y1 - 5, hastransform, transform); + repositionSvgItem(svgItem, width +strokeWidth, height + strokeWidth, x1 + transform.m31() - strokeWidth/2, y1 + transform.m32() + strokeWidth/2, transform); hashSceneItem(element, svgItem); delete generator; @@ -537,7 +573,6 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgText(const QDomElement &elem // remember if text area has transform // QString transformString; QTransform transform = fontTransform; - bool hasTransform = !fontTransform.isIdentity(); QRectF lastDrawnTextBoundingRect; //parse text area tags @@ -552,7 +587,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgText(const QDomElement &elem //add resulting svg file to scene UBGraphicsSvgItem *svgItem = mCurrentScene->addSvg(QUrl::fromLocalFile(generator->fileName())); - repositionSvgItem(svgItem, width, height, x, y, hasTransform, transform); + svgItem->resetTransform(); + repositionSvgItem(svgItem, width, height, x + transform.m31(), y + transform.m32(), transform); hashSceneItem(element, svgItem); delete generator; @@ -659,10 +695,10 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgTextarea(const QDomElement & QTransform transform; QString textTransform = element.attribute(aTransform); - bool hastransform = false; + + svgItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); - hastransform = true; + transform = transformFromString(textTransform, svgItem); } //by default all the textAreas are not editable @@ -671,7 +707,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgTextarea(const QDomElement & curDelegate->setEditable(false); } - repositionSvgItem(svgItem, width, height, x, y, hastransform, transform); + repositionSvgItem(svgItem, width, height, x + transform.m31(), y + transform.m32(), transform); hashSceneItem(element, svgItem); return true; @@ -703,12 +739,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgImage(const QDomElement &ele UBGraphicsPixmapItem *pixItem = mCurrentScene->addPixmap(pix); QTransform transform; QString textTransform = element.attribute(aTransform); - bool hastransform = false; + + pixItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); - hastransform = true; + transform = transformFromString(textTransform, pixItem); } - repositionSvgItem(pixItem, width, height, x, y, hastransform, transform); + repositionSvgItem(pixItem, width, height, x + transform.m31(), y + transform.m32(), transform); hashSceneItem(element, pixItem); return true; @@ -745,10 +781,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgFlash(const QDomElement &ele QTransform transform; QString textTransform = element.attribute(aTransform); + + flashItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); + transform = transformFromString(textTransform, flashItem); } - repositionSvgItem(flashItem, width, height, x, y, true, transform); + repositionSvgItem(flashItem, width, height, x + transform.m31(), y + transform.m32(), transform); hashSceneItem(element, flashItem); return true; @@ -756,32 +794,42 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgFlash(const QDomElement &ele bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgAudio(const QDomElement &element) { - qreal x = element.attribute(aX).toDouble(); - qreal y = element.attribute(aY).toDouble(); - qreal width = element.attribute(aWidth).toDouble(); - qreal height = element.attribute(aHeight).toDouble(); + QDomElement parentOfAudio = element.firstChild().toElement(); + + qreal x = parentOfAudio.attribute(aX).toDouble(); + qreal y = parentOfAudio.attribute(aY).toDouble(); QString itemRefPath = element.attribute(aHref); - QUrl urlPath; + QUrl concreteUrl; if (!itemRefPath.isNull()) { - QString videoPath = pwdContent + "/" + itemRefPath; - if (!QFile::exists(videoPath)) { + QString audioPath = pwdContent + "/" + itemRefPath; + if (!QFile::exists(audioPath)) { qDebug() << "can't load file" << pwdContent + "/" + itemRefPath << "maybe file corrupted"; return false; } - urlPath = QUrl::fromLocalFile(videoPath); + concreteUrl = QUrl::fromLocalFile(audioPath); } - UBGraphicsAudioItem *audioItem = mCurrentScene->addAudio(urlPath, false); + QUuid uuid = QUuid::createUuid(); + +#ifdef Q_WS_X11 + concreteUrl = QUrl::fromLocalFile(mCurrentScene->document()->persistencePath() + "/" + UBPersistenceManager::persistenceManager() + ->addAudioFileToDocument(mCurrentScene->document(), concreteUrl.toLocalFile(), uuid)); +#else + concreteUrl = QUrl::fromLocalFile(UBPersistenceManager::persistenceManager() + ->addAudioFileToDocument(mCurrentScene->document(), concreteUrl.toLocalFile(), uuid)); +#endif + + UBGraphicsAudioItem *audioItem = mCurrentScene->addAudio(concreteUrl, false); QTransform transform; - QString textTransform = element.attribute(aTransform); - bool hastransform = false; + QString textTransform = parentOfAudio.attribute(aTransform); + + audioItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); - hastransform = true; + transform = transformFromString(textTransform, audioItem); } - repositionSvgItem(audioItem, width, height, x, y, hastransform, transform); + repositionSvgItem(audioItem, audioItem->boundingRect().width(), audioItem->boundingRect().height(), x + transform.m31(), y + transform.m32(), transform); hashSceneItem(element, audioItem); return true; @@ -793,31 +841,38 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgVideo(const QDomElement &ele if (parseSvgFlash(element)) return true; else return false; } - qreal x = element.attribute(aX).toDouble(); qreal y = element.attribute(aY).toDouble(); - qreal width = element.attribute(aWidth).toDouble(); - qreal height = element.attribute(aHeight).toDouble(); - QUrl urlPath; + QUrl concreteUrl; if (!itemRefPath.isNull()) { QString videoPath = pwdContent + "/" + itemRefPath; if (!QFile::exists(videoPath)) { qDebug() << "can't load file" << pwdContent + "/" + itemRefPath << "maybe file corrupted"; return false; } - urlPath = QUrl::fromLocalFile(videoPath); + concreteUrl = QUrl::fromLocalFile(videoPath); } - UBGraphicsVideoItem *videoItem = mCurrentScene->addVideo(urlPath, false); + QUuid uuid = QUuid::createUuid(); + +#ifdef Q_WS_X11 + concreteUrl = QUrl::fromLocalFile(mCurrentScene->document()->persistencePath() + "/" + UBPersistenceManager::persistenceManager() + ->addVideoFileToDocument(mCurrentScene->document(), concreteUrl.toLocalFile(), uuid)); +#else + concreteUrl = QUrl::fromLocalFile(UBPersistenceManager::persistenceManager() + ->addVideoFileToDocument(mCurrentScene->document(), concreteUrl.toLocalFile(), uuid)); +#endif + + UBGraphicsVideoItem *videoItem = mCurrentScene->addVideo(concreteUrl, false); QTransform transform; QString textTransform = element.attribute(aTransform); - bool hastransform = false; + + videoItem->resetTransform(); if (!textTransform.isNull()) { - transform = transformFromString(textTransform); - hastransform = true; + transform = transformFromString(textTransform, videoItem); } - repositionSvgItem(videoItem, width, height, x - 5, y - 5, hastransform, transform); + repositionSvgItem(videoItem, videoItem->boundingRect().width(), videoItem->boundingRect().height(), x + transform.m31(), y + transform.m32(), transform); hashSceneItem(element, videoItem); return true; @@ -847,16 +902,18 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgElement(const QDomElement &p return false; } - if (tagName == tRect && !parseSvgRect(parent)) return false; - else if (tagName == tEllipse && !parseSvgEllipse(parent)) return false; - else if (tagName == tPolygon && !parseSvgPolygon(parent)) return false; - else if (tagName == tPolyline && !parseSvgPolyline(parent)) return false; - else if (tagName == tText && !parseSvgText(parent)) return false; - else if (tagName == tTextarea && !parseSvgTextarea(parent)) return false; - else if (tagName == tImage && !parseSvgImage(parent)) return false; - else if (tagName == tFlash && !parseSvgFlash(parent)) return false; - else if (tagName == tAudio && !parseSvgAudio(parent)) return false; - else if (tagName == tVideo && !parseSvgVideo(parent)) return false; + if (tagName == tG && !parseGSection(parent)) return false; + else if (tagName == tSwitch && !parseSvgSwitchSection(parent)) return false; + else if (tagName == tRect && !parseSvgRect(parent)) return false; + else if (tagName == tEllipse && !parseSvgEllipse(parent)) return false; + else if (tagName == tPolygon && !parseSvgPolygon(parent)) return false; + else if (tagName == tPolyline && !parseSvgPolyline(parent)) return false; + else if (tagName == tText && !parseSvgText(parent)) return false; + else if (tagName == tTextarea && !parseSvgTextarea(parent)) return false; + else if (tagName == tImage && !parseSvgImage(parent)) return false; + else if (tagName == tFlash && !parseSvgFlash(parent)) return false; + else if (tagName == tAudio && !parseSvgAudio(parent)) return false; + else if (tagName == tVideo && !parseSvgVideo(parent)) return false; return true; } @@ -984,7 +1041,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseDoc() void UBCFFSubsetAdaptor::UBCFFSubsetReader::repositionSvgItem(QGraphicsItem *item, qreal width, qreal height, qreal x, qreal y, - bool useTransform, QTransform &transform) + QTransform &transform) { //First using viebox coordinates, then translate them to scene coordinates @@ -996,29 +1053,32 @@ void UBCFFSubsetAdaptor::UBCFFSubsetReader::repositionSvgItem(QGraphicsItem *ite qreal fullScaleX = mVBTransFactor * xScale; qreal fullScaleY = mVBTransFactor * yScale; - if (useTransform) { //if rotation or translation specified - QPointF oldVector((x - transform.dx()), (y - transform.dy())); - QTransform rTransform(transform.m11(), transform.m12(), transform.m21(), transform.m22(), 0, 0); - QPointF newVector = rTransform.map(oldVector); - - item->setTransform(rTransform.scale(fullScaleX, fullScaleY)); - item->setPos((x - mViewBoxCenter.x() + (newVector - oldVector).x()) * mVBTransFactor, - (y - mViewBoxCenter.y() + (newVector - oldVector).y()) * mVBTransFactor); - } else { //item is't rotated or translated - item->setTransform(QTransform(fullScaleX, 0, 0, fullScaleY, 0, 0)); - itemBounds = item->boundingRect(); - item->setPos((int)((x - mViewBoxCenter.x()) * mVBTransFactor), - (int)((y - mViewBoxCenter.y()) * mVBTransFactor)); - } + QPointF oldVector((x - transform.dx()), (y - transform.dy())); + QTransform rTransform; + QPointF newVector = rTransform.map(oldVector); + + QRectF sr = mCurrentScene->sceneRect(); + QRectF sr1 = mCurrentSceneRect; + QRectF sr2 = mCurrentScene->normalizedSceneRect(); + + QTransform tr = item->sceneTransform(); + item->setTransform(rTransform.scale(fullScaleX, fullScaleY), true); + tr = item->sceneTransform(); + QPoint pos ((int)((x + mShiftVector.x() + (newVector - oldVector).x()) * mVBTransFactor), (int)((y +mShiftVector.y() + (newVector - oldVector).y()) * mVBTransFactor)); + item->setPos(pos); } bool UBCFFSubsetAdaptor::UBCFFSubsetReader::createNewScene() { mCurrentScene = UBPersistenceManager::persistenceManager()->createDocumentSceneAt(mProxy, mProxy->pageCount()); mCurrentScene->setURStackEnable(false); - mCurrentSceneRect = mCurrentScene->normalizedSceneRect(); - mVBTransFactor = qMin(mCurrentSceneRect.width() / mViewPort.width(), - mCurrentSceneRect.height() / mViewPort.height()); + mCurrentScene->setSceneRect(mViewBox); + if ((mCurrentScene->sceneRect().topLeft().x() >= 0) || (mCurrentScene->sceneRect().topLeft().y() >= 0)) { + mShiftVector = -mViewBox.center(); + } + mCurrentSceneRect = mViewBox; + mVBTransFactor = qMin(mCurrentScene->normalizedSceneRect().width() / mViewPort.width(), + mCurrentScene->normalizedSceneRect().height() / mViewPort.height()); return true; } @@ -1046,11 +1106,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::persistScenes() qDebug() << "can't allocate scene, loading failed"; return false; } - UBSvgSubsetAdaptor::persistScene(mProxy, mCurrentScene, i); - UBGraphicsScene *tmpScene = UBSvgSubsetAdaptor::loadScene(mProxy, i); - tmpScene->setModified(true); - UBThumbnailAdaptor::persistScene(mProxy->persistencePath(), tmpScene, i); - delete tmpScene; + + UBSvgSubsetAdaptor::persistScene(mProxy, mCurrentScene, i); + UBGraphicsScene *tmpScene = UBSvgSubsetAdaptor::loadScene(mProxy, i); + tmpScene->setModified(true); + UBThumbnailAdaptor::persistScene(mProxy->persistencePath(), tmpScene, i); + delete tmpScene; mCurrentScene->setModified(false); } @@ -1085,45 +1146,63 @@ QColor UBCFFSubsetAdaptor::UBCFFSubsetReader::colorFromString(const QString& clr return QColor(clrString); } -QTransform UBCFFSubsetAdaptor::UBCFFSubsetReader::transformFromString(const QString trString) +QTransform UBCFFSubsetAdaptor::UBCFFSubsetReader::transformFromString(const QString trString, QGraphicsItem *item) { + qreal dxr = 0.0; + qreal dyr = 0.0; qreal dx = 0.0; qreal dy = 0.0; qreal angle = 0.0; + QTransform tr; - //check pattern for strings like 'rotate(10)' - QRegExp regexp("rotate\\( *([-+]{0,1}[0-9]*\\.{0,1}[0-9]*) *\\)"); - if (regexp.exactMatch(trString)) { - angle = regexp.capturedTexts().at(1).toDouble(); - } else { + foreach(QString trStr, trString.split(" ", QString::SkipEmptyParts)) + { + //check pattern for strings like 'rotate(10)' + QRegExp regexp("rotate\\( *([-+]{0,1}[0-9]*\\.{0,1}[0-9]*) *\\)"); + if (regexp.exactMatch(trStr)) { + angle = regexp.capturedTexts().at(1).toDouble(); + if (item) + { + item->setTransformOriginPoint(QPointF(0, 0)); + item->rotate(angle); + } + continue; + }; + //check pattern for strings like 'rotate(10,20,20)' or 'rotate(10.1,10.2,34.2)' regexp.setPattern("rotate\\( *([-+]{0,1}[0-9]*\\.{0,1}[0-9]*) *, *([-+]{0,1}[0-9]*\\.{0,1}[0-9]*) *, *([-+]{0,1}[0-9]*\\.{0,1}[0-9]*) *\\)"); - if (regexp.exactMatch(trString)) { + if (regexp.exactMatch(trStr)) { angle = regexp.capturedTexts().at(1).toDouble(); - dx = regexp.capturedTexts().at(2).toDouble(); - dy = regexp.capturedTexts().at(3).toDouble(); + dxr = regexp.capturedTexts().at(2).toDouble(); + dyr = regexp.capturedTexts().at(3).toDouble(); + if (item) + { + item->setTransformOriginPoint(QPointF(dxr, dyr)-item->pos()); + item->rotate(angle); + } + continue; } - } - //check pattern for strings like 'translate(11.0, 12.34)' - regexp.setPattern("translate\\( *([-+]{0,1}[0-9]*\\.{0,1}[0-9]*) *,*([-+]{0,1}[0-9]*\\.{0,1}[0-9]*)*\\)"); - if (regexp.exactMatch(trString)) { - dx = regexp.capturedTexts().at(1).toDouble(); - dy = regexp.capturedTexts().at(2).toDouble(); - } - return QTransform().translate(dx, dy).rotate(angle); + //check pattern for strings like 'translate(11.0, 12.34)' + regexp.setPattern("translate\\( *([-+]{0,1}[0-9]*\\.{0,1}[0-9]*) *,*([-+]{0,1}[0-9]*\\.{0,1}[0-9]*)*\\)"); + if (regexp.exactMatch(trStr)) { + dx = regexp.capturedTexts().at(1).toDouble(); + dy = regexp.capturedTexts().at(2).toDouble(); + tr.translate(dx,dy); + continue; + } + } + return tr; } bool UBCFFSubsetAdaptor::UBCFFSubsetReader::getViewBoxDimenstions(const QString& viewBox) { - //check pattern for strings like 'rotate(10)' - QRegExp regexp("([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)"); - if (regexp.exactMatch(viewBox)) + QStringList capturedTexts = viewBox.split(" ", QString::SkipEmptyParts); + if (capturedTexts.count()) { - int capturesCount = regexp.capturedTexts().count(); - if (capturesCount == 5 && regexp.capturedTexts().at(0).length() == viewBox.length()) + if (4 == capturedTexts.count()) { - mViewBox = QRectF(0, 0, regexp.capturedTexts().at(3).toDouble(), regexp.capturedTexts().at(4).toDouble()); + mViewBox = QRectF(capturedTexts.at(0).toDouble(), capturedTexts.at(1).toDouble(), capturedTexts.at(2).toDouble(), capturedTexts.at(3).toDouble()); mViewPort = mViewBox; mViewPort.translate(- mViewPort.center()); mViewBoxCenter.setX(mViewBox.width() / 2); diff --git a/src/adaptors/UBCFFSubsetAdaptor.h b/src/adaptors/UBCFFSubsetAdaptor.h index d4def19b..791c057d 100644 --- a/src/adaptors/UBCFFSubsetAdaptor.h +++ b/src/adaptors/UBCFFSubsetAdaptor.h @@ -65,6 +65,7 @@ private: qreal mVBTransFactor; QPointF mViewBoxCenter; QSize mSize; + QPointF mShiftVector; private: QDomDocument mDOMdoc; @@ -85,6 +86,8 @@ private: bool parseIwbMeta(const QDomElement &element); bool parseSvg(const QDomElement &svgSection); + inline bool parseGSection(const QDomElement &element); + inline bool parseSvgSwitchSection(const QDomElement &element); inline bool parseSvgRect(const QDomElement &element); inline bool parseSvgEllipse(const QDomElement &element); inline bool parseSvgPolygon(const QDomElement &element); @@ -123,9 +126,9 @@ private: // helper methods void repositionSvgItem(QGraphicsItem *item, qreal width, qreal height, qreal x, qreal y, - bool useTransform, QTransform &transform); + QTransform &transform); QColor colorFromString(const QString& clrString); - QTransform transformFromString(const QString trString); + QTransform transformFromString(const QString trString, QGraphicsItem *item = 0); bool getViewBoxDimenstions(const QString& viewBox); QSvgGenerator* createSvgGenerator(qreal width, qreal height); bool getTempFileName(); diff --git a/src/adaptors/UBExportCFF.cpp b/src/adaptors/UBExportCFF.cpp index 741eb871..bc97a730 100644 --- a/src/adaptors/UBExportCFF.cpp +++ b/src/adaptors/UBExportCFF.cpp @@ -3,6 +3,7 @@ #include "document/UBDocumentProxy.h" #include "core/UBDocumentManager.h" #include "core/UBApplication.h" +#include "core/memcheck.h" UBExportCFF::UBExportCFF(QObject *parent) diff --git a/src/adaptors/UBExportFullPDF.cpp b/src/adaptors/UBExportFullPDF.cpp index 8f6b80f6..b7499f97 100644 --- a/src/adaptors/UBExportFullPDF.cpp +++ b/src/adaptors/UBExportFullPDF.cpp @@ -100,6 +100,7 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* pDocumentProxy, const QStr if (pageIndex != 0) pdfPrinter.newPage(); //render to PDF + scene->setDrawingMode(true); scene->render(pdfPainter, QRectF(), scene->normalizedSceneRect()); //restore screen rendering quality @@ -107,6 +108,7 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* pDocumentProxy, const QStr scene->setRenderingQuality(UBItem::RenderingQualityNormal); //restore background state + scene->setDrawingMode(false); scene->setBackground(isDark, isCrossed); } diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index 86ade4c9..e300bb3a 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -369,7 +369,8 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() // introduced in UB 4.0 - QStringRef svgViewBox = mXmlReader.attributes().value(nsSvg, "viewBox"); + QStringRef svgViewBox = mXmlReader.attributes().value("viewBox"); + if (!svgViewBox.isNull()) { diff --git a/src/api/UBWidgetUniboardAPI.cpp b/src/api/UBWidgetUniboardAPI.cpp index 4b4d3686..260734ad 100644 --- a/src/api/UBWidgetUniboardAPI.cpp +++ b/src/api/UBWidgetUniboardAPI.cpp @@ -534,7 +534,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event) } } } - + qDebug() << destFileName; QString mimeText = createMimeText(downloaded, contentType, destFileName); dropMimeData.setData(tMimeText, mimeText.toAscii()); @@ -623,7 +623,7 @@ QString UBWidgetUniboardAPI::createMimeText(bool downloaded, const QString &mime } QString relatedFileName = fileName; - relatedFileName = relatedFileName.remove(mGraphicsWidget->getOwnFolder().toLocalFile()); + relatedFileName = relatedFileName.remove(mGraphicsWidget->getOwnFolder().toLocalFile() + "/"); writer.writeTextElement(tPath, relatedFileName); //writing path to created object } diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index 51b8622e..df5aa41b 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -58,10 +58,10 @@ #include "UBBoardController.h" -#include "core/memcheck.h" - #include "document/UBDocumentController.h" +#include "core/memcheck.h" + UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardController* pBoardController) : QObject(container) , mKeyboardPalette(0) @@ -81,7 +81,9 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll , mPendingPanButtonPressed(false) , mPendingEraseButtonPressed(false) , mpPageNavigWidget(NULL) +#ifdef USE_WEB_WIDGET , mpLibWidget(NULL) +#endif , mpCachePropWidget(NULL) , mpDownloadWidget(NULL) , mpDesktopLibWidget(NULL) @@ -132,7 +134,9 @@ void UBBoardPaletteManager::setupDockPaletteWidgets() mpPageNavigWidget = new UBPageNavigationWidget(); +#ifdef USE_WEB_WIDGET mpLibWidget = new UBLibWidget(); +#endif mpCachePropWidget = new UBCachePropertiesWidget(); @@ -159,8 +163,11 @@ void UBBoardPaletteManager::setupDockPaletteWidgets() mRightPalette->addTab(mpFeaturesWidget); //Do not show deprecated lib widget to prevent collisions. Uncomment to return lib widget -// mRightPalette->registerWidget(mpLibWidget); -// mRightPalette->addTab(mpLibWidget); + +#ifdef USE_WEB_WIDGET + mRightPalette->registerWidget(mpLibWidget); + mRightPalette->addTab(mpLibWidget); +#endif // The cache widget will be visible only if a cache is put on the page @@ -724,11 +731,11 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is if(mKeyboardPalette->m_isVisible) { mKeyboardPalette->hide(); - mKeyboardPalette->setParent(brWnd); + mKeyboardPalette->setParent(UBApplication::mainWindow); mKeyboardPalette->show(); } else - mKeyboardPalette->setParent(brWnd); + mKeyboardPalette->setParent(UBApplication::mainWindow); } } @@ -841,10 +848,10 @@ void UBBoardPaletteManager::addItemToLibrary() } QImage image = mPixmap.toImage(); - if(NULL != mpLibWidget) - { - mpLibWidget->libNavigator()->libraryWidget()->libraryController()->importImageOnLibrary(image); - } +#ifdef USE_WEB_WIDGET + mpLibWidget->libNavigator()->libraryWidget()->libraryController()->importImageOnLibrary(image); +#endif + } else { diff --git a/src/board/UBBoardPaletteManager.h b/src/board/UBBoardPaletteManager.h index 6a1c60a1..8e9cef3e 100644 --- a/src/board/UBBoardPaletteManager.h +++ b/src/board/UBBoardPaletteManager.h @@ -1,184 +1,192 @@ -/* - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -#ifndef UBBOARDPALETTEMANAGER_H_ -#define UBBOARDPALETTEMANAGER_H_ - -#include -#include - -#include "web/UBRoutedMouseEventWebView.h" -#include "gui/UBLeftPalette.h" -#include "gui/UBRightPalette.h" -#include "gui/UBPageNavigationWidget.h" -#include "gui/UBLibWidget.h" -#include "gui/UBCachePropertiesWidget.h" -#include "gui/UBDockDownloadWidget.h" -#include "core/UBApplicationController.h" -#include "gui/UBFeaturesWidget.h" - - -class UBStylusPalette; -class UBClockPalette; -class UBPageNumberPalette; -class UBZoomPalette; -class UBActionPalette; -class UBBoardController; -class UBFloatingPalette; -class UBServerXMLHttpRequest; -class UBKeyboardPalette; -class UBMainWindow; -class UBApplicationController; -class UBDockTeacherGuideWidget; - -class UBBoardPaletteManager : public QObject -{ - Q_OBJECT - - public: - UBBoardPaletteManager(QWidget* container, UBBoardController* controller); - virtual ~UBBoardPaletteManager(); - - void setupLayout(); - UBLeftPalette* leftPalette(){return mLeftPalette;} - UBRightPalette* rightPalette(){return mRightPalette;} - UBStylusPalette* stylusPalette(){return mStylusPalette;} - void showVirtualKeyboard(bool show = true); - void initPalettesPosAtStartup(); - void connectToDocumentController(); - void refreshPalettes(); - - UBKeyboardPalette *mKeyboardPalette; - - void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode); - void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false); - void startDownloads(); - void stopDownloads(); - - signals: - void connectToDocController(); - void signal_changeMode(eUBDockPaletteWidgetMode newMode); - - public slots: - - void activeSceneChanged(); - void containerResized(); - void addItem(const QUrl& pUrl); - void addItem(const QPixmap& pPixmap, const QPointF& p = QPointF(0.0, 0.0), qreal scale = 1.0, const QUrl& sourceUrl = QUrl()); - - void slot_changeMainMode(UBApplicationController::MainMode); - void slot_changeDesktopMode(bool); - - private: - - void setupPalettes(); - void connectPalettes(); - void positionFreeDisplayPalette(); - void setupDockPaletteWidgets(); - - QWidget* mContainer; - UBBoardController *mBoardControler; - - UBStylusPalette *mStylusPalette; - - UBZoomPalette *mZoomPalette; - - /** The left dock palette */ - UBLeftPalette* mLeftPalette; - /** The right dock palette */ - UBRightPalette* mRightPalette; - - UBActionPalette *mBackgroundsPalette; - UBActionPalette *mToolsPalette; - UBActionPalette* mAddItemPalette; - UBActionPalette* mErasePalette; - UBActionPalette* mPagePalette; - - QUrl mItemUrl; - QPixmap mPixmap; - QPointF mPos; - qreal mScaleFactor; - - QTime mPageButtonPressedTime; - bool mPendingPageButtonPressed; - - QTime mZoomButtonPressedTime; - bool mPendingZoomButtonPressed; - - QTime mPanButtonPressedTime; - bool mPendingPanButtonPressed; - - QTime mEraseButtonPressedTime; - bool mPendingEraseButtonPressed; - - /** The page navigator widget */ - UBPageNavigationWidget* mpPageNavigWidget; - /** The library widget */ - UBLibWidget* mpLibWidget; - /** The cache properties widget */ - UBCachePropertiesWidget* mpCachePropWidget; - - UBFeaturesWidget *mpFeaturesWidget; - - /** The download widget */ - UBDockDownloadWidget* mpDownloadWidget; - // HACK: here we duplicate the lib widget for the desktop mode - // we MUST refactor the architecture in order to use only one - // lib widget! - UBLibWidget* mpDesktopLibWidget; - - UBDockTeacherGuideWidget* mpTeacherGuideWidget; - - bool mDownloadInProgress; - - private slots: - - void changeBackground(); - - void toggleBackgroundPalette(bool checked); - void backgroundPaletteClosed(); - - void toggleStylusPalette(bool checked); - void tooglePodcastPalette(bool checked); - - void erasePaletteButtonPressed(); - void erasePaletteButtonReleased(); - - void toggleErasePalette(bool ckecked); - void erasePaletteClosed(); - - void togglePagePalette(bool ckecked); - void pagePaletteClosed(); - - void pagePaletteButtonPressed(); - void pagePaletteButtonReleased(); - - void addItemToCurrentPage(); - void addItemToNewPage(); - void addItemToLibrary(); - - void purchaseLinkActivated(const QString&); - - void linkClicked(const QUrl& url); - - void zoomButtonPressed(); - void zoomButtonReleased(); - void panButtonPressed(); - void panButtonReleased(); - - void changeStylusPaletteOrientation(QVariant var); -}; - -#endif /* UBBOARDPALETTEMANAGER_H_ */ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ + +#ifndef UBBOARDPALETTEMANAGER_H_ +#define UBBOARDPALETTEMANAGER_H_ + +#include +#include + +#include "web/UBRoutedMouseEventWebView.h" +#include "gui/UBLeftPalette.h" +#include "gui/UBRightPalette.h" +#include "gui/UBPageNavigationWidget.h" +#include "gui/UBLibWidget.h" +#include "gui/UBCachePropertiesWidget.h" +#include "gui/UBDockDownloadWidget.h" +#include "core/UBApplicationController.h" +#include "gui/UBFeaturesWidget.h" + + +class UBStylusPalette; +class UBClockPalette; +class UBPageNumberPalette; +class UBZoomPalette; +class UBActionPalette; +class UBBoardController; +class UBFloatingPalette; +class UBServerXMLHttpRequest; +class UBKeyboardPalette; +class UBMainWindow; +class UBApplicationController; +class UBDockTeacherGuideWidget; + +// Uncomment this to use old-styles lib paletter +// #define USE_WEB_WIDGET + + +class UBBoardPaletteManager : public QObject +{ + Q_OBJECT + + public: + UBBoardPaletteManager(QWidget* container, UBBoardController* controller); + virtual ~UBBoardPaletteManager(); + + void setupLayout(); + UBLeftPalette* leftPalette(){return mLeftPalette;} + UBRightPalette* rightPalette(){return mRightPalette;} + UBStylusPalette* stylusPalette(){return mStylusPalette;} + void showVirtualKeyboard(bool show = true); + void initPalettesPosAtStartup(); + void connectToDocumentController(); + void refreshPalettes(); + + UBKeyboardPalette *mKeyboardPalette; + + void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode); + void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false); + void startDownloads(); + void stopDownloads(); + + signals: + void connectToDocController(); + void signal_changeMode(eUBDockPaletteWidgetMode newMode); + + public slots: + + void activeSceneChanged(); + void containerResized(); + void addItem(const QUrl& pUrl); + void addItem(const QPixmap& pPixmap, const QPointF& p = QPointF(0.0, 0.0), qreal scale = 1.0, const QUrl& sourceUrl = QUrl()); + + void slot_changeMainMode(UBApplicationController::MainMode); + void slot_changeDesktopMode(bool); + + private: + + void setupPalettes(); + void connectPalettes(); + void positionFreeDisplayPalette(); + void setupDockPaletteWidgets(); + + QWidget* mContainer; + UBBoardController *mBoardControler; + + UBStylusPalette *mStylusPalette; + + UBZoomPalette *mZoomPalette; + + /** The left dock palette */ + UBLeftPalette* mLeftPalette; + /** The right dock palette */ + UBRightPalette* mRightPalette; + + UBActionPalette *mBackgroundsPalette; + UBActionPalette *mToolsPalette; + UBActionPalette* mAddItemPalette; + UBActionPalette* mErasePalette; + UBActionPalette* mPagePalette; + + QUrl mItemUrl; + QPixmap mPixmap; + QPointF mPos; + qreal mScaleFactor; + + QTime mPageButtonPressedTime; + bool mPendingPageButtonPressed; + + QTime mZoomButtonPressedTime; + bool mPendingZoomButtonPressed; + + QTime mPanButtonPressedTime; + bool mPendingPanButtonPressed; + + QTime mEraseButtonPressedTime; + bool mPendingEraseButtonPressed; + + /** The page navigator widget */ + UBPageNavigationWidget* mpPageNavigWidget; + +#ifdef USE_WEB_WIDGET + /** The library widget */ + UBLibWidget* mpLibWidget; +#endif + + /** The cache properties widget */ + UBCachePropertiesWidget* mpCachePropWidget; + + UBFeaturesWidget *mpFeaturesWidget; + + /** The download widget */ + UBDockDownloadWidget* mpDownloadWidget; + // HACK: here we duplicate the lib widget for the desktop mode + // we MUST refactor the architecture in order to use only one + // lib widget! + UBLibWidget* mpDesktopLibWidget; + + UBDockTeacherGuideWidget* mpTeacherGuideWidget; + + bool mDownloadInProgress; + + private slots: + + void changeBackground(); + + void toggleBackgroundPalette(bool checked); + void backgroundPaletteClosed(); + + void toggleStylusPalette(bool checked); + void tooglePodcastPalette(bool checked); + + void erasePaletteButtonPressed(); + void erasePaletteButtonReleased(); + + void toggleErasePalette(bool ckecked); + void erasePaletteClosed(); + + void togglePagePalette(bool ckecked); + void pagePaletteClosed(); + + void pagePaletteButtonPressed(); + void pagePaletteButtonReleased(); + + void addItemToCurrentPage(); + void addItemToNewPage(); + void addItemToLibrary(); + + void purchaseLinkActivated(const QString&); + + void linkClicked(const QUrl& url); + + void zoomButtonPressed(); + void zoomButtonReleased(); + void panButtonPressed(); + void panButtonReleased(); + + void changeStylusPaletteOrientation(QVariant var); +}; + +#endif /* UBBOARDPALETTEMANAGER_H_ */ diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index 05c16943..0296345b 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -437,7 +437,6 @@ void UBBoardView::mousePressEvent (QMouseEvent *event) || movingItem->type() == UBGraphicsTriangle::Type || movingItem == this->scene()->backgroundObject() || movingItem->group()) - { movingItem = NULL; QGraphicsView::mousePressEvent (event); diff --git a/src/board/UBFeaturesController.cpp b/src/board/UBFeaturesController.cpp index 863606da..5bd9f5b7 100644 --- a/src/board/UBFeaturesController.cpp +++ b/src/board/UBFeaturesController.cpp @@ -18,13 +18,30 @@ #include "domain/UBGraphicsVideoItem.h" #include "domain/UBGraphicsWidgetItem.h" -UBFeature::UBFeature(const QString &url, const QPixmap &icon, const QString &name, const QString &realPath, UBFeatureElementType type) +UBFeature::UBFeature(const QString &url, const QPixmap &icon, const QString &name, const QUrl &realPath, UBFeatureElementType type) : virtualPath(url), mThumbnail(icon), mName(name), mPath(realPath), elementType(type) { } +QString UBFeature::getUrl() const +{ + if ( elementType == FEATURE_INTERNAL ) + return getFullPath().toString(); + /*if ( UBApplication::isFromWeb( getFullPath() ) ) + return QUrl( getFullPath() );*/ + return getFullPath().toLocalFile(); +} + +bool UBFeature::operator ==( const UBFeature &f )const +{ + return virtualPath == f.getVirtualPath() && mName == f.getName() && mPath == f.getFullPath() && elementType == f.getType(); +} +bool UBFeature::operator !=( const UBFeature &f )const +{ + return !(*this == f); +} bool UBFeature::isFolder() const { @@ -32,6 +49,10 @@ bool UBFeature::isFolder() const || elementType == FEATURE_FOLDER; } +bool UBFeature::isDeletable()const +{ + return elementType == FEATURE_ITEM; +} UBFeaturesController::UBFeaturesController(QWidget *pParentWidget) : QObject(pParentWidget), @@ -43,23 +64,24 @@ UBFeaturesController::UBFeaturesController(QWidget *pParentWidget) : void UBFeaturesController::initDirectoryTree() { - mUserAudioDirectoryPath = UBSettings::settings()->userAudioDirectory(); - mUserVideoDirectoryPath = UBSettings::settings()->userVideoDirectory(); - mUserPicturesDirectoryPath = UBSettings::settings()->userImageDirectory(); - mUserInteractiveDirectoryPath = UBSettings::settings()->userInteractiveDirectory(); - mUserAnimationDirectoryPath = UBSettings::settings()->userAnimationDirectory(); - - mLibPicturesDirectoryPath = UBSettings::settings()->applicationImageLibraryDirectory(); - mLibInteractiveDirectoryPath = UBSettings::settings()->applicationInteractivesDirectory(); - mLibApplicationsDirectoryPath = UBSettings::settings()->applicationApplicationsLibraryDirectory(); - mLibShapesDirectoryPath = UBSettings::settings()->applicationShapeLibraryDirectory() ; - trashDirectoryPath = UBSettings::userTrashDirPath(); + mUserAudioDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userAudioDirectory() ); + mUserVideoDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userVideoDirectory() ); + mUserPicturesDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userImageDirectory() ); + mUserInteractiveDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userInteractiveDirectory() ); + mUserAnimationDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userAnimationDirectory() ); + + mLibPicturesDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->applicationImageLibraryDirectory() ); + mLibInteractiveDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->applicationInteractivesDirectory() ); + mLibApplicationsDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->applicationApplicationsLibraryDirectory() ); + mLibShapesDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->applicationShapeLibraryDirectory() ); + mLibSearchDirectoryPath =QUrl::fromLocalFile( UBSettings::settings()->userSearchDirectory() ); + trashDirectoryPath = QUrl::fromLocalFile( UBSettings::userTrashDirPath() ); featuresList = new QList (); QList tools = UBToolsManager::manager()->allTools(); - featuresList->append( UBFeature( QString(), QPixmap( ":images/libpalette/home.png" ), "root", QString() ) ); + featuresList->append( UBFeature( QString(), QPixmap( ":images/libpalette/home.png" ), "root", QUrl() ) ); currentElement = featuresList->at(0); appPath = rootPath + "/Applications"; @@ -72,26 +94,32 @@ void UBFeaturesController::initDirectoryTree() trashPath = rootPath + "/Trash"; favoritePath = rootPath + "/Favorites"; - featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/AudiosCategory.svg"), "Audios" , mUserAudioDirectoryPath ) ); - featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/MoviesCategory.svg"), "Movies" , mUserVideoDirectoryPath ) ); - featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/PicturesCategory.svg"), "Pictures" , mUserPicturesDirectoryPath ) ); + audiosElement = UBFeature( rootPath, QPixmap(":images/libpalette/AudiosCategory.svg"), "Audios" , mUserAudioDirectoryPath ); + featuresList->append( audiosElement ); + moviesElement = UBFeature( rootPath, QPixmap(":images/libpalette/MoviesCategory.svg"), "Movies" , mUserVideoDirectoryPath ); + featuresList->append( moviesElement ); + picturesElement = UBFeature( rootPath, QPixmap(":images/libpalette/PicturesCategory.svg"), "Pictures" , mUserPicturesDirectoryPath ); + featuresList->append( picturesElement ); featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/ApplicationsCategory.svg"), "Applications" , mUserInteractiveDirectoryPath ) ); - featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/FlashCategory.svg"), "Animations" , mUserAnimationDirectoryPath ) ); - featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/InteractivesCategory.svg"), "Interactivities" , mLibInteractiveDirectoryPath ) ); + flashElement = UBFeature( rootPath, QPixmap(":images/libpalette/FlashCategory.svg"), "Animations" , mUserAnimationDirectoryPath ); + featuresList->append( flashElement ); + interactElement = UBFeature( rootPath, QPixmap(":images/libpalette/InteractivesCategory.svg"), "Interactivities" , mLibInteractiveDirectoryPath ); + featuresList->append( interactElement ); featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/ShapesCategory.svg"), "Shapes" , mLibShapesDirectoryPath ) ); trashElement = UBFeature( rootPath, QPixmap(":images/libpalette/TrashCategory.svg"), "Trash", trashDirectoryPath, FEATURE_TRASH ); featuresList->append( trashElement ); - favoriteElement = UBFeature( rootPath, QPixmap(":images/libpalette/FavoritesCategory.svg"), "Favorites", "favorites", FEATURE_FAVORITE ); + favoriteElement = UBFeature( rootPath, QPixmap(":images/libpalette/FavoritesCategory.svg"), "Favorites", QUrl("favorites"), FEATURE_FAVORITE ); featuresList->append( favoriteElement ); - + webSearchElement = UBFeature( rootPath, QPixmap(":images/libpalette/WebSearchCategory.svg"), "Web search", mLibSearchDirectoryPath ); + featuresList->append( webSearchElement ); loadFavoriteList(); foreach (UBToolsManager::UBToolDescriptor tool, tools) { - featuresList->append( UBFeature( appPath, tool.icon, tool.label, tool.id, FEATURE_INTERNAL ) ); - if ( favoriteSet->find( tool.id ) != favoriteSet->end() ) + featuresList->append( UBFeature( appPath, tool.icon, tool.label, QUrl( tool.id ), FEATURE_INTERNAL ) ); + if ( favoriteSet->find( QUrl( tool.id ) ) != favoriteSet->end() ) { - featuresList->append( UBFeature( favoritePath, tool.icon, tool.label, tool.id, FEATURE_INTERNAL ) ); + featuresList->append( UBFeature( favoritePath, tool.icon, tool.label, QUrl( tool.id ), FEATURE_INTERNAL ) ); } } fileSystemScan( mUserInteractiveDirectoryPath, appPath ); @@ -105,14 +133,14 @@ void UBFeaturesController::initDirectoryTree() fileSystemScan( mLibShapesDirectoryPath, shapesPath ); fileSystemScan( mLibInteractiveDirectoryPath, interactPath ); fileSystemScan( trashDirectoryPath, trashPath ); - + fileSystemScan( mLibSearchDirectoryPath, rootPath + "/" + "Web search" ); } -void UBFeaturesController::fileSystemScan(const QString & currentPath, const QString & currVirtualPath) +void UBFeaturesController::fileSystemScan(const QUrl & currentPath, const QString & currVirtualPath) { - QFileInfoList fileInfoList = UBFileSystemUtils::allElementsInDirectory(currentPath); + QFileInfoList fileInfoList = UBFileSystemUtils::allElementsInDirectory(currentPath.toLocalFile()); QFileInfoList::iterator fileInfo; for ( fileInfo = fileInfoList.begin(); fileInfo != fileInfoList.end(); fileInfo += 1) @@ -120,12 +148,19 @@ void UBFeaturesController::fileSystemScan(const QString & currentPath, const QSt UBFeatureElementType fileType = fileInfo->isDir() ? FEATURE_FOLDER : FEATURE_ITEM; QString fileName = fileInfo->fileName(); - if ( UBFileSystemUtils::mimeTypeFromFileName(fileName).contains("application") ) { - fileType = FEATURE_INTERACTIVE; + if ( UBFileSystemUtils::mimeTypeFromFileName(fileName).contains("application") ) + { + if ( UBFileSystemUtils::mimeTypeFromFileName(fileName).contains("application/search") ) + { + fileType = FEATURE_SEARCH; + } + else + fileType = FEATURE_INTERACTIVE; } QString itemName = (fileType != FEATURE_ITEM) ? fileName : fileInfo->completeBaseName(); QPixmap icon = QPixmap(":images/libpalette/soundIcon.svg"); QString fullFileName = fileInfo->filePath(); + if ( fileType == FEATURE_FOLDER ) { @@ -146,15 +181,15 @@ void UBFeaturesController::fileSystemScan(const QString & currentPath, const QSt icon = QPixmap( thumbnailPath ); else icon = createThumbnail( fullFileName );*/ } - featuresList->append( UBFeature( currVirtualPath, icon, fileName, fullFileName, fileType ) ); - if ( favoriteSet->find( fullFileName ) != favoriteSet->end() ) + featuresList->append( UBFeature( currVirtualPath, icon, fileName, QUrl::fromLocalFile( fullFileName ), fileType ) ); + if ( favoriteSet->find( QUrl::fromLocalFile( fullFileName ) ) != favoriteSet->end() ) { - featuresList->append( UBFeature( favoritePath, icon, fileName, fullFileName, fileType ) ); + featuresList->append( UBFeature( favoritePath, icon, fileName, QUrl::fromLocalFile( fullFileName ), fileType ) ); } if ( fileType == FEATURE_FOLDER ) { - fileSystemScan( fullFileName, currVirtualPath + "/" + fileName ); + fileSystemScan( QUrl::fromLocalFile( fullFileName ), currVirtualPath + "/" + fileName ); } } @@ -162,7 +197,7 @@ void UBFeaturesController::fileSystemScan(const QString & currentPath, const QSt void UBFeaturesController::loadFavoriteList() { - favoriteSet = new QSet(); + favoriteSet = new QSet(); QFile file( UBSettings::userDataDirectory() + "/favorites.dat" ); if ( file.exists() ) { @@ -172,7 +207,7 @@ void UBFeaturesController::loadFavoriteList() in >> elementsNumber; for ( int i = 0; i < elementsNumber; ++i) { - QString path; + QUrl path; in >> path; /*QFileInfo fileInfo( path ); QString fileName = fileInfo.fileName(); @@ -191,7 +226,7 @@ void UBFeaturesController::saveFavoriteList() file.open(QIODevice::WriteOnly); QDataStream out(&file); out << favoriteSet->size(); - for ( QSet::iterator it = favoriteSet->begin(); it != favoriteSet->end(); ++it ) + for ( QSet::iterator it = favoriteSet->begin(); it != favoriteSet->end(); ++it ) { out << (*it); } @@ -201,12 +236,12 @@ void UBFeaturesController::saveFavoriteList() UBFeature UBFeaturesController::addToFavorite( const QUrl &path ) { QString filePath = fileNameFromUrl( path ); - if ( favoriteSet->find( filePath ) == favoriteSet->end() ) + if ( favoriteSet->find( path ) == favoriteSet->end() ) { QFileInfo fileInfo( filePath ); QString fileName = fileInfo.fileName(); - UBFeature elem( favoritePath, thumbnailForFile( filePath ), fileName, filePath, fileTypeFromUrl(filePath) ); - favoriteSet->insert( filePath ); + UBFeature elem( favoritePath, thumbnailForFile( filePath ), fileName, path, fileTypeFromUrl(filePath) ); + favoriteSet->insert( path ); saveFavoriteList(); return elem; } @@ -216,9 +251,9 @@ UBFeature UBFeaturesController::addToFavorite( const QUrl &path ) void UBFeaturesController::removeFromFavorite( const QUrl &path ) { QString filePath = fileNameFromUrl( path ); - if ( favoriteSet->find( filePath ) != favoriteSet->end() ) + if ( favoriteSet->find( path ) != favoriteSet->end() ) { - favoriteSet->erase( favoriteSet->find( filePath ) ); + favoriteSet->erase( favoriteSet->find( path ) ); saveFavoriteList(); } } @@ -231,6 +266,7 @@ QString UBFeaturesController::fileNameFromUrl( const QUrl &url ) return url.toLocalFile(); } + UBFeatureElementType UBFeaturesController::fileTypeFromUrl( const QString &path ) { QFileInfo fileInfo( path ); @@ -268,6 +304,12 @@ QPixmap UBFeaturesController::thumbnailForFile(const QString &path) return thumb; } +bool UBFeaturesController::isDeletable( const QUrl &url ) +{ + UBFeatureElementType type = fileTypeFromUrl( fileNameFromUrl(url) ); + return type == FEATURE_ITEM; +} + QPixmap UBFeaturesController::createThumbnail(const QString &path) { QString thumbnailPath = UBFileSystemUtils::thumbnailPath(path); @@ -303,25 +345,123 @@ QPixmap UBFeaturesController::createThumbnail(const QString &path) return QPixmap(thumbnailPath); } +UBFeature UBFeaturesController::importImage( const QImage &image, const UBFeature &destination ) +{ + QDateTime now = QDateTime::currentDateTime(); + QString fileName = tr("ImportedImage") + "-" + now.toString("dd-MM-yyyy hh-mm-ss") + ".png"; + + UBFeature dest = destination; + + if ( !destination.getFullVirtualPath().startsWith( picturesElement.getFullVirtualPath(), Qt::CaseInsensitive ) ) + { + dest = picturesElement; + } + + QString filePath = dest.getFullPath().toLocalFile() + "/" + fileName; + image.save(filePath); + + QPixmap thumb = createThumbnail( filePath ); + return UBFeature( dest.getFullVirtualPath(), thumb, fileName, + QUrl::fromLocalFile( filePath ), FEATURE_ITEM ); + +} + UBFeature UBFeaturesController::newFolder( const QString &name ) { - QString path = currentElement.getFullPath() + "/" + name; + QString path = currentElement.getFullPath().toLocalFile() + "/" + name; if(!QFileInfo(path).exists()) { QDir().mkpath(path); } - return UBFeature( currentElement.getUrl() + "/" + currentElement.getName(), QPixmap(":images/libpalette/folder.svg"), name, path, FEATURE_FOLDER ); + return UBFeature( currentElement.getFullVirtualPath(), QPixmap(":images/libpalette/folder.svg"), + name, QUrl::fromLocalFile( path ), FEATURE_FOLDER ); } void UBFeaturesController::addItemToPage(const UBFeature &item) { - UBApplication::boardController->downloadURL( QUrl::fromLocalFile( item.getFullPath() ) ); + UBApplication::boardController->downloadURL( item.getFullPath() ); +} + +void UBFeaturesController::addItemAsBackground(const UBFeature &item) +{ + UBApplication::boardController->downloadURL( item.getFullPath(), QPointF(), QSize(), true ); +} + + +UBFeature UBFeaturesController::getDestinationForItem( const QUrl &url ) +{ + QString mimetype = UBFileSystemUtils::mimeTypeFromFileName( url.toString() ); + + if ( mimetype.contains("audio") ) + return audiosElement; + if ( mimetype.contains("video") ) + return moviesElement; + else if ( mimetype.contains("image") ) + return picturesElement; + else if ( mimetype.contains("application") ) + { + if ( mimetype.contains( "x-shockwave-flash") ) + return flashElement; + else + return interactElement; + } + return UBFeature(); +} + +UBFeature UBFeaturesController::addDownloadedFile( const QUrl &sourceUrl, const QByteArray &pData ) +{ + UBFeature dest = getDestinationForItem( sourceUrl ); + if ( dest == UBFeature() ) + return UBFeature(); + QString fileName = QFileInfo( sourceUrl.toString() ).fileName(); + QString filePath = dest.getFullPath().toLocalFile() + "/" + fileName; + + QFile file( filePath ); + if( file.open(QIODevice::WriteOnly )) + { + file.write(pData); + file.close(); + return UBFeature( dest.getFullVirtualPath(), thumbnailForFile( filePath ), + fileName, QUrl::fromLocalFile(filePath), FEATURE_ITEM ); + } + return UBFeature(); } UBFeature UBFeaturesController::moveItemToFolder( const QUrl &url, const UBFeature &destination ) { - UBFeature newElement = copyItemToFolder( url, destination ); + /*UBFeature newElement = copyItemToFolder( url, destination ); deleteItem( url ); + return newElement;*/ + QString sourcePath = url.toLocalFile(); + + Q_ASSERT( QFileInfo( sourcePath ).exists() ); + + UBFeature possibleDest = getDestinationForItem( url ); + + UBFeature dest = destination; + + if ( destination != trashElement && + !destination.getFullVirtualPath().startsWith( possibleDest.getFullVirtualPath(), Qt::CaseInsensitive ) ) + { + dest = possibleDest; + } + + QString name = QFileInfo( sourcePath ).fileName(); + QString destPath = dest.getFullPath().toLocalFile(); + QString destVirtualPath = dest.getFullVirtualPath(); + QString newFullPath = destPath + "/" + name; + if ( sourcePath.compare( newFullPath, Qt::CaseInsensitive ) ) + { + QFile( sourcePath ).copy( newFullPath ); + deleteItem( url ); + } + + QPixmap thumb = thumbnailForFile( newFullPath ); + + UBFeatureElementType type = FEATURE_ITEM; + if ( UBFileSystemUtils::mimeTypeFromFileName( newFullPath ).contains("application") ) + type = FEATURE_INTERACTIVE; + UBFeature newElement( destVirtualPath, thumb, name, QUrl::fromLocalFile( newFullPath ), type ); return newElement; } @@ -331,18 +471,29 @@ UBFeature UBFeaturesController::copyItemToFolder( const QUrl &url, const UBFeatu Q_ASSERT( QFileInfo( sourcePath ).exists() ); + UBFeature possibleDest = getDestinationForItem( url ); + + UBFeature dest = destination; + + if ( destination != trashElement && + !destination.getFullVirtualPath().startsWith( possibleDest.getFullVirtualPath(), Qt::CaseInsensitive ) ) + { + dest = possibleDest; + } + QString name = QFileInfo( sourcePath ).fileName(); - QString destPath = destination.getFullPath(); - QString destVirtualPath = destination.getUrl() + "/" + destination.getName(); + QString destPath = dest.getFullPath().toLocalFile(); + QString destVirtualPath = dest.getFullVirtualPath(); QString newFullPath = destPath + "/" + name; - QFile( sourcePath ).copy( newFullPath ); + if ( !sourcePath.compare( newFullPath, Qt::CaseInsensitive ) ) + QFile( sourcePath ).copy( newFullPath ); QPixmap thumb = thumbnailForFile( newFullPath ); UBFeatureElementType type = FEATURE_ITEM; if ( UBFileSystemUtils::mimeTypeFromFileName( newFullPath ).contains("application") ) type = FEATURE_INTERACTIVE; - UBFeature newElement( destVirtualPath, thumb, name, newFullPath, type ); + UBFeature newElement( destVirtualPath, thumb, name, QUrl::fromLocalFile( newFullPath ), type ); return newElement; } @@ -352,7 +503,7 @@ void UBFeaturesController::deleteItem( const QUrl &url ) Q_ASSERT( QFileInfo( path ).exists() ); QString thumbnailPath = UBFileSystemUtils::thumbnailPath( path ); - if (thumbnailPath.length() && QFileInfo( thumbnailPath ).exists()) + if ( thumbnailPath.length() && QFileInfo( thumbnailPath ).exists() ) { QFile::remove(thumbnailPath); } @@ -361,7 +512,7 @@ void UBFeaturesController::deleteItem( const QUrl &url ) bool UBFeaturesController::isTrash( const QUrl &url ) { - return url.toLocalFile().startsWith( trashDirectoryPath ); + return url.toLocalFile().startsWith( trashDirectoryPath.toLocalFile() ); } UBFeaturesController::~UBFeaturesController() diff --git a/src/board/UBFeaturesController.h b/src/board/UBFeaturesController.h index a46c6e63..254514a4 100644 --- a/src/board/UBFeaturesController.h +++ b/src/board/UBFeaturesController.h @@ -4,9 +4,13 @@ #include #include #include +#include #include #include #include +#include +#include +#include //#include "UBDockPaletteWidget.h" @@ -19,7 +23,8 @@ enum UBFeatureElementType FEATURE_INTERNAL, FEATURE_ITEM, FEATURE_TRASH, - FEATURE_FAVORITE + FEATURE_FAVORITE, + FEATURE_SEARCH }; class UBFeature @@ -27,21 +32,30 @@ class UBFeature public: UBFeature() {;} //UBFeature(const UBFeature &f); - UBFeature(const QString &url, const QPixmap &icon, const QString &name, const QString &realPath, UBFeatureElementType type = FEATURE_CATEGORY); + UBFeature(const QString &url, const QPixmap &icon, const QString &name, const QUrl &realPath, UBFeatureElementType type = FEATURE_CATEGORY); virtual ~UBFeature() {;} QString getName() const { return mName; } QPixmap getThumbnail() const {return mThumbnail;} - QString getUrl() const { return virtualPath; } + QString getVirtualPath() const { return virtualPath; } //QString getPath() const { return mPath; }; - QString getFullPath() const { return mPath; } + QUrl getFullPath() const { return mPath; } + QString getFullVirtualPath() const { return virtualPath + "/" + mName; } + QString getUrl() const; UBFeatureElementType getType() const { return elementType; } + bool isFolder() const; + bool isDeletable() const; + bool operator ==( const UBFeature &f )const; + bool operator !=( const UBFeature &f )const; + const QMap & getMetadata() const { return metadata; } + void setMetadata( const QMap &data ) { metadata = data; } private: QString virtualPath; QPixmap mThumbnail; QString mName; - QString mPath; + QUrl mPath; UBFeatureElementType elementType; + QMap metadata; }; Q_DECLARE_METATYPE( UBFeature ) @@ -57,10 +71,14 @@ public: const QString& getRootPath()const { return rootPath; } - void addItemToPage(const UBFeature &item); + void addItemToPage( const UBFeature &item ); + void addItemAsBackground( const UBFeature &item ); const UBFeature& getCurrentElement()const { return currentElement; } void setCurrentElement( const UBFeature &elem ) { currentElement = elem; } const UBFeature & getTrashElement () const { return trashElement; } + + UBFeature addDownloadedFile( const QUrl &sourceUrl, const QByteArray &pData ); + UBFeature moveItemToFolder( const QUrl &url, const UBFeature &destination ); UBFeature copyItemToFolder( const QUrl &url, const UBFeature &destination ); void deleteItem( const QUrl &url ); @@ -68,37 +86,41 @@ public: UBFeature newFolder( const QString &name ); UBFeature addToFavorite( const QUrl &path ); void removeFromFavorite( const QUrl &path ); + UBFeature importImage( const QImage &image, const UBFeature &destination ); static QString fileNameFromUrl( const QUrl &url ); static QPixmap thumbnailForFile( const QString &path ); + static bool isDeletable( const QUrl &url ); private: void initDirectoryTree(); - void fileSystemScan(const QString &currPath, const QString & currVirtualPath); + void fileSystemScan(const QUrl &currPath, const QString & currVirtualPath); static QPixmap createThumbnail(const QString &path); //void addImageToCurrentPage( const QString &path ); void loadFavoriteList(); void saveFavoriteList(); + UBFeature getDestinationForItem( const QUrl &url ); static UBFeatureElementType fileTypeFromUrl( const QString &path ); QList *featuresList; UBFeature *rootElement; - QString mUserAudioDirectoryPath; - QString mUserVideoDirectoryPath; - QString mUserPicturesDirectoryPath; - QString mUserInteractiveDirectoryPath; - QString mUserAnimationDirectoryPath; + QUrl mUserAudioDirectoryPath; + QUrl mUserVideoDirectoryPath; + QUrl mUserPicturesDirectoryPath; + QUrl mUserInteractiveDirectoryPath; + QUrl mUserAnimationDirectoryPath; QString libraryPath; - QString mLibAudioDirectoryPath; - QString mLibVideoDirectoryPath; - QString mLibPicturesDirectoryPath; - QString mLibInteractiveDirectoryPath; - QString mLibAnimationDirectoryPath; - QString mLibApplicationsDirectoryPath; - QString mLibShapesDirectoryPath; - QString trashDirectoryPath; + QUrl mLibAudioDirectoryPath; + QUrl mLibVideoDirectoryPath; + QUrl mLibPicturesDirectoryPath; + QUrl mLibInteractiveDirectoryPath; + QUrl mLibAnimationDirectoryPath; + QUrl mLibApplicationsDirectoryPath; + QUrl mLibShapesDirectoryPath; + QUrl trashDirectoryPath; + QUrl mLibSearchDirectoryPath; QString rootPath; QString audiosPath; @@ -115,8 +137,15 @@ private: UBFeature currentElement; UBFeature trashElement; UBFeature favoriteElement; - - QSet *favoriteSet; + UBFeature audiosElement; + UBFeature moviesElement; + UBFeature picturesElement; + UBFeature interactElement; + UBFeature flashElement; + UBFeature shapesElement; + UBFeature webSearchElement; + + QSet *favoriteSet; }; diff --git a/src/core/main.cpp b/src/core/main.cpp index 80c8a989..33cb711c 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) // Uncomment next section to have memory leaks information // tracing in VC++ debug mode under Windows - /* +/* #if defined(_MSC_VER) && defined(_DEBUG) _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); #endif diff --git a/src/customWidgets/UBActionableWidget.cpp b/src/customWidgets/UBActionableWidget.cpp index 78d8ea6b..25c1809e 100644 --- a/src/customWidgets/UBActionableWidget.cpp +++ b/src/customWidgets/UBActionableWidget.cpp @@ -18,6 +18,8 @@ #include "UBActionableWidget.h" +#include "core/memcheck.h" + UBActionableWidget::UBActionableWidget(QWidget *parent, const char *name):QWidget(parent) , mShowActions(false) { diff --git a/src/customWidgets/UBMediaWidget.cpp b/src/customWidgets/UBMediaWidget.cpp index cbc0b842..cf7f8489 100644 --- a/src/customWidgets/UBMediaWidget.cpp +++ b/src/customWidgets/UBMediaWidget.cpp @@ -16,6 +16,8 @@ #include "globals/UBGlobals.h" #include "UBMediaWidget.h" +#include "core/memcheck.h" + /** * \brief Constructor * @param type as the media type diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 30b3f4d8..5a87f0d8 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -71,9 +71,15 @@ UBDocumentController::UBDocumentController(UBMainWindow* mainWindow) { setupViews(); setupToolbar(); + this->selectDocument(UBApplication::boardController->activeDocument()); connect(this, SIGNAL(exportDone()), mMainWindow, SLOT(onExportDone())); + connect(mMainWindow->actionNewPage, SIGNAL(triggered()), this, SLOT(reloadThumbs())); } +void UBDocumentController::reloadThumbs() +{ + mDocumentThumbs = UBThumbnailAdaptor::load(selectedDocumentProxy()); +} UBDocumentController::~UBDocumentController() { diff --git a/src/document/UBDocumentController.h b/src/document/UBDocumentController.h index 76a8d42e..ac3f4ab3 100644 --- a/src/document/UBDocumentController.h +++ b/src/document/UBDocumentController.h @@ -75,6 +75,7 @@ class UBDocumentController : public QObject void copy(); void paste(); void focusChanged(QWidget *old, QWidget *current); + void reloadThumbs(); protected: virtual void setupViews(); diff --git a/src/domain/UBAbstractUndoCommand.cpp b/src/domain/UBAbstractUndoCommand.cpp index fe623acc..fc5d9fdf 100644 --- a/src/domain/UBAbstractUndoCommand.cpp +++ b/src/domain/UBAbstractUndoCommand.cpp @@ -15,6 +15,8 @@ #include "UBAbstractUndoCommand.h" +#include "core/memcheck.h" + UBAbstractUndoCommand::UBAbstractUndoCommand() { // NOOP diff --git a/src/domain/UBAngleWidget.cpp b/src/domain/UBAngleWidget.cpp index 542a7eed..7be0bf39 100644 --- a/src/domain/UBAngleWidget.cpp +++ b/src/domain/UBAngleWidget.cpp @@ -1,6 +1,8 @@ #include "UBAngleWidget.h" #include +#include "core/memcheck.h" + UBAngleWidget::UBAngleWidget(QWidget *parent) : QWidget(parent) { diff --git a/src/domain/UBGraphicsDelegateFrame.cpp b/src/domain/UBGraphicsDelegateFrame.cpp index bb47e5c6..54dc4650 100644 --- a/src/domain/UBGraphicsDelegateFrame.cpp +++ b/src/domain/UBGraphicsDelegateFrame.cpp @@ -1,794 +1,802 @@ -/* - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -#include "UBGraphicsDelegateFrame.h" - -#include -#include - -#include "core/UBApplication.h" -#include "core/UBSettings.h" - -#include "domain/UBGraphicsItemDelegate.h" -#include "domain/UBGraphicsScene.h" -#include "domain/UBGraphicsProxyWidget.h" - -#include "gui/UBResources.h" - -#include "core/memcheck.h" - -UBGraphicsDelegateFrame::UBGraphicsDelegateFrame(UBGraphicsItemDelegate* pDelegate, QRectF pRect, qreal pFrameWidth, bool respectRatio) - : QGraphicsRectItem(), QObject(pDelegate) - , mCurrentTool(None) - , mDelegate(pDelegate) - , mVisible(true) - , mFrameWidth(pFrameWidth) - , mNominalFrameWidth(pFrameWidth) - , mRespectRatio(respectRatio) - , mAngle(0) - , mAngleOffset(0) - , mTotalScaleX(-1) - , mTotalScaleY(-1) - , mTranslateX(0) - , mTranslateY(0) - , mTotalTranslateX(0) - , mTotalTranslateY(0) - , mOperationMode(Scaling) - , mMirrorX(false) - , mMirrorY(false) -{ - mAngleTolerance = UBSettings::settings()->angleTolerance->get().toReal(); - - setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); - - setAcceptedMouseButtons(Qt::LeftButton); - setRect(pRect.adjusted(mFrameWidth, mFrameWidth, mFrameWidth * -1, mFrameWidth * -1)); - - setBrush(QBrush(UBSettings::paletteColor)); - setPen(Qt::NoPen); - setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); - - mBottomRightResizeGripSvgItem = new QGraphicsSvgItem(":/images/resize.svg", this); - mBottomResizeGripSvgItem = new QGraphicsSvgItem(":/images/resizeBottom.svg", this); - mLeftResizeGripSvgItem = new QGraphicsSvgItem(":/images/resizeLeft.svg", this); - mRightResizeGripSvgItem = new QGraphicsSvgItem(":/images/resizeRight.svg", this); - mTopResizeGripSvgItem = new QGraphicsSvgItem(":/images/resizeTop.svg", this); - - mBottomRightResizeGrip = new QGraphicsRectItem(this); - mBottomRightResizeGrip->setPen(Qt::NoPen); - mBottomResizeGrip = new QGraphicsRectItem(this); - mBottomResizeGrip->setPen(Qt::NoPen); - mLeftResizeGrip = new QGraphicsRectItem(this); - mLeftResizeGrip->setToolTip("left"); - mLeftResizeGrip->setPen(Qt::NoPen); - mRightResizeGrip = new QGraphicsRectItem(this); - mRightResizeGrip->setPen(Qt::NoPen); - mRightResizeGrip->setToolTip("Right"); - mTopResizeGrip = new QGraphicsRectItem(this); - mTopResizeGrip->setPen(Qt::NoPen); - - mRotateButton = new QGraphicsSvgItem(":/images/rotate.svg", this); - mRotateButton->setCursor(UBResources::resources()->rotateCursor); - mRotateButton->setVisible(mDelegate->canRotate()); - - updateResizeCursors(); - - setAntiScale(1.0); - - positionHandles(); - - this->setAcceptHoverEvents(true); - - angleWidget = new UBAngleWidget(); -} - - -UBGraphicsDelegateFrame::~UBGraphicsDelegateFrame() -{ -delete angleWidget; - // NOOP -} - -void UBGraphicsDelegateFrame::setAntiScale(qreal pAntiScale) -{ - mFrameWidth = mNominalFrameWidth * pAntiScale; - - QTransform tr; - tr.scale(pAntiScale, pAntiScale); - - mBottomRightResizeGripSvgItem->setTransform(tr); - mBottomResizeGripSvgItem->setTransform(tr); - mLeftResizeGripSvgItem->setTransform(tr); - mRightResizeGripSvgItem->setTransform(tr); - mTopResizeGripSvgItem->setTransform(tr); - mRotateButton->setTransform(tr); -} - - -void UBGraphicsDelegateFrame::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) -{ - Q_UNUSED(option); - Q_UNUSED(widget); - - QPainterPath path; - path.addRoundedRect(rect(), mFrameWidth / 2, mFrameWidth / 2); - - if (rect().width() > 1 && rect().height() > 1) - { - QPainterPath extruded; - extruded.addRect(rect().adjusted(mFrameWidth, mFrameWidth, (mFrameWidth * -1), (mFrameWidth * -1))); - path = path.subtracted(extruded); - } - - painter->fillPath(path, brush()); -} - - -QPainterPath UBGraphicsDelegateFrame::shape() const -{ - QPainterPath path; - - //We do not use the rounded rect here because we want the bottom right corner - //to be included in the frame (for resize grip handling : #702) - path.addRect(rect()); - - if (rect().width() > 0 && rect().height() > 0) - { - QPainterPath extruded; - extruded.addRect(rect().adjusted(mFrameWidth, mFrameWidth, mFrameWidth * -1, mFrameWidth * -1)); - path = path.subtracted(extruded); - } - - return path; -} - - -void UBGraphicsDelegateFrame::initializeTransform() -{ - QTransform itemTransform = delegated()->sceneTransform(); - QRectF itemRect = delegated()->boundingRect(); - QPointF topLeft = itemTransform.map(itemRect.topLeft()); - QPointF topRight = itemTransform.map(itemRect.topRight()); - QPointF bottomLeft = itemTransform.map(itemRect.bottomLeft()); - - qreal horizontalFlip = (topLeft.x() > topRight.x()) ? -1 : 1; - mMirrorX = horizontalFlip < 0 ; - if(horizontalFlip < 0){ - // why this is because of the way of calculating the translations that checks which side is the most is the - // nearest instead of checking which one is the left side. - QPointF tmp = topLeft; - topLeft = topRight; - topRight = tmp; - - // because of the calculation of the height is done by lenght and not deltaY - bottomLeft = itemTransform.map(itemRect.bottomRight()); - } - - qreal verticalFlip = (bottomLeft.y() < topLeft.y()) ? -1 : 1; - // not sure that is usefull - mMirrorY = verticalFlip < 0; - if(verticalFlip < 0 && !mMirrorX){ - topLeft = itemTransform.map(itemRect.bottomLeft()); - topRight = itemTransform.map(itemRect.bottomRight()); - bottomLeft = itemTransform.map(itemRect.topLeft()); - } - - QLineF topLine(topLeft, topRight); - QLineF leftLine(topLeft, bottomLeft); - qreal width = topLine.length(); - qreal height = leftLine.length(); - - mAngle = topLine.angle(); - - // the fact the the length is used we loose the horizontalFlip information - // a better way to do this is using DeltaX that preserve the direction information. - mTotalScaleX = (width / itemRect.width()) * horizontalFlip; - mTotalScaleY = height / itemRect.height() * verticalFlip; - - QTransform tr; - QPointF center = delegated()->boundingRect().center(); - tr.translate(center.x() * mTotalScaleX, center.y() * mTotalScaleY); - tr.rotate(-mAngle); - tr.translate(-center.x() * mTotalScaleX, -center.y() * mTotalScaleY); - tr.scale(mTotalScaleX, mTotalScaleY); - - mTotalTranslateX = delegated()->transform().dx() - tr.dx(); - mTotalTranslateY = delegated()->transform().dy() - tr.dy(); -} - - -void UBGraphicsDelegateFrame::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - mDelegate->startUndoStep(); - - mStartingPoint = event->scenePos(); - - initializeTransform(); - - mScaleX = 1; - mScaleY = 1; - mTranslateX = 0; - mTranslateY = 0; - mAngleOffset = 0; - - mInitialTransform = buildTransform(); - - mCurrentTool = toolFromPos(event->pos()); - - event->accept(); -} - -bool UBGraphicsDelegateFrame::canResizeBottomRight(qreal width, qreal height, qreal scaleFactor) -{ - bool res = false; - - if(!mMirrorX && !mMirrorX && ((width * scaleFactor) > 2*mFrameWidth && (height * scaleFactor) > 2*mFrameWidth)){ - res = true; - }else if(mMirrorX && !mMirrorY && (-width * scaleFactor) > 2*mFrameWidth && (height*scaleFactor) > 2*mFrameWidth){ - res = true; - }else if(!mMirrorX && mMirrorY && (width * scaleFactor) > 2*mFrameWidth && (-height*scaleFactor) > 2*mFrameWidth){ - res = true; - }else if(mMirrorX && mMirrorY && (-width * scaleFactor) > 2*mFrameWidth && (-height*scaleFactor) > 2*mFrameWidth){ - res = true; - } - - return res; -} - -void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - QLineF move(mStartingPoint, event->scenePos()); - qreal moveX = move.length() * cos((move.angle() - mAngle) * PI / 180); - qreal moveY = -move.length() * sin((move.angle() - mAngle) * PI / 180); - qreal width = delegated()->boundingRect().width() * mTotalScaleX; - qreal height = delegated()->boundingRect().height() * mTotalScaleY; - - if(mOperationMode == Scaling) - { - mTranslateX = moveX; - // Perform the resize - if (resizingBottomRight()) - { - // ----------------------------------------------------- - // ! We want to keep the aspect ratio with this resize ! - // ----------------------------------------------------- - qreal scaleX; - qreal scaleY; - - if(!mMirrorX){ - scaleX = (width + moveX) / width; - }else{ - scaleX = (width - moveX) / width; - } - - if(!mMirrorY){ - scaleY = (height + moveY) / height; - }else{ - scaleY = (height - moveY) / height; - } - - qreal scaleFactor = (scaleX + scaleY) / 2; - - // Do not allow resizing of image size under frame size - if (canResizeBottomRight(width, height, scaleFactor)) - { - if (mRespectRatio) - { - mScaleX = scaleFactor; - mScaleY = scaleFactor; - } - else - { - mScaleX = scaleX; - mScaleY = scaleY; - } - } - }else if (resizingLeft() || resizingRight()) - { - if(width != 0){ - qreal scaleX = 0.0; - if(resizingLeft()){ - scaleX = (width - moveX) / width; - }else if(resizingRight()){ - scaleX = (width + moveX) / width; - } - if(mDelegate->isFlippable() && qAbs(scaleX) != 0){ - if((qAbs(width * scaleX)) < 2*mFrameWidth){ - bool negative = (scaleX < 0)?true:false; - if(negative){ - if(mMirrorX) - scaleX = 2*mFrameWidth/width; - else - scaleX = -2*mFrameWidth/width; - }else{ - scaleX = -1; - } - } - mScaleX = scaleX; - }else if (scaleX > 1 || (width * scaleX) > 2 * mFrameWidth){ - mScaleX = scaleX; - if(resizingLeft()){ - mTranslateX = moveX; - } - } - } - }else if(resizingTop() || resizingBottom()){ - if(height != 0){ - qreal scaleY = 0.0; - if(resizingTop()){ - scaleY = (height - moveY) / height; - }else if(resizingBottom()){ - scaleY = (height + moveY) / height; - } - - if(mDelegate->isFlippable() && qAbs(scaleY) != 0){ - if((qAbs(height * scaleY)) < 2*mFrameWidth){ - bool negative = (scaleY < 0)?true:false; - if(negative){ - if(mMirrorY) - scaleY = 2*mFrameWidth/width; - else - scaleY = -2*mFrameWidth/width; - }else{ - scaleY = -1; - } - } - mScaleY = scaleY; - }else if (scaleY > 1 || (height * scaleY) > 2 * mFrameWidth) - { - mScaleY = scaleY; - if(resizingTop()){ - mTranslateY = moveY; - } - } - } - } - } - else if (mOperationMode == Resizing) - { - mTranslateX = moveX; - UBResizableGraphicsItem* resizableItem = dynamic_cast(delegated()); - - if (resizableItem) - { - QLineF mousePosDelta(delegated()->mapFromScene(event->lastScenePos()) - , delegated()->mapFromScene(event->scenePos())); - QSizeF incVector(0, 0); - - if (resizingBottomRight()) - { - incVector = QSizeF(mousePosDelta.dx(), mousePosDelta.dy()); - } - else if (resizingRight()) - { - incVector = QSizeF(mousePosDelta.dx(), 0); - } - else if (resizingBottom()) - { - incVector = QSizeF(0, mousePosDelta.dy()); - } - else if (resizingLeft()) - { - incVector = QSizeF(- mousePosDelta.dx(), 0); - } - else if (resizingTop()) - { - incVector = QSizeF(0, - mousePosDelta.dy()); - } - - QSizeF newSize = resizableItem->size() + incVector; - - resizableItem->resize(newSize); - } - } - - if (rotating()) - { - mTranslateX = 0; - mTranslateY = 0; - - QLineF startLine(sceneBoundingRect().center(), event->lastScenePos()); - QLineF currentLine(sceneBoundingRect().center(), event->scenePos()); - mAngle += startLine.angleTo(currentLine); - - if ((int)mAngle % 45 >= 45 - mAngleTolerance || (int)mAngle % 45 <= mAngleTolerance) - { - mAngle = qRound(mAngle / 45) * 45; - mAngleOffset += startLine.angleTo(currentLine); - if ((int)mAngleOffset % 360 > mAngleTolerance && (int)mAngleOffset % 360 < 360 - mAngleTolerance) - { - mAngle += mAngleOffset; - mAngleOffset = 0; - } - } - else if ((int)mAngle % 30 >= 30 - mAngleTolerance || (int)mAngle % 30 <= mAngleTolerance) - { - mAngle = qRound(mAngle / 30) * 30; - mAngleOffset += startLine.angleTo(currentLine); - if ((int)mAngleOffset % 360 > mAngleTolerance && (int)mAngleOffset % 360 < 360 - mAngleTolerance) - { - mAngle += mAngleOffset; - mAngleOffset = 0; - } - } - - if (!angleWidget->isVisible()) - angleWidget->show(); - - angleWidget->setText(QString::number((int)mAngle % 360)); - angleWidget->update(); - - } - else if (moving()) - { - mTranslateX = move.dx(); - mTranslateY = move.dy(); - } - - QTransform tr = buildTransform(); - - //TODO UB 4.x: Could find a better solution ? - if (resizingRight() || resizingBottom() || resizingBottomRight()) - { - QPointF ref; - if(!mMirrorX && !mMirrorY){ - ref = delegated()->boundingRect().topLeft(); - }else if(mMirrorX && !mMirrorY){ - ref = delegated()->boundingRect().topLeft(); - }else if(!mMirrorX && mMirrorY){ - ref = delegated()->boundingRect().topLeft(); - }else if(mMirrorX && mMirrorY){ - ref = delegated()->boundingRect().topRight(); - } - - // Map the item topleft point to the current mouse move transform - QPointF topLeft = tr.map(ref); - - // Map the item topleft point to the mouse press transform - QPointF fixedPoint = mInitialTransform.map(ref); - - // Update the translation coordinates - mTranslateX += fixedPoint.x() - topLeft.x(); - mTranslateY += fixedPoint.y() - topLeft.y(); - - // Update the transform - tr = buildTransform(); - } - else if (resizingTop() || resizingLeft()) - { - if (mOperationMode == Scaling) - { - QPointF bottomRight = tr.map(delegated()->boundingRect().bottomRight()); - QPointF fixedPoint = mInitialTransform.map(delegated()->boundingRect().bottomRight()); - mTranslateX += fixedPoint.x() - bottomRight.x(); - mTranslateY += fixedPoint.y() - bottomRight.y(); - } - else - { - QLineF vector; - if (resizingLeft()) - { - QPointF topRight1 = mInitialTransform.map(QPointF(delegated()->boundingRect().width() - moveX, 0)); - QPointF topRight2 = mInitialTransform.map(QPointF(delegated()->boundingRect().width(), 0)); - vector.setPoints(topRight1, topRight2); - } - else - { - QPointF bottomLeft1 = mInitialTransform.map(QPointF(0, delegated()->boundingRect().height() - moveY)); - QPointF bottomLeft2 = mInitialTransform.map(QPointF(0, delegated()->boundingRect().height())); - vector.setPoints(bottomLeft1, bottomLeft2); - } - mTranslateX = vector.dx(); - mTranslateY = vector.dy(); - } - tr = buildTransform(); - } - - delegated()->setTransform(tr); - event->accept(); -} - - -QTransform UBGraphicsDelegateFrame::buildTransform() -{ - QTransform tr; - QPointF center = delegated()->boundingRect().center(); - - // Translate - tr.translate(mTotalTranslateX + mTranslateX, mTotalTranslateY + mTranslateY); - - // Set angle - tr.translate(center.x() * mTotalScaleX * mScaleX, center.y() * mTotalScaleY * mScaleY); - tr.rotate(-mAngle); - tr.translate(-center.x() * mTotalScaleX * mScaleX, -center.y() * mTotalScaleY * mScaleY); - - // Scale - tr.scale(mTotalScaleX * mScaleX, mTotalScaleY * mScaleY); - return tr; -} - - -void UBGraphicsDelegateFrame::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - if (angleWidget->isVisible()) - angleWidget->hide(); - - updateResizeCursors(); - - mDelegate->commitUndoStep(); - mTotalScaleX *= mScaleX; - mTotalScaleY *= mScaleY; - mTotalTranslateX += mTranslateX; - mTotalTranslateY += mTranslateY; - event->accept(); - - mCurrentTool = None; - QGraphicsRectItem::mouseReleaseEvent(event); - - // Show the buttons - if(isResizing()){ - mResizing = false; - } - mDelegate->setButtonsVisible(true); -} - - -void UBGraphicsDelegateFrame::updateResizeCursors() -{ - QPixmap pix(":/images/cursors/resize.png"); - QTransform tr; - - tr.rotate(-mAngle); - QCursor resizeCursor = QCursor(pix.transformed(tr, Qt::SmoothTransformation), pix.width() / 2, pix.height() / 2); - mLeftResizeGrip->setCursor(resizeCursor); - mRightResizeGrip->setCursor(resizeCursor); - - tr.rotate(-90); - resizeCursor = QCursor(pix.transformed(tr, Qt::SmoothTransformation), pix.width() / 2, pix.height() / 2); - mBottomResizeGrip->setCursor(resizeCursor); - mTopResizeGrip->setCursor(resizeCursor); - - tr.rotate(-45); - resizeCursor = QCursor(pix.transformed(tr, Qt::SmoothTransformation), pix.width() / 2, pix.height() / 2); - mBottomRightResizeGrip->setCursor(resizeCursor); -} - - -void UBGraphicsDelegateFrame::setVisible(bool visible) -{ - mVisible = visible; - if (mVisible) - setBrush(QBrush(UBSettings::paletteColor)); - else - setBrush(Qt::NoBrush); -} - - -void UBGraphicsDelegateFrame::positionHandles() -{ - QRectF itemRect = delegated()->boundingRect(); - QTransform itemTransform = delegated()->sceneTransform(); - QPointF topLeft = itemTransform.map(itemRect.topLeft()); - QPointF topRight = itemTransform.map(itemRect.topRight()); - QPointF bottomLeft = itemTransform.map(itemRect.bottomLeft()); - QPointF bottomRight = itemTransform.map(itemRect.bottomRight()); - QPointF center = itemTransform.map(itemRect.center()); - int rotateHeight = QLineF(topLeft, bottomLeft).length(); - - // Handle the mirroring - if(topLeft.x() > topRight.x()){ - QPointF topTmp = topRight; - QPointF bottomTmp = bottomRight; - topRight = topLeft; - topLeft = topTmp; - bottomRight = bottomLeft; - bottomLeft = bottomTmp; - } - - if(bottomLeft.y() > topLeft.y()){ - QPointF leftTmp = bottomLeft; - QPointF rightTmp = bottomRight; - bottomLeft = topLeft; - topLeft = leftTmp; - bottomRight = topRight; - topRight = rightTmp; - } - - QLineF topLine(topLeft, topRight); - qreal angle = topLine.angle(); - qreal width = topLine.length(); - - QLineF leftLine(topLeft, bottomLeft); - qreal height = leftLine.length(); - - int h = rotating()?rotateHeight:height; - - if (mVisible) - { - setRect(center.x() - mFrameWidth - width / 2, center.y() - mFrameWidth - h / 2, width + 2 * mFrameWidth, h + 2 * mFrameWidth); - } - else - { - setRect(center.x() - width / 2, center.y() - h / 2, width, h); - } - - resetTransform(); - translate(center.x(), center.y()); - rotate(-angle); - translate(-center.x(), -center.y()); - - mBottomRightResizeGripSvgItem->setParentItem(this); - mBottomResizeGripSvgItem->setParentItem(this); - mLeftResizeGripSvgItem->setParentItem(this); - mRightResizeGripSvgItem->setParentItem(this); - mTopResizeGripSvgItem->setParentItem(this); - mRotateButton->setParentItem(this); - - mBottomRightResizeGrip->setParentItem(this); - mBottomResizeGrip->setParentItem(this); - mLeftResizeGrip->setParentItem(this); - mRightResizeGrip->setParentItem(this); - mTopResizeGrip->setParentItem(this); - - QRectF brRect = mBottomRightResizeGripSvgItem->mapRectToParent(mBottomRightResizeGripSvgItem->boundingRect()); - QRectF bRect = mBottomResizeGripSvgItem->mapRectToParent(mBottomResizeGripSvgItem->boundingRect()); - QRectF lRect = mLeftResizeGripSvgItem->mapRectToParent(mLeftResizeGripSvgItem->boundingRect()); - QRectF rRect = mRightResizeGripSvgItem->mapRectToParent(mRightResizeGripSvgItem->boundingRect()); - QRectF trRect = mTopResizeGripSvgItem->mapRectToParent(mTopResizeGripSvgItem->boundingRect()); - - mBottomRightResizeGripSvgItem->setPos(rect().right() - brRect.width(), rect().bottom() - brRect.height()); - mBottomResizeGripSvgItem->setPos(rect().center().x() - bRect.width() / 2, rect().bottom() - bRect.height()); - - mLeftResizeGripSvgItem->setPos(rect().left(), rect().center().y() - lRect.height() / 2); - mRightResizeGripSvgItem->setPos(rect().right() - rRect.width(), rect().center().y() - rRect.height() / 2); - - mTopResizeGripSvgItem->setPos(rect().center().x() - trRect.width() / 2, rect().y()); - mRotateButton->setPos(rect().right() - mFrameWidth - 5, rect().top() + 5); - - mBottomRightResizeGrip->setRect(bottomRightResizeGripRect()); - mBottomResizeGrip->setRect(bottomResizeGripRect()); - mLeftResizeGrip->setRect(leftResizeGripRect()); - mRightResizeGrip->setRect(rightResizeGripRect()); - mTopResizeGrip->setRect(topResizeGripRect()); - - QVariant vLocked = delegated()->data(UBGraphicsItemData::ItemLocked); - bool isLocked = (vLocked.isValid() && vLocked.toBool()); - - mBottomRightResizeGripSvgItem->setVisible(!isLocked); - mBottomResizeGripSvgItem->setVisible(!isLocked); - mLeftResizeGripSvgItem->setVisible(!isLocked); - mRightResizeGripSvgItem->setVisible(!isLocked); - mTopResizeGripSvgItem->setVisible(!isLocked); - mRotateButton->setVisible(mDelegate->canRotate() && !isLocked); - - mBottomRightResizeGrip->setVisible(!isLocked); - mBottomResizeGrip->setVisible(!isLocked); - mLeftResizeGrip->setVisible(!isLocked); - mRightResizeGrip->setVisible(!isLocked); - mTopResizeGrip->setVisible(!isLocked); - - if (isLocked) - { - QColor baseColor = UBSettings::paletteColor; - baseColor.setAlphaF(baseColor.alphaF() / 3); - setBrush(QBrush(baseColor)); - } - else - { - setBrush(QBrush(UBSettings::paletteColor)); - } - - //make frame interact like delegated item when selected. Maybe should be deleted if selection logic will change - setZValue(delegated()->zValue()); -} - - -QGraphicsItem* UBGraphicsDelegateFrame::delegated() -{ - return mDelegate->delegated(); -} - -UBGraphicsDelegateFrame::FrameTool UBGraphicsDelegateFrame::toolFromPos(QPointF pos) -{ - if(mDelegate->isLocked()) - return None; - else if (bottomRightResizeGripRect().contains(pos)) - return ResizeBottomRight; - else if (bottomResizeGripRect().contains(pos)){ - if(mMirrorY){ - return ResizeTop; - }else{ - return ResizeBottom; - } - } - else if (leftResizeGripRect().contains(pos)){ - if(mMirrorX){ - return ResizeRight; - }else{ - return ResizeLeft; - } - return ResizeLeft; - } - else if (rightResizeGripRect().contains(pos)){ - if(mMirrorX){ - return ResizeLeft; - }else{ - return ResizeRight; - } - } - else if (topResizeGripRect().contains(pos)){ - if(mMirrorY){ - return ResizeBottom; - }else{ - return ResizeTop; - } - } - else if (rotateButtonBounds().contains(pos) && mDelegate && mDelegate->canRotate()) - return Rotate; - else - return Move; -} - - -QRectF UBGraphicsDelegateFrame::bottomRightResizeGripRect() const -{ - return QRectF(rect().right() - mFrameWidth, rect().bottom() - mFrameWidth, mFrameWidth, mFrameWidth); -} - - -QRectF UBGraphicsDelegateFrame::bottomResizeGripRect() const -{ - return QRectF(rect().center().x() - mFrameWidth / 2, rect().bottom() - mFrameWidth, mFrameWidth, mFrameWidth); -} - - -QRectF UBGraphicsDelegateFrame::leftResizeGripRect() const -{ - return QRectF(rect().left(), rect().center().y() - mFrameWidth / 2, mFrameWidth, mFrameWidth); -} - - -QRectF UBGraphicsDelegateFrame::rightResizeGripRect() const -{ - return QRectF(rect().right() - mFrameWidth, rect().center().y() - mFrameWidth / 2, mFrameWidth, mFrameWidth); -} - - -QRectF UBGraphicsDelegateFrame::topResizeGripRect() const -{ - return QRectF(rect().center().x() - mFrameWidth / 2, rect().top(), mFrameWidth, mFrameWidth); -} - - -QRectF UBGraphicsDelegateFrame::rotateButtonBounds() const -{ - return QRectF(rect().right()- mFrameWidth, rect().top(), mFrameWidth, mFrameWidth); -} - -void UBGraphicsDelegateFrame::refreshGeometry() -{ - // Here we want to have the left on the left, the right on the right, the top on the top and the bottom on the bottom! - QRectF itemRect = delegated()->boundingRect(); - QTransform itemTransform = delegated()->sceneTransform(); - QPointF topLeft = itemTransform.map(itemRect.topLeft()); - QPointF topRight = itemTransform.map(itemRect.topRight()); - QPointF bottomLeft = itemTransform.map(itemRect.bottomLeft()); - - QLineF topLine(topLeft, topRight); - qreal width = topLine.length(); - QLineF leftLine(topLeft, bottomLeft); - qreal height = leftLine.length(); - setRect(topRight.x() - mFrameWidth, topLeft.y() - mFrameWidth, width + 2*mFrameWidth, height + 2*mFrameWidth); -} +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ + +#include "UBGraphicsDelegateFrame.h" + +#include +#include + +#include "core/UBApplication.h" +#include "core/UBSettings.h" + +#include "domain/UBGraphicsItemDelegate.h" +#include "domain/UBGraphicsScene.h" +#include "domain/UBGraphicsProxyWidget.h" + +#include "gui/UBResources.h" + +#include "core/memcheck.h" + +UBGraphicsDelegateFrame::UBGraphicsDelegateFrame(UBGraphicsItemDelegate* pDelegate, QRectF pRect, qreal pFrameWidth, bool respectRatio) + : QGraphicsRectItem(), QObject(pDelegate) + , mCurrentTool(None) + , mDelegate(pDelegate) + , mVisible(true) + , mFrameWidth(pFrameWidth) + , mNominalFrameWidth(pFrameWidth) + , mRespectRatio(respectRatio) + , mAngle(0) + , mAngleOffset(0) + , mTotalScaleX(-1) + , mTotalScaleY(-1) + , mTranslateX(0) + , mTranslateY(0) + , mTotalTranslateX(0) + , mTotalTranslateY(0) + , mOperationMode(Scaling) + , mMirrorX(false) + , mMirrorY(false) +{ + mAngleTolerance = UBSettings::settings()->angleTolerance->get().toReal(); + + setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); + + setAcceptedMouseButtons(Qt::LeftButton); + setRect(pRect.adjusted(mFrameWidth, mFrameWidth, mFrameWidth * -1, mFrameWidth * -1)); + + setBrush(QBrush(UBSettings::paletteColor)); + setPen(Qt::NoPen); + setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); + + mBottomRightResizeGripSvgItem = new QGraphicsSvgItem(":/images/resize.svg", this); + mBottomResizeGripSvgItem = new QGraphicsSvgItem(":/images/resizeBottom.svg", this); + mLeftResizeGripSvgItem = new QGraphicsSvgItem(":/images/resizeLeft.svg", this); + mRightResizeGripSvgItem = new QGraphicsSvgItem(":/images/resizeRight.svg", this); + mTopResizeGripSvgItem = new QGraphicsSvgItem(":/images/resizeTop.svg", this); + + mBottomRightResizeGrip = new QGraphicsRectItem(this); + mBottomRightResizeGrip->setPen(Qt::NoPen); + mBottomResizeGrip = new QGraphicsRectItem(this); + mBottomResizeGrip->setPen(Qt::NoPen); + mLeftResizeGrip = new QGraphicsRectItem(this); + mLeftResizeGrip->setToolTip("left"); + mLeftResizeGrip->setPen(Qt::NoPen); + mRightResizeGrip = new QGraphicsRectItem(this); + mRightResizeGrip->setPen(Qt::NoPen); + mRightResizeGrip->setToolTip("Right"); + mTopResizeGrip = new QGraphicsRectItem(this); + mTopResizeGrip->setPen(Qt::NoPen); + + mRotateButton = new QGraphicsSvgItem(":/images/rotate.svg", this); + mRotateButton->setCursor(UBResources::resources()->rotateCursor); + mRotateButton->setVisible(mDelegate->canRotate()); + + updateResizeCursors(); + + setAntiScale(1.0); + + positionHandles(); + + this->setAcceptHoverEvents(true); + + angleWidget = new UBAngleWidget(); +} + + +UBGraphicsDelegateFrame::~UBGraphicsDelegateFrame() +{ +delete angleWidget; + // NOOP +} + +void UBGraphicsDelegateFrame::setAntiScale(qreal pAntiScale) +{ + mFrameWidth = mNominalFrameWidth * pAntiScale; + + QTransform tr; + tr.scale(pAntiScale, pAntiScale); + + mBottomRightResizeGripSvgItem->setTransform(tr); + mBottomResizeGripSvgItem->setTransform(tr); + mLeftResizeGripSvgItem->setTransform(tr); + mRightResizeGripSvgItem->setTransform(tr); + mTopResizeGripSvgItem->setTransform(tr); + mRotateButton->setTransform(tr); +} + + +void UBGraphicsDelegateFrame::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + Q_UNUSED(option); + Q_UNUSED(widget); + + QPainterPath path; + path.addRoundedRect(rect(), mFrameWidth / 2, mFrameWidth / 2); + + if (rect().width() > 1 && rect().height() > 1) + { + QPainterPath extruded; + extruded.addRect(rect().adjusted(mFrameWidth, mFrameWidth, (mFrameWidth * -1), (mFrameWidth * -1))); + path = path.subtracted(extruded); + } + + painter->fillPath(path, brush()); +} + + +QPainterPath UBGraphicsDelegateFrame::shape() const +{ + QPainterPath path; + + //We do not use the rounded rect here because we want the bottom right corner + //to be included in the frame (for resize grip handling : #702) + path.addRect(rect()); + + if (rect().width() > 0 && rect().height() > 0) + { + QPainterPath extruded; + extruded.addRect(rect().adjusted(mFrameWidth, mFrameWidth, mFrameWidth * -1, mFrameWidth * -1)); + path = path.subtracted(extruded); + } + + return path; +} + + +void UBGraphicsDelegateFrame::initializeTransform() +{ + QTransform itemTransform = delegated()->sceneTransform(); + QRectF itemRect = delegated()->boundingRect(); + QPointF topLeft = itemTransform.map(itemRect.topLeft()); + QPointF topRight = itemTransform.map(itemRect.topRight()); + QPointF bottomLeft = itemTransform.map(itemRect.bottomLeft()); + + qreal horizontalFlip = (topLeft.x() > topRight.x()) ? -1 : 1; + mMirrorX = horizontalFlip < 0 ; + if(horizontalFlip < 0){ + // why this is because of the way of calculating the translations that checks which side is the most is the + // nearest instead of checking which one is the left side. + QPointF tmp = topLeft; + topLeft = topRight; + topRight = tmp; + + // because of the calculation of the height is done by lenght and not deltaY + bottomLeft = itemTransform.map(itemRect.bottomRight()); + } + + qreal verticalFlip = (bottomLeft.y() < topLeft.y()) ? -1 : 1; + // not sure that is usefull + mMirrorY = verticalFlip < 0; + if(verticalFlip < 0 && !mMirrorX){ + topLeft = itemTransform.map(itemRect.bottomLeft()); + topRight = itemTransform.map(itemRect.bottomRight()); + bottomLeft = itemTransform.map(itemRect.topLeft()); + } + + QLineF topLine(topLeft, topRight); + QLineF leftLine(topLeft, bottomLeft); + qreal width = topLine.length(); + qreal height = leftLine.length(); + + mAngle = topLine.angle(); + + // the fact the the length is used we loose the horizontalFlip information + // a better way to do this is using DeltaX that preserve the direction information. + mTotalScaleX = (width / itemRect.width()) * horizontalFlip; + mTotalScaleY = height / itemRect.height() * verticalFlip; + + QTransform tr; + QPointF center = delegated()->boundingRect().center(); + tr.translate(center.x() * mTotalScaleX, center.y() * mTotalScaleY); + tr.rotate(-mAngle); + tr.translate(-center.x() * mTotalScaleX, -center.y() * mTotalScaleY); + tr.scale(mTotalScaleX, mTotalScaleY); + + mTotalTranslateX = delegated()->transform().dx() - tr.dx(); + mTotalTranslateY = delegated()->transform().dy() - tr.dy(); +} + + +void UBGraphicsDelegateFrame::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + mDelegate->startUndoStep(); + + mStartingPoint = event->scenePos(); + + initializeTransform(); + + mScaleX = 1; + mScaleY = 1; + mTranslateX = 0; + mTranslateY = 0; + mAngleOffset = 0; + + mInitialTransform = buildTransform(); + + mCurrentTool = toolFromPos(event->pos()); + + event->accept(); +} + +bool UBGraphicsDelegateFrame::canResizeBottomRight(qreal width, qreal height, qreal scaleFactor) +{ + bool res = false; + + if(!mMirrorX && !mMirrorX && ((width * scaleFactor) > 2*mFrameWidth && (height * scaleFactor) > 2*mFrameWidth)){ + res = true; + }else if(mMirrorX && !mMirrorY && (-width * scaleFactor) > 2*mFrameWidth && (height*scaleFactor) > 2*mFrameWidth){ + res = true; + }else if(!mMirrorX && mMirrorY && (width * scaleFactor) > 2*mFrameWidth && (-height*scaleFactor) > 2*mFrameWidth){ + res = true; + }else if(mMirrorX && mMirrorY && (-width * scaleFactor) > 2*mFrameWidth && (-height*scaleFactor) > 2*mFrameWidth){ + res = true; + } + + return res; +} + +void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + QLineF move(mStartingPoint, event->scenePos()); + qreal moveX = move.length() * cos((move.angle() - mAngle) * PI / 180); + qreal moveY = -move.length() * sin((move.angle() - mAngle) * PI / 180); + qreal width = delegated()->boundingRect().width() * mTotalScaleX; + qreal height = delegated()->boundingRect().height() * mTotalScaleY; + + if(mOperationMode == Scaling) + { + mTranslateX = moveX; + // Perform the resize + if (resizingBottomRight()) + { + // ----------------------------------------------------- + // ! We want to keep the aspect ratio with this resize ! + // ----------------------------------------------------- + qreal scaleX; + qreal scaleY; + + if(!mMirrorX){ + scaleX = (width + moveX) / width; + }else{ + scaleX = (width - moveX) / width; + } + + if(!mMirrorY){ + scaleY = (height + moveY) / height; + }else{ + scaleY = (height - moveY) / height; + } + + qreal scaleFactor = (scaleX + scaleY) / 2; + + // Do not allow resizing of image size under frame size + if (canResizeBottomRight(width, height, scaleFactor)) + { + if (mRespectRatio) + { + mScaleX = scaleFactor; + mScaleY = scaleFactor; + } + else + { + mScaleX = scaleX; + mScaleY = scaleY; + } + } + }else if (resizingLeft() || resizingRight()) + { + if(width != 0){ + qreal scaleX = 0.0; + if(resizingLeft()){ + scaleX = (width - moveX) / width; + }else if(resizingRight()){ + scaleX = (width + moveX) / width; + } + if(mDelegate->isFlippable() && qAbs(scaleX) != 0){ + if((qAbs(width * scaleX)) < 2*mFrameWidth){ + bool negative = (scaleX < 0)?true:false; + if(negative){ + if(mMirrorX) + scaleX = 2*mFrameWidth/width; + else + scaleX = -2*mFrameWidth/width; + }else{ + scaleX = -1; + } + } + mScaleX = scaleX; + }else if (scaleX > 1 || (width * scaleX) > 2 * mFrameWidth){ + mScaleX = scaleX; + if(resizingLeft()){ + mTranslateX = moveX; + } + } + } + }else if(resizingTop() || resizingBottom()){ + if(height != 0){ + qreal scaleY = 0.0; + if(resizingTop()){ + scaleY = (height - moveY) / height; + }else if(resizingBottom()){ + scaleY = (height + moveY) / height; + } + + if(mDelegate->isFlippable() && qAbs(scaleY) != 0){ + if((qAbs(height * scaleY)) < 2*mFrameWidth){ + bool negative = (scaleY < 0)?true:false; + if(negative){ + if(mMirrorY) + scaleY = 2*mFrameWidth/width; + else + scaleY = -2*mFrameWidth/width; + }else{ + scaleY = -1; + } + } + mScaleY = scaleY; + }else if (scaleY > 1 || (height * scaleY) > 2 * mFrameWidth) + { + mScaleY = scaleY; + if(resizingTop()){ + mTranslateY = moveY; + } + } + } + } + } + else if (mOperationMode == Resizing) + { + mTranslateX = moveX; + UBResizableGraphicsItem* resizableItem = dynamic_cast(delegated()); + + if (resizableItem) + { + QLineF mousePosDelta(delegated()->mapFromScene(event->lastScenePos()) + , delegated()->mapFromScene(event->scenePos())); + QSizeF incVector(0, 0); + + if (resizingBottomRight()) + { + incVector = QSizeF(mousePosDelta.dx(), mousePosDelta.dy()); + } + else if (resizingRight()) + { + incVector = QSizeF(mousePosDelta.dx(), 0); + } + else if (resizingBottom()) + { + incVector = QSizeF(0, mousePosDelta.dy()); + } + else if (resizingLeft()) + { + incVector = QSizeF(- mousePosDelta.dx(), 0); + } + else if (resizingTop()) + { + incVector = QSizeF(0, - mousePosDelta.dy()); + } + + QSizeF newSize = resizableItem->size() + incVector; + + if (!(mDelegate->getToolBarItem()->isVisibleOnBoard() + && (newSize.width() < mDelegate->getToolBarItem()->minWidth() / mDelegate->antiScaleRatio() + || newSize.height() < mDelegate->getToolBarItem()->minWidth() / mDelegate->antiScaleRatio() * 3/4))) + resizableItem->resize(newSize); + } + } + + if (rotating()) + { + mTranslateX = 0; + mTranslateY = 0; + + QLineF startLine(sceneBoundingRect().center(), event->lastScenePos()); + QLineF currentLine(sceneBoundingRect().center(), event->scenePos()); + mAngle += startLine.angleTo(currentLine); + + if ((int)mAngle % 45 >= 45 - mAngleTolerance || (int)mAngle % 45 <= mAngleTolerance) + { + mAngle = qRound(mAngle / 45) * 45; + mAngleOffset += startLine.angleTo(currentLine); + if ((int)mAngleOffset % 360 > mAngleTolerance && (int)mAngleOffset % 360 < 360 - mAngleTolerance) + { + mAngle += mAngleOffset; + mAngleOffset = 0; + } + } + else if ((int)mAngle % 30 >= 30 - mAngleTolerance || (int)mAngle % 30 <= mAngleTolerance) + { + mAngle = qRound(mAngle / 30) * 30; + mAngleOffset += startLine.angleTo(currentLine); + if ((int)mAngleOffset % 360 > mAngleTolerance && (int)mAngleOffset % 360 < 360 - mAngleTolerance) + { + mAngle += mAngleOffset; + mAngleOffset = 0; + } + } + + if (!angleWidget->isVisible()) + angleWidget->show(); + + angleWidget->setText(QString::number((int)mAngle % 360)); + angleWidget->update(); + + } + else if (moving()) + { + mTranslateX = move.dx(); + mTranslateY = move.dy(); + } + + QTransform tr = buildTransform(); + + //TODO UB 4.x: Could find a better solution ? + if (resizingRight() || resizingBottom() || resizingBottomRight()) + { + QPointF ref; + if(!mMirrorX && !mMirrorY){ + ref = delegated()->boundingRect().topLeft(); + }else if(mMirrorX && !mMirrorY){ + ref = delegated()->boundingRect().topLeft(); + }else if(!mMirrorX && mMirrorY){ + ref = delegated()->boundingRect().topLeft(); + }else if(mMirrorX && mMirrorY){ + ref = delegated()->boundingRect().topRight(); + } + + // Map the item topleft point to the current mouse move transform + QPointF topLeft = tr.map(ref); + + // Map the item topleft point to the mouse press transform + QPointF fixedPoint = mInitialTransform.map(ref); + + // Update the translation coordinates + mTranslateX += fixedPoint.x() - topLeft.x(); + mTranslateY += fixedPoint.y() - topLeft.y(); + + // Update the transform + tr = buildTransform(); + } + else if (resizingTop() || resizingLeft()) + { + if (mOperationMode == Scaling) + { + QPointF bottomRight = tr.map(delegated()->boundingRect().bottomRight()); + QPointF fixedPoint = mInitialTransform.map(delegated()->boundingRect().bottomRight()); + mTranslateX += fixedPoint.x() - bottomRight.x(); + mTranslateY += fixedPoint.y() - bottomRight.y(); + } + else + { + QLineF vector; + if (resizingLeft()) + { + QPointF topRight1 = mInitialTransform.map(QPointF(delegated()->boundingRect().width() - moveX, 0)); + QPointF topRight2 = mInitialTransform.map(QPointF(delegated()->boundingRect().width(), 0)); + vector.setPoints(topRight1, topRight2); + } + else + { + QPointF bottomLeft1 = mInitialTransform.map(QPointF(0, delegated()->boundingRect().height() - moveY)); + QPointF bottomLeft2 = mInitialTransform.map(QPointF(0, delegated()->boundingRect().height())); + vector.setPoints(bottomLeft1, bottomLeft2); + } + mTranslateX = vector.dx(); + mTranslateY = vector.dy(); + } + tr = buildTransform(); + } + + delegated()->setTransform(tr); + event->accept(); +} + + +QTransform UBGraphicsDelegateFrame::buildTransform() +{ + QTransform tr; + QPointF center = delegated()->boundingRect().center(); + + // Translate + tr.translate(mTotalTranslateX + mTranslateX, mTotalTranslateY + mTranslateY); + + // Set angle + tr.translate(center.x() * mTotalScaleX * mScaleX, center.y() * mTotalScaleY * mScaleY); + tr.rotate(-mAngle); + tr.translate(-center.x() * mTotalScaleX * mScaleX, -center.y() * mTotalScaleY * mScaleY); + + // Scale + tr.scale(mTotalScaleX * mScaleX, mTotalScaleY * mScaleY); + return tr; +} + + +void UBGraphicsDelegateFrame::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (angleWidget->isVisible()) + angleWidget->hide(); + + updateResizeCursors(); + + mDelegate->commitUndoStep(); + mTotalScaleX *= mScaleX; + mTotalScaleY *= mScaleY; + mTotalTranslateX += mTranslateX; + mTotalTranslateY += mTranslateY; + event->accept(); + + mCurrentTool = None; + QGraphicsRectItem::mouseReleaseEvent(event); + + // Show the buttons + if(isResizing()){ + mResizing = false; + } + mDelegate->setButtonsVisible(true); +} + + +void UBGraphicsDelegateFrame::updateResizeCursors() +{ + QPixmap pix(":/images/cursors/resize.png"); + QTransform tr; + + tr.rotate(-mAngle); + QCursor resizeCursor = QCursor(pix.transformed(tr, Qt::SmoothTransformation), pix.width() / 2, pix.height() / 2); + mLeftResizeGrip->setCursor(resizeCursor); + mRightResizeGrip->setCursor(resizeCursor); + + tr.rotate(-90); + resizeCursor = QCursor(pix.transformed(tr, Qt::SmoothTransformation), pix.width() / 2, pix.height() / 2); + mBottomResizeGrip->setCursor(resizeCursor); + mTopResizeGrip->setCursor(resizeCursor); + + tr.rotate(-45); + resizeCursor = QCursor(pix.transformed(tr, Qt::SmoothTransformation), pix.width() / 2, pix.height() / 2); + mBottomRightResizeGrip->setCursor(resizeCursor); +} + + +void UBGraphicsDelegateFrame::setVisible(bool visible) +{ + mVisible = visible; + if (mVisible) + setBrush(QBrush(UBSettings::paletteColor)); + else + setBrush(Qt::NoBrush); +} + + +void UBGraphicsDelegateFrame::positionHandles() +{ + QRectF itemRect = delegated()->boundingRect(); + + if (mDelegate->getToolBarItem()->isVisibleOnBoard() + && mDelegate->getToolBarItem()->isShifting()) + itemRect.setHeight(itemRect.height() + mDelegate->getToolBarItem()->rect().height() * mDelegate->antiScaleRatio() * 1.1); + + QTransform itemTransform = delegated()->sceneTransform(); + QPointF topLeft = itemTransform.map(itemRect.topLeft()); + QPointF topRight = itemTransform.map(itemRect.topRight()); + QPointF bottomLeft = itemTransform.map(itemRect.bottomLeft()); + QPointF bottomRight = itemTransform.map(itemRect.bottomRight()); + QPointF center = itemTransform.map(itemRect.center()); + int rotateHeight = QLineF(topLeft, bottomLeft).length(); + + // Handle the mirroring + if(topLeft.x() > topRight.x()){ + QPointF topTmp = topRight; + QPointF bottomTmp = bottomRight; + topRight = topLeft; + topLeft = topTmp; + bottomRight = bottomLeft; + bottomLeft = bottomTmp; + } + + if(bottomLeft.y() > topLeft.y()){ + QPointF leftTmp = bottomLeft; + QPointF rightTmp = bottomRight; + bottomLeft = topLeft; + topLeft = leftTmp; + bottomRight = topRight; + topRight = rightTmp; + } + + QLineF topLine(topLeft, topRight); + qreal angle = topLine.angle(); + qreal width = topLine.length(); + + QLineF leftLine(topLeft, bottomLeft); + qreal height = leftLine.length(); + + int h = rotating()?rotateHeight:height; + + if (mVisible) + { + setRect(center.x() - mFrameWidth - width / 2, center.y() - mFrameWidth - h / 2, width + 2 * mFrameWidth, h + 2 * mFrameWidth); + } + else + { + setRect(center.x() - width / 2, center.y() - h / 2, width, h); + } + + resetTransform(); + translate(center.x(), center.y()); + rotate(-angle); + translate(-center.x(), -center.y()); + + mBottomRightResizeGripSvgItem->setParentItem(this); + mBottomResizeGripSvgItem->setParentItem(this); + mLeftResizeGripSvgItem->setParentItem(this); + mRightResizeGripSvgItem->setParentItem(this); + mTopResizeGripSvgItem->setParentItem(this); + mRotateButton->setParentItem(this); + + mBottomRightResizeGrip->setParentItem(this); + mBottomResizeGrip->setParentItem(this); + mLeftResizeGrip->setParentItem(this); + mRightResizeGrip->setParentItem(this); + mTopResizeGrip->setParentItem(this); + + QRectF brRect = mBottomRightResizeGripSvgItem->mapRectToParent(mBottomRightResizeGripSvgItem->boundingRect()); + QRectF bRect = mBottomResizeGripSvgItem->mapRectToParent(mBottomResizeGripSvgItem->boundingRect()); + QRectF lRect = mLeftResizeGripSvgItem->mapRectToParent(mLeftResizeGripSvgItem->boundingRect()); + QRectF rRect = mRightResizeGripSvgItem->mapRectToParent(mRightResizeGripSvgItem->boundingRect()); + QRectF trRect = mTopResizeGripSvgItem->mapRectToParent(mTopResizeGripSvgItem->boundingRect()); + + mBottomRightResizeGripSvgItem->setPos(rect().right() - brRect.width(), rect().bottom() - brRect.height()); + mBottomResizeGripSvgItem->setPos(rect().center().x() - bRect.width() / 2, rect().bottom() - bRect.height()); + + mLeftResizeGripSvgItem->setPos(rect().left(), rect().center().y() - lRect.height() / 2); + mRightResizeGripSvgItem->setPos(rect().right() - rRect.width(), rect().center().y() - rRect.height() / 2); + + mTopResizeGripSvgItem->setPos(rect().center().x() - trRect.width() / 2, rect().y()); + mRotateButton->setPos(rect().right() - mFrameWidth - 5, rect().top() + 5); + + mBottomRightResizeGrip->setRect(bottomRightResizeGripRect()); + mBottomResizeGrip->setRect(bottomResizeGripRect()); + mLeftResizeGrip->setRect(leftResizeGripRect()); + mRightResizeGrip->setRect(rightResizeGripRect()); + mTopResizeGrip->setRect(topResizeGripRect()); + + QVariant vLocked = delegated()->data(UBGraphicsItemData::ItemLocked); + bool isLocked = (vLocked.isValid() && vLocked.toBool()); + + mBottomRightResizeGripSvgItem->setVisible(!isLocked); + mBottomResizeGripSvgItem->setVisible(!isLocked); + mLeftResizeGripSvgItem->setVisible(!isLocked); + mRightResizeGripSvgItem->setVisible(!isLocked); + mTopResizeGripSvgItem->setVisible(!isLocked); + mRotateButton->setVisible(mDelegate->canRotate() && !isLocked); + + mBottomRightResizeGrip->setVisible(!isLocked); + mBottomResizeGrip->setVisible(!isLocked); + mLeftResizeGrip->setVisible(!isLocked); + mRightResizeGrip->setVisible(!isLocked); + mTopResizeGrip->setVisible(!isLocked); + + if (isLocked) + { + QColor baseColor = UBSettings::paletteColor; + baseColor.setAlphaF(baseColor.alphaF() / 3); + setBrush(QBrush(baseColor)); + } + else + { + setBrush(QBrush(UBSettings::paletteColor)); + } + + //make frame interact like delegated item when selected. Maybe should be deleted if selection logic will change + setZValue(delegated()->zValue()); +} + + +QGraphicsItem* UBGraphicsDelegateFrame::delegated() +{ + return mDelegate->delegated(); +} + +UBGraphicsDelegateFrame::FrameTool UBGraphicsDelegateFrame::toolFromPos(QPointF pos) +{ + if(mDelegate->isLocked()) + return None; + else if (bottomRightResizeGripRect().contains(pos)) + return ResizeBottomRight; + else if (bottomResizeGripRect().contains(pos)){ + if(mMirrorY){ + return ResizeTop; + }else{ + return ResizeBottom; + } + } + else if (leftResizeGripRect().contains(pos)){ + if(mMirrorX){ + return ResizeRight; + }else{ + return ResizeLeft; + } + return ResizeLeft; + } + else if (rightResizeGripRect().contains(pos)){ + if(mMirrorX){ + return ResizeLeft; + }else{ + return ResizeRight; + } + } + else if (topResizeGripRect().contains(pos)){ + if(mMirrorY){ + return ResizeBottom; + }else{ + return ResizeTop; + } + } + else if (rotateButtonBounds().contains(pos) && mDelegate && mDelegate->canRotate()) + return Rotate; + else + return Move; +} + + +QRectF UBGraphicsDelegateFrame::bottomRightResizeGripRect() const +{ + return QRectF(rect().right() - mFrameWidth, rect().bottom() - mFrameWidth, mFrameWidth, mFrameWidth); +} + + +QRectF UBGraphicsDelegateFrame::bottomResizeGripRect() const +{ + return QRectF(rect().center().x() - mFrameWidth / 2, rect().bottom() - mFrameWidth, mFrameWidth, mFrameWidth); +} + + +QRectF UBGraphicsDelegateFrame::leftResizeGripRect() const +{ + return QRectF(rect().left(), rect().center().y() - mFrameWidth / 2, mFrameWidth, mFrameWidth); +} + + +QRectF UBGraphicsDelegateFrame::rightResizeGripRect() const +{ + return QRectF(rect().right() - mFrameWidth, rect().center().y() - mFrameWidth / 2, mFrameWidth, mFrameWidth); +} + + +QRectF UBGraphicsDelegateFrame::topResizeGripRect() const +{ + return QRectF(rect().center().x() - mFrameWidth / 2, rect().top(), mFrameWidth, mFrameWidth); +} + + +QRectF UBGraphicsDelegateFrame::rotateButtonBounds() const +{ + return QRectF(rect().right()- mFrameWidth, rect().top(), mFrameWidth, mFrameWidth); +} + +void UBGraphicsDelegateFrame::refreshGeometry() +{ + // Here we want to have the left on the left, the right on the right, the top on the top and the bottom on the bottom! + QRectF itemRect = delegated()->boundingRect(); + QTransform itemTransform = delegated()->sceneTransform(); + QPointF topLeft = itemTransform.map(itemRect.topLeft()); + QPointF topRight = itemTransform.map(itemRect.topRight()); + QPointF bottomLeft = itemTransform.map(itemRect.bottomLeft()); + + QLineF topLine(topLeft, topRight); + qreal width = topLine.length(); + QLineF leftLine(topLeft, bottomLeft); + qreal height = leftLine.length(); + setRect(topRight.x() - mFrameWidth, topLeft.y() - mFrameWidth, width + 2*mFrameWidth, height + 2*mFrameWidth); +} diff --git a/src/domain/UBGraphicsItemDelegate.cpp b/src/domain/UBGraphicsItemDelegate.cpp index cadbf191..8a7494ec 100644 --- a/src/domain/UBGraphicsItemDelegate.cpp +++ b/src/domain/UBGraphicsItemDelegate.cpp @@ -37,6 +37,9 @@ #include "UBGraphicsWidgetItem.h" #include "domain/UBAbstractWidget.h" +#include "domain/UBGraphicsTextItem.h" +#include "domain/UBGraphicsAudioItem.h" +#include "domain/UBGraphicsVideoItem.h" #include "web/UBWebController.h" @@ -47,6 +50,27 @@ class UBGraphicsParaschoolEditorWidgetItem; +DelegateButton::DelegateButton(const QString & fileName, QGraphicsItem* pDelegated, QGraphicsItem * parent, Qt::WindowFrameSection section) + : QGraphicsSvgItem(fileName, parent) + , mDelegated(pDelegated) + , mIsTransparentToMouseEvent(false) + , mButtonAlignmentSection(section) +{ + setAcceptedMouseButtons(Qt::LeftButton); + setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); +} + +DelegateButton::~DelegateButton() +{ + // NOOP +} + +void DelegateButton::setFileName(const QString & fileName) +{ + QGraphicsSvgItem::setSharedRenderer(new QSvgRenderer (fileName, this)); +} + + void DelegateButton::mousePressEvent(QGraphicsSceneMouseEvent *event) { // make sure delegate is selected, to avoid control being hidden @@ -93,6 +117,8 @@ UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObjec void UBGraphicsItemDelegate::init() { + mToolBarItem = new UBGraphicsToolBarItem(delegated()); + mFrame = new UBGraphicsDelegateFrame(this, QRectF(0, 0, 0, 0), mFrameWidth, mRespectRatio); mFrame->hide(); mFrame->setFlag(QGraphicsItem::ItemIsSelectable, true); @@ -123,10 +149,13 @@ void UBGraphicsItemDelegate::init() foreach(DelegateButton* button, mButtons) { + if (button->getSection() != Qt::TitleBarArea) + { button->hide(); button->setFlag(QGraphicsItem::ItemIsSelectable, true); } } +} UBGraphicsItemDelegate::~UBGraphicsItemDelegate() @@ -207,27 +236,27 @@ void UBGraphicsItemDelegate::setMimeData(QMimeData *mimeData) bool UBGraphicsItemDelegate::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { - if(NULL != mMimeData) - { - QDrag* mDrag = new QDrag(event->widget()); - mDrag->setMimeData(mMimeData); - if (!mDragPixmap.isNull()) { - mDrag->setPixmap(mDragPixmap); - mDrag->setHotSpot(mDragPixmap.rect().center()); - } - mDrag->exec(); - mDragPixmap = QPixmap(); + if((NULL != mMimeData) && ((event->pos() - mDragStartPosition).manhattanLength() < QApplication::startDragDistance())) + { + QDrag* mDrag = new QDrag(event->widget()); + mDrag->setMimeData(mMimeData); + if (!mDragPixmap.isNull()) { + mDrag->setPixmap(mDragPixmap); + mDrag->setHotSpot(mDragPixmap.rect().center()); + } + mDrag->exec(); + mDragPixmap = QPixmap(); - return true; - } + return true; + } if(isLocked()) { event->accept(); return true; } - else - return false; + + return true; } bool UBGraphicsItemDelegate::weelEvent(QGraphicsSceneWheelEvent *event) @@ -292,13 +321,20 @@ void UBGraphicsItemDelegate::positionHandles() updateButtons(true); + if (mToolBarItem->isVisibleOnBoard()) + { + updateToolBar(); + mToolBarItem->show(); + } } else { foreach(DelegateButton* button, mButtons) button->hide(); mFrame->hide(); + mToolBarItem->hide(); } } + void UBGraphicsItemDelegate::setZOrderButtonsVisible(bool visible) { if (visible) { @@ -335,6 +371,7 @@ void UBGraphicsItemDelegate::remove(bool canUndo) scene->removeItem(mFrame); scene->removeItem(mDelegated); + scene->removeItem(mToolBarItem); if (canUndo) { @@ -577,14 +614,16 @@ void UBGraphicsItemDelegate::updateButtons(bool showUpdated) int i = 1, j = 0, k = 0; while ((i + j + k) < mButtons.size()) { DelegateButton* button = mButtons[i + j]; - button->setParentItem(mFrame); - button->setTransform(tr); if (button->getSection() == Qt::TopLeftSection) { + button->setParentItem(mFrame); button->setPos(topX + (i++ * 1.6 * mFrameWidth * mAntiScaleRatio), topY); + button->setTransform(tr); } else if (button->getSection() == Qt::BottomLeftSection) { + button->setParentItem(mFrame); button->setPos(bottomX + (++j * 1.6 * mFrameWidth * mAntiScaleRatio), bottomY); - } else if (button->getSection() == Qt::NoSection) { + button->setTransform(tr); + } else if (button->getSection() == Qt::TitleBarArea || button->getSection() == Qt::NoSection){ ++k; } if (!button->scene()) @@ -599,9 +638,65 @@ void UBGraphicsItemDelegate::updateButtons(bool showUpdated) } } +void UBGraphicsItemDelegate::updateToolBar() +{ + QTransform transformForToolbarButtons; + transformForToolbarButtons.scale(mAntiScaleRatio, 1); + + QRectF toolBarRect = mToolBarItem->rect(); + toolBarRect.setWidth(delegated()->boundingRect().width() - 10); + mToolBarItem->setRect(toolBarRect); + + if (mToolBarItem->isShifting()) + mToolBarItem->setPos(delegated()->boundingRect().bottomLeft() + QPointF(5 * mAntiScaleRatio, 0)); + else mToolBarItem->setPos(delegated()->boundingRect().bottomLeft() - QPointF(-5 * mAntiScaleRatio, mToolBarItem->rect().height() * 1.1 * mAntiScaleRatio)); + + int offsetOnToolBar = 5 * mAntiScaleRatio; + QList itemList = mToolBarItem->itemsOnToolBar(); + foreach (QGraphicsItem* item, itemList) + { + item->setPos(offsetOnToolBar, 0); + offsetOnToolBar += (item->boundingRect().width() + 5) * mAntiScaleRatio; + item->setTransform(transformForToolbarButtons); + item->show(); + } + + mToolBarItem->setOffsetOnToolBar(offsetOnToolBar); + + QTransform tr; + tr.scale(1, mAntiScaleRatio); + mToolBarItem->setTransform(tr); +} + void UBGraphicsItemDelegate::setButtonsVisible(bool visible) { foreach(DelegateButton* pButton, mButtons){ pButton->setVisible(visible); } } + +UBGraphicsToolBarItem::UBGraphicsToolBarItem(QGraphicsItem * parent) : + QGraphicsRectItem(parent), + mShifting(true), + mVisible(false), + mMinWidth(200) +{ + QRectF rect = this->rect(); + rect.setHeight(26); + this->setRect(rect); + + setBrush(QColor(UBSettings::paletteColor)); + setPen(Qt::NoPen); + hide(); +} + +void UBGraphicsToolBarItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + Q_UNUSED(option); + Q_UNUSED(widget); + + QPainterPath path; + path.addRoundedRect(rect(), 10, 10); + + painter->fillPath(path, brush()); +} diff --git a/src/domain/UBGraphicsItemDelegate.h b/src/domain/UBGraphicsItemDelegate.h index f560b546..b6994a84 100644 --- a/src/domain/UBGraphicsItemDelegate.h +++ b/src/domain/UBGraphicsItemDelegate.h @@ -35,30 +35,16 @@ class DelegateButton: public QGraphicsSvgItem Q_OBJECT public: - DelegateButton(const QString & fileName, QGraphicsItem* pDelegated, QGraphicsItem * parent = 0, Qt::WindowFrameSection section = Qt::TopLeftSection) - : QGraphicsSvgItem(fileName, parent) - , mDelegated(pDelegated) - , mIsTransparentToMouseEvent(false) - , mButtonAlignmentSection(section) - { - setAcceptedMouseButtons(Qt::LeftButton); - setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); - } + DelegateButton(const QString & fileName, QGraphicsItem* pDelegated, QGraphicsItem * parent = 0, Qt::WindowFrameSection section = Qt::TopLeftSection); - virtual ~DelegateButton() - { - // NOOP - } + virtual ~DelegateButton(); void setTransparentToMouseEvent(bool tr) { mIsTransparentToMouseEvent = tr; } - void setFileName(const QString & fileName) - { - QGraphicsSvgItem::setSharedRenderer(new QSvgRenderer (fileName, this)); - } + void setFileName(const QString & fileName); void setSection(Qt::WindowFrameSection section) {mButtonAlignmentSection = section;} Qt::WindowFrameSection getSection() const {return mButtonAlignmentSection;} @@ -84,6 +70,31 @@ class DelegateButton: public QGraphicsSvgItem }; +class UBGraphicsToolBarItem : public QGraphicsRectItem, public QObject +{ + public: + UBGraphicsToolBarItem(QGraphicsItem * parent = 0); + virtual ~UBGraphicsToolBarItem() {}; + + bool isVisibleOnBoard() const { return mVisible; } + void setVisibleOnBoard(bool visible) { mVisible = visible; } + bool isShifting() const { return mShifting; } + void setShifting(bool shifting) { mShifting = shifting; } + int offsetOnToolBar() const { return mOffsetOnToolBar; } + void setOffsetOnToolBar(int pOffset) { mOffsetOnToolBar = pOffset; } + QList itemsOnToolBar() const { return mItemsOnToolBar; } + void setItemsOnToolBar(QList itemsOnToolBar) { mItemsOnToolBar = itemsOnToolBar;} + int minWidth() { return mMinWidth; } + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, + QWidget *widget); + + private: + bool mShifting; + bool mVisible; + int mOffsetOnToolBar; + int mMinWidth; + QList mItemsOnToolBar; +}; class UBGraphicsItemDelegate : public QObject { @@ -138,6 +149,10 @@ class UBGraphicsItemDelegate : public QObject void setButtonsVisible(bool visible); + UBGraphicsToolBarItem* getToolBarItem() const { return mToolBarItem; } + + qreal antiScaleRatio() const { return mAntiScaleRatio; } + signals: void showOnDisplayChanged(bool shown); void lockChanged(bool locked); @@ -183,12 +198,17 @@ class UBGraphicsItemDelegate : public QObject QList mButtons; + UBGraphicsToolBarItem* mToolBarItem; + protected slots: virtual void gotoContentSource(bool checked); private: void updateFrame(); void updateButtons(bool showUpdated = false); + void updateToolBar(); + + QPointF mOffset; QTransform mPreviousTransform; diff --git a/src/domain/UBGraphicsItemUndoCommand.cpp b/src/domain/UBGraphicsItemUndoCommand.cpp index d027c1f0..bc8c4c82 100644 --- a/src/domain/UBGraphicsItemUndoCommand.cpp +++ b/src/domain/UBGraphicsItemUndoCommand.cpp @@ -19,12 +19,12 @@ #include "UBGraphicsScene.h" -#include "core/memcheck.h" - #include "core/UBApplication.h" #include "board/UBBoardController.h" +#include "core/memcheck.h" + UBGraphicsItemUndoCommand::UBGraphicsItemUndoCommand(UBGraphicsScene* pScene, const QSet& pRemovedItems, const QSet& pAddedItems) : mScene(pScene) diff --git a/src/domain/UBGraphicsMediaItem.cpp b/src/domain/UBGraphicsMediaItem.cpp index 9342cb66..dd19e275 100644 --- a/src/domain/UBGraphicsMediaItem.cpp +++ b/src/domain/UBGraphicsMediaItem.cpp @@ -23,10 +23,10 @@ #include "board/UBBoardController.h" -#include "core/memcheck.h" - #include "frameworks/UBFileSystemUtils.h" +#include "core/memcheck.h" + bool UBGraphicsMediaItem::sIsMutedByDefault = false; UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsItem *parent) diff --git a/src/domain/UBGraphicsStrokesGroup.cpp b/src/domain/UBGraphicsStrokesGroup.cpp index ac7aadf0..a7f658dd 100644 --- a/src/domain/UBGraphicsStrokesGroup.cpp +++ b/src/domain/UBGraphicsStrokesGroup.cpp @@ -1,5 +1,7 @@ #include "UBGraphicsStrokesGroup.h" +#include "core/memcheck.h" + UBGraphicsStrokesGroup::UBGraphicsStrokesGroup(QGraphicsItem *parent):QGraphicsItemGroup(parent) { mDelegate = new UBGraphicsItemDelegate(this, 0, true, true); diff --git a/src/domain/UBGraphicsTextItemDelegate.cpp b/src/domain/UBGraphicsTextItemDelegate.cpp index c567ef43..2a911fbf 100644 --- a/src/domain/UBGraphicsTextItemDelegate.cpp +++ b/src/domain/UBGraphicsTextItemDelegate.cpp @@ -24,9 +24,10 @@ #include "domain/UBGraphicsDelegateFrame.h" #include "core/UBSettings.h" -#include "core/memcheck.h" #include "board/UBBoardController.h" +#include "core/memcheck.h" + const int UBGraphicsTextItemDelegate::sMinPixelSize = 8; const int UBGraphicsTextItemDelegate::sMinPointSize = 8; @@ -94,17 +95,21 @@ void UBGraphicsTextItemDelegate::buildButtons() { UBGraphicsItemDelegate::buildButtons(); - mFontButton = new DelegateButton(":/images/font.svg", mDelegated, mFrame, Qt::TopLeftSection); - mColorButton = new DelegateButton(":/images/color.svg", mDelegated, mFrame, Qt::TopLeftSection); - mDecreaseSizeButton = new DelegateButton(":/images/minus.svg", mDelegated, mFrame, Qt::TopLeftSection); - mIncreaseSizeButton = new DelegateButton(":/images/plus.svg", mDelegated, mFrame, Qt::TopLeftSection); + mFontButton = new DelegateButton(":/images/font.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); + mColorButton = new DelegateButton(":/images/color.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); + mDecreaseSizeButton = new DelegateButton(":/images/minus.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); + mIncreaseSizeButton = new DelegateButton(":/images/plus.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); connect(mFontButton, SIGNAL(clicked(bool)), this, SLOT(pickFont())); connect(mColorButton, SIGNAL(clicked(bool)), this, SLOT(pickColor())); connect(mDecreaseSizeButton, SIGNAL(clicked(bool)), this, SLOT(decreaseSize())); connect(mIncreaseSizeButton, SIGNAL(clicked(bool)), this, SLOT(increaseSize())); - mButtons << mFontButton << mColorButton << mDecreaseSizeButton << mIncreaseSizeButton; + QList itemsOnToolBar; + itemsOnToolBar << mFontButton << mColorButton << mDecreaseSizeButton << mIncreaseSizeButton; + mToolBarItem->setItemsOnToolBar(itemsOnToolBar); + + mToolBarItem->setVisibleOnBoard(true); } void UBGraphicsTextItemDelegate::contentsChanged() diff --git a/src/domain/UBGraphicsVideoItem.cpp b/src/domain/UBGraphicsVideoItem.cpp index 9fa9d345..7ef73f8d 100644 --- a/src/domain/UBGraphicsVideoItem.cpp +++ b/src/domain/UBGraphicsVideoItem.cpp @@ -109,11 +109,6 @@ void UBGraphicsVideoItem::showOnDisplayChanged(bool shown) void UBGraphicsVideoItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { -// QDrag* mDrag = new QDrag(event->widget()); -// QMimeData* pMime = new QMimeData(); -// mDrag->setMimeData(pMime); -// mDrag->start(); - mShouldMove = (event->buttons() & Qt::LeftButton); mMousePressPos = event->scenePos(); mMouseMovePos = mMousePressPos; diff --git a/src/domain/UBGraphicsVideoItemDelegate.cpp b/src/domain/UBGraphicsVideoItemDelegate.cpp index 35620cf0..e02640c5 100644 --- a/src/domain/UBGraphicsVideoItemDelegate.cpp +++ b/src/domain/UBGraphicsVideoItemDelegate.cpp @@ -1,336 +1,351 @@ -/* - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -#include -#include - -#include "UBGraphicsVideoItemDelegate.h" - -#include "UBGraphicsScene.h" - -#include "core/UBSettings.h" -#include "core/UBApplication.h" -#include "core/UBApplicationController.h" -#include "core/UBDisplayManager.h" - -#include "domain/UBGraphicsVideoItem.h" -#include "domain/UBGraphicsDelegateFrame.h" - -#include "core/memcheck.h" - -UBGraphicsVideoItemDelegate::UBGraphicsVideoItemDelegate(UBGraphicsVideoItem* pDelegated, Phonon::MediaObject* pMedia, QObject * parent) - : UBGraphicsItemDelegate(pDelegated, parent, true, false) - , mMedia(pMedia) -{ - // NOOP -} - -void UBGraphicsVideoItemDelegate::buildButtons() -{ - mPlayPauseButton = new DelegateButton(":/images/play.svg", mDelegated, mFrame); - - mStopButton = new DelegateButton(":/images/stop.svg", mDelegated, mFrame); - mStopButton->hide(); - - if (delegated()->isMuted()) - mMuteButton = new DelegateButton(":/images/soundOff.svg", mDelegated, mFrame); - else - mMuteButton = new DelegateButton(":/images/soundOn.svg", mDelegated, mFrame); - - mMuteButton->hide(); - - mVideoControl = new DelegateVideoControl(delegated(), mFrame); - UBGraphicsItem::assignZValue(mVideoControl, delegated()->zValue()); - mVideoControl->setFlag(QGraphicsItem::ItemIsSelectable, true); - - connect(mPlayPauseButton, SIGNAL(clicked(bool)), this, SLOT(togglePlayPause())); - connect(mStopButton, SIGNAL(clicked(bool)), mMedia, SLOT(stop())); - connect(mMuteButton, SIGNAL(clicked(bool)), delegated(), SLOT(toggleMute())); - connect(mMuteButton, SIGNAL(clicked(bool)), this, SLOT(toggleMute())); - - mButtons << mPlayPauseButton << mStopButton << mMuteButton; - - mMedia->setTickInterval(50); - - connect(mMedia, SIGNAL(stateChanged (Phonon::State, Phonon::State)), this, SLOT(mediaStateChanged (Phonon::State, Phonon::State))); - connect(mMedia, SIGNAL(finished()), this, SLOT(updatePlayPauseState())); - connect(mMedia, SIGNAL(tick(qint64)), this, SLOT(updateTicker(qint64))); - connect(mMedia, SIGNAL(totalTimeChanged(qint64)), this, SLOT(totalTimeChanged(qint64))); - -} - - -UBGraphicsVideoItemDelegate::~UBGraphicsVideoItemDelegate() -{ - //NOOP -} - - -void UBGraphicsVideoItemDelegate::positionHandles() -{ - UBGraphicsItemDelegate::positionHandles(); - - if (mDelegated->isSelected()) - { - qreal scaledFrameWidth = mFrameWidth * mAntiScaleRatio; - - - qreal width = mFrame->rect().width(); - qreal height = mFrame->rect().height(); - - qreal x = mFrame->rect().left(); - qreal y = mFrame->rect().top(); - - mVideoControl->setRect(x + 2 * scaledFrameWidth - , y + height - 3 * scaledFrameWidth - , width - 4 * scaledFrameWidth - , 2 * scaledFrameWidth); - - if (!mVideoControl->scene()) - { - mVideoControl->setParentItem(mFrame);//update parent for the case the item has been previously removed from scene - mDelegated->scene()->addItem(mVideoControl); - } - - mVideoControl->setAntiScale(mAntiScaleRatio); - mVideoControl->setZValue(delegated()->zValue()); - mVideoControl->show(); - } - else - { - mVideoControl->hide(); - } -} - - -void UBGraphicsVideoItemDelegate::remove(bool canUndo) -{ - if (delegated() && delegated()->mediaObject()) - delegated()->mediaObject()->stop(); - - QGraphicsScene* scene = mDelegated->scene(); - - scene->removeItem(mVideoControl); - - UBGraphicsItemDelegate::remove(canUndo); -} - - -void UBGraphicsVideoItemDelegate::toggleMute() -{ - if (delegated()->isMuted()) - mMuteButton->setFileName(":/images/soundOff.svg"); - else - mMuteButton->setFileName(":/images/soundOn.svg"); - -} - - -UBGraphicsVideoItem* UBGraphicsVideoItemDelegate::delegated() -{ - return static_cast(mDelegated); -} - - -void UBGraphicsVideoItemDelegate::togglePlayPause() -{ - if (delegated() && delegated()->mediaObject()) { - - Phonon::MediaObject* media = delegated()->mediaObject(); - if (media->state() == Phonon::StoppedState) { - media->play(); - } else if (media->state() == Phonon::PlayingState) { - if (media->remainingTime() <= 0) { - media->stop(); - media->play(); - } else { - media->pause(); - if(delegated()->scene()) - delegated()->scene()->setModified(true); - } - } else if (media->state() == Phonon::PausedState) { - if (media->remainingTime() <= 0) { - media->stop(); - } - media->play(); - } else if ( media->state() == Phonon::LoadingState ) { - delegated()->mediaObject()->setCurrentSource(delegated()->mediaFileUrl()); - media->play(); - } else if (media->state() == Phonon::ErrorState){ - qDebug() << "Error appeared." << media->errorString(); - } - } -} - -void UBGraphicsVideoItemDelegate::mediaStateChanged ( Phonon::State newstate, Phonon::State oldstate ) -{ - Q_UNUSED(newstate); - Q_UNUSED(oldstate); - updatePlayPauseState(); -} - - -void UBGraphicsVideoItemDelegate::updatePlayPauseState() -{ - Phonon::MediaObject* media = delegated()->mediaObject(); - - if (media->state() == Phonon::PlayingState) - mPlayPauseButton->setFileName(":/images/pause.svg"); - else - mPlayPauseButton->setFileName(":/images/play.svg"); -} - - -void UBGraphicsVideoItemDelegate::updateTicker(qint64 time) -{ - Phonon::MediaObject* media = delegated()->mediaObject(); - mVideoControl->totalTimeChanged(media->totalTime()); - - mVideoControl->updateTicker(time); -} - - -void UBGraphicsVideoItemDelegate::totalTimeChanged(qint64 newTotalTime) -{ - mVideoControl->totalTimeChanged(newTotalTime); -} - - -DelegateVideoControl::DelegateVideoControl(UBGraphicsVideoItem* pDelegated, QGraphicsItem * parent) - : QGraphicsRectItem(parent) - , mDelegate(pDelegated) - , mDisplayCurrentTime(false) - , mAntiScale(1.0) - , mCurrentTimeInMs(0) - , mTotalTimeInMs(0) -{ - setAcceptedMouseButtons(Qt::LeftButton); - - setBrush(QBrush(UBSettings::paletteColor)); - setPen(Qt::NoPen); - setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); -} - - -void DelegateVideoControl::paint(QPainter *painter, - const QStyleOptionGraphicsItem *option, QWidget *widget) -{ - Q_UNUSED(option); - Q_UNUSED(widget); - - painter->fillPath(shape(), brush()); - - qreal frameWidth = rect().height() / 2; - int position = frameWidth; - - if (mTotalTimeInMs > 0) - { - position = frameWidth + (rect().width() - (2 * frameWidth)) / mTotalTimeInMs * mCurrentTimeInMs; - } - - int radius = rect().height() / 6; - QRectF r(rect().x() + position - radius, rect().y() + (rect().height() / 4) - radius, radius * 2, radius * 2); - - painter->setBrush(UBSettings::documentViewLightColor); - painter->drawEllipse(r); - - if(mDisplayCurrentTime) - { - painter->setBrush(UBSettings::paletteColor); - painter->setPen(QPen(Qt::NoPen)); - QRectF balloon(rect().x() + position - frameWidth, rect().y() - (frameWidth * 1.2), 2 * frameWidth, frameWidth); - painter->drawRoundedRect(balloon, frameWidth/2, frameWidth/2); - - QTime t; - t = t.addMSecs(mCurrentTimeInMs < 0 ? 0 : mCurrentTimeInMs); - QFont f = painter->font(); - f.setPointSizeF(f.pointSizeF() * mAntiScale); - painter->setFont(f); - painter->setPen(Qt::white); - painter->drawText(balloon, Qt::AlignCenter, t.toString("m:ss")); - } -} - - -QPainterPath DelegateVideoControl::shape() const -{ - QPainterPath path; - QRectF r = rect().adjusted(0,0,0,- rect().height() / 2); - path.addRoundedRect(r, rect().height() / 4, rect().height() / 4); - return path; -} - - -void DelegateVideoControl::updateTicker(qint64 time ) -{ - mCurrentTimeInMs = time; - update(); -} - - -void DelegateVideoControl::totalTimeChanged(qint64 newTotalTime) -{ - mTotalTimeInMs = newTotalTime; - update(); -} - - -void DelegateVideoControl::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - mDisplayCurrentTime = true; - seekToMousePos(event->pos()); - update(); - event->accept(); -} - - -void DelegateVideoControl::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - seekToMousePos(event->pos()); - update(); - event->accept(); -} - - -void DelegateVideoControl::seekToMousePos(QPointF mousePos) -{ - qreal minX, length; - qreal frameWidth = rect().height() / 2; - - minX = rect().x() + frameWidth; - length = rect().width() - (2 * frameWidth); - - qreal mouseX = mousePos.x(); - - if (mTotalTimeInMs > 0 && length > 0 && mDelegate - && mDelegate->mediaObject() && mDelegate->mediaObject()->isSeekable()) - { - qint64 tickPos = mTotalTimeInMs / length * (mouseX - minX); - mDelegate->mediaObject()->seek(tickPos); - - //OSX is a bit lazy - updateTicker(tickPos); - } -} - -void DelegateVideoControl::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - mDisplayCurrentTime = false; - update(); - event->accept(); -} - - - +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ + +#include +#include + +#include "UBGraphicsVideoItemDelegate.h" + +#include "UBGraphicsScene.h" + +#include "core/UBSettings.h" +#include "core/UBApplication.h" +#include "core/UBApplicationController.h" +#include "core/UBDisplayManager.h" + +#include "domain/UBGraphicsVideoItem.h" +#include "domain/UBGraphicsDelegateFrame.h" + +#include "core/memcheck.h" + +UBGraphicsVideoItemDelegate::UBGraphicsVideoItemDelegate(UBGraphicsVideoItem* pDelegated, Phonon::MediaObject* pMedia, QObject * parent) + : UBGraphicsItemDelegate(pDelegated, parent, true, false) + , mMedia(pMedia) +{ + // NOOP +} + +void UBGraphicsVideoItemDelegate::buildButtons() +{ + mPlayPauseButton = new DelegateButton(":/images/play.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); + + mStopButton = new DelegateButton(":/images/stop.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); + + mVideoControl = new DelegateVideoControl(delegated(), mToolBarItem); + UBGraphicsItem::assignZValue(mVideoControl, delegated()->zValue()); + mVideoControl->setFlag(QGraphicsItem::ItemIsSelectable, true); + + if (delegated()->isMuted()) + mMuteButton = new DelegateButton(":/images/soundOff.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); + else + mMuteButton = new DelegateButton(":/images/soundOn.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); + + connect(mPlayPauseButton, SIGNAL(clicked(bool)), this, SLOT(togglePlayPause())); + connect(mStopButton, SIGNAL(clicked(bool)), mMedia, SLOT(stop())); + connect(mMuteButton, SIGNAL(clicked(bool)), delegated(), SLOT(toggleMute())); + connect(mMuteButton, SIGNAL(clicked(bool)), this, SLOT(toggleMute())); + + mButtons << mPlayPauseButton << mStopButton << mMuteButton; + + QList itemsOnToolBar; + itemsOnToolBar << mPlayPauseButton << mStopButton << mVideoControl << mMuteButton; + mToolBarItem->setItemsOnToolBar(itemsOnToolBar); + + mMedia->setTickInterval(50); + + connect(mMedia, SIGNAL(stateChanged (Phonon::State, Phonon::State)), this, SLOT(mediaStateChanged (Phonon::State, Phonon::State))); + connect(mMedia, SIGNAL(finished()), this, SLOT(updatePlayPauseState())); + connect(mMedia, SIGNAL(tick(qint64)), this, SLOT(updateTicker(qint64))); + connect(mMedia, SIGNAL(totalTimeChanged(qint64)), this, SLOT(totalTimeChanged(qint64))); + + mToolBarItem->setVisibleOnBoard(true); + mToolBarItem->setShifting(false); +} + + +UBGraphicsVideoItemDelegate::~UBGraphicsVideoItemDelegate() +{ + //NOOP +} + + +void UBGraphicsVideoItemDelegate::positionHandles() +{ + UBGraphicsItemDelegate::positionHandles(); + + if (mDelegated->isSelected()) + { + qreal scaledFrameWidth = mFrameWidth * mAntiScaleRatio; + + int offset = 0; + foreach (DelegateButton* button, mButtons) + { + if (button->getSection() == Qt::TitleBarArea) + offset += button->boundingRect().width() * mAntiScaleRatio; + } + + mVideoControl->setRect(mVideoControl->rect().x() + , scaledFrameWidth/6 - 0.5 + , (mToolBarItem->rect().width() - 35 - offset) / mAntiScaleRatio + , (2 * scaledFrameWidth) / mAntiScaleRatio); + + offset += (mVideoControl->rect().width() + 5) * mAntiScaleRatio; + mMuteButton->setPos(offset, 0); + + if (!mVideoControl->scene()) + { + mVideoControl->setParentItem(mToolBarItem);//update parent for the case the item has been previously removed from scene + mDelegated->scene()->addItem(mVideoControl); + } + + mVideoControl->setAntiScale(mAntiScaleRatio); + mVideoControl->setZValue(delegated()->zValue()); + mVideoControl->show(); + } + else + { + mVideoControl->hide(); + } +} + + +void UBGraphicsVideoItemDelegate::remove(bool canUndo) +{ + if (delegated() && delegated()->mediaObject()) + delegated()->mediaObject()->stop(); + + QGraphicsScene* scene = mDelegated->scene(); + + scene->removeItem(mVideoControl); + + UBGraphicsItemDelegate::remove(canUndo); +} + + +void UBGraphicsVideoItemDelegate::toggleMute() +{ + if (delegated()->isMuted()) + mMuteButton->setFileName(":/images/soundOff.svg"); + else + mMuteButton->setFileName(":/images/soundOn.svg"); + +} + + +UBGraphicsVideoItem* UBGraphicsVideoItemDelegate::delegated() +{ + return static_cast(mDelegated); +} + + +void UBGraphicsVideoItemDelegate::togglePlayPause() +{ + if (delegated() && delegated()->mediaObject()) { + + Phonon::MediaObject* media = delegated()->mediaObject(); + if (media->state() == Phonon::StoppedState) { + media->play(); + } else if (media->state() == Phonon::PlayingState) { + if (media->remainingTime() <= 0) { + media->stop(); + media->play(); + } else { + media->pause(); + if(delegated()->scene()) + delegated()->scene()->setModified(true); + } + } else if (media->state() == Phonon::PausedState) { + if (media->remainingTime() <= 0) { + media->stop(); + } + media->play(); + } else if ( media->state() == Phonon::LoadingState ) { + delegated()->mediaObject()->setCurrentSource(delegated()->mediaFileUrl()); + media->play(); + } else if (media->state() == Phonon::ErrorState){ + qDebug() << "Error appeared." << media->errorString(); + } + } +} + +void UBGraphicsVideoItemDelegate::mediaStateChanged ( Phonon::State newstate, Phonon::State oldstate ) +{ + Q_UNUSED(newstate); + Q_UNUSED(oldstate); + updatePlayPauseState(); +} + + +void UBGraphicsVideoItemDelegate::updatePlayPauseState() +{ + Phonon::MediaObject* media = delegated()->mediaObject(); + + if (media->state() == Phonon::PlayingState) + mPlayPauseButton->setFileName(":/images/pause.svg"); + else + mPlayPauseButton->setFileName(":/images/play.svg"); +} + + +void UBGraphicsVideoItemDelegate::updateTicker(qint64 time) +{ + Phonon::MediaObject* media = delegated()->mediaObject(); + mVideoControl->totalTimeChanged(media->totalTime()); + + mVideoControl->updateTicker(time); +} + + +void UBGraphicsVideoItemDelegate::totalTimeChanged(qint64 newTotalTime) +{ + mVideoControl->totalTimeChanged(newTotalTime); +} + + +DelegateVideoControl::DelegateVideoControl(UBGraphicsVideoItem* pDelegated, QGraphicsItem * parent) + : QGraphicsRectItem(parent) + , mDelegate(pDelegated) + , mDisplayCurrentTime(false) + , mAntiScale(1.0) + , mCurrentTimeInMs(0) + , mTotalTimeInMs(0) + , mStartWidth(200) +{ + setAcceptedMouseButtons(Qt::LeftButton); + + setBrush(QBrush(Qt::white)); + setPen(Qt::NoPen); + setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); + + QRectF rect = this->rect(); + rect.setWidth(mStartWidth); + this->setRect(rect); +} + + +void DelegateVideoControl::paint(QPainter *painter, + const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + Q_UNUSED(option); + Q_UNUSED(widget); + + painter->fillPath(shape(), brush()); + + qreal frameWidth = rect().height() / 2; + int position = frameWidth; + + if (mTotalTimeInMs > 0) + { + position = frameWidth + (rect().width() - (2 * frameWidth)) / mTotalTimeInMs * mCurrentTimeInMs; + } + + int radius = rect().height() / 6; + QRectF r(rect().x() + position - radius, rect().y() + (rect().height() / 4) - radius, radius * 2, radius * 2); + + painter->setBrush(UBSettings::documentViewLightColor); + painter->drawEllipse(r); + + if(mDisplayCurrentTime) + { + painter->setBrush(UBSettings::paletteColor); + painter->setPen(QPen(Qt::NoPen)); + mBalloon.setRect(rect().x() + position - frameWidth, rect().y() - (frameWidth * 1.2), 2 * frameWidth, frameWidth); + painter->drawRoundedRect(mBalloon, frameWidth/2, frameWidth/2); + + QTime t; + t = t.addMSecs(mCurrentTimeInMs < 0 ? 0 : mCurrentTimeInMs); + QFont f = painter->font(); + f.setPointSizeF(f.pointSizeF() * mAntiScale); + painter->setFont(f); + painter->setPen(Qt::white); + painter->drawText(mBalloon, Qt::AlignCenter, t.toString("m:ss")); + } +} + + +QPainterPath DelegateVideoControl::shape() const +{ + QPainterPath path; + QRectF r = rect().adjusted(0,0,0,- rect().height() / 2); + path.addRoundedRect(r, rect().height() / 4, rect().height() / 4); + return path; +} + + +void DelegateVideoControl::updateTicker(qint64 time ) +{ + mCurrentTimeInMs = time; + update(); +} + + +void DelegateVideoControl::totalTimeChanged(qint64 newTotalTime) +{ + mTotalTimeInMs = newTotalTime; + update(); +} + + +void DelegateVideoControl::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + mDisplayCurrentTime = true; + seekToMousePos(event->pos()); + update(); + event->accept(); +} + + +void DelegateVideoControl::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + if (shape().contains(event->pos() - QPointF(mBalloon.width()/2,0)) + && shape().contains(event->pos() + QPointF(mBalloon.width()/2,0))) + { + seekToMousePos(event->pos()); + update(); + event->accept(); + } +} + + +void DelegateVideoControl::seekToMousePos(QPointF mousePos) +{ + qreal minX, length; + qreal frameWidth = rect().height() / 2; + + minX = rect().x() + frameWidth; + length = rect().width() - (2 * frameWidth); + + qreal mouseX = mousePos.x(); + + if (mTotalTimeInMs > 0 && length > 0 && mDelegate + && mDelegate->mediaObject() && mDelegate->mediaObject()->isSeekable()) + { + qint64 tickPos = mTotalTimeInMs / length * (mouseX - minX); + mDelegate->mediaObject()->seek(tickPos); + + //OSX is a bit lazy + updateTicker(tickPos); + } +} + +void DelegateVideoControl::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + mDisplayCurrentTime = false; + update(); + event->accept(); +} + + + diff --git a/src/domain/UBGraphicsVideoItemDelegate.h b/src/domain/UBGraphicsVideoItemDelegate.h index 8fd36bcc..66dcd8a8 100644 --- a/src/domain/UBGraphicsVideoItemDelegate.h +++ b/src/domain/UBGraphicsVideoItemDelegate.h @@ -1,114 +1,116 @@ -/* - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -#ifndef UBGRAPHICSVIDEOITEMDELEGATE_H_ -#define UBGRAPHICSVIDEOITEMDELEGATE_H_ - -#include -#include - -#include "core/UB.h" -#include "UBGraphicsItemDelegate.h" - -class QGraphicsSceneMouseEvent; -class QGraphicsItem; -class UBGraphicsVideoItem; - -class DelegateVideoControl: public QGraphicsRectItem -{ - public: - - DelegateVideoControl(UBGraphicsVideoItem* pDelegated, QGraphicsItem * parent = 0); - - virtual ~DelegateVideoControl() - { - // NOOP - } - - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget); - - QPainterPath shape() const; - - void setAntiScale(qreal antiScale){ mAntiScale = antiScale; } - - virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); - virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - - void updateTicker(qint64 time); - void totalTimeChanged( qint64 newTotalTime); - - protected: - - - void seekToMousePos(QPointF mousePos); - - UBGraphicsVideoItem* mDelegate; - bool mDisplayCurrentTime; - - qreal mAntiScale; - qint64 mCurrentTimeInMs; - qint64 mTotalTimeInMs; - -}; - - -class UBGraphicsVideoItemDelegate : public UBGraphicsItemDelegate -{ - Q_OBJECT - - public: - UBGraphicsVideoItemDelegate(UBGraphicsVideoItem* pDelegated, Phonon::MediaObject* pMedia, QObject * parent = 0); - virtual ~UBGraphicsVideoItemDelegate(); - - virtual void positionHandles(); - - public slots: - - void toggleMute(); - void updateTicker(qint64 time); - - protected slots: - - virtual void remove(bool canUndo = true); - - void togglePlayPause(); - - void mediaStateChanged ( Phonon::State newstate, Phonon::State oldstate ); - - void updatePlayPauseState(); - - void totalTimeChanged( qint64 newTotalTime); - - protected: - - virtual void buildButtons(); - - private: - - UBGraphicsVideoItem* delegated(); - - DelegateButton* mPlayPauseButton; - DelegateButton* mStopButton; - DelegateButton* mMuteButton; - DelegateVideoControl *mVideoControl; - - Phonon::MediaObject* mMedia; - -}; - - -#endif /* UBGRAPHICSVIDEOITEMDELEGATE_H_ */ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ + +#ifndef UBGRAPHICSVIDEOITEMDELEGATE_H_ +#define UBGRAPHICSVIDEOITEMDELEGATE_H_ + +#include +#include + +#include "core/UB.h" +#include "UBGraphicsItemDelegate.h" + +class QGraphicsSceneMouseEvent; +class QGraphicsItem; +class UBGraphicsVideoItem; + +class DelegateVideoControl: public QGraphicsRectItem +{ + public: + + DelegateVideoControl(UBGraphicsVideoItem* pDelegated, QGraphicsItem * parent = 0); + + virtual ~DelegateVideoControl() + { + // NOOP + } + + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, + QWidget *widget); + + QPainterPath shape() const; + + void setAntiScale(qreal antiScale){ mAntiScale = antiScale; } + + virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + + void updateTicker(qint64 time); + void totalTimeChanged( qint64 newTotalTime); + + protected: + + + void seekToMousePos(QPointF mousePos); + + UBGraphicsVideoItem* mDelegate; + bool mDisplayCurrentTime; + + qreal mAntiScale; + qint64 mCurrentTimeInMs; + qint64 mTotalTimeInMs; + + private: + int mStartWidth; + QRectF mBalloon; +}; + + +class UBGraphicsVideoItemDelegate : public UBGraphicsItemDelegate +{ + Q_OBJECT + + public: + UBGraphicsVideoItemDelegate(UBGraphicsVideoItem* pDelegated, Phonon::MediaObject* pMedia, QObject * parent = 0); + virtual ~UBGraphicsVideoItemDelegate(); + + virtual void positionHandles(); + + public slots: + + void toggleMute(); + void updateTicker(qint64 time); + + protected slots: + + virtual void remove(bool canUndo = true); + + void togglePlayPause(); + + void mediaStateChanged ( Phonon::State newstate, Phonon::State oldstate ); + + void updatePlayPauseState(); + + void totalTimeChanged( qint64 newTotalTime); + + protected: + + virtual void buildButtons(); + + private: + + UBGraphicsVideoItem* delegated(); + + DelegateButton* mPlayPauseButton; + DelegateButton* mStopButton; + DelegateButton* mMuteButton; + DelegateVideoControl *mVideoControl; + + Phonon::MediaObject* mMedia; +}; + + +#endif /* UBGRAPHICSVIDEOITEMDELEGATE_H_ */ diff --git a/src/domain/ubgraphicsgroupcontaineritem.cpp b/src/domain/ubgraphicsgroupcontaineritem.cpp index 0a706099..22990d79 100644 --- a/src/domain/ubgraphicsgroupcontaineritem.cpp +++ b/src/domain/ubgraphicsgroupcontaineritem.cpp @@ -6,6 +6,8 @@ #include "domain/ubgraphicsgroupcontaineritemdelegate.h" #include "domain/UBGraphicsScene.h" +#include "core/memcheck.h" + UBGraphicsGroupContainerItem::UBGraphicsGroupContainerItem(QGraphicsItem *parent) : QGraphicsItemGroup(parent) { diff --git a/src/domain/ubgraphicsgroupcontaineritemdelegate.cpp b/src/domain/ubgraphicsgroupcontaineritemdelegate.cpp index ff763520..19997a2b 100644 --- a/src/domain/ubgraphicsgroupcontaineritemdelegate.cpp +++ b/src/domain/ubgraphicsgroupcontaineritemdelegate.cpp @@ -8,9 +8,10 @@ #include "domain/UBGraphicsDelegateFrame.h" #include "domain/ubgraphicsgroupcontaineritem.h" -#include "core/memcheck.h" #include "board/UBBoardController.h" +#include "core/memcheck.h" + UBGraphicsGroupContainerItemDelegate::UBGraphicsGroupContainerItemDelegate(QGraphicsItem *pDelegated, QObject *parent) : UBGraphicsItemDelegate(pDelegated, parent), mDestroyGroupButton(0) diff --git a/src/frameworks/UBCoreGraphicsScene.cpp b/src/frameworks/UBCoreGraphicsScene.cpp index 68ffed2d..9eb68db7 100644 --- a/src/frameworks/UBCoreGraphicsScene.cpp +++ b/src/frameworks/UBCoreGraphicsScene.cpp @@ -15,12 +15,13 @@ #include "UBCoreGraphicsScene.h" -#include "core/memcheck.h" #include "domain/UBGraphicsAudioItem.h" #include "domain/UBGraphicsVideoItem.h" #include "domain/UBGraphicsMediaItem.h" #include "domain/UBGraphicsWidgetItem.h" +#include "core/memcheck.h" + UBCoreGraphicsScene::UBCoreGraphicsScene(QObject * parent) : QGraphicsScene ( parent ) { diff --git a/src/gui/UBDockDownloadWidget.cpp b/src/gui/UBDockDownloadWidget.cpp index 4ce9d07e..a09ab966 100644 --- a/src/gui/UBDockDownloadWidget.cpp +++ b/src/gui/UBDockDownloadWidget.cpp @@ -17,6 +17,8 @@ #include "globals/UBGlobals.h" +#include "core/memcheck.h" + UBDockDownloadWidget::UBDockDownloadWidget(QWidget *parent, const char *name):UBDockPaletteWidget(parent, name) , mpLayout(NULL) , mpDLWidget(NULL) diff --git a/src/gui/UBDockTeacherGuideWidget.cpp b/src/gui/UBDockTeacherGuideWidget.cpp index f8ad4f43..0c4d5c4a 100644 --- a/src/gui/UBDockTeacherGuideWidget.cpp +++ b/src/gui/UBDockTeacherGuideWidget.cpp @@ -19,6 +19,8 @@ #include "UBDockTeacherGuideWidget.h" #include "UBTeacherGuideWidget.h" +#include "core/memcheck.h" + UBDockTeacherGuideWidget::UBDockTeacherGuideWidget(QWidget* parent, const char* name): UBDockPaletteWidget(parent,name) diff --git a/src/gui/UBFeaturesActionBar.cpp b/src/gui/UBFeaturesActionBar.cpp index e9a560e1..8311bfc9 100644 --- a/src/gui/UBFeaturesActionBar.cpp +++ b/src/gui/UBFeaturesActionBar.cpp @@ -1,4 +1,5 @@ #include "UBFeaturesActionBar.h" +#include "core/memcheck.h" UBFeaturesActionBar::UBFeaturesActionBar( UBFeaturesController *controller, QWidget* parent, const char* name ) : QWidget (parent) , featuresController(controller) @@ -65,8 +66,8 @@ UBFeaturesActionBar::UBFeaturesActionBar( UBFeaturesController *controller, QWid mButtonGroup->addButton(mpRemoveFavoriteBtn); mButtonGroup->addButton(mpNewFolderBtn); // Connect signals & slots - /*connect(mpFavoriteAction,SIGNAL(triggered()), this, SLOT(onActionFavorite())); - connect(mpSocialAction,SIGNAL(triggered()), this, SLOT(onActionSocial())); + connect(mpFavoriteAction,SIGNAL(triggered()), this, SLOT(onActionFavorite())); + /*connect(mpSocialAction,SIGNAL(triggered()), this, SLOT(onActionSocial())); connect(mpSearchAction,SIGNAL(triggered()), this, SLOT(onActionSearch())); connect(mpDeleteAction,SIGNAL(triggered()), this, SLOT(onActionTrash())); connect(mpCloseAction, SIGNAL(triggered()), this, SLOT(onActionClose())); @@ -143,6 +144,16 @@ void UBFeaturesActionBar::setButtons() mpRemoveFavoriteBtn->show(); mpNewFolderBtn->hide(); break; + case IN_TRASH: + mpFavoriteBtn->hide(); + mpSocialBtn->hide(); + mSearchBar->show(); + //mpSearchBtn->show(); + //mpDeleteBtn->hide(); + mpCloseBtn->hide(); + //mpRemoveFavoriteBtn->show(); + mpNewFolderBtn->hide(); + break; default: break; } @@ -159,6 +170,11 @@ void UBFeaturesActionBar::onActionNewFolder() emit newFolderToCreate(); } +void UBFeaturesActionBar::onActionFavorite() +{ + emit addElementsToFavorite(); +} + /* void UBFeaturesActionBar::dragMoveEvent(QDragMoveEvent *event) { @@ -169,7 +185,9 @@ void UBFeaturesActionBar::dragMoveEvent(QDragMoveEvent *event) void UBFeaturesActionBar::dragEnterEvent( QDragEnterEvent *event ) { if (event->mimeData()->hasFormat("text/uri-list")) + { event->acceptProposedAction(); + } } void UBFeaturesActionBar::dropEvent( QDropEvent *event ) @@ -177,6 +195,12 @@ void UBFeaturesActionBar::dropEvent( QDropEvent *event ) QWidget *dest = childAt( event->pos() ); if ( dest == mpDeleteBtn ) { + QList urls = event->mimeData()->urls(); + foreach ( QUrl url, urls ) + { + if ( !UBFeaturesController::isDeletable( url ) ) + return; + } event->setDropAction( Qt::MoveAction ); event->accept(); emit deleteElements( *event->mimeData() ); diff --git a/src/gui/UBFeaturesActionBar.h b/src/gui/UBFeaturesActionBar.h index 653fbbac..7aec99a9 100644 --- a/src/gui/UBFeaturesActionBar.h +++ b/src/gui/UBFeaturesActionBar.h @@ -12,7 +12,8 @@ enum UBFeaturesActionBarState IN_ROOT, IN_FOLDER, IN_PROPERTIES, - IN_FAVORITE + IN_FAVORITE, + IN_TRASH }; class UBFeaturesActionBar : public QWidget @@ -29,9 +30,11 @@ signals: void deleteElements( const QMimeData &data ); void addToFavorite( const QMimeData &data ); void removeFromFavorite( const QMimeData &data ); + void addElementsToFavorite(); private slots: void onSearchTextChanged(QString txt); void onActionNewFolder(); + void onActionFavorite(); protected: //void dragMoveEvent(QDragMoveEvent *event); void dragEnterEvent( QDragEnterEvent *event ); diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp index e3affd5c..7a71b555 100644 --- a/src/gui/UBFeaturesWidget.cpp +++ b/src/gui/UBFeaturesWidget.cpp @@ -1,3 +1,5 @@ +#include + #include "UBFeaturesWidget.h" #include "domain/UBAbstractWidget.h" #include "gui/UBThumbnailWidget.h" @@ -6,6 +8,7 @@ #include "core/UBApplication.h" #include "core/UBDownloadManager.h" #include "globals/UBGlobals.h" +#include "board/UBBoardController.h" UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPaletteWidget(parent) { @@ -49,12 +52,14 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale //featuresListView->setStyleSheet( QString("background: #EEEEEE;border-radius: 10px;border: 2px solid #999999;") ); featuresListView->setDragDropMode( QAbstractItemView::DragDrop ); + featuresListView->setSelectionMode( QAbstractItemView::ContiguousSelection ); featuresListView->setModel( featuresProxyModel ); featuresListView->setResizeMode( QListView::Adjust ); featuresListView->setViewMode( QListView::IconMode ); itemDelegate = new UBFeaturesItemDelegate( this, featuresListView ); featuresListView->setItemDelegate( itemDelegate ); + //featuresListView->setSelectionRectVisible(false); featuresListView->setIconSize( QSize(defaultThumbnailSize, defaultThumbnailSize) ); featuresListView->setGridSize( QSize(defaultThumbnailSize * 1.75, defaultThumbnailSize * 1.75) ); @@ -70,13 +75,17 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale pathListView->setSelectionMode( QAbstractItemView::NoSelection ); pathListView->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); pathListView->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOn ); + pathListView->setFlow( QListView::LeftToRight ); + pathListView->setWrapping(false); + //pathListView->setResizeMode( QListView::Adjust ); //pathListView->setMovement( QListView::Static ); - pathListView->setDragDropMode( QAbstractItemView::DragDrop ); + pathListView->setDragDropMode( QAbstractItemView::DropOnly ); pathScene = new QGraphicsScene(this); //pathViewer = new UBFeaturesPathViewer( QPixmap(":images/libpalette/home.png"), controller->getRootPath(), pathScene, this ); featureProperties = new UBFeatureProperties(this); + webView = new UBFeaturesWebView(this); //layout->addWidget( pathViewer ); //pathViewer->show(); @@ -86,6 +95,7 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale stackedWidget->addWidget( featuresListView ); stackedWidget->addWidget( featureProperties ); + stackedWidget->addWidget( webView ); stackedWidget->setCurrentIndex(ID_LISTVIEW); currentStackedWidget = ID_LISTVIEW; @@ -106,14 +116,19 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale this, SLOT(currentSelected(const QModelIndex &)));*/ connect( featuresListView, SIGNAL(clicked ( const QModelIndex & ) ), this, SLOT( currentSelected(const QModelIndex &) ) ); - connect( mActionBar, SIGNAL( searchElement(const QString &) ), this, SLOT( const searchStarted(QString &) ) ); + connect( mActionBar, SIGNAL( searchElement(const QString &) ), this, SLOT( searchStarted(const QString &) ) ); connect( mActionBar, SIGNAL( newFolderToCreate() ), this, SLOT( createNewFolder() ) ); connect( mActionBar, SIGNAL( deleteElements(const QMimeData &) ), this, SLOT( deleteElements(const QMimeData &) ) ); connect( mActionBar, SIGNAL( addToFavorite(const QMimeData &) ), this, SLOT( addToFavorite(const QMimeData &) ) ); connect( mActionBar, SIGNAL( removeFromFavorite(const QMimeData &) ), this, SLOT( removeFromFavorite(const QMimeData &) ) ); + connect ( mActionBar, SIGNAL( addElementsToFavorite() ), this, SLOT ( addElementsToFavorite() ) ); connect( pathListView, SIGNAL(clicked( const QModelIndex & ) ), this, SLOT( currentPathChanged( const QModelIndex & ) ) ); connect( thumbSlider, SIGNAL( sliderMoved(int) ), this, SLOT(thumbnailSizeChanged( int ) ) ); + connect( UBApplication::boardController, SIGNAL( displayMetadata( QMap ) ), + this, SLOT( onDisplayMetadata( QMap ) ) ); + connect( UBDownloadManager::downloadManager(), SIGNAL( addDownloadedFileToLibrary( bool, QUrl, QString, QByteArray ) ), + this, SLOT( onAddDownloadedFileToLibrary( bool, QUrl, QString,QByteArray ) ) ); } bool UBFeaturesWidget::eventFilter( QObject *target, QEvent *event ) @@ -155,7 +170,7 @@ void UBFeaturesWidget::currentSelected(const QModelIndex ¤t) if ( feature.isFolder() ) { - QString newPath = feature.getUrl() + "/" + feature.getName(); + QString newPath = feature.getFullVirtualPath(); //pathViewer->addPathElement( feature.getThumbnail(), newPath ); controller->setCurrentElement( feature ); @@ -169,11 +184,20 @@ void UBFeaturesWidget::currentSelected(const QModelIndex ¤t) { mActionBar->setCurrentState( IN_FAVORITE ); } + else if (feature.getType() == FEATURE_TRASH) + { + mActionBar->setCurrentState( IN_TRASH ); + } else { mActionBar->setCurrentState( IN_FOLDER ); } } + else if ( feature.getType() == FEATURE_SEARCH ) + { + webView->showElement( feature ); + switchToWebView(); + } else { featureProperties->showElement( feature ); @@ -189,7 +213,7 @@ void UBFeaturesWidget::currentPathChanged(const QModelIndex &index) if ( index.isValid() ) { UBFeature feature = featuresPathModel->data(index, Qt::UserRole + 1).value(); - QString newPath = feature.getUrl() + "/" + feature.getName(); + QString newPath = feature.getFullVirtualPath(); featuresPathModel->setPath( newPath ); featuresPathModel->invalidate(); @@ -207,6 +231,10 @@ void UBFeaturesWidget::currentPathChanged(const QModelIndex &index) { mActionBar->setCurrentState( IN_FAVORITE ); } + else if (feature.getType() == FEATURE_TRASH) + { + mActionBar->setCurrentState( IN_TRASH ); + } else { mActionBar->setCurrentState( IN_FOLDER ); @@ -223,7 +251,6 @@ void UBFeaturesWidget::createNewFolder() featuresModel->addItem( newFolder ); featuresProxyModel->invalidate(); } - } void UBFeaturesWidget::deleteElements( const QMimeData & mimeData ) @@ -259,7 +286,7 @@ void UBFeaturesWidget::addToFavorite( const QMimeData & mimeData ) foreach ( QUrl url, urls ) { UBFeature elem = controller->addToFavorite( url ); - if ( !elem.getUrl().isEmpty() && !elem.getUrl().isNull() ) + if ( !elem.getVirtualPath().isEmpty() && !elem.getVirtualPath().isNull() ) featuresModel->addItem( elem ); } QSortFilterProxyModel *model = dynamic_cast( featuresListView->model() ); @@ -283,6 +310,44 @@ void UBFeaturesWidget::thumbnailSizeChanged( int value ) featuresListView->setGridSize( QSize( value * 1.75, value * 1.75 ) ); } +void UBFeaturesWidget::onDisplayMetadata( QMap metadata ) +{ + UBFeature feature( QString(), QPixmap(":images/libpalette/notFound.png"), QString(), metadata["Url"], FEATURE_ITEM ); + feature.setMetadata( metadata ); + + featureProperties->showElement( feature ); + switchToProperties(); + mActionBar->setCurrentState( IN_PROPERTIES ); +} + +void UBFeaturesWidget::onAddDownloadedFileToLibrary(bool pSuccess, QUrl sourceUrl, QString pContentHeader, QByteArray pData) +{ + if ( pSuccess ) + { + UBFeature newFeature = controller->addDownloadedFile( sourceUrl, pData ); + if ( newFeature != UBFeature() ) + { + featuresModel->addItem( newFeature ); + QSortFilterProxyModel *model = dynamic_cast( featuresListView->model() ); + model->invalidate(); + } + } +} + +void UBFeaturesWidget::addElementsToFavorite() +{ + QModelIndexList selected = featuresListView->selectionModel()->selectedIndexes(); + for ( int i = 0; i < selected.size(); ++i ) + { + UBFeature feature = selected.at(i).data( Qt::UserRole + 1 ).value(); + UBFeature elem = controller->addToFavorite( feature.getFullPath() ); + if ( !elem.getVirtualPath().isEmpty() && !elem.getVirtualPath().isNull() ) + featuresModel->addItem( elem ); + } + QSortFilterProxyModel *model = dynamic_cast( featuresListView->model() ); + model->invalidate(); +} + void UBFeaturesWidget::switchToListView() { stackedWidget->setCurrentIndex(ID_LISTVIEW); @@ -295,6 +360,11 @@ void UBFeaturesWidget::switchToProperties() currentStackedWidget = ID_PROPERTIES; } +void UBFeaturesWidget::switchToWebView() +{ + stackedWidget->setCurrentIndex(ID_WEBVIEW); + currentStackedWidget = ID_WEBVIEW; +} /* @@ -314,20 +384,54 @@ UBFeaturesWidget::~UBFeaturesWidget() { } -UBFeaturesListView::UBFeaturesListView( QWidget* parent, const char* name ) : QListView(parent) +UBFeaturesListView::UBFeaturesListView( QWidget* parent, const char* name ) +: QListView(parent) { setObjectName(name); + //rubberBand = new UBRubberBand( QRubberBand::Rectangle, this ); } +/* +void UBFeaturesListView::mousePressEvent( QMouseEvent *event ) +{ + rubberOrigin = event->pos(); + rubberBand->setGeometry( QRect( rubberOrigin, QSize() ) ); + //qDebug() << rubberOrigin.x() << rubberOrigin.y(); + rubberBand->show(); + QListView::mousePressEvent(event); +} + +void UBFeaturesListView::mouseMoveEvent( QMouseEvent *event ) +{ + QPoint current = event->pos(); + rubberBand->setGeometry( QRect( rubberOrigin, current ).normalized() ); + + //setSelection( rubberBand->rect(), QItemSelectionModel::Select ); + QListView::mouseMoveEvent(event); +} + +void UBFeaturesListView::mouseReleaseEvent( QMouseEvent *event ) +{ + rubberBand->hide(); + QListView::mouseReleaseEvent(event); +} + +*/ void UBFeaturesListView::dragEnterEvent( QDragEnterEvent *event ) { - if ( event->mimeData()->hasUrls() ) + if ( event->mimeData()->hasUrls() || event->mimeData()->hasImage() ) event->acceptProposedAction(); } +void UBFeaturesListView::dragMoveEvent( QDragMoveEvent *event ) +{ + if ( event->mimeData()->hasUrls() || event->mimeData()->hasImage() ) + event->acceptProposedAction(); +} + void UBFeaturesListView::dropEvent( QDropEvent *event ) { - if( event->source() || dynamic_cast( event->source() ) ) + if( event->source() && dynamic_cast( event->source() ) ) { event->setDropAction( Qt::MoveAction ); } @@ -335,6 +439,96 @@ void UBFeaturesListView::dropEvent( QDropEvent *event ) } +UBFeaturesWebView::UBFeaturesWebView(QWidget* parent, const char* name):QWidget(parent) + , mpView(NULL) + , mpWebSettings(NULL) + , mpLayout(NULL) + , mpSankoreAPI(NULL) +{ + setObjectName(name); + + SET_STYLE_SHEET(); + + mpLayout = new QVBoxLayout(); + setLayout(mpLayout); + + mpView = new QWebView(this); + mpView->setObjectName("SearchEngineView"); + mpSankoreAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene()); + mpView->page()->mainFrame()->addToJavaScriptWindowObject("sankore", mpSankoreAPI); + + mpWebSettings = QWebSettings::globalSettings(); + mpWebSettings->setAttribute(QWebSettings::JavaEnabled, true); + mpWebSettings->setAttribute(QWebSettings::PluginsEnabled, true); + mpWebSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true); + mpWebSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true); + mpWebSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true); + mpWebSettings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true); + mpWebSettings->setAttribute(QWebSettings::DnsPrefetchEnabled, true); + + mpLayout->addWidget(mpView); + + connect(mpView, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool))); +} + +UBFeaturesWebView::~UBFeaturesWebView() +{ + if(NULL != mpSankoreAPI){ + delete mpSankoreAPI; + mpSankoreAPI = NULL; + } + if(NULL != mpView){ + delete mpView; + mpView = NULL; + } + if(NULL != mpLayout){ + delete mpLayout; + mpLayout = NULL; + } +} + +void UBFeaturesWebView::showElement(const UBFeature &elem) +{ + QString qsWidgetName; + QString path = elem.getFullPath().toLocalFile(); + + QString qsConfigPath = QString("%0/config.xml").arg(path); + + if(QFile::exists(qsConfigPath)) + { + QFile f(qsConfigPath); + if(f.open(QIODevice::ReadOnly)) + { + QDomDocument domDoc; + domDoc.setContent(QString(f.readAll())); + QDomElement root = domDoc.documentElement(); + + QDomNode node = root.firstChild(); + while(!node.isNull()) + { + if(node.toElement().tagName() == "content") + { + QDomAttr srcAttr = node.toElement().attributeNode("src"); + qsWidgetName = srcAttr.value(); + break; + } + node = node.nextSibling(); + } + f.close(); + } + } + + mpView->load(QUrl::fromLocalFile(QString("%0/%1").arg(path).arg(qsWidgetName))); +} + +void UBFeaturesWebView::onLoadFinished(bool ok) +{ + if(ok && NULL != mpSankoreAPI){ + mpView->page()->mainFrame()->addToJavaScriptWindowObject("sankore", mpSankoreAPI); + } +} + + UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : QWidget(parent) , mpLayout(NULL) , mpButtonLayout(NULL) @@ -345,6 +539,7 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : , mpThumbnail(NULL) , mpOrigPixmap(NULL) , mpElement(NULL) + , mpObjInfos(NULL) { setObjectName(name); @@ -384,12 +579,49 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : mpButtonLayout->addStretch(1); - mpObjInfoLabel = new QLabel(tr("Object informations")); + mpObjInfoLabel = new QLabel(tr("Object informations")); mpObjInfoLabel->setStyleSheet(QString("color: #888888; font-size : 18px; font-weight:bold;")); mpLayout->addWidget(mpObjInfoLabel, 0); - connect(mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage())); + mpObjInfos = new QTreeWidget(this); + mpObjInfos->setColumnCount(2); + mpObjInfos->header()->hide(); + mpObjInfos->setAlternatingRowColors(true); + mpObjInfos->setRootIsDecorated(false); + mpObjInfos->setObjectName("DockPaletteWidgetBox"); + mpObjInfos->setStyleSheet("background:white;"); + mpLayout->addWidget(mpObjInfos, 1); + + connect( mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage()) ); + connect( mpSetAsBackgroundButton, SIGNAL( clicked() ), this, SLOT( onSetAsBackground() ) ); + connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) ); +} + +void UBFeatureProperties::resizeEvent( QResizeEvent *event ) +{ + Q_UNUSED(event); + adaptSize(); +} +void UBFeatureProperties::showEvent (QShowEvent *event ) +{ + Q_UNUSED(event); + adaptSize(); +} + +void UBFeatureProperties::adaptSize() +{ + if( NULL != mpOrigPixmap ) + { + if( width() < THUMBNAIL_WIDTH + 40 ) + { + mpThumbnail->setPixmap( mpOrigPixmap->scaledToWidth( width() - 40 ) ); + } + else + { + mpThumbnail->setPixmap( mpOrigPixmap->scaledToWidth( THUMBNAIL_WIDTH ) ); + } + } } void UBFeatureProperties::showElement( const UBFeature &elem ) @@ -407,59 +639,95 @@ void UBFeatureProperties::showElement( const UBFeature &elem ) mpElement = new UBFeature( elem ); mpOrigPixmap = new QPixmap( elem.getThumbnail() ); mpThumbnail->setPixmap(elem.getThumbnail().scaledToWidth(THUMBNAIL_WIDTH)); - //populateMetadata(); + populateMetadata(); - if ( UBApplication::isFromWeb( elem.getUrl() ) ) + if ( UBApplication::isFromWeb( elem.getFullPath().toString() ) ) { mpAddToLibButton->show(); - /*if(elem->metadatas()["Type"].toLower().contains("image")) + if( elem.getMetadata()["Type"].toLower().contains("image") ) { mpSetAsBackgroundButton->show(); } else { mpSetAsBackgroundButton->hide(); - }*/ + } } else { mpAddToLibButton->hide(); - if (UBFileSystemUtils::mimeTypeFromFileName( elem.getUrl() ).contains("image")) + if (UBFileSystemUtils::mimeTypeFromFileName( elem.getFullPath().toLocalFile() ).contains("image")) { mpSetAsBackgroundButton->show(); } - else + else { mpSetAsBackgroundButton->hide(); } } } +void UBFeatureProperties::populateMetadata() +{ + if(NULL != mpObjInfos){ + mpObjInfos->clear(); + QMap metas = mpElement->getMetadata(); + QList lKeys = metas.keys(); + QList lValues = metas.values(); + + for(int i=0; i< metas.size(); i++){ + QStringList values; + values << lKeys.at(i); + values << lValues.at(i); + mpItem = new QTreeWidgetItem(values); + mpObjInfos->addTopLevelItem(mpItem); + } + mpObjInfos->resizeColumnToContents(0); + } +} + void UBFeatureProperties::onAddToPage() { QWidget *w = parentWidget()->parentWidget(); UBFeaturesWidget* featuresWidget = dynamic_cast( w ); featuresWidget->getFeaturesController()->addItemToPage( *mpElement ); - /*if ( UBApplication::isFromWeb( mpElement->getUrl() ) ) - { +} + +void UBFeatureProperties::onAddToLib() +{ + if ( UBApplication::isFromWeb( mpElement->getFullPath().toString() ) ) + { sDownloadFileDesc desc; desc.isBackground = false; - desc.modal = true; - desc.name = QFileInfo( mpElement->getName() ).fileName(); - desc.url = mpElement->getUrl(); + desc.modal = false; + desc.name = QFileInfo( mpElement->getFullPath().toString()).fileName(); + qDebug() << desc.name; + desc.url = mpElement->getFullPath().toString(); + qDebug() << desc.url; UBDownloadManager::downloadManager()->addFileToDownload(desc); - } - else - { - QWidget *w = parentWidget()->parentWidget(); - UBFeaturesWidget* featuresWidget = dynamic_cast( w ); - featuresWidget->getFeaturesController()->addItemToPage( *mpElement ); - }*/ +} + + +void UBFeatureProperties::onSetAsBackground() +{ + QWidget *w = parentWidget()->parentWidget(); + UBFeaturesWidget* featuresWidget = dynamic_cast( w ); + featuresWidget->getFeaturesController()->addItemAsBackground( *mpElement ); } UBFeatureProperties::~UBFeatureProperties() { + if ( mpOrigPixmap ) + { + delete mpOrigPixmap; + mpOrigPixmap = NULL; + } + if ( mpElement ) + { + delete mpElement; + mpElement = NULL; + } } UBFeatureItemButton::UBFeatureItemButton(QWidget *parent, const char *name):QPushButton(parent) @@ -486,7 +754,7 @@ QVariant UBFeaturesModel::data(const QModelIndex &index, int role) const } else if (role == Qt::UserRole) { - return featuresList->at(index.row()).getUrl(); + return featuresList->at(index.row()).getVirtualPath(); } else if (role == Qt::UserRole + 1) { @@ -508,14 +776,15 @@ QMimeData* UBFeaturesModel::mimeData(const QModelIndexList &indexes) const if ( index.isValid() ) { UBFeature element = data( index, Qt::UserRole + 1 ).value(); - if ( element.getType() == FEATURE_INTERNAL ) + urlList.push_back( element.getFullPath() ); + /*if ( element.getType() == FEATURE_INTERNAL ) { urlList.push_back( QUrl( element.getFullPath() ) ); } else if ( element.getType() == FEATURE_INTERACTIVE || element.getType() == FEATURE_ITEM ) { - urlList.push_back( QUrl::fromLocalFile(element.getFullPath()) ); - } + urlList.push_back( element.getFullPath() ); + }*/ } } mimeData->setUrls( urlList ); @@ -527,7 +796,7 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act { Q_UNUSED(row) - if ( !mimeData->hasUrls() ) + if ( !mimeData->hasUrls() && !mimeData->hasImage() ) return false; if ( action == Qt::IgnoreAction ) return true; @@ -536,43 +805,48 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act int endRow = 0; + UBFeature parentFeature; if ( !parent.isValid() ) { - return false; - /*if (row < 0) - endRow = featuresList->size(); - else - endRow = qMin( row, featuresList->size() );*/ + parentFeature = dynamic_cast(QObject::parent())->getFeaturesController()->getCurrentElement(); } else - endRow = parent.row(); - Q_UNUSED(endRow) //why do we need this variable? - - UBFeature parentFeature = parent.data( Qt::UserRole + 1).value(); - - QList urls = mimeData->urls(); - - foreach ( QUrl url, urls ) { - UBFeature element; - - if ( action == Qt::MoveAction ) - { - element = dynamic_cast(QObject::parent())->getFeaturesController()->moveItemToFolder( url, parentFeature ); - } - else - { - element = dynamic_cast(QObject::parent())->getFeaturesController()->copyItemToFolder( url, parentFeature ); - } - addItem( element ); + parentFeature = parent.data( Qt::UserRole + 1).value(); } + + if ( mimeData->hasUrls() ) + { + QList urls = mimeData->urls(); + + foreach ( QUrl url, urls ) + { + UBFeature element; + + if ( action == Qt::MoveAction ) + { + element = dynamic_cast(QObject::parent())->getFeaturesController()->moveItemToFolder( url, parentFeature ); + } + else + { + element = dynamic_cast(QObject::parent())->getFeaturesController()->copyItemToFolder( url, parentFeature ); + } + addItem( element ); + } + } + else if ( mimeData->hasImage() ) + { + QImage image = qvariant_cast( mimeData->imageData() ); + UBFeature element = dynamic_cast(QObject::parent())->getFeaturesController()->importImage( image, parentFeature ); + addItem( element ); + } return true; } void UBFeaturesModel::addItem( const UBFeature &item ) { beginInsertRows( QModelIndex(), featuresList->size(), featuresList->size() ); - featuresList->push_back( item ); + featuresList->append( item ); endInsertRows(); } @@ -580,8 +854,8 @@ void UBFeaturesModel::deleteFavoriteItem( const QString &path ) { for ( int i = 0; i < featuresList->size(); ++i ) { - if ( !QString::compare( featuresList->at(i).getFullPath(), path, Qt::CaseInsensitive ) && - !QString::compare( featuresList->at(i).getUrl(), "/root/favorites", Qt::CaseInsensitive ) ) + if ( !QString::compare( featuresList->at(i).getUrl(), path, Qt::CaseInsensitive ) && + !QString::compare( featuresList->at(i).getVirtualPath(), "/root/favorites", Qt::CaseInsensitive ) ) { removeRow( i, QModelIndex() ); return; @@ -625,10 +899,27 @@ Qt::ItemFlags UBFeaturesModel::flags( const QModelIndex &index ) const item.getType() == FEATURE_ITEM || item.getType() == FEATURE_INTERNAL ) return Qt::ItemIsDragEnabled | defaultFlags; - if ( item.isFolder() && !item.getFullPath().isNull() ) + if ( item.isFolder() && !item.getVirtualPath().isNull() ) return defaultFlags | Qt::ItemIsDropEnabled; - else return defaultFlags; + else return defaultFlags | Qt::ItemIsDropEnabled; } + /*if ( index.isValid() ) + { + UBFeature item = index.data( Qt::UserRole + 1 ).value(); + switch( item.getType() ) + { + case FEATURE_CATEGORY: + case FEATURE_FOLDER: + case FEATURE_FAVORITE: + case FEATURE_TRASH: + return Qt::ItemIsDropEnabled | Qt::ItemIsEnabled; + case FEATURE_INTERACTIVE: + case FEATURE_INTERNAL: + case FEATURE_ITEM: + return Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsSelectable; + default:; + } + }*/ return defaultFlags | Qt::ItemIsDropEnabled; } @@ -636,7 +927,7 @@ Qt::ItemFlags UBFeaturesModel::flags( const QModelIndex &index ) const QStringList UBFeaturesModel::mimeTypes() const { QStringList types; - types << "text/uri-list"; + types << "text/uri-list" << "image/png" << "image/tiff" << "image/gif" << "image/jpeg"; return types; } @@ -678,9 +969,8 @@ bool UBFeaturesPathProxyModel::filterAcceptsRow( int sourceRow, const QModelInde eUBLibElementType type = (eUBLibElementType)sourceModel()->data(index, Qt::UserRole + 1).toInt();*/ UBFeature feature = sourceModel()->data(index, Qt::UserRole + 1).value(); - QString virtualFullPath = feature.getUrl() + "/" + feature.getName(); - return feature.isFolder() && path.startsWith( virtualFullPath ); + return feature.isFolder() && path.startsWith( feature.getFullVirtualPath() ); } QString UBFeaturesItemDelegate::displayText ( const QVariant & value, const QLocale & locale ) const @@ -692,13 +982,7 @@ QString UBFeaturesItemDelegate::displayText ( const QVariant & value, const QLoc { const QFontMetrics fm = listView->fontMetrics(); const QSize iSize = listView->iconSize(); - - if ( iSize.width() > 0 && fm.width(text) > iSize.width() ) - { - while (fm.width(text) > iSize.width()) - text.resize(text.size()-1); - text += "..."; - } + return elidedText( fm, iSize.width(), Qt::ElideRight, text ); } return text; } diff --git a/src/gui/UBFeaturesWidget.h b/src/gui/UBFeaturesWidget.h index ea718f22..85aaebbd 100644 --- a/src/gui/UBFeaturesWidget.h +++ b/src/gui/UBFeaturesWidget.h @@ -18,12 +18,15 @@ #include "UBDockPaletteWidget.h" //#include "UBLibActionBar.h" #include "board/UBFeaturesController.h" +#include "api/UBWidgetUniboardAPI.h" #include "UBFeaturesActionBar.h" +#include "UBRubberBand.h" #define THUMBNAIL_WIDTH 400 #define ID_LISTVIEW 0 #define ID_PROPERTIES 1 +#define ID_WEBVIEW 2 class UBListModel; @@ -37,6 +40,7 @@ class UBFeaturesPathViewer; class UBFeatureProperties; class UBFeatureItemButton; class UBFeaturesListView; +class UBFeaturesWebView; class UBFeaturesWidget : public UBDockPaletteWidget { @@ -58,6 +62,7 @@ public: private: void switchToListView(); void switchToProperties(); + void switchToWebView(); UBFeaturesController *controller; @@ -78,7 +83,9 @@ private: QGraphicsScene *pathScene; UBFeaturesActionBar *mActionBar; UBFeatureProperties *featureProperties; + UBFeaturesWebView *webView; QStackedWidget *stackedWidget; + int currentStackedWidget; QModelIndex trashIndex; @@ -92,6 +99,9 @@ private slots: void addToFavorite( const QMimeData & ); void removeFromFavorite( const QMimeData & ); void thumbnailSizeChanged( int ); + void onDisplayMetadata( QMap ); + void onAddDownloadedFileToLibrary(bool, QUrl, QString, QByteArray); + void addElementsToFavorite(); protected: bool eventFilter(QObject *target, QEvent *event); }; @@ -105,8 +115,33 @@ public: protected: virtual void dragEnterEvent( QDragEnterEvent *event ); virtual void dropEvent( QDropEvent *event ); + virtual void dragMoveEvent( QDragMoveEvent *event ); + /*virtual void mousePressEvent( QMouseEvent *event ); + virtual void mouseMoveEvent( QMouseEvent *event ); + virtual void mouseReleaseEvent( QMouseEvent *event );*/ +private: + //UBRubberBand *rubberBand; + //QPoint rubberOrigin; }; +class UBFeaturesWebView : public QWidget +{ + Q_OBJECT +public: + UBFeaturesWebView(QWidget* parent = 0, const char* name = "UBFeaturesWebView"); + ~UBFeaturesWebView(); + + void showElement(const UBFeature &elem); + +private slots: + void onLoadFinished(bool ok); + +private: + QWebView* mpView; + QWebSettings* mpWebSettings; + QVBoxLayout* mpLayout; + UBWidgetUniboardAPI* mpSankoreAPI; +}; class UBFeatureProperties : public QWidget { @@ -119,28 +154,31 @@ public: protected: - //void resizeEvent(QResizeEvent *event); - //void showEvent(QShowEvent *event); + void resizeEvent(QResizeEvent *event); + void showEvent(QShowEvent *event); private slots: void onAddToPage(); - //void onAddToLib(); - //void onSetAsBackground(); + void onAddToLib(); + void onSetAsBackground(); //void onBack(); private: + void populateMetadata(); + void adaptSize(); + QVBoxLayout* mpLayout; QHBoxLayout* mpButtonLayout; UBFeatureItemButton* mpAddPageButton; UBFeatureItemButton* mpAddToLibButton; UBFeatureItemButton* mpSetAsBackgroundButton; QLabel* mpObjInfoLabel; - //QTreeWidget* mpObjInfos; + QTreeWidget* mpObjInfos; QLabel* mpThumbnail; QPixmap* mpOrigPixmap; int maxThumbHeight; UBFeature *mpElement; - //QTreeWidgetItem* mpItem; + QTreeWidgetItem* mpItem; }; @@ -174,7 +212,7 @@ public: Qt::DropActions supportedDropActions() const { return Qt::MoveAction | Qt::CopyAction; } - void setFeaturesList( QList *flist ) { featuresList = flist; } + void setFeaturesList(QList *flist ) { featuresList = flist; } private: QList *featuresList; }; diff --git a/src/gui/UBLibItemProperties.cpp b/src/gui/UBLibItemProperties.cpp index 4d2eada3..86c9233d 100644 --- a/src/gui/UBLibItemProperties.cpp +++ b/src/gui/UBLibItemProperties.cpp @@ -18,12 +18,13 @@ #include "core/UBApplication.h" #include "core/UBDownloadManager.h" -#include "core/memcheck.h" #include "frameworks/UBFileSystemUtils.h" #include "globals/UBGlobals.h" +#include "core/memcheck.h" + /** * \brief Constructor diff --git a/src/gui/UBLibNavigatorWidget.cpp b/src/gui/UBLibNavigatorWidget.cpp index 5974c4ea..d7b50551 100644 --- a/src/gui/UBLibNavigatorWidget.cpp +++ b/src/gui/UBLibNavigatorWidget.cpp @@ -16,10 +16,11 @@ #include "UBLibWidget.h" #include "core/UBApplication.h" -#include "core/memcheck.h" #include "globals/UBGlobals.h" +#include "core/memcheck.h" + static int lowBoundForSlider = 40; static int topBoundForSlider = 120; static int tickIntervalForSlider = 10; diff --git a/src/gui/UBLibPathViewer.cpp b/src/gui/UBLibPathViewer.cpp index fe31b290..9ca91d82 100644 --- a/src/gui/UBLibPathViewer.cpp +++ b/src/gui/UBLibPathViewer.cpp @@ -20,10 +20,11 @@ #include "core/UBApplication.h" #include "board/UBBoardController.h" -#include "core/memcheck.h" #include "core/UBDownloadManager.h" #include "board/UBBoardPaletteManager.h" +#include "core/memcheck.h" + /** * \brief Constructor * @param parent as the parent widget diff --git a/src/gui/UBLibWebView.cpp b/src/gui/UBLibWebView.cpp index ac6e11a5..a70cbcdc 100644 --- a/src/gui/UBLibWebView.cpp +++ b/src/gui/UBLibWebView.cpp @@ -1,7 +1,6 @@ #include #include "core/UBApplication.h" -#include "core/memcheck.h" #include "board/UBBoardController.h" @@ -9,7 +8,7 @@ #include "UBLibWebView.h" - +#include "core/memcheck.h" UBLibWebView::UBLibWebView(QWidget* parent, const char* name):QWidget(parent) , mpView(NULL) diff --git a/src/gui/UBLibWidget.cpp b/src/gui/UBLibWidget.cpp index 9765bae4..5fbfad49 100644 --- a/src/gui/UBLibWidget.cpp +++ b/src/gui/UBLibWidget.cpp @@ -17,10 +17,11 @@ #include "UBLibWidget.h" #include "core/UBApplication.h" -#include "core/memcheck.h" #include "globals/UBGlobals.h" +#include "core/memcheck.h" + /** * \brief Constructor * @param parent as the parent widget diff --git a/src/gui/UBPageNavigationWidget.cpp b/src/gui/UBPageNavigationWidget.cpp index 6ff72dd8..4d751ccd 100644 --- a/src/gui/UBPageNavigationWidget.cpp +++ b/src/gui/UBPageNavigationWidget.cpp @@ -14,12 +14,13 @@ */ #include "UBPageNavigationWidget.h" #include "core/UBApplication.h" -#include "core/memcheck.h" #include "board/UBBoardController.h" #include "globals/UBGlobals.h" +#include "core/memcheck.h" + /** * \brief Constructor * @param parent as the parent widget diff --git a/src/gui/UBTGWidgetTreeDelegate.cpp b/src/gui/UBTGWidgetTreeDelegate.cpp index 928beac9..1b3754f6 100644 --- a/src/gui/UBTGWidgetTreeDelegate.cpp +++ b/src/gui/UBTGWidgetTreeDelegate.cpp @@ -7,6 +7,8 @@ #include #include "UBTGWidgetTreeDelegate.h" +#include "core/memcheck.h" + UBTGWidgetTreeDelegate::UBTGWidgetTreeDelegate(QObject *parent) : QStyledItemDelegate(parent) { diff --git a/src/gui/UBTeacherGuideDelegate.cpp b/src/gui/UBTeacherGuideDelegate.cpp index 33dba6fe..fd98606a 100644 --- a/src/gui/UBTeacherGuideDelegate.cpp +++ b/src/gui/UBTeacherGuideDelegate.cpp @@ -1,4 +1,5 @@ #include "UBTeacherGuideDelegate.h" +#include "core/memcheck.h" UBTeacherGuideDelegate::UBTeacherGuideDelegate() { diff --git a/src/gui/UBTeacherGuideWidget.cpp b/src/gui/UBTeacherGuideWidget.cpp index 9fc0fdcd..1d571274 100644 --- a/src/gui/UBTeacherGuideWidget.cpp +++ b/src/gui/UBTeacherGuideWidget.cpp @@ -40,6 +40,8 @@ #include "document/UBDocumentProxy.h" #include "document/UBDocumentController.h" +#include "core/memcheck.h" + #define UBTG_SEPARATOR_FIXED_HEIGHT 3 diff --git a/src/gui/UBTeacherGuideWidgetsTools.cpp b/src/gui/UBTeacherGuideWidgetsTools.cpp index 73b89276..adf91d11 100644 --- a/src/gui/UBTeacherGuideWidgetsTools.cpp +++ b/src/gui/UBTeacherGuideWidgetsTools.cpp @@ -32,6 +32,8 @@ #include "frameworks/UBFileSystemUtils.h" +#include "core/memcheck.h" + /*************************************************************************** * class UBAddItem * diff --git a/src/pdf-merger/CCITTFaxDecode.cpp b/src/pdf-merger/CCITTFaxDecode.cpp index 1b9310c9..5c1ab0af 100644 --- a/src/pdf-merger/CCITTFaxDecode.cpp +++ b/src/pdf-merger/CCITTFaxDecode.cpp @@ -16,6 +16,8 @@ #include #include "CCITTFaxDecode.h" +#include "core/memcheck.h" + using namespace merge_lib; bool CCITTFaxDecode::encode(std::string & decoded) diff --git a/src/pdf-merger/DCTDecode.cpp b/src/pdf-merger/DCTDecode.cpp index 603926c5..392c4862 100644 --- a/src/pdf-merger/DCTDecode.cpp +++ b/src/pdf-merger/DCTDecode.cpp @@ -16,6 +16,8 @@ #include #include "DCTDecode.h" +#include "core/memcheck.h" + using namespace merge_lib; bool DCTDecode::encode(std::string & decoded) diff --git a/src/pdf-merger/JBIG2Decode.cpp b/src/pdf-merger/JBIG2Decode.cpp index 6ef248d0..f6e601de 100644 --- a/src/pdf-merger/JBIG2Decode.cpp +++ b/src/pdf-merger/JBIG2Decode.cpp @@ -15,6 +15,7 @@ #include #include "JBIG2Decode.h" +#include "core/memcheck.h" using namespace merge_lib; diff --git a/src/web/UBOEmbedParser.cpp b/src/web/UBOEmbedParser.cpp index 1cb8e1f8..786d2883 100644 --- a/src/web/UBOEmbedParser.cpp +++ b/src/web/UBOEmbedParser.cpp @@ -24,6 +24,8 @@ #include "UBOEmbedParser.h" +#include "core/memcheck.h" + UBOEmbedParser::UBOEmbedParser(QObject *parent, const char* name) { Q_UNUSED(parent); diff --git a/src/web/UBWebController.cpp b/src/web/UBWebController.cpp index ca46e500..2e975868 100644 --- a/src/web/UBWebController.cpp +++ b/src/web/UBWebController.cpp @@ -423,7 +423,7 @@ void UBWebController::setupPalettes() { if(!(*mToolsCurrentPalette)) { - (*mToolsCurrentPalette) = new UBWebToolsPalette((*mCurrentWebBrowser),false); + (*mToolsCurrentPalette) = new UBWebToolsPalette(UBApplication::mainWindow, false); #ifndef Q_WS_WIN if (UBPlatformUtils::hasVirtualKeyboard() && UBApplication::boardController->paletteManager()->mKeyboardPalette)