diff --git a/Sankore 3.1.iss b/Sankore 3.1.iss index eaeacb68..4aba09e1 100644 --- a/Sankore 3.1.iss +++ b/Sankore 3.1.iss @@ -63,7 +63,6 @@ Source: "..\Qt-sankore3.1\lib\QtWebKit4.dll"; DestDir: "{app}"; Flags: ignorever Source: "..\Qt-sankore3.1\lib\phonon4.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\Qt-sankore3.1\lib\QtNetwork4.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\Qt-sankore3.1\lib\QtSvg4.dll"; DestDir: "{app}"; Flags: ignoreversion -Source: "..\Qt-sankore3.1\lib\QtOpenGL4.dll"; DestDir: "{app}"; Flags: ignoreversion ;Qt plugins Source: "..\Qt-sankore3.1\plugins\accessible\qtaccessiblecompatwidgets4.dll"; DestDir: "{app}\accessible"; Flags: ignoreversion diff --git a/Sankore_3.1.pro b/Sankore_3.1.pro index 6d4112ae..5620eb7b 100644 --- a/Sankore_3.1.pro +++ b/Sankore_3.1.pro @@ -12,8 +12,8 @@ linux-g++-64 { VERSION_MAJ = 1 VERSION_MIN = 50 -VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error -VERSION_PATCH = 00 +VERSION_TYPE = a # a = alpha, b = beta, r = release, other => error +VERSION_PATCH = 20 VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = $$replace(VERSION, "\\.r", "") @@ -52,7 +52,6 @@ include(src/podcast/podcast.pri) include(src/tools/tools.pri) include(src/desktop/desktop.pri) include(src/web/web.pri) -include(src/softwareupdate/softwareupdate.pri) include(src/transition/transition.pri) include(src/customWidgets/customWidgets.pri) include(src/interfaces/interfaces.pri) @@ -137,7 +136,7 @@ macx { LIBS += -framework AppKit LIBS += -framework WebKit - CONFIG(release, debug|release):CONFIG += x86 ppc + CONFIG(release, debug|release):CONFIG += x86 # [03-02-2011] We must use the 32bit version for the moment # because the Quicktime components used by this application diff --git a/release.linux.sh b/release.linux.sh index 79bdc17c..313ac7dc 100755 --- a/release.linux.sh +++ b/release.linux.sh @@ -39,14 +39,18 @@ checkDirectory(){ # path definition # ####################################################################### QT_PATH="/usr/local/Trolltech/Qt-4.7.3" -PLUGINS_PATH="$QT_PATH/plugins" +QT_PLUGINS_PATH="$QT_PATH/plugins" RELEASE_DIR=build/linux/release BUILD_DIR=$RELEASE_DIR/product GUI_TRANSLATIONS_DIRECTORY_PATH="../Qt-sankore3.1/translations" QT_LIBRARY_SOURCE_PATH="$QT_PATH/lib" +SANKORE_SRC_PLUGINS_PATH="plugins" +SANKORE_DST_PLUGINS_PATH=build/linux/release/product/plugins +CFF_ADAPTOR_SRC_PLUGIN_PATH=$SANKORE_SRC_PLUGINS_PATH/cffadaptor/build/linux/release/lib QMAKE_PATH="$QT_PATH/bin/qmake" -LRELEASE="/usr/local/Trolltech/Qt-4.7.3/bin/lrelease" +LRELEASE="../Qt-sankore3.1/bin/lrelease" +#LRELEASE="/usr/local/Trolltech/Qt-4.7.3/bin/lrelease" ARCHITECTURE=`uname -m` @@ -57,13 +61,15 @@ checkExecutable $QMAKE_PATH checkExecutable $LRELEASE checkDirectory $GUI_TRANSLATIONS_DIRECTORY_PATH -checkDirectory $PLUGINS_PATH +checkDirectory $QT_PLUGINS_PATH checkDirectory $QT_LIBRARY_SOURCE_PATH +checkDirectory $CFF_ADAPTOR_PLUGIN_PATH + ####################################################################### # cleaning # ####################################################################### -rm -rf $RELEASE_DIR +#rm -rf $RELEASE_DIR ####################################################################### @@ -126,21 +132,26 @@ cp -R resources/linux/qtlinux/* $BUILD_DIR cp -R resources/customizations $BUILD_DIR +notify-send "Sankore" "Copying plugins..." +mkdir "$SANKORE_DST_PLUGINS_PATH" +mkdir "$SANKORE_DST_PLUGINS_PATH/cffadaptor" +cp -R $CFF_ADAPTOR_SRC_PLUGIN_PATH/*.so* "$SANKORE_DST_PLUGINS_PATH/cffadaptor" + notify-send "QT" "Coping plugins and library ..." -cp -R $PLUGINS_PATH $BUILD_DIR +cp -R $QT_PLUGINS_PATH $BUILD_DIR #copying custom qt library QT_LIBRARY_DEST_PATH="$BUILD_DIR/qtlib" mkdir $QT_LIBRARY_DEST_PATH copyQtLibrary(){ - if [ ! -e "$QT_LIBRARY_SOURCE_PATH/$1.so.4.7.3" ]; then + if [ ! -e "$QT_LIBRARY_SOURCE_PATH/$1.so.4" ]; then notifyError "$1 library not found in path: $QT_LIBRARY_SOURCE_PATH" fi - cp "$QT_LIBRARY_SOURCE_PATH/$1.so.4" "$QT_LIBRARY_DEST_PATH/" - cp "$QT_LIBRARY_SOURCE_PATH/$1.so.4.7.3" "$QT_LIBRARY_DEST_PATH/" + cp $QT_LIBRARY_SOURCE_PATH/$1.so.4.* $QT_LIBRARY_DEST_PATH/ } +copyQtLibrary libphonon copyQtLibrary libQtWebKit copyQtLibrary libQtDBus copyQtLibrary libQtScript @@ -150,14 +161,8 @@ copyQtLibrary libQtNetwork copyQtLibrary libQtXml copyQtLibrary libQtGui copyQtLibrary libQtCore - -if [ ! -e "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4.4.0" ]; then - notifyError "phonon library not found in path: $QT_LIBRARY_SOURCE_PATH" -else - cp "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4" "$QT_LIBRARY_DEST_PATH/" - cp "$QT_LIBRARY_SOURCE_PATH/libphonon.so.4.4.0" "$QT_LIBRARY_DEST_PATH/" -fi - +# uncomment for Qt 4.8 +#copyQtLibrary libQtOpenGL ####################################################################### # Removing unwanted files # @@ -279,7 +284,7 @@ echo "Priority: optional" >> "$CONTROL_FILE" echo "Architecture: $ARCHITECTURE" >> "$CONTROL_FILE" echo "Essential: no" >> "$CONTROL_FILE" echo "Installed-Size: `du -s $SANKORE_PACKAGE_DIRECTORY | awk '{ print $1 }'`" >> "$CONTROL_FILE" -echo "Maintainer: Open-Sankoré Developers team " >> "$CONTROL_FILE" +echo "Maintainer: Open-Sankore Developers team " >> "$CONTROL_FILE" echo "Homepage: http://dev.open-sankore.org" >> "$CONTROL_FILE" echo -n "Depends: " >> "$CONTROL_FILE" unset tab @@ -318,7 +323,7 @@ echo "Version=$VERSION" >> $SANKORE_SHORTCUT echo "Encoding=UTF-8" >> $SANKORE_SHORTCUT echo "Name=Open-Sankore ($VERSION)" >> $SANKORE_SHORTCUT echo "GenericName=Open-Sankore" >> $SANKORE_SHORTCUT -echo "Comment=Logiciel de création de présentations pour tableau numérique interactif (TNI)" >> $SANKORE_SHORTCUT +echo "Comment=Logiciel de creation de presentations pour tableau numerique interactif (TNI)" >> $SANKORE_SHORTCUT echo "Exec=/usr/local/$SANKORE_DIRECTORY_NAME/run.sh" >> $SANKORE_SHORTCUT echo "Icon=/usr/local/$SANKORE_DIRECTORY_NAME/sankore.png" >> $SANKORE_SHORTCUT echo "StartupNotify=true" >> $SANKORE_SHORTCUT @@ -353,4 +358,4 @@ cd $RELEASE_DIR rm ../../../install/linux/Open-Sankore.tar.gz tar cvzf ../../../install/linux/Open-Sankore.tar.gz Open-Sankore.$VERSION -C . -notify-send "Open-Sankore" "tar.gz Build done" +notify-send "Open-Sankore" "tar.gz Build done" \ No newline at end of file diff --git a/release.win7.vc9.bat b/release.win7.vc9.bat index dbf91aa2..c11d938d 100644 --- a/release.win7.vc9.bat +++ b/release.win7.vc9.bat @@ -62,7 +62,8 @@ nmake release-install copy %BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm build\win32\release\product\i18n\ -copy resources\customizations build\win32\release\product\ +mkdir build\win32\release\product\customizations +xcopy /s resources\customizations\* build\win32\release\product\customizations del build\win32\release\product\i18n\qt_help* diff --git a/resources/forms/mainWindow.ui b/resources/forms/mainWindow.ui index f8c9ba81..a2ac84b8 100644 --- a/resources/forms/mainWindow.ui +++ b/resources/forms/mainWindow.ui @@ -1643,10 +1643,10 @@ :/images/toolbar/library.png:/images/toolbar/library.png - Gtorup items + Group Items - Erase Content + Group items diff --git a/resources/i18n/sankore_ar.ts b/resources/i18n/sankore_ar.ts index e8dab019..b43ffb46 100644 --- a/resources/i18n/sankore_ar.ts +++ b/resources/i18n/sankore_ar.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ التصدير لمتصفح الويب + + UBFeatureProperties + + Add to page + الاضافة الى الصفحة + + + Set as background + تعيين كخلفية + + + Add to library + الاضافة الى المكتبة + + + Object informations + معلومات حول الأشياء + + + + UBFeaturesActionBar + + Add to favorites + الاضافة الى المفضلة + + + Share + تقاسم + + + Search + بحث + + + Delete + حذف + + + Back to folder + العودة الى المجلد + + + Remove from favorites + الحذف المفضلة + + + Create new folder + انشاء مجلد جديد + + + + UBFeaturesController + + ImportedImage + الصورة المستوردة + + + + UBGraphicsGroupContainerItemDelegate + + Locked + مقفل + + + Visible on Extended Screen + مرئي على الشاشة الكبيرة + + UBGraphicsItemDelegate @@ -1857,11 +1933,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2833,6 +3002,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_da.ts b/resources/i18n/sankore_da.ts index e8d23158..f1c4506e 100644 --- a/resources/i18n/sankore_da.ts +++ b/resources/i18n/sankore_da.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ Eksport til webbrowser + + UBFeatureProperties + + Add to page + Tilføj til side + + + Set as background + Brug som baggrund + + + Add to library + Tilføj til bibliotek + + + Object informations + Oplysninger om objekt + + + + UBFeaturesActionBar + + Add to favorites + Tilføj til favoritter + + + Share + Del + + + Search + Søg + + + Delete + Slet + + + Back to folder + Tilbage til mappe + + + Remove from favorites + Fjern fra favoritter + + + Create new folder + Opret ny mappe + + + + UBFeaturesController + + ImportedImage + ImporteretBillede + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Låst + + + Visible on Extended Screen + Synlig på udvidet skærm + + UBGraphicsItemDelegate @@ -1863,11 +1939,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2840,6 +3009,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_de.ts b/resources/i18n/sankore_de.ts index 46df491a..13d45411 100644 --- a/resources/i18n/sankore_de.ts +++ b/resources/i18n/sankore_de.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ In Web-Browser exportieren + + UBFeatureProperties + + Add to page + Zur Seite hinzufügen + + + Set as background + Als Hintergrund festlegen + + + Add to library + Zur Bibliothek hinzufügen + + + Object informations + Objektinformationen + + + + UBFeaturesActionBar + + Add to favorites + Zu Favoriten hinzufügen + + + Share + Teilen + + + Search + Suchen + + + Delete + Löschen + + + Back to folder + Zurück zum Ordner + + + Remove from favorites + Aus Favoritenliste entfernen + + + Create new folder + Neuen Ordner erstellen + + + + UBFeaturesController + + ImportedImage + Importiertes Bild + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Gesperrt + + + Visible on Extended Screen + Auf erweitertem Bildschirm sichtbar + + UBGraphicsItemDelegate @@ -1863,11 +1939,104 @@ Möchten Sie diese Fehler auf diesem Computer ignorieren? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2840,6 +3009,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_en.ts b/resources/i18n/sankore_en.ts index eef93edd..8932c67b 100644 --- a/resources/i18n/sankore_en.ts +++ b/resources/i18n/sankore_en.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ + + UBFeatureProperties + + Add to page + + + + Set as background + + + + Add to library + + + + Object informations + + + + + UBFeaturesActionBar + + Add to favorites + + + + Share + + + + Search + + + + Delete + + + + Back to folder + + + + Remove from favorites + + + + Create new folder + + + + + UBFeaturesController + + ImportedImage + + + + + UBGraphicsGroupContainerItemDelegate + + Locked + + + + Visible on Extended Screen + + + UBGraphicsItemDelegate @@ -1857,11 +1933,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + - Document title + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2833,6 +3002,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_en_UK.ts b/resources/i18n/sankore_en_UK.ts index 1a355789..b1c80fe5 100644 --- a/resources/i18n/sankore_en_UK.ts +++ b/resources/i18n/sankore_en_UK.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ + + UBFeatureProperties + + Add to page + + + + Set as background + + + + Add to library + + + + Object informations + + + + + UBFeaturesActionBar + + Add to favorites + + + + Share + + + + Search + + + + Delete + + + + Back to folder + + + + Remove from favorites + + + + Create new folder + + + + + UBFeaturesController + + ImportedImage + + + + + UBGraphicsGroupContainerItemDelegate + + Locked + + + + Visible on Extended Screen + + + UBGraphicsItemDelegate @@ -1857,11 +1933,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + - Document title + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2833,6 +3002,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_es.ts b/resources/i18n/sankore_es.ts index ba9938d4..604ba422 100644 --- a/resources/i18n/sankore_es.ts +++ b/resources/i18n/sankore_es.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents Importar viejos documentos de Sankore o Uniboard + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ Exportar al explorador web + + UBFeatureProperties + + Add to page + Añadir a la página + + + Set as background + Definir como fondo + + + Add to library + Añadir a biblioteca + + + Object informations + Información del objeto + + + + UBFeaturesActionBar + + Add to favorites + Añadir a favoritos + + + Share + Compartir + + + Search + + + + Delete + Eliminar + + + Back to folder + Regresar a la carpeta + + + Remove from favorites + Eliminar de favoritos + + + Create new folder + Crear nueva carpeta + + + + UBFeaturesController + + ImportedImage + Imagen importada + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Bloqueado + + + Visible on Extended Screen + Visible en pantalla extendida + + UBGraphicsItemDelegate @@ -1863,11 +1939,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + - Document title + Type session title here ... + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2844,6 +3013,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_fr.ts b/resources/i18n/sankore_fr.ts index 29fd90e9..40fd627e 100644 --- a/resources/i18n/sankore_fr.ts +++ b/resources/i18n/sankore_fr.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents Importer les anciens documents Sankoré et Uniboard + + Group Items + Grouper + + + Group items + Grouper + PasswordDialog @@ -1216,23 +1224,23 @@ UBExportCFF Export to IWB - + Exporter au format IWB Export as IWB File - + Exporter comme fichier IWB Exporting document... - Exportation du document... + Exportation du document en cours Export successful. - Exportation terminée. + Exportation terminée. Export failed. - Exportation échouée. + Exportation échouée. @@ -1331,6 +1339,74 @@ Exporter vers un navigateur Web + + UBFeatureProperties + + Add to page + Ajouter à la page + + + Set as background + Ajouter en arrière plan + + + Add to library + Ajouter à la librarie + + + Object informations + Informations + + + + UBFeaturesActionBar + + Add to favorites + Ajouter aux favoris + + + Share + Partager + + + Search + Rechercher + + + Delete + Supprimer + + + Back to folder + Retour au répertoire + + + Remove from favorites + Supprimer des favoris + + + Create new folder + Créer un nouveau dossier + + + + UBFeaturesController + + ImportedImage + ImageImportée + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Verrouillé + + + Visible on Extended Screen + Visible sur l'écran de projection + + UBGraphicsItemDelegate @@ -1801,33 +1877,33 @@ Voulez-vous ignorer les erreurs pour ce serveur? UBTGActionWidget Teacher - + Professeur Student - + Elève Type task here ... - + Ajouter une action UBTGMediaWidget drop media here ... - + Glisser un média ici ... Type title here... - + Titre de l'activité UBTGUrlWidget Insert link title here... - + Titre @@ -1841,39 +1917,132 @@ Voulez-vous ignorer les erreurs pour ce serveur? UBTeacherGuideEditionWidget Type title here ... - + Titre Type comment here ... - + Commentaire, descriptif Add an action - + Ajouter une action Add a media - + Ajouter un média Add a link - + Ajouter un lien Page: %0 - + Page: %0 - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + Titre de la séance + + + Author(s) + Auteur(s) + + + Type authors here ... + Auteur(s) + - Document title + Resource indexing + Indexation de la ressource + + + Keywords: + Mots clé(s) + + + Type keywords here ... + Mots clés + + + Level: + Niveau scolaire + + + Type: + Type + + + Licence + Licence + + + Attribution CC BY - Page: %0 + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + Crée le: + + + Updated the: + + Modifié le: + + + Objective(s) + Objectif(s) + + + Type objectives here... + Objectifs + + + Subjects: + Discipline: + + + + UBTeacherGuidePresentationWidget + + Page: %0 + + UBThumbnailAdaptor @@ -2842,6 +3011,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + Crédits + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_fr_CH.ts b/resources/i18n/sankore_fr_CH.ts index e44d3ccc..40fd627e 100644 --- a/resources/i18n/sankore_fr_CH.ts +++ b/resources/i18n/sankore_fr_CH.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents Importer les anciens documents Sankoré et Uniboard + + Group Items + Grouper + + + Group items + Grouper + PasswordDialog @@ -1196,8 +1204,8 @@ %1 pages copied - %1 page(s) copiée(s) - + %1 page copiée + %1 pages copiées @@ -1216,23 +1224,23 @@ UBExportCFF Export to IWB - + Exporter au format IWB Export as IWB File - + Exporter comme fichier IWB Exporting document... - Exportation du document... + Exportation du document en cours Export successful. - Exportation terminée. + Exportation terminée. Export failed. - Exportation échouée. + Exportation échouée. @@ -1331,6 +1339,74 @@ Exporter vers un navigateur Web + + UBFeatureProperties + + Add to page + Ajouter à la page + + + Set as background + Ajouter en arrière plan + + + Add to library + Ajouter à la librarie + + + Object informations + Informations + + + + UBFeaturesActionBar + + Add to favorites + Ajouter aux favoris + + + Share + Partager + + + Search + Rechercher + + + Delete + Supprimer + + + Back to folder + Retour au répertoire + + + Remove from favorites + Supprimer des favoris + + + Create new folder + Créer un nouveau dossier + + + + UBFeaturesController + + ImportedImage + ImageImportée + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Verrouillé + + + Visible on Extended Screen + Visible sur l'écran de projection + + UBGraphicsItemDelegate @@ -1473,7 +1549,7 @@ UBKeyboardPalette Enter - + Retour @@ -1801,33 +1877,33 @@ Voulez-vous ignorer les erreurs pour ce serveur? UBTGActionWidget Teacher - + Professeur Student - + Elève Type task here ... - + Ajouter une action UBTGMediaWidget drop media here ... - + Glisser un média ici ... Type title here... - + Titre de l'activité UBTGUrlWidget Insert link title here... - + Titre @@ -1841,39 +1917,132 @@ Voulez-vous ignorer les erreurs pour ce serveur? UBTeacherGuideEditionWidget Type title here ... - + Titre Type comment here ... - + Commentaire, descriptif Add an action - + Ajouter une action Add a media - + Ajouter un média Add a link - + Ajouter un lien Page: %0 - + Page: %0 - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + Titre de la séance + + + Author(s) + Auteur(s) + + + Type authors here ... + Auteur(s) + + + Resource indexing + Indexation de la ressource + + + Keywords: + Mots clé(s) + - Document title + Type keywords here ... + Mots clés + + + Level: + Niveau scolaire + + + Type: + Type + + + Licence + Licence + + + Attribution CC BY - Page: %0 + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + Created the: + + Crée le: + + + Updated the: + + Modifié le: + + + Objective(s) + Objectif(s) + + + Type objectives here... + Objectifs + + + Subjects: + Discipline: + + + + UBTeacherGuidePresentationWidget + + Page: %0 + + UBThumbnailAdaptor @@ -2567,27 +2736,27 @@ p, li { white-space: pre-wrap; } Multi display - + Multi-écran Swap control display and view display - + Inverser les écrans Mode - + Mode Mode to start in: - + Démarrer en mode: Board - Tableau + Tableau Desktop - + Bureau Proxy User: @@ -2842,6 +3011,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + Crédits + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_it.ts b/resources/i18n/sankore_it.ts index 82c562cf..c8343a8f 100644 --- a/resources/i18n/sankore_it.ts +++ b/resources/i18n/sankore_it.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents Importa i vecchi documenti Sankoré o Uniboard + + Group Items + + + + Group items + + PasswordDialog @@ -1331,6 +1339,74 @@ Esporta nel browser web + + UBFeatureProperties + + Add to page + Aggiungi alla pagina + + + Set as background + Imposta come sfondo + + + Add to library + Aggiungi alla libreria + + + Object informations + Informazioni sull'oggetto + + + + UBFeaturesActionBar + + Add to favorites + Aggiungi ai preferiti + + + Share + Condividi + + + Search + + + + Delete + Cancella + + + Back to folder + Torna alla cartella + + + Remove from favorites + Rimuovi dai preferiti + + + Create new folder + Crea nuova cartella + + + + UBFeaturesController + + ImportedImage + Immagine importata + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Bloccato + + + Visible on Extended Screen + Visibile sullo schermo esteso + + UBGraphicsItemDelegate @@ -1865,11 +1941,104 @@ Vuoi ignorare gli errori per questo host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + - Document title + Type session title here ... + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2846,6 +3015,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_iw.ts b/resources/i18n/sankore_iw.ts index f8b24ced..1a933792 100644 --- a/resources/i18n/sankore_iw.ts +++ b/resources/i18n/sankore_iw.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ ייצא לדפדפן + + UBFeatureProperties + + Add to page + הוסף לדף + + + Set as background + קבע כרקע + + + Add to library + הוסף לספרייה + + + Object informations + מידע על האובייקט + + + + UBFeaturesActionBar + + Add to favorites + הוסף למועדפים + + + Share + שתף + + + Search + + + + Delete + מחק + + + Back to folder + חזרה לקובץ + + + Remove from favorites + הסר מהמועדפים + + + Create new folder + צור תיקייה חדשה + + + + UBFeaturesController + + ImportedImage + תמונה מיובאת + + + + UBGraphicsGroupContainerItemDelegate + + Locked + נעול + + + Visible on Extended Screen + ניתן לראותו במסך רחב + + UBGraphicsItemDelegate @@ -1857,11 +1933,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + - Document title + Type session title here ... + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2834,6 +3003,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_ja.ts b/resources/i18n/sankore_ja.ts index ef0b6697..30943a19 100644 --- a/resources/i18n/sankore_ja.ts +++ b/resources/i18n/sankore_ja.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ ウェブブラウザへエクスポート + + UBFeatureProperties + + Add to page + ページに追加 + + + Set as background + 背景として設定 + + + Add to library + ライブラリに追加 + + + Object informations + オブジェクトインフォーメーション + + + + UBFeaturesActionBar + + Add to favorites + お気に入りに追加 + + + Share + シェアする + + + Search + 検索 + + + Delete + 削除 + + + Back to folder + フォルダーに戻る + + + Remove from favorites + お気に入りから削除 + + + Create new folder + 新規フォルダーを作成 + + + + UBFeaturesController + + ImportedImage + インポートされた画像 + + + + UBGraphicsGroupContainerItemDelegate + + Locked + ロック + + + Visible on Extended Screen + 拡張画面でみることができます + + UBGraphicsItemDelegate @@ -1864,11 +1940,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2841,6 +3010,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_ko.ts b/resources/i18n/sankore_ko.ts index fcbfa379..d2ab151f 100644 --- a/resources/i18n/sankore_ko.ts +++ b/resources/i18n/sankore_ko.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ 웹 브라우저로 내보내기 + + UBFeatureProperties + + Add to page + 페이지에 추가 + + + Set as background + 배경으로 지정 + + + Add to library + 라이브러리에 추가 + + + Object informations + 객체 정보 + + + + UBFeaturesActionBar + + Add to favorites + 즐겨찾기에 추가 + + + Share + 공유 + + + Search + 검색 + + + Delete + 삭제 + + + Back to folder + 폴더로 돌아가기 + + + Remove from favorites + 즐겨찾기에서 제거 + + + Create new folder + 새 폴더 만들기 + + + + UBFeaturesController + + ImportedImage + 가져온 이미지 + + + + UBGraphicsGroupContainerItemDelegate + + Locked + 잠김 + + + Visible on Extended Screen + 확장 화면에 보이기 + + UBGraphicsItemDelegate @@ -1863,11 +1939,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2844,6 +3013,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_nb.ts b/resources/i18n/sankore_nb.ts index ea4200cf..1b34f8ff 100644 --- a/resources/i18n/sankore_nb.ts +++ b/resources/i18n/sankore_nb.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1330,6 +1338,74 @@ Eksporter til nettleser + + UBFeatureProperties + + Add to page + Legg til side + + + Set as background + Bruk som bakgrunn + + + Add to library + Legg til bibliotek + + + Object informations + Objektopplysninger + + + + UBFeaturesActionBar + + Add to favorites + Legg til favoritter + + + Share + Del + + + Search + Søk + + + Delete + + + + Back to folder + Tilbake til mappe + + + Remove from favorites + Fjern fra favoritter + + + Create new folder + Opprett ny mappe + + + + UBFeaturesController + + ImportedImage + Importert bilde + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Låst + + + Visible on Extended Screen + Synlig på utvidet skjerm + + UBGraphicsItemDelegate @@ -1858,11 +1934,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + - Document title + Type session title here ... + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2838,6 +3007,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_nl.ts b/resources/i18n/sankore_nl.ts index f88a567f..25e05be2 100644 --- a/resources/i18n/sankore_nl.ts +++ b/resources/i18n/sankore_nl.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ Exporteren naar Web Browser + + UBFeatureProperties + + Add to page + Aan pagina toevoegen + + + Set as background + Als achtergrond gebruiken + + + Add to library + Aan bibliotheek toevoegen + + + Object informations + Object informaties + + + + UBFeaturesActionBar + + Add to favorites + Aan favorieten toevoegen + + + Share + Delen + + + Search + Zoeken + + + Delete + Verwijderen + + + Back to folder + Terug naar map + + + Remove from favorites + Uit favorieten verwijderen + + + Create new folder + Nieuwe map maken + + + + UBFeaturesController + + ImportedImage + Geïmporteerd beeld + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Vergrendeld + + + Visible on Extended Screen + Weergeven op Verbreed scherm + + UBGraphicsItemDelegate @@ -1857,11 +1933,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2833,6 +3002,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_pl.ts b/resources/i18n/sankore_pl.ts index c28e1f13..0dba7d5a 100644 --- a/resources/i18n/sankore_pl.ts +++ b/resources/i18n/sankore_pl.ts @@ -800,6 +800,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1330,6 +1338,74 @@ Eksportowanie do przeglądarki sieci Web + + UBFeatureProperties + + Add to page + Dodaj do strony + + + Set as background + Ustaw jako tło + + + Add to library + Dodaj do biblioteki + + + Object informations + Informacje o obiekcie + + + + UBFeaturesActionBar + + Add to favorites + Dodaj do ulubionych + + + Share + Udostępniaj + + + Search + Szukaj + + + Delete + Usuń + + + Back to folder + Powrót do folderu + + + Remove from favorites + Usuń z ulubionych + + + Create new folder + Utwórz nowy folder + + + + UBFeaturesController + + ImportedImage + ImportowanyObraz + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Zablokowane + + + Visible on Extended Screen + Widoczne na ekranie rozszerzonym + + UBGraphicsItemDelegate @@ -1864,11 +1940,104 @@ Czy chcesz ignorować te błędy dla tego hosta? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2846,6 +3015,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_pt.ts b/resources/i18n/sankore_pt.ts index d8e58cac..f025f6d3 100644 --- a/resources/i18n/sankore_pt.ts +++ b/resources/i18n/sankore_pt.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ + + UBFeatureProperties + + Add to page + + + + Set as background + + + + Add to library + + + + Object informations + + + + + UBFeaturesActionBar + + Add to favorites + + + + Share + + + + Search + + + + Delete + + + + Back to folder + + + + Remove from favorites + + + + Create new folder + + + + + UBFeaturesController + + ImportedImage + + + + + UBGraphicsGroupContainerItemDelegate + + Locked + + + + Visible on Extended Screen + + + UBGraphicsItemDelegate @@ -1857,11 +1933,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + - Document title + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2833,6 +3002,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_rm.ts b/resources/i18n/sankore_rm.ts index bb9b2e7b..c6bb902d 100644 --- a/resources/i18n/sankore_rm.ts +++ b/resources/i18n/sankore_rm.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ + + UBFeatureProperties + + Add to page + + + + Set as background + + + + Add to library + + + + Object informations + + + + + UBFeaturesActionBar + + Add to favorites + + + + Share + + + + Search + + + + Delete + + + + Back to folder + + + + Remove from favorites + + + + Create new folder + + + + + UBFeaturesController + + ImportedImage + + + + + UBGraphicsGroupContainerItemDelegate + + Locked + + + + Visible on Extended Screen + + + UBGraphicsItemDelegate @@ -1857,11 +1933,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + - Document title + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2833,6 +3002,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_ro.ts b/resources/i18n/sankore_ro.ts index 00316c90..6706ce60 100644 --- a/resources/i18n/sankore_ro.ts +++ b/resources/i18n/sankore_ro.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ Exportare în browser web + + UBFeatureProperties + + Add to page + Adăugare la pagină + + + Set as background + Setare ca fundal + + + Add to library + Adăugare la bibliotecă + + + Object informations + Informaţii despre obiect + + + + UBFeaturesActionBar + + Add to favorites + Adăugare la favorite + + + Share + Distribuire + + + Search + Căutare + + + Delete + Ştergere + + + Back to folder + Înapoi la folder + + + Remove from favorites + Eliminare din favorite + + + Create new folder + Creare folder nou + + + + UBFeaturesController + + ImportedImage + ImportedImage + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Blocat + + + Visible on Extended Screen + Vizibil pe ecran extins + + UBGraphicsItemDelegate @@ -1863,11 +1939,104 @@ Doriţi să ignoraţi aceste erori pentru acest host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2844,6 +3013,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_ru.ts b/resources/i18n/sankore_ru.ts index de76b79e..d37bb13f 100644 --- a/resources/i18n/sankore_ru.ts +++ b/resources/i18n/sankore_ru.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1331,6 +1339,74 @@ Экспорт в веб-браузер + + UBFeatureProperties + + Add to page + Добавить на страницу + + + Set as background + Сделать фоновым изображением + + + Add to library + Добавить в библиотеку + + + Object informations + Информация об объекте + + + + UBFeaturesActionBar + + Add to favorites + Добавить в избранное + + + Share + Совместный доступ + + + Search + Поиск + + + Delete + Удалить + + + Back to folder + Назад в папку + + + Remove from favorites + Удалить из избранного + + + Create new folder + Создать новую папку + + + + UBFeaturesController + + ImportedImage + Импортированные изображения + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Заблокированный + + + Visible on Extended Screen + Видимый на втором экране + + UBGraphicsItemDelegate @@ -1865,11 +1941,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2846,6 +3015,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_sk.ts b/resources/i18n/sankore_sk.ts index 7f1dc035..4dc5c106 100644 --- a/resources/i18n/sankore_sk.ts +++ b/resources/i18n/sankore_sk.ts @@ -799,6 +799,14 @@ Erase Annotation Vymazať anotáciu + + Group Items + + + + Group items + + PasswordDialog @@ -1333,6 +1341,74 @@ Exportovať do webového prehliadača + + UBFeatureProperties + + Add to page + Pridať na stránku + + + Set as background + Nastaviť ako pozadie + + + Add to library + Pridať do knižnice + + + Object informations + Informácie o objekte + + + + UBFeaturesActionBar + + Add to favorites + Ajouter au favoris + + + Share + Partager + + + Search + + + + Delete + + + + Back to folder + Retour au répertoire + + + Remove from favorites + Supprimer des favoris + + + Create new folder + Créer un nouveau dossier + + + + UBFeaturesController + + ImportedImage + NahranýObrázok + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Zamknuté + + + Visible on Extended Screen + Vidieť to na rozšírenej obrazovke + + UBGraphicsItemDelegate @@ -1867,11 +1943,104 @@ Chcete ignorovať tieto chyby na tomto serveri? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2848,6 +3017,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_sv.ts b/resources/i18n/sankore_sv.ts index 1d7547b7..a6a7e8b3 100644 --- a/resources/i18n/sankore_sv.ts +++ b/resources/i18n/sankore_sv.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ Exportera till Webläsare + + UBFeatureProperties + + Add to page + Lägg till sida + + + Set as background + Infoga som bakgrund + + + Add to library + Lägg till bibliotek + + + Object informations + Objekt information + + + + UBFeaturesActionBar + + Add to favorites + Lägg till favoriter + + + Share + Dela + + + Search + Sök + + + Delete + Radera + + + Back to folder + Tillbaka till mapp + + + Remove from favorites + Ta bort från favoriter + + + Create new folder + Skapa ny mapp + + + + UBFeaturesController + + ImportedImage + Importeradbild + + + + UBGraphicsGroupContainerItemDelegate + + Locked + Låst + + + Visible on Extended Screen + Synlig på utvidgad skärm + + UBGraphicsItemDelegate @@ -1863,11 +1939,104 @@ Vill du ignorera felen för den här värden? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2844,6 +3013,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/i18n/sankore_zh.ts b/resources/i18n/sankore_zh.ts index 9c3a3869..b3a71081 100644 --- a/resources/i18n/sankore_zh.ts +++ b/resources/i18n/sankore_zh.ts @@ -799,6 +799,14 @@ Import old Sankore or Uniboard documents + + Group Items + + + + Group items + + PasswordDialog @@ -1329,6 +1337,74 @@ 导出到网页浏览器 + + UBFeatureProperties + + Add to page + 添加至页面 + + + Set as background + 设置为背景 + + + Add to library + 添加至图书馆 + + + Object informations + 素材信息 + + + + UBFeaturesActionBar + + Add to favorites + 添加至收藏夹 + + + Share + 分享 + + + Search + 搜索 + + + Delete + 删除 + + + Back to folder + 返回上级文件夹 + + + Remove from favorites + 从收藏夹中移除 + + + Create new folder + 新建文件夹 + + + + UBFeaturesController + + ImportedImage + 已导入图片 + + + + UBGraphicsGroupContainerItemDelegate + + Locked + 位置锁定 + + + Visible on Extended Screen + 宽屏上可见 + + UBGraphicsItemDelegate @@ -1863,11 +1939,104 @@ Do you want to ignore these errors for this host? - UBTeacherGuidePresentationWidget + UBTeacherGuidePageZeroWidget + + Page 0 + + + + Type session title here ... + + + + Author(s) + + + + Type authors here ... + + + + Resource indexing + + + + Keywords: + + + + Type keywords here ... + + + + Level: + + + + Type: + + + + Licence + + + + Attribution CC BY + + + + Attribution-NoDerivs CC BY-ND + + + + Attribution-ShareAlike CC BY-SA + + + + Attribution-NonCommercial CC BY-NC + + + + Attribution-NonCommercial-NoDerivs CC BY-NC-ND + + - Document title + Attribution-NonCommercial-ShareAlike CC BY-NC-SA + + Public domain + + + + Copyright + + + + Created the: + + + + + Updated the: + + + + + Objective(s) + + + + Type objectives here... + + + + Subjects: + + + + + UBTeacherGuidePresentationWidget Page: %0 @@ -2840,6 +3009,21 @@ p, li { white-space: pre-wrap; } <p align="justify" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:9pt; color:#3c3c3c;">GIPENA</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Délégation Interministérielle à l'Education Numérique en Afrique</span><span style=" font-size:9pt;"><br /></span><span style=" font-size:9pt; color:#3c3c3c;">20 Avenue Ségur Paris 75007</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">Téléphone : 01 43 17 68 08</span><span style=" font-size:9pt;"><br /><br /></span><span style=" font-size:9pt; color:#3c3c3c;">email: </span><a href="mailto:contact@sankore.org"><span style=" font-size:9pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-size:9pt;"> </span></p></body></html> + + Credits + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; font-size:12pt; font-weight:600;">Fonts</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Thanks to Henri ROGELET for Script-École 2, ScriptCase-École, Alphonetic (</span><a href="http://pointecole.free.fr/polices.html"><span style=" font-family:'Arial'; text-decoration: underline; color:#0000ff;">http://pointecole.free.fr/polices.html</span></a><span style=" font-family:'Arial';">).</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial';">- Andika Copyright (c) 2004-2011, SIL International (http://www.sil.org/). Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL), with Reserved Font Names &quot;Andika&quot; and &quot;SIL&quot;.</span></p> +<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Arial'; color:#000000;">- Ecolier CC BY-NC-ND 2.0 (JM Douteau)</span></p></body></html> + + trapFlashDialog diff --git a/resources/linux/run.sh b/resources/linux/run.sh index 72b6052f..a9c1a4a5 100644 --- a/resources/linux/run.sh +++ b/resources/linux/run.sh @@ -14,4 +14,4 @@ # along with this program. If not, see . # --------------------------------------------------------------------- -env LD_LIBRARY_PATH=$PWD/qtlib:$LD_LIBRARY_PATH ./Open-Sankore +env LD_LIBRARY_PATH=$PWD/qtlib:$PWD/plugins/cffadaptor:$LD_LIBRARY_PATH ./Open-Sankore diff --git a/resources/style.qss b/resources/style.qss index 29505cea..9525babb 100644 --- a/resources/style.qss +++ b/resources/style.qss @@ -234,19 +234,13 @@ QLabel#UBTGPresentationDocumentTitle font-weight:bold; } -QLabel#UBTGEditionPageNumberLabel +QLabel#UBTGPageNumberLabel { color: black; font-size : 12px; font-weight:bold; } -QLabel#UBTGPresentationPageNumberLabel -{ - color: black; - font-size : 12px; -} - UBTGAdaptableText#UBTGEditionPageTitle, UBTGAdaptableText#UBTGEditionComment { @@ -273,3 +267,10 @@ QFrame#UBTGSeparator { background-color: #cccccc; } + +UBTGAdaptableText { + background-color: white; + border:1 solid #999999; + border-radius : 10px; + padding: 2px; +} diff --git a/src/adaptors/UBCFFSubsetAdaptor.cpp b/src/adaptors/UBCFFSubsetAdaptor.cpp index a82b2fec..016af489 100644 --- a/src/adaptors/UBCFFSubsetAdaptor.cpp +++ b/src/adaptors/UBCFFSubsetAdaptor.cpp @@ -17,7 +17,9 @@ #include #include "core/UBPersistenceManager.h" + #include "document/UBDocumentProxy.h" + #include "domain/UBItem.h" #include "domain/UBGraphicsPolygonItem.h" #include "domain/UBGraphicsStroke.h" diff --git a/src/adaptors/UBImportImage.cpp b/src/adaptors/UBImportImage.cpp index f2829dd6..16564540 100644 --- a/src/adaptors/UBImportImage.cpp +++ b/src/adaptors/UBImportImage.cpp @@ -14,7 +14,6 @@ */ #include "UBImportImage.h" -#include "UBSvgSubsetAdaptor.h" #include "document/UBDocumentProxy.h" diff --git a/src/adaptors/UBImportPDF.cpp b/src/adaptors/UBImportPDF.cpp index d3cf8b38..ef845f13 100644 --- a/src/adaptors/UBImportPDF.cpp +++ b/src/adaptors/UBImportPDF.cpp @@ -14,7 +14,6 @@ */ #include "UBImportPDF.h" -#include "UBSvgSubsetAdaptor.h" #include "document/UBDocumentProxy.h" diff --git a/src/adaptors/UBMetadataDcSubsetAdaptor.cpp b/src/adaptors/UBMetadataDcSubsetAdaptor.cpp index 1608dece..066f924d 100644 --- a/src/adaptors/UBMetadataDcSubsetAdaptor.cpp +++ b/src/adaptors/UBMetadataDcSubsetAdaptor.cpp @@ -111,12 +111,13 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy) xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "updated-at", UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTimeUtc())); // introduced in OpenSankore 1.40.00 xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionTitle,proxy->metaData(UBSettings::sessionTitle).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionTarget,proxy->metaData(UBSettings::sessionTarget).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionLicence,proxy->metaData(UBSettings::sessionLicence).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionKeywords,proxy->metaData(UBSettings::sessionKeywords).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionLevel,proxy->metaData(UBSettings::sessionLevel).toString()); - xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionTopic,proxy->metaData(UBSettings::sessionTopic).toString()); xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionAuthors,proxy->metaData(UBSettings::sessionAuthors).toString()); + xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionObjectives,proxy->metaData(UBSettings::sessionObjectives).toString()); + xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionKeywords,proxy->metaData(UBSettings::sessionKeywords).toString()); + xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionGradeLevel,proxy->metaData(UBSettings::sessionGradeLevel).toString()); + xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionSubjects,proxy->metaData(UBSettings::sessionSubjects).toString()); + xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionType,proxy->metaData(UBSettings::sessionType).toString()); + xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionLicence,proxy->metaData(UBSettings::sessionLicence).toString()); xmlWriter.writeEndElement(); //dc:Description xmlWriter.writeEndElement(); //RDF @@ -222,36 +223,42 @@ QMap UBMetadataDcSubsetAdaptor::load(QString pPath) { metadata.insert(UBSettings::sessionTitle, xml.readElementText()); } - else if (xml.name() == UBSettings::sessionTarget // introduced in OpenSankore 1.40.00 + else if (xml.name() == UBSettings::sessionAuthors // introduced in OpenSankore 1.40.00 && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) { - metadata.insert(UBSettings::sessionTarget, xml.readElementText()); + metadata.insert(UBSettings::sessionAuthors, xml.readElementText()); } - else if (xml.name() == UBSettings::sessionLicence // introduced in OpenSankore 1.40.00 + else if (xml.name() == UBSettings::sessionObjectives // introduced in OpenSankore 1.40.00 && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) { - metadata.insert(UBSettings::sessionLicence, xml.readElementText()); + metadata.insert(UBSettings::sessionObjectives, xml.readElementText()); } else if (xml.name() == UBSettings::sessionKeywords // introduced in OpenSankore 1.40.00 && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) { metadata.insert(UBSettings::sessionKeywords, xml.readElementText()); } - else if (xml.name() == UBSettings::sessionLevel // introduced in OpenSankore 1.40.00 + else if (xml.name() == UBSettings::sessionGradeLevel // introduced in OpenSankore 1.40.00 && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) { - metadata.insert(UBSettings::sessionLevel, xml.readElementText()); + metadata.insert(UBSettings::sessionGradeLevel, xml.readElementText()); } - else if (xml.name() == UBSettings::sessionTopic // introduced in OpenSankore 1.40.00 + else if (xml.name() == UBSettings::sessionSubjects // introduced in OpenSankore 1.40.00 && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) { - metadata.insert(UBSettings::sessionTopic, xml.readElementText()); + metadata.insert(UBSettings::sessionSubjects, xml.readElementText()); } - else if (xml.name() == UBSettings::sessionAuthors // introduced in OpenSankore 1.40.00 + else if (xml.name() == UBSettings::sessionType // introduced in OpenSankore 1.40.00 && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) { - metadata.insert(UBSettings::sessionAuthors, xml.readElementText()); + metadata.insert(UBSettings::sessionType, xml.readElementText()); + } + else if (xml.name() == UBSettings::sessionLicence // introduced in OpenSankore 1.40.00 + && xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri) + { + metadata.insert(UBSettings::sessionLicence, xml.readElementText()); } + metadata.insert(UBSettings::documentVersion, docVersion); } @@ -291,7 +298,6 @@ QMap UBMetadataDcSubsetAdaptor::load(QString pPath) metadata.insert(UBSettings::documentDate, QVariant(date)); - return metadata; } diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index e300bb3a..baf2fb87 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -30,6 +30,7 @@ #include "domain/UBAbstractWidget.h" #include "domain/UBGraphicsStroke.h" #include "domain/UBGraphicsStrokesGroup.h" +#include "domain/ubgraphicsgroupcontaineritem.h" #include "domain/UBItem.h" #include "tools/UBGraphicsRuler.h" @@ -53,6 +54,8 @@ #include "core/UBPersistenceManager.h" #include "core/UBApplication.h" +#include "interfaces/IDataStorage.h" + #include "pdf/PDFRenderer.h" #include "core/memcheck.h" @@ -68,8 +71,7 @@ const QString UBSvgSubsetAdaptor::sPixelUnit = "px"; const QString UBSvgSubsetAdaptor::sFontWeightPrefix = "font-weight:"; const QString UBSvgSubsetAdaptor::sFontStylePrefix = "font-style:"; const QString UBSvgSubsetAdaptor::sFormerUniboardDocumentNamespaceUri = "http://www.mnemis.com/uniboard"; - - +QMap UBSvgSubsetAdaptor::additionalElementToStore; QString UBSvgSubsetAdaptor::toSvgTransform(const QMatrix& matrix) { @@ -109,7 +111,6 @@ QMatrix UBSvgSubsetAdaptor::fromSvgTransform(const QString& transform) static bool itemZIndexComp(const QGraphicsItem* item1, const QGraphicsItem* item2) { -// return item1->zValue() < item2->zValue(); return item1->data(UBGraphicsItemData::ItemOwnZValue).toReal() < item2->data(UBGraphicsItemData::ItemOwnZValue).toReal(); } @@ -133,8 +134,7 @@ void UBSvgSubsetAdaptor::upgradeScene(UBDocumentProxy* proxy, const int pageInde QDomDocument UBSvgSubsetAdaptor::loadSceneDocument(UBDocumentProxy* proxy, const int pPageIndex) { - QString fileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.svg", pPageIndex + 1); + QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg",pPageIndex); QFile file(fileName); QDomDocument doc("page"); @@ -157,8 +157,7 @@ QDomDocument UBSvgSubsetAdaptor::loadSceneDocument(UBDocumentProxy* proxy, const void UBSvgSubsetAdaptor::setSceneUuid(UBDocumentProxy* proxy, const int pageIndex, QUuid pUuid) { - QString fileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex + 1); + QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg",pageIndex); QFile file(fileName); @@ -207,6 +206,16 @@ void UBSvgSubsetAdaptor::setSceneUuid(UBDocumentProxy* proxy, const int pageInde } } +bool UBSvgSubsetAdaptor::addElementToBeStored(QString domName, IDataStorage *dataStorageClass) +{ + if(domName.isEmpty() || additionalElementToStore.contains(domName)){ + qWarning() << "Error adding the element that should persist"; + return false; + } + + additionalElementToStore.insert(domName,dataStorageClass); + return true; +} QString UBSvgSubsetAdaptor::uniboardDocumentNamespaceUriFromVersion(int mFileVersion) { @@ -216,8 +225,7 @@ QString UBSvgSubsetAdaptor::uniboardDocumentNamespaceUriFromVersion(int mFileVer UBGraphicsScene* UBSvgSubsetAdaptor::loadScene(UBDocumentProxy* proxy, const int pageIndex) { - QString fileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex + 1); + QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex); QFile file(fileName); @@ -242,8 +250,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::loadScene(UBDocumentProxy* proxy, const int QUuid UBSvgSubsetAdaptor::sceneUuid(UBDocumentProxy* proxy, const int pageIndex) { - QString fileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex + 1); + QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex); QFile file(fileName); @@ -295,6 +302,53 @@ UBGraphicsScene* UBSvgSubsetAdaptor::loadScene(UBDocumentProxy* proxy, const QBy } +QString UBSvgSubsetAdaptor::readTeacherGuideNode(int sceneIndex) +{ + QString result; + + QString fileName = UBApplication::boardController->activeDocument()->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sceneIndex); + QFile file(fileName); + file.open(QIODevice::ReadOnly); + QByteArray fileByteArray=file.readAll(); + file.close(); + QXmlStreamReader mXmlReader(fileByteArray); + + while (!mXmlReader.atEnd()) + { + mXmlReader.readNext(); + if (mXmlReader.isStartElement()) + { + if (mXmlReader.name() == "teacherBar" || mXmlReader.name() == "teacherGuide"){ + result.clear(); + result += ""; + result += "\n"; + } + else if (mXmlReader.name() == "media" || mXmlReader.name() == "link" || mXmlReader.name() == "title" || mXmlReader.name() == "comment" || mXmlReader.name() == "action") + { + result += "<" + mXmlReader.name().toString() + " "; + foreach(QXmlStreamAttribute attribute, mXmlReader.attributes()) + result += attribute.name().toString() + "=\"" + attribute.value().toString() + "\" "; + result += " />\n"; + } + else + { + // NOOP + } + } + else if (mXmlReader.isEndElement() && (mXmlReader.name() == "teacherBar" || mXmlReader.name() == "teacherGuide")){ + result += ""; + } + } + + if (mXmlReader.hasError()) + { + qWarning() << "error parsing Sankore file " << mXmlReader.errorString(); + } + + return result; +} + + UBSvgSubsetAdaptor::UBSvgSubsetReader::UBSvgSubsetReader(UBDocumentProxy* pProxy, const QByteArray& pXmlData) : mXmlReader(pXmlData) , mProxy(pProxy) @@ -316,6 +370,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() UBGraphicsStrokesGroup* strokesGroup = 0; UBDrawingController* dc = UBDrawingController::drawingController(); + while (!mXmlReader.atEnd()) { mXmlReader.readNext(); @@ -430,13 +485,13 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() else if (mXmlReader.name() == "g") { // Create new stroke, if its NULL or already has polygons - if (annotationGroup) - { - if (!annotationGroup->polygons().empty()) - annotationGroup = new UBGraphicsStroke(); - } - else - annotationGroup = new UBGraphicsStroke(); + if (annotationGroup) + { + if (!annotationGroup->polygons().empty()) + annotationGroup = new UBGraphicsStroke(); + } + else + annotationGroup = new UBGraphicsStroke(); if(eDrawingMode_Vector == dc->drawingMode()){ strokesGroup = new UBGraphicsStrokesGroup(); @@ -710,7 +765,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() UBGraphicsItem::assignZValue(triangle, zFromSvg); } } - else if(mXmlReader.name() == "cache") + else if (mXmlReader.name() == "cache") { UBGraphicsCache* cache = cacheFromSvg(); if(cache) @@ -831,6 +886,18 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() currentWidget->setDatastoreEntry(key, value); } +// else if (mXmlReader.name() == "teacherBar" || mXmlReader.name() == "teacherGuide"){ +// sTeacherGuideNode.clear(); +// sTeacherGuideNode += ""; +// sTeacherGuideNode += "\n"; +// } +// else if (mXmlReader.name() == "media" || mXmlReader.name() == "link" || mXmlReader.name() == "title" || mXmlReader.name() == "comment" || mXmlReader.name() == "action") +// { +// sTeacherGuideNode += "<" + mXmlReader.name().toString() + " "; +// foreach(QXmlStreamAttribute attribute, mXmlReader.attributes()) +// sTeacherGuideNode += attribute.name().toString() + "=\"" + attribute.value().toString() + "\" "; +// sTeacherGuideNode += " />\n"; +// } else { // NOOP @@ -845,15 +912,24 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() //graphicsItemFromSvg(strokesGroup); } - if (annotationGroup) - { - if (!annotationGroup->polygons().empty()) - annotationGroup = 0; - } + if (annotationGroup) + { + if (!annotationGroup->polygons().empty()) + annotationGroup = 0; + } mGroupHasInfo = false; mGroupDarkBackgroundColor = QColor(); mGroupLightBackgroundColor = QColor(); } +// else if (mXmlReader.name() == "teacherBar" || mXmlReader.name() == "teacherGuide"){ +// sTeacherGuideNode += ""; +// qDebug() << sTeacherGuideNode; +// QMap elements = getAdditionalElementToStore(); +// IDataStorage* storageClass = elements.value("teacherGuide"); +// if(storageClass){ +// storageClass->load(sTeacherGuideNode); +// } +// } } } @@ -879,7 +955,7 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() void UBSvgSubsetAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* pScene, const int pageIndex) { UBSvgSubsetWriter writer(proxy, pScene, pageIndex); - writer.persistScene(); + writer.persistScene(pageIndex); } @@ -927,10 +1003,15 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::writeSvgElement() mXmlWriter.writeEndElement(); } -bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene() +bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) { + + if (mScene->isModified()) { + static int i = 0; + qDebug() << "persist call no is " << ++i; + QBuffer buffer; buffer.open(QBuffer::WriteOnly); mXmlWriter.setDevice(&buffer); @@ -1143,6 +1224,14 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene() triangleToSvg(triangle); continue; } + + UBGraphicsGroupContainerItem *groupItem = qgraphicsitem_cast(item); + + if (groupItem && groupItem->isVisible()) + { + qDebug() << "came across the group during the parsing"; + continue; + } } if (openStroke) @@ -1152,8 +1241,28 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene() openStroke = 0; } + QMap elements = getAdditionalElementToStore(); + QVector dataStorageItems = elements.value("teacherGuide")->save(pageIndex); + foreach(tIDataStorage* eachItem, dataStorageItems){ + if(eachItem->type == eElementType_START){ + mXmlWriter.writeStartElement(eachItem->name); + foreach(QString key,eachItem->attributes.keys()) + mXmlWriter.writeAttribute(key,eachItem->attributes.value(key)); + } + else if (eachItem->type == eElementType_END) + mXmlWriter.writeEndElement(); + else if (eachItem->type == eElementType_UNIQUE){ + mXmlWriter.writeStartElement(eachItem->name); + foreach(QString key,eachItem->attributes.keys()) + mXmlWriter.writeAttribute(key,eachItem->attributes.value(key)); + mXmlWriter.writeEndElement(); + } + else + qWarning() << "unknown type"; + } + mXmlWriter.writeEndDocument(); - QString fileName = mDocumentPath + UBFileSystemUtils::digitFileFormat("/page%1.svg", mPageIndex + 1); + QString fileName = mDocumentPath + UBFileSystemUtils::digitFileFormat("/page%1.svg", mPageIndex); QFile file(fileName); if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) @@ -1168,13 +1277,12 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene() } else { - qDebug() << "ignoring unmodified page" << mPageIndex + 1; + qDebug() << "ignoring unmodified page" << UBApplication::boardController->pageFromSceneIndex(mPageIndex); } return true; } - void UBSvgSubsetAdaptor::UBSvgSubsetWriter::polygonItemToSvgLine(UBGraphicsPolygonItem* polygonItem, bool groupHoldsInfo) { mXmlWriter.writeStartElement("line"); @@ -2505,7 +2613,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::curtainItemToSvg(UBGraphicsCurtainIt mXmlWriter.writeAttribute("width", QString("%1").arg(curtainItem->boundingRect().width())); mXmlWriter.writeAttribute("height", QString("%1").arg(curtainItem->boundingRect().height())); mXmlWriter.writeAttribute("transform", toSvgTransform(curtainItem->sceneMatrix())); - + //graphicsItemToSvg(curtainItem); QString zs; zs.setNum(curtainItem->zValue(), 'f'); // 'f' keeps precision diff --git a/src/adaptors/UBSvgSubsetAdaptor.h b/src/adaptors/UBSvgSubsetAdaptor.h index 188bba2f..d3b39c37 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.h +++ b/src/adaptors/UBSvgSubsetAdaptor.h @@ -41,6 +41,7 @@ class UBGraphicsStroke; class UBPersistenceManager; class UBGraphicsTriangle; class UBGraphicsCache; +class IDataStorage; class UBSvgSubsetAdaptor { @@ -58,9 +59,13 @@ class UBSvgSubsetAdaptor static QUuid sceneUuid(UBDocumentProxy* proxy, const int pageIndex); static void setSceneUuid(UBDocumentProxy* proxy, const int pageIndex, QUuid pUuid); + static bool addElementToBeStored(QString domName,IDataStorage* dataStorageClass); + static void convertPDFObjectsToImages(UBDocumentProxy* proxy); static void convertSvgImagesToImages(UBDocumentProxy* proxy); + static QMap getAdditionalElementToStore() { return additionalElementToStore;} + static const QString nsSvg; static const QString nsXLink; static const QString nsXHtml; @@ -73,6 +78,7 @@ class UBSvgSubsetAdaptor static const QString sFontWeightPrefix; static const QString sFontStylePrefix; + static QString readTeacherGuideNode(int sceneIndex); private: static UBGraphicsScene* loadScene(UBDocumentProxy* proxy, const QByteArray& pArray); @@ -86,6 +92,9 @@ class UBSvgSubsetAdaptor static QString toSvgTransform(const QMatrix& matrix); static QMatrix fromSvgTransform(const QString& transform); + static QMap additionalElementToStore; + + class UBSvgSubsetReader { public: @@ -155,7 +164,7 @@ class UBSvgSubsetAdaptor UBSvgSubsetWriter(UBDocumentProxy* proxy, UBGraphicsScene* pScene, const int pageIndex); - bool persistScene(); + bool persistScene(int pageIndex); virtual ~UBSvgSubsetWriter(){} @@ -188,9 +197,9 @@ class UBSvgSubsetAdaptor QLocale loc(QLocale::C); sBuf = sBuf.arg(loc.toFloat(temp1)).arg(loc.toFloat(temp2)); - + svgPoints.insert(length, sBuf); - length += sBuf.length(); + length += sBuf.length(); } return svgPoints; } diff --git a/src/adaptors/UBThumbnailAdaptor.cpp b/src/adaptors/UBThumbnailAdaptor.cpp index e45cf725..69de0876 100644 --- a/src/adaptors/UBThumbnailAdaptor.cpp +++ b/src/adaptors/UBThumbnailAdaptor.cpp @@ -23,6 +23,8 @@ #include "core/UBApplication.h" #include "core/UBSettings.h" +#include "board/UBBoardController.h" + #include "document/UBDocumentProxy.h" #include "domain/UBGraphicsScene.h" @@ -35,16 +37,14 @@ QList UBThumbnailAdaptor::load(UBDocumentProxy* proxy) { QList thumbnails; - if (!proxy || proxy->persistencePath().size() == 0) + if (!proxy || proxy->persistencePath().isEmpty()) return thumbnails; //compatibility with older formats (<= 4.0.b.2.0) : generate missing thumbnails int existingPageCount = proxy->pageCount(); - QString thumbFileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", existingPageCount); - + QString thumbFileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", existingPageCount); QFile thumbFile(thumbFileName); if (!thumbFile.exists()) @@ -62,10 +62,20 @@ QList UBThumbnailAdaptor::load(UBDocumentProxy* proxy) thumbCount++; if (displayMessage && thumbCount == 1) - UBApplication::showMessage(tr("Generating preview thumbnails ...")); + UBApplication::showMessage(tr("Generating preview thumbnails ...")); persistScene(proxy->persistencePath(), scene, i); } + else{ + if(i==0){ + // we are working a document without zero page but on a system that enable it + // we have to create an empty zero scene + scene = new UBGraphicsScene(proxy); + UBSvgSubsetAdaptor::persistScene(proxy,scene,0); + persistScene(proxy->persistencePath(),scene,i); + thumbCount++; + } + } } if (displayMessage && thumbCount > 0) @@ -76,12 +86,11 @@ QList UBThumbnailAdaptor::load(UBDocumentProxy* proxy) //end compatibility with older format bool moreToProcess = true; - int pageCount = 0; + int pageCount = UBApplication::boardController->sceneIndexFromPage(0); while (moreToProcess) { pageCount++; - QString fileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageCount); + QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageCount); QFile file(fileName); if (file.exists()) { @@ -104,12 +113,11 @@ QPixmap UBThumbnailAdaptor::load(UBDocumentProxy* proxy, int index) { int existingPageCount = proxy->pageCount(); - if (!proxy || proxy->persistencePath().size() == 0 || index < 0 || index >= existingPageCount) - return QPixmap(); + if (!proxy || proxy->persistencePath().size() == 0 || index < 0 || index >= existingPageCount) + return QPixmap(); //compatibility with older formats (<= 4.0.b.2.0) : generate missing thumbnails - QString thumbFileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", existingPageCount); + QString thumbFileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", existingPageCount); QFile thumbFile(thumbFileName); @@ -128,7 +136,7 @@ QPixmap UBThumbnailAdaptor::load(UBDocumentProxy* proxy, int index) thumbCount++; if (displayMessage && thumbCount == 1) - UBApplication::showMessage(tr("Generating preview thumbnails ...")); + UBApplication::showMessage(tr("Generating preview thumbnails ...")); persistScene(proxy->persistencePath(), scene, i); } @@ -140,12 +148,11 @@ QPixmap UBThumbnailAdaptor::load(UBDocumentProxy* proxy, int index) } //end compatibility with older format - QString fileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", index + 1); + QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", index); QFile file(fileName); if (file.exists()) - { + { QPixmap pix; //Warning. Works only with modified Qt #ifdef Q_WS_X11 @@ -153,14 +160,14 @@ QPixmap UBThumbnailAdaptor::load(UBDocumentProxy* proxy, int index) #else pix.load(fileName, 0, Qt::AutoColor, false); #endif - return pix; - } - return QPixmap(); + return pix; + } + return QPixmap(); } void UBThumbnailAdaptor::persistScene(const QString& pDocPath, UBGraphicsScene* pScene, int pageIndex, bool overrideModified) { - QString fileName = pDocPath + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageIndex + 1); + QString fileName = pDocPath + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageIndex); QFile thumbFile(fileName); @@ -206,8 +213,7 @@ void UBThumbnailAdaptor::persistScene(const QString& pDocPath, UBGraphicsScene* QUrl UBThumbnailAdaptor::thumbnailUrl(UBDocumentProxy* proxy, int pageIndex) { - QString fileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageIndex + 1); + QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", pageIndex); return QUrl::fromLocalFile(fileName); } diff --git a/src/adaptors/publishing/UBDocumentPublisher.cpp b/src/adaptors/publishing/UBDocumentPublisher.cpp index 686b9d94..0198328b 100644 --- a/src/adaptors/publishing/UBDocumentPublisher.cpp +++ b/src/adaptors/publishing/UBDocumentPublisher.cpp @@ -28,6 +28,8 @@ #include "core/UBPersistenceManager.h" #include "core/UBApplicationController.h" +#include "board/UBBoardController.h" + #include "gui/UBMainWindow.h" #include "document/UBDocumentProxy.h" @@ -131,7 +133,7 @@ void UBDocumentPublisher::buildUbwFile() // remove all useless files for (int pageIndex = 0; pageIndex < mPublishingDocument->pageCount(); pageIndex++) { - QString filename = mPublishingDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex + 1); + QString filename = mPublishingDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg",pageIndex); QFile::remove(filename); } @@ -187,11 +189,11 @@ void UBDocumentPublisher::rasterizeScenes() for (int pageIndex = 0; pageIndex < mPublishingDocument->pageCount(); pageIndex++) { - UBApplication::showMessage(tr("Converting page %1/%2 ...").arg(pageIndex + 1).arg(mPublishingDocument->pageCount()), true); + UBApplication::showMessage(tr("Converting page %1/%2 ...").arg(UBApplication::boardController->pageFromSceneIndex(pageIndex)).arg(mPublishingDocument->pageCount()), true); UBSvgSubsetRasterizer rasterizer(mPublishingDocument, pageIndex); - QString filename = mPublishingDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.jpg", pageIndex + 1); + QString filename = mPublishingDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.jpg",pageIndex); rasterizer.rasterizeToFile(filename); @@ -250,12 +252,12 @@ void UBDocumentPublisher::upgradeDocumentForPublishing() UBGraphicsW3CWidgetItem *widgetItem = dynamic_cast(item); if(widgetItem){ - generateWidgetPropertyScript(widgetItem, pageIndex + 1); + generateWidgetPropertyScript(widgetItem, UBApplication::boardController->pageFromSceneIndex(pageIndex)); widgets << widgetItem; } } - QString filename = mPublishingDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.json", pageIndex + 1); + QString filename = mPublishingDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.json",pageIndex); QFile jsonFile(filename); if (jsonFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index d3faba2b..fefb05d5 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -62,9 +62,12 @@ #include "podcast/UBPodcastController.h" #include "adaptors/UBMetadataDcSubsetAdaptor.h" +#include "adaptors/UBSvgSubsetAdaptor.h" #include "UBBoardPaletteManager.h" +#include "core/UBSettings.h" + #include "core/memcheck.h" //#include @@ -147,6 +150,27 @@ UBBoardController::~UBBoardController() } +int UBBoardController::currentPage() +{ + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) + return mActiveSceneIndex; + return mActiveSceneIndex + 1; +} + +int UBBoardController::pageFromSceneIndex(int sceneIndex) +{ + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) + return sceneIndex; + return sceneIndex+1; +} + +int UBBoardController::sceneIndexFromPage(int page) +{ + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) + return page-1; + return page; +} + void UBBoardController::setupViews() { mControlContainer = new QWidget(mMainWindow->centralWidget()); @@ -670,7 +694,7 @@ void UBBoardController::zoom(const qreal ratio, QPointF scenePoint) void UBBoardController::handScroll(qreal dx, qreal dy) { mControlView->translate(dx, dy); - + UBApplication::applicationController->adjustDisplayView(); emit controlViewportChanged(); @@ -1235,10 +1259,12 @@ void UBBoardController::ClearUndoStack() while (itUniq.hasNext()) { QGraphicsItem* item = itUniq.next(); - UBGraphicsScene *scene = dynamic_cast(item->scene()); - if(!scene) - { - mActiveScene->deleteItem(item); + if (item->scene()) { + UBGraphicsScene *scene = dynamic_cast(item->scene()); + if(!scene) + { + mActiveScene->deleteItem(item); + } } } @@ -1533,17 +1559,17 @@ void UBBoardController::updateSystemScaleFactor() if (mActiveScene) { QSize pageNominalSize = mActiveScene->nominalSize(); - //we're going to keep scale factor untouched if the size is custom - QMap sizesMap = UBSettings::settings()->documentSizes; - if(pageNominalSize == sizesMap.value(DocumentSizeRatio::Ratio16_9) || pageNominalSize == sizesMap.value(DocumentSizeRatio::Ratio4_3)) - { - QSize controlSize = controlViewport(); + //we're going to keep scale factor untouched if the size is custom + QMap sizesMap = UBSettings::settings()->documentSizes; + if(pageNominalSize == sizesMap.value(DocumentSizeRatio::Ratio16_9) || pageNominalSize == sizesMap.value(DocumentSizeRatio::Ratio4_3)) + { + QSize controlSize = controlViewport(); - qreal hFactor = ((qreal)controlSize.width()) / ((qreal)pageNominalSize.width()); - qreal vFactor = ((qreal)controlSize.height()) / ((qreal)pageNominalSize.height()); + qreal hFactor = ((qreal)controlSize.width()) / ((qreal)pageNominalSize.width()); + qreal vFactor = ((qreal)controlSize.height()) / ((qreal)pageNominalSize.height()); - newScaleFactor = qMin(hFactor, vFactor); - } + newScaleFactor = qMin(hFactor, vFactor); + } } if (mSystemScaleFactor != newScaleFactor) diff --git a/src/board/UBBoardController.h b/src/board/UBBoardController.h index d5d6bee1..5a794b36 100644 --- a/src/board/UBBoardController.h +++ b/src/board/UBBoardController.h @@ -57,6 +57,11 @@ class UBBoardController : public QObject QRectF controlGeometry(); void closing(); + int currentPage(); + + int pageFromSceneIndex(int sceneIndex); + int sceneIndexFromPage(int page); + UBDocumentProxy* activeDocument() { return mActiveDocument; diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index df5aa41b..2173de6b 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -141,26 +141,30 @@ void UBBoardPaletteManager::setupDockPaletteWidgets() mpCachePropWidget = new UBCachePropertiesWidget(); mpDownloadWidget = new UBDockDownloadWidget(); - mpTeacherGuideWidget = new UBDockTeacherGuideWidget(); - mpFeaturesWidget = new UBFeaturesWidget(); // Add the dock palettes mLeftPalette = new UBLeftPalette(mContainer); // LEFT palette widgets + mpPageNavigWidget = new UBPageNavigationWidget(); mLeftPalette->registerWidget(mpPageNavigWidget); mLeftPalette->addTab(mpPageNavigWidget); - mLeftPalette->registerWidget(mpTeacherGuideWidget); - mLeftPalette->addTab(mpTeacherGuideWidget); + if(UBSettings::settings()->teacherGuidePageZeroActivated || UBSettings::settings()->teacherGuideLessonPagesActivated){ + mpTeacherGuideWidget = new UBDockTeacherGuideWidget(); + mLeftPalette->registerWidget(mpTeacherGuideWidget); + mLeftPalette->addTab(mpTeacherGuideWidget); + } mLeftPalette->connectSignals(); mRightPalette = new UBRightPalette(mContainer); // RIGHT palette widgets - +#ifndef USE_WEB_WIDGET + mpFeaturesWidget = new UBFeaturesWidget(); mRightPalette->registerWidget(mpFeaturesWidget); mRightPalette->addTab(mpFeaturesWidget); +#endif //Do not show deprecated lib widget to prevent collisions. Uncomment to return lib widget @@ -542,7 +546,7 @@ void UBBoardPaletteManager::activeSceneChanged() if (mpPageNavigWidget) { - mpPageNavigWidget->setPageNumber(pageIndex + 1, activeScene->document()->pageCount()); + mpPageNavigWidget->setPageNumber(UBApplication::boardController->pageFromSceneIndex(pageIndex), activeScene->document()->pageCount()); } if (mZoomPalette) @@ -726,7 +730,8 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is { if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL) { - WBBrowserWindow* brWnd = UBApplication::webController->GetCurrentWebBrowser(); +// tmp variable? +// WBBrowserWindow* brWnd = UBApplication::webController->GetCurrentWebBrowser(); if(mKeyboardPalette->m_isVisible) { diff --git a/src/board/UBBoardPaletteManager.h b/src/board/UBBoardPaletteManager.h index 8e9cef3e..86ef4355 100644 --- a/src/board/UBBoardPaletteManager.h +++ b/src/board/UBBoardPaletteManager.h @@ -44,7 +44,7 @@ class UBApplicationController; class UBDockTeacherGuideWidget; // Uncomment this to use old-styles lib paletter -// #define USE_WEB_WIDGET + #define USE_WEB_WIDGET class UBBoardPaletteManager : public QObject diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index 0296345b..e3f1e8bb 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -50,6 +50,7 @@ #include "domain/UBGraphicsVideoItem.h" #include "domain/UBGraphicsAudioItem.h" #include "domain/UBGraphicsSvgItem.h" +#include "domain/ubgraphicsgroupcontaineritem.h" #include "domain/UBGraphicsStrokesGroup.h" #include "document/UBDocumentProxy.h" @@ -436,8 +437,8 @@ void UBBoardView::mousePressEvent (QMouseEvent *event) || movingItem->type() == UBGraphicsCache::Type || movingItem->type() == UBGraphicsTriangle::Type || movingItem == this->scene()->backgroundObject() - || movingItem->group()) - { + || (movingItem->parentItem() && movingItem->parentItem()->type() == UBGraphicsGroupContainerItem::Type)) + { movingItem = NULL; QGraphicsView::mousePressEvent (event); @@ -516,8 +517,6 @@ void UBBoardView::mousePressEvent (QMouseEvent *event) } } -QSet mJustSelectedItems; - void UBBoardView::mouseMoveEvent (QMouseEvent *event) { @@ -564,6 +563,7 @@ UBBoardView::mouseMoveEvent (QMouseEvent *event) || item->type() == UBGraphicsVideoItem::Type || item->type() == UBGraphicsAudioItem::Type || item->type() == UBGraphicsSvgItem::Type + || item->type() == UBGraphicsTextItem::Type || item->type() == UBGraphicsStrokesGroup::Type) { if (!mJustSelectedItems.contains(item)) { @@ -586,9 +586,9 @@ UBBoardView::mouseMoveEvent (QMouseEvent *event) else QGraphicsView::mouseMoveEvent (event); } else if ((UBDrawingController::drawingController()->isDrawingTool()) - && !mMouseButtonIsPressed) + && !mMouseButtonIsPressed) { - QGraphicsView::mouseMoveEvent (event); + QGraphicsView::mouseMoveEvent (event); } else if (currentTool == UBStylusTool::Text || currentTool == UBStylusTool::Capture) { @@ -850,11 +850,12 @@ void UBBoardView::dropEvent (QDropEvent *event) graphicsWidget->processDropEvent(event); event->acceptProposedAction(); - } else if (!event->source() - || dynamic_cast(event->source()) - || dynamic_cast(event->source()) - || dynamic_cast(event->source()) - || dynamic_cast(event->source()) ) { + } else if (!event->source() + || dynamic_cast(event->source()) + || dynamic_cast(event->source()) + || dynamic_cast(event->source()) + || dynamic_cast(event->source()) + || dynamic_cast(event->source())) { mController->processMimeData (event->mimeData (), mapToScene (event->pos ())); event->acceptProposedAction(); diff --git a/src/board/UBBoardView.h b/src/board/UBBoardView.h index a0d0e838..21bc12b8 100644 --- a/src/board/UBBoardView.h +++ b/src/board/UBBoardView.h @@ -125,6 +125,7 @@ class UBBoardView : public QGraphicsView QMouseEvent *suspendedMousePressEvent; UBRubberBand *mUBRubberBand; + QSet mJustSelectedItems; private slots: diff --git a/src/core/UB.h b/src/core/UB.h index 0ca8d2cd..86eaa5d9 100644 --- a/src/core/UB.h +++ b/src/core/UB.h @@ -123,7 +123,8 @@ struct UBGraphicsItemType StrokeItemType, TriangleItemType, MagnifierItemType, - cacheItemType + cacheItemType, + groupContainerType }; }; diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index 81847ad5..328fe88c 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -24,9 +24,6 @@ #include "core/UBDocumentManager.h" #include "core/UBDisplayManager.h" -#include "softwareupdate/UBSoftwareUpdateController.h" -#include "softwareupdate/UBSoftwareUpdate.h" - #include "board/UBBoardView.h" #include "board/UBBoardController.h" #include "board/UBBoardPaletteManager.h" diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 8c3b6b1e..29e0ef71 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -32,6 +32,10 @@ #include "adaptors/UBThumbnailAdaptor.h" #include "adaptors/UBMetadataDcSubsetAdaptor.h" +#include "board/UBBoardController.h" + +#include "interfaces/IDataStorage.h" + #include "core/memcheck.h" const QString UBPersistenceManager::imageDirectory = "images"; // added to UBPersistenceManager::mAllDirectories @@ -39,6 +43,7 @@ const QString UBPersistenceManager::objectDirectory = "objects"; // added to UBP const QString UBPersistenceManager::widgetDirectory = "widgets"; // added to UBPersistenceManager::mAllDirectories const QString UBPersistenceManager::videoDirectory = "videos"; // added to UBPersistenceManager::mAllDirectories const QString UBPersistenceManager::audioDirectory = "audios"; // added to +const QString UBPersistenceManager::teacherGuideDirectory = "teacherGuideObjects"; UBPersistenceManager * UBPersistenceManager::sSingleton = 0; @@ -52,6 +57,7 @@ UBPersistenceManager::UBPersistenceManager(QObject *pParent) mDocumentSubDirectories << widgetDirectory; mDocumentSubDirectories << videoDirectory; mDocumentSubDirectories << audioDirectory; + mDocumentSubDirectories << teacherGuideDirectory; documentProxies = allDocumentProxies(); emit proxyListChanged(); @@ -83,7 +89,6 @@ UBPersistenceManager::~UBPersistenceManager() } } - QList > UBPersistenceManager::allDocumentProxies() { mDocumentRepositoryPath = UBSettings::userDocumentDirectory(); @@ -363,7 +368,7 @@ UBDocumentProxy* UBPersistenceManager::duplicateDocument(UBDocumentProxy* pDocum void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QList& indexes) { - checkIfDocumentRepositoryExists(); + checkIfDocumentRepositoryExists(); int pageCount = UBPersistenceManager::persistenceManager()->sceneCount(proxy); @@ -422,17 +427,15 @@ void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QL foreach(int index, compactedIndexes) { - QString svgFileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.svg", index + 1); + QString svgFileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", index); QFile::remove(svgFileName); - QString thumbFileName = proxy->persistencePath() + - UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", index + 1); + QString thumbFileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", index); QFile::remove(thumbFileName); - mSceneCache.removeScene(proxy, index); + mSceneCache.removeScene(proxy, index); proxy->decPageCount(); @@ -482,7 +485,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in proxy->incPageCount(); - emit documentSceneCreated(proxy, index + 1); + emit documentSceneCreated(proxy, index + 1); } @@ -491,9 +494,7 @@ UBGraphicsScene* UBPersistenceManager::createDocumentSceneAt(UBDocumentProxy* pr int count = sceneCount(proxy); for(int i = count - 1; i >= index; i--) - { renamePage(proxy, i , i + 1); - } mSceneCache.shiftUpScenes(proxy, index, count -1); @@ -543,11 +544,11 @@ void UBPersistenceManager::moveSceneToIndex(UBDocumentProxy* proxy, int source, if (source == target) return; - QFile svgTmp(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", source + 1)); - svgTmp.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.tmp", target + 1)); + QFile svgTmp(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", source)); + svgTmp.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.tmp", target)); - QFile thumbTmp(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", source + 1)); - thumbTmp.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.tmp", target + 1)); + QFile thumbTmp(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", source)); + thumbTmp.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.tmp", target)); if (source < target) { @@ -564,11 +565,11 @@ void UBPersistenceManager::moveSceneToIndex(UBDocumentProxy* proxy, int source, } } - QFile svg(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.tmp", target + 1)); - svg.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", target + 1)); + QFile svg(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.tmp", target)); + svg.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", target)); - QFile thumb(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.tmp", target + 1)); - thumb.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", target + 1)); + QFile thumb(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.tmp", target)); + thumb.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", target)); mSceneCache.moveScene(proxy, source, target); @@ -579,12 +580,9 @@ void UBPersistenceManager::moveSceneToIndex(UBDocumentProxy* proxy, int source, UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy, int sceneIndex) { if (mSceneCache.contains(proxy, sceneIndex)) - { - //qDebug() << "scene" << sceneIndex << "retrieved from cache ..."; return mSceneCache.value(proxy, sceneIndex); - } - else - { + else { + qDebug() << "scene" << sceneIndex << "retrieved from file ..."; UBGraphicsScene* scene = UBSvgSubsetAdaptor::loadScene(proxy, sceneIndex); if (scene) @@ -636,23 +634,23 @@ UBDocumentProxy* UBPersistenceManager::persistDocumentMetadata(UBDocumentProxy* void UBPersistenceManager::renamePage(UBDocumentProxy* pDocumentProxy, const int sourceIndex, const int targetIndex) { - QFile svg(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1)); - svg.rename(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1)); + QFile svg(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex)); + svg.rename(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex)); - QFile thumb(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1)); - thumb.rename(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1)); + QFile thumb(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex)); + thumb.rename(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex)); } void UBPersistenceManager::copyPage(UBDocumentProxy* pDocumentProxy, const int sourceIndex, const int targetIndex) { - QFile svg(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1)); - svg.copy(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1)); + QFile svg(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg",sourceIndex)); + svg.copy(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex)); UBSvgSubsetAdaptor::setSceneUuid(pDocumentProxy, targetIndex, QUuid::createUuid()); - QFile thumb(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1)); - thumb.copy(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1)); + QFile thumb(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex)); + thumb.copy(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex)); } @@ -665,10 +663,11 @@ int UBPersistenceManager::sceneCountInDir(const QString& pPath) { int pageIndex = 0; bool moreToProcess = true; + bool addedMissingZeroPage = false; while (moreToProcess) { - QString fileName = pPath + UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex + 1); + QString fileName = pPath + UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex); QFile file(fileName); @@ -678,10 +677,24 @@ int UBPersistenceManager::sceneCountInDir(const QString& pPath) } else { - moreToProcess = false; + if(UBSettings::settings()->teacherGuidePageZeroActivated && pageIndex == 0){ + // the document has no zero file but doesn't means that it hasn't any file + // at all. Just importing a document without the first page using a configuartion + // that enables zero page. + pageIndex++; + addedMissingZeroPage = true; + } + else + moreToProcess = false; } } + if(pageIndex == 1 && addedMissingZeroPage){ + // increment is done only to check if there are other pages than the missing zero page + // This situation means -> no pages on the document + return 0; + } + return pageIndex; } @@ -716,13 +729,13 @@ void UBPersistenceManager::addDirectoryContentToDocument(const QString& document { int targetIndex = targetPageCount + sourceIndex; - QFile svg(documentRootFolder + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1)); - svg.copy(pDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1)); + QFile svg(documentRootFolder + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex)); + svg.copy(pDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex)); UBSvgSubsetAdaptor::setSceneUuid(pDocument, targetIndex, QUuid::createUuid()); - QFile thumb(documentRootFolder + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1)); - thumb.copy(pDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1)); + QFile thumb(documentRootFolder + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex)); + thumb.copy(pDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex)); } foreach(QString dir, mDocumentSubDirectories) @@ -828,6 +841,40 @@ void UBPersistenceManager::purgeEmptyDocuments() } } +QString UBPersistenceManager::teacherGuideAbsoluteObjectPath(UBDocumentProxy* pDocumentProxy) +{ + return pDocumentProxy->persistencePath() + "/" + teacherGuideDirectory; +} + +QString UBPersistenceManager::addObjectToTeacherGuideDirectory(UBDocumentProxy* pDocumentProxy, QString pPath) +{ + QString path = pPath; + //windows + path.replace("file:///",""); + //others + path.replace("file://",""); + QFileInfo fi(path); + QString uuid = QUuid::createUuid(); + + if (!fi.exists() || !pDocumentProxy) + return ""; + + QString fileName = UBPersistenceManager::teacherGuideDirectory + "/" + uuid + "." + fi.suffix(); + + QString destPath = pDocumentProxy->persistencePath() + "/" + fileName; + + if (!QFile::exists(destPath)){ + QDir dir; + dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::teacherGuideDirectory); + + QFile source(path); + + source.copy(destPath); + } + + return destPath; +} + QString UBPersistenceManager::addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid) { diff --git a/src/core/UBPersistenceManager.h b/src/core/UBPersistenceManager.h index b9c53579..e5e88114 100644 --- a/src/core/UBPersistenceManager.h +++ b/src/core/UBPersistenceManager.h @@ -41,11 +41,12 @@ class UBPersistenceManager : public QObject static const QString videoDirectory; static const QString audioDirectory; static const QString widgetDirectory; + static const QString teacherGuideDirectory; static UBPersistenceManager* persistenceManager(); static void destroy(); - virtual UBDocumentProxy* createDocument(const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = true); + virtual UBDocumentProxy* createDocument(const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = true); virtual UBDocumentProxy* createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = false); virtual UBDocumentProxy* persistDocumentMetadata(UBDocumentProxy* pDocumentProxy); @@ -80,6 +81,9 @@ class UBPersistenceManager : public QObject virtual QString generateUniqueDocumentPath(); + QString teacherGuideAbsoluteObjectPath(UBDocumentProxy* pDocumentProxy); + QString addObjectToTeacherGuideDirectory(UBDocumentProxy* proxy, QString pPath); + virtual void addDirectoryContentToDocument(const QString& documentRootFolder, UBDocumentProxy* pDocument); virtual void upgradeDocumentIfNeeded(UBDocumentProxy* pDocumentProxy); @@ -153,6 +157,8 @@ class UBPersistenceManager : public QObject QString mDocumentRepositoryPath; + QHashteacherBarNodeString; + private slots: void documentRepositoryChanged(const QString& path); diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 28a2a8d5..292b5a4a 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -37,12 +37,13 @@ QString UBSettings::documentIdentifer = QString("ID"); QString UBSettings::documentVersion = QString("Version"); QString UBSettings::documentUpdatedAt = QString("UpdatedAt"); QString UBSettings::sessionTitle = QString("sessionTitle"); -QString UBSettings::sessionTarget = QString("sessionTarget"); -QString UBSettings::sessionLicence = QString("sessionLicence"); -QString UBSettings::sessionKeywords = QString("sessionKeywords"); -QString UBSettings::sessionLevel = QString("sessionLevel"); -QString UBSettings::sessionTopic = QString("sessionTopic"); QString UBSettings::sessionAuthors = QString("sessionAuthors"); +QString UBSettings::sessionObjectives = QString("sessionObjectives"); +QString UBSettings::sessionKeywords = QString("sessionKeywords"); +QString UBSettings::sessionGradeLevel = QString("sessionGradeLevel"); +QString UBSettings::sessionSubjects = QString("sessionSubjects"); +QString UBSettings::sessionType = QString("sessionType"); +QString UBSettings::sessionLicence = QString("sessionLicence"); QString UBSettings::documentDate = QString("date"); QString UBSettings::trashedDocumentGroupNamePrefix = QString("_Trash:"); @@ -54,7 +55,7 @@ QString UBSettings::uniboardApplicationNamespaceUri = "http://uniboard.mnemis.co const int UBSettings::sDefaultFontPixelSize = 36; const char *UBSettings::sDefaultFontFamily = "Arial"; -QString UBSettings::currentFileVersion = "4.5.0"; +QString UBSettings::currentFileVersion = "4.6.0"; QColor UBSettings::crossDarkBackground = QColor(44, 44, 44, 200); QColor UBSettings::crossLightBackground = QColor(165, 225, 255); @@ -381,6 +382,8 @@ void UBSettings::init() angleTolerance = new UBSetting(this, "App", "AngleTolerance", 4); historyLimit = new UBSetting(this, "Web", "HistoryLimit", 15); + teacherGuidePageZeroActivated = new UBSetting(this,"DockPalette","TeacherGuideActivatePageZero",true); + teacherGuideLessonPagesActivated = new UBSetting(this,"DockPalette","TeacherGuideActivateLessonPages",true); } diff --git a/src/core/UBSettings.h b/src/core/UBSettings.h index 2bb7262b..f97d7b4c 100644 --- a/src/core/UBSettings.h +++ b/src/core/UBSettings.h @@ -153,13 +153,16 @@ class UBSettings : public QObject static QString documentIdentifer; static QString documentVersion; static QString documentUpdatedAt; + static QString sessionTitle; - static QString sessionTarget; - static QString sessionLicence; - static QString sessionKeywords; - static QString sessionLevel; - static QString sessionTopic; static QString sessionAuthors; + static QString sessionObjectives; + static QString sessionKeywords; + static QString sessionGradeLevel; + static QString sessionSubjects; + static QString sessionType; + static QString sessionLicence; + static QString documentDate; static QString trashedDocumentGroupNamePrefix; @@ -330,6 +333,8 @@ class UBSettings : public QObject UBSetting* angleTolerance; UBSetting* historyLimit; + UBSetting* teacherGuidePageZeroActivated; + UBSetting* teacherGuideLessonPagesActivated; public slots: diff --git a/src/customWidgets/UBMediaWidget.cpp b/src/customWidgets/UBMediaWidget.cpp index cf7f8489..bc3d4f8a 100644 --- a/src/customWidgets/UBMediaWidget.cpp +++ b/src/customWidgets/UBMediaWidget.cpp @@ -28,6 +28,8 @@ UBMediaWidget::UBMediaWidget(eMediaType type, QWidget *parent, const char *name) , mpMediaObject(NULL) , mpVideoWidget(NULL) , mpAudioOutput(NULL) + , mpLayout(NULL) + , mpSeekerLayout(NULL) , mpPlayStopButton(NULL) , mpPauseButton(NULL) , mpSlider(NULL) @@ -35,15 +37,15 @@ UBMediaWidget::UBMediaWidget(eMediaType type, QWidget *parent, const char *name) , mGeneratingThumbnail(false) , mBorder(5) , mpMediaContainer(NULL) + , mMediaLayout(NULL) , mpCover(NULL) -// , mpVideoStackedWidget(NULL) -// , mpSnapshotVideoWidget(NULL) { SET_STYLE_SHEET(); addAction(eAction_Close); mType = type; - setLayout(&mLayout); + mpLayout = new QVBoxLayout(this); + setLayout(mpLayout); mpPlayStopButton = new UBMediaButton(this); mpPlayStopButton->setPixmap(QPixmap(":images/play.svg")); @@ -55,10 +57,11 @@ UBMediaWidget::UBMediaWidget(eMediaType type, QWidget *parent, const char *name) mpSlider->setMinimum(0); mpSlider->setMaximum(0); - mSeekerLayout.addWidget(mpPlayStopButton, 0); - mSeekerLayout.addWidget(mpPauseButton, 0); - mSeekerLayout.addWidget(mpSlider, 1); - mSeekerLayout.setContentsMargins(0, 0, 0, 0); + mpSeekerLayout = new QHBoxLayout(); + mpSeekerLayout->addWidget(mpPlayStopButton, 0); + mpSeekerLayout->addWidget(mpPauseButton, 0); + mpSeekerLayout->addWidget(mpSlider, 1); + mpSeekerLayout->setContentsMargins(0, 0, 0, 0); connect(mpPlayStopButton, SIGNAL(clicked()), this, SLOT(onPlayStopClicked())); connect(mpPauseButton, SIGNAL(clicked()), this, SLOT(onPauseClicked())); @@ -71,15 +74,16 @@ UBMediaWidget::UBMediaWidget(eMediaType type, QWidget *parent, const char *name) UBMediaWidget::~UBMediaWidget() { unsetActionsParent(); + DELETEPTR(mpMediaObject); DELETEPTR(mpSlider); DELETEPTR(mpPauseButton); DELETEPTR(mpPlayStopButton); DELETEPTR(mpAudioOutput); DELETEPTR(mpVideoWidget); -// DELETEPTR(mpVideoStackedWidget); -// DELETEPTR(mpSnapshotVideoWidget); - DELETEPTR(mpMediaObject); DELETEPTR(mpCover); + DELETEPTR(mpMediaContainer); + DELETEPTR(mpSeekerLayout); + DELETEPTR(mpLayout); } /** @@ -112,9 +116,9 @@ void UBMediaWidget::showEvent(QShowEvent* event) { if(!mpVideoWidget){ mpVideoWidget = new Phonon::VideoWidget(this); - mMediaLayout.addStretch(1); - mMediaLayout.addWidget(mpVideoWidget, 0); - mMediaLayout.addStretch(1); + mMediaLayout->addStretch(1); + mMediaLayout->addWidget(mpVideoWidget); + mMediaLayout->addStretch(1); Phonon::createPath(mpMediaObject, mpVideoWidget); adaptSizeToVideo(); mpMediaObject->play(); @@ -135,43 +139,37 @@ void UBMediaWidget::hideEvent(QHideEvent* event) */ void UBMediaWidget::createMediaPlayer() { - mpMediaContainer = new QWidget(this); + mpMediaContainer = new QWidget(); mpMediaContainer->setObjectName("UBMediaVideoContainer"); - mpMediaContainer->setLayout(&mMediaLayout); + mMediaLayout = new QHBoxLayout(); + mpMediaContainer->setLayout(mMediaLayout); if(eMediaType_Video == mType){ - mMediaLayout.setContentsMargins(10, 10, 10, 10); + mMediaLayout->setContentsMargins(10, 10, 10, 10); if(isVisible()){ mpVideoWidget = new Phonon::VideoWidget(this); - mMediaLayout.addStretch(1); - -// mpVideoStackedWidget = new QStackedWidget(this); -// mpVideoStackedWidget->addWidget(mpVideoWidget); -// mpSnapshotVideoWidget = new QLabel(this); -// mpVideoStackedWidget->addWidget(mpSnapshotVideoWidget); -// mMediaLayout.addWidget(mpVideoStackedWidget,0); - - mMediaLayout.addWidget(mpVideoWidget, 0); - mMediaLayout.addStretch(1); + mMediaLayout->addStretch(1); + mMediaLayout->addWidget(mpVideoWidget); + mMediaLayout->addStretch(1); Phonon::createPath(mpMediaObject, mpVideoWidget); adaptSizeToVideo(); } mpAudioOutput = new Phonon::AudioOutput(Phonon::VideoCategory, this); Phonon::createPath(mpMediaObject, mpAudioOutput); }else if(eMediaType_Audio == mType){ - mMediaLayout.setContentsMargins(10, 10, 10, 10); + mMediaLayout->setContentsMargins(10, 10, 10, 10); mpCover = new QLabel(mpMediaContainer); mpMediaContainer->setStyleSheet(QString("background: none;")); setAudioCover(":images/libpalette/soundIcon.svg"); mpCover->setScaledContents(true); - mMediaLayout.addStretch(1); - mMediaLayout.addWidget(mpCover, 0); - mMediaLayout.addStretch(1); + mMediaLayout->addStretch(1); + mMediaLayout->addWidget(mpCover, 0); + mMediaLayout->addStretch(1); mpAudioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this); Phonon::createPath(mpMediaObject, mpAudioOutput); } - mLayout.addWidget(mpMediaContainer, 1); - mLayout.addLayout(&mSeekerLayout, 0); + mpLayout->addWidget(mpMediaContainer, 1); + mpLayout->addLayout(mpSeekerLayout, 0); setActionsParent(mpMediaContainer); } @@ -190,22 +188,6 @@ void UBMediaWidget::adaptSizeToVideo() } } -//void UBMediaWidget::updateView(Phonon::State nextState) -//{ -// if(eMediaType_Video == mType){ -// if(nextState != Phonon::PlayingState){ -// const QPixmap& snapshot = QPixmap::grabWindow(mpVideoWidget->winId()); -// if(snapshot.size().width()!= 0){ -// mpSnapshotVideoWidget->setPixmap(snapshot); -// mpVideoStackedWidget->setCurrentWidget(mpSnapshotVideoWidget); -// } -// } -// else -// mpVideoStackedWidget->setCurrentWidget(mpVideoWidget); -// } - -//} - /** * \brief Handle the media state change notification * @param newState as the new state @@ -234,8 +216,10 @@ void UBMediaWidget::onStateChanged(Phonon::State newState, Phonon::State oldStat mpPauseButton->setEnabled(false); mpSlider->setValue(0); } - //updateView(newState); + } + // if(mType == eMediaType_Video) + // updateView(newState); } /** @@ -275,16 +259,16 @@ void UBMediaWidget::onSliderChanged(int value) void UBMediaWidget::onPlayStopClicked() { switch(mpMediaObject->state()){ - case Phonon::PlayingState: - mpMediaObject->stop(); - break; + case Phonon::PlayingState: + mpMediaObject->stop(); + break; - case Phonon::StoppedState: - case Phonon::PausedState: - mpMediaObject->play(); - break; - default: - break; + case Phonon::StoppedState: + case Phonon::PausedState: + mpMediaObject->play(); + break; + default: + break; } } diff --git a/src/customWidgets/UBMediaWidget.h b/src/customWidgets/UBMediaWidget.h index 0d4db8f0..13a96a84 100644 --- a/src/customWidgets/UBMediaWidget.h +++ b/src/customWidgets/UBMediaWidget.h @@ -27,7 +27,6 @@ #include #include -#include "interfaces/IResizeable.h" #include "UBActionableWidget.h" #define UBMEDIABUTTON_SIZE 32 @@ -91,7 +90,6 @@ private slots: private: void createMediaPlayer(); void adaptSizeToVideo(); -// void updateView(Phonon::State nextState); /** The current media type */ eMediaType mType; @@ -102,9 +100,9 @@ private: /** The audio renderer */ Phonon::AudioOutput* mpAudioOutput; /** The principal layout of this widget */ - QVBoxLayout mLayout; + QVBoxLayout* mpLayout; /** The seeker layout */ - QHBoxLayout mSeekerLayout; + QHBoxLayout* mpSeekerLayout; /** The play-stop button */ UBMediaButton* mpPlayStopButton; /** The pause button */ @@ -120,14 +118,11 @@ private: /** A widget that will contain the media */ QWidget* mpMediaContainer; /** The media layout */ - QHBoxLayout mMediaLayout; + QHBoxLayout* mMediaLayout; /** The audio cover */ QLabel* mpCover; /** The media url */ QString mUrl; - -// QStackedWidget* mpVideoStackedWidget; -// QLabel* mpSnapshotVideoWidget; }; #endif // UBMEDIAWIDGET_H diff --git a/src/document/UBDocumentController.cpp b/src/document/UBDocumentController.cpp index 5a87f0d8..96650d07 100644 --- a/src/document/UBDocumentController.cpp +++ b/src/document/UBDocumentController.cpp @@ -12,6 +12,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "UBDocumentController.h" #include @@ -289,9 +290,9 @@ void UBDocumentController::refreshDocumentThumbnailsView() } items << pixmapItem; - labels << tr("Page %1").arg(i + 1); + labels << tr("Page %1").arg(UBApplication::boardController->pageFromSceneIndex(i)); - itemsPath.append(QUrl::fromLocalFile(proxy->persistencePath() + QString("/pages/%1").arg(i + 1))); + itemsPath.append(QUrl::fromLocalFile(proxy->persistencePath() + QString("/pages/%1").arg(UBApplication::boardController->pageFromSceneIndex(i)))); } } @@ -305,15 +306,12 @@ void UBDocumentController::refreshDocumentThumbnailsView() mDocumentUI->thumbnailWidget->ensureVisible(0, 0, 10, 10); - if (selection) - { - disconnect(mDocumentUI->thumbnailWidget->scene(), SIGNAL(selectionChanged()), - this, SLOT(pageSelectionChanged())); + if (selection) { + disconnect(mDocumentUI->thumbnailWidget->scene(), SIGNAL(selectionChanged()), this, SLOT(pageSelectionChanged())); UBSceneThumbnailPixmap *currentScene = dynamic_cast(selection); if (currentScene) mDocumentUI->thumbnailWidget->hightlightItem(currentScene->sceneIndex()); - connect(mDocumentUI->thumbnailWidget->scene(), SIGNAL(selectionChanged()), - this, SLOT(pageSelectionChanged())); + connect(mDocumentUI->thumbnailWidget->scene(), SIGNAL(selectionChanged()), this, SLOT(pageSelectionChanged())); } emit refreshThumbnails(); @@ -1425,7 +1423,8 @@ bool UBDocumentController::isOKToOpenDocument(UBDocumentProxy* proxy) QString docVersion = proxy->metaData(UBSettings::documentVersion).toString(); if (docVersion.isEmpty() || docVersion.startsWith("4.1") || docVersion.startsWith("4.2") - || docVersion.startsWith("4.3") || docVersion.startsWith("4.4") || docVersion.startsWith("4.5")) // TODO UB 4.7 update if necessary + || docVersion.startsWith("4.3") || docVersion.startsWith("4.4") || docVersion.startsWith("4.5") + || docVersion.startsWith("4.6")) // TODO UB 4.7 update if necessary { return true; } @@ -1640,7 +1639,7 @@ int UBDocumentController::getSelectedItemIndex() if (selectedItems.count() > 0) { - UBSceneThumbnailPixmap* thumb = dynamic_cast (selectedItems.last()); + UBSceneThumbnailPixmap* thumb = dynamic_cast (selectedItems.last()); return thumb->sceneIndex(); } else return -1; diff --git a/src/document/UBDocumentController.h b/src/document/UBDocumentController.h index ac3f4ab3..f3e387ba 100644 --- a/src/document/UBDocumentController.h +++ b/src/document/UBDocumentController.h @@ -112,9 +112,6 @@ class UBDocumentController : public QObject UBDocumentProxy* mCurrentDocument; QList mDocumentThumbs; -// UBKeyboardPalette *mKeyboardPalette; - - private slots: void documentZoomSliderValueChanged (int value); void loadDocumentProxies(); diff --git a/src/document/UBDocumentProxy.cpp b/src/document/UBDocumentProxy.cpp index c37f9b28..a128a16a 100644 --- a/src/document/UBDocumentProxy.cpp +++ b/src/document/UBDocumentProxy.cpp @@ -50,13 +50,15 @@ void UBDocumentProxy::init() setDefaultDocumentSize(UBSettings::settings()->pageSize->get().toSize()); - setSessionTitle(""); - setSessionTarget(""); - setSessionLicence(""); - setSessionKeywords(""); - setSessionLevel(""); - setSessionTopic(""); - setSessionAuthor(""); + //teacherGuide metadata + setMetaData(UBSettings::sessionTitle,""); + setMetaData(UBSettings::sessionAuthors,""); + setMetaData(UBSettings::sessionObjectives,""); + setMetaData(UBSettings::sessionKeywords,""); + setMetaData(UBSettings::sessionGradeLevel,""); + setMetaData(UBSettings::sessionSubjects,""); + setMetaData(UBSettings::sessionType,""); + setMetaData(UBSettings::sessionLicence,""); } @@ -204,101 +206,9 @@ void UBDocumentProxy::setUuid(const QUuid& uuid) UBSettings::uniboardDocumentNamespaceUri + "/" + UBStringUtils::toCanonicalUuid(uuid)); } -QString UBDocumentProxy::sessionTitle() const -{ - if(mMetaDatas.contains(UBSettings::sessionTitle)) - return metaData(UBSettings::sessionTitle).toString(); - else - return QString(); -} - -void UBDocumentProxy::setSessionTitle(const QString & sessionTitle) -{ - setMetaData(UBSettings::sessionTitle,QVariant(sessionTitle)); -} - -QString UBDocumentProxy::sessionTarget() const -{ - if(mMetaDatas.contains(UBSettings::sessionTarget)) - return metaData(UBSettings::sessionTarget).toString(); - else - return QString(); -} - -void UBDocumentProxy::setSessionTarget(const QString & sessionTarget) -{ - setMetaData(UBSettings::sessionTarget,QVariant(sessionTarget)); -} - -QString UBDocumentProxy::sessionLicence() const -{ - if(mMetaDatas.contains(UBSettings::sessionLicence)) - return metaData(UBSettings::sessionLicence).toString(); - else - return QString(); -} - -void UBDocumentProxy::setSessionLicence(const QString & sessionLicence) -{ - setMetaData(UBSettings::sessionLicence,QVariant(sessionLicence)); -} - -void UBDocumentProxy::setSessionKeywords(const QString &kw) -{ - setMetaData(UBSettings::sessionKeywords,QVariant(kw)); -} - -QString UBDocumentProxy::sessionKeywords() -{ - if(mMetaDatas.contains(UBSettings::sessionKeywords)) - return metaData(UBSettings::sessionKeywords).toString(); - else - return QString(); -} - -void UBDocumentProxy::setSessionLevel(const QString &level) -{ - setMetaData(UBSettings::sessionLevel,QVariant(level)); -} - -QString UBDocumentProxy::sessionLevel() -{ - if(mMetaDatas.contains(UBSettings::sessionLevel)) - return metaData(UBSettings::sessionLevel).toString(); - else - return QString(); -} - -void UBDocumentProxy::setSessionTopic(const QString &topic) -{ - setMetaData(UBSettings::sessionTopic,QVariant(topic)); -} - -QString UBDocumentProxy::sessionTopic() -{ - if(mMetaDatas.contains(UBSettings::sessionTopic)) - return metaData(UBSettings::sessionTopic).toString(); - else - return QString(); -} - -void UBDocumentProxy::setSessionAuthor(const QString &authors) -{ - setMetaData(UBSettings::sessionAuthors,QVariant(authors)); -} - -QString UBDocumentProxy::sessionAuthors() -{ - if(mMetaDatas.contains(UBSettings::sessionAuthors)) - return metaData(UBSettings::sessionAuthors).toString(); - else - return QString(); -} QDateTime UBDocumentProxy::documentDate() { - qDebug()<< UBSettings::documentDate; - qDebug()<boundingRect(); -// if (mDelegate->getToolBarItem()->isVisibleOnBoard() -// && mDelegate->getToolBarItem()->isShifting()) -// itemRect.setHeight(itemRect.height() + mDelegate->getToolBarItem()->rect().height() * mDelegate->antiScaleRatio() * 1.1); + 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()); diff --git a/src/domain/UBGraphicsItemDelegate.cpp b/src/domain/UBGraphicsItemDelegate.cpp index 2ff9d0ed..35fc5bf6 100644 --- a/src/domain/UBGraphicsItemDelegate.cpp +++ b/src/domain/UBGraphicsItemDelegate.cpp @@ -40,6 +40,7 @@ #include "domain/UBGraphicsTextItem.h" #include "domain/UBGraphicsAudioItem.h" #include "domain/UBGraphicsVideoItem.h" +#include "domain/ubgraphicsgroupcontaineritem.h" #include "web/UBWebController.h" @@ -117,7 +118,7 @@ UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObjec void UBGraphicsItemDelegate::init() { - //mToolBarItem = new UBGraphicsToolBarItem(delegated()); + mToolBarItem = new UBGraphicsToolBarItem(delegated()); mFrame = new UBGraphicsDelegateFrame(this, QRectF(0, 0, 0, 0), mFrameWidth, mRespectRatio); mFrame->hide(); @@ -219,10 +220,9 @@ bool UBGraphicsItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *event) startUndoStep(); - if (!mDelegated->isSelected()) + if (!delegated()->isSelected()) { - mDelegated->setSelected(true); - positionHandles(); + delegated()->setSelected(true); return true; } else @@ -238,33 +238,31 @@ void UBGraphicsItemDelegate::setMimeData(QMimeData *mimeData) bool UBGraphicsItemDelegate::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { - 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; + if(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(isLocked()) - { - event->accept(); return true; } - return true; + if(isLocked()) { + event->accept(); + return true; + } else { + return false; + } } bool UBGraphicsItemDelegate::weelEvent(QGraphicsSceneWheelEvent *event) { Q_UNUSED(event); - if( mDelegated->isSelected() ) + if( delegated()->isSelected() ) { // event->accept(); return true; @@ -312,6 +310,18 @@ void UBGraphicsItemDelegate::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) // } } +QGraphicsItem *UBGraphicsItemDelegate::delegated() +{ + QGraphicsItem *curDelegate = 0; + if (mDelegated->parentItem() && mDelegated->parentItem()->type() == UBGraphicsGroupContainerItem::Type) { + curDelegate = mDelegated->parentItem(); // considering delegated item as an item's group which contains everything + } else { + curDelegate = mDelegated; + } + + return curDelegate; +} + void UBGraphicsItemDelegate::positionHandles() { if (mDelegated->isSelected()) { @@ -323,17 +333,17 @@ void UBGraphicsItemDelegate::positionHandles() updateButtons(true); -// if (mToolBarItem->isVisibleOnBoard()) -// { -// updateToolBar(); -// mToolBarItem->show(); -// } + if (mToolBarItem->isVisibleOnBoard()) + { + updateToolBar(); + mToolBarItem->show(); + } } else { foreach(DelegateButton* button, mButtons) button->hide(); mFrame->hide(); -// mToolBarItem->hide(); + mToolBarItem->hide(); } } @@ -365,7 +375,7 @@ void UBGraphicsItemDelegate::setZOrderButtonsVisible(bool visible) void UBGraphicsItemDelegate::remove(bool canUndo) { // QGraphicsScene* scene = mDelegated->scene(); - UBGraphicsScene* scene = (UBGraphicsScene*)(mDelegated->scene()); + UBGraphicsScene* scene = dynamic_cast(mDelegated->scene()); if (scene) { foreach(DelegateButton* button, mButtons) @@ -373,7 +383,7 @@ void UBGraphicsItemDelegate::remove(bool canUndo) scene->removeItem(mFrame); scene->removeItem(mDelegated); - //scene->removeItem(mToolBarItem); + scene->removeItem(mToolBarItem); if (canUndo) { diff --git a/src/domain/UBGraphicsItemDelegate.h b/src/domain/UBGraphicsItemDelegate.h index b6994a84..2aeedfe4 100644 --- a/src/domain/UBGraphicsItemDelegate.h +++ b/src/domain/UBGraphicsItemDelegate.h @@ -4,7 +4,7 @@ * 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, + * This prograscenem 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. @@ -121,10 +121,7 @@ class UBGraphicsItemDelegate : public QObject void printMessage(const QString &mess) {qDebug() << mess;} - QGraphicsItem* delegated() - { - return mDelegated; - } + QGraphicsItem* delegated(); void setCanDuplicate(bool allow){ mCanDuplicate = allow; } diff --git a/src/domain/UBGraphicsPolygonItem.cpp b/src/domain/UBGraphicsPolygonItem.cpp index 9c6dee10..1fc87f6a 100644 --- a/src/domain/UBGraphicsPolygonItem.cpp +++ b/src/domain/UBGraphicsPolygonItem.cpp @@ -189,18 +189,18 @@ void UBGraphicsPolygonItem::paint ( QPainter * painter, const QStyleOptionGraphi QGraphicsPolygonItem::paint(painter, option, widget); } -QPainterPath UBGraphicsPolygonItem::shape() const -{ +//QPainterPath UBGraphicsPolygonItem::shape() const +//{ - QPainterPath path; - path.addRect(boundingRect()); +// QPainterPath path; +// path.addRect(boundingRect()); - return path; +// return path; -// static QPainterPath shapePath = QGraphicsPolygonItem::shape(); +//// static QPainterPath shapePath = QGraphicsPolygonItem::shape(); -// return shapePath; -} +//// return shapePath; +//} UBGraphicsScene* UBGraphicsPolygonItem::scene() diff --git a/src/domain/UBGraphicsPolygonItem.h b/src/domain/UBGraphicsPolygonItem.h index 851092b2..663658f2 100644 --- a/src/domain/UBGraphicsPolygonItem.h +++ b/src/domain/UBGraphicsPolygonItem.h @@ -118,7 +118,7 @@ class UBGraphicsPolygonItem : public QGraphicsPolygonItem, public UBItem protected: void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget); - QPainterPath shape () const; +// QPainterPath shape () const; private: diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 6ff18a96..431a215c 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -65,6 +65,9 @@ #include "core/memcheck.h" +const QString groupText = "Group items"; +const QString ungroupText = "Ungroup items"; + qreal UBZLayerController::errorNumber = -20000001.0; UBZLayerController::UBZLayerController(QGraphicsScene *scene) : @@ -290,10 +293,17 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent) UBApplication::applicationController->initialVScroll())); } - connect(this, SIGNAL(selectionChanged()), this, SLOT(selectionChangedProcessing())); - connect(this, SIGNAL(selectionChanged()), this, SLOT(enableGroupingButton())); +// Just for debug. Do not delete please +// connect(this, SIGNAL(selectionChanged()), this, SLOT(selectionChangedProcessing())); + connect(this, SIGNAL(selectionChanged()), this, SLOT(updateGroupButtonState())); - connect(UBApplication::mainWindow->actionGroupItems, SIGNAL(triggered()), this, SLOT(processGroupItems())); +// just a stub don't treat as a result code +// static int i = 0; +// i++; +// if (i == 1) { + connect(UBApplication::mainWindow->actionGroupItems, SIGNAL(triggered()), this, SLOT(groupButtonClicked())); +// qDebug() << "the connect is accepted"; +// } } UBGraphicsScene::~UBGraphicsScene() @@ -314,37 +324,74 @@ void UBGraphicsScene::selectionChangedProcessing() + QString::number(selectedItems().first()->data(UBGraphicsItemData::ItemOwnZValue).toReal(), 'f')); } } - -void UBGraphicsScene::enableGroupingButton() + +void UBGraphicsScene::updateGroupButtonState() { QAction *groupAction = UBApplication::mainWindow->actionGroupItems; + QList selItems = selectedItems(); + int selCount = selItems.count(); - if (selectedItems().count() > 1) { - groupAction->setEnabled(true); - } else { + if (selCount < 1) { groupAction->setEnabled(false); + groupAction->setText(groupText); + + } else if (selCount == 1) { + if (selItems.first()->type() == UBGraphicsGroupContainerItem::Type) { + groupAction->setEnabled(true); + groupAction->setText(ungroupText); + } else { + groupAction->setEnabled(false); + } + + } else if (selCount > 1) { + groupAction->setEnabled(true); + groupAction->setText(groupText); } } - -void UBGraphicsScene::processGroupItems() + +void UBGraphicsScene::groupButtonClicked() { - qDebug() << "processing grouping items"; + QAction *groupAction = UBApplication::mainWindow->actionGroupItems; + QList selItems = selectedItems(); + if (!selItems.count()) { + qDebug() << "Got grouping request when there is no any selected item on the scene"; + return; + } - UBGraphicsGroupContainerItem *groupItem = new UBGraphicsGroupContainerItem(); + if (groupAction->text() == groupText) { //The only way to get information from item, considering using smth else + UBGraphicsGroupContainerItem *groupItem = new UBGraphicsGroupContainerItem(); - foreach (QGraphicsItem *item, selectedItems()) { - item->setSelected(false); - item->setFlag(QGraphicsItem::ItemIsSelectable, false); - item->setFlag( QGraphicsItem::ItemIsMovable, false); - item->setFlag(QGraphicsItem::ItemIsFocusable); - groupItem->addToGroup(item); + foreach (QGraphicsItem *item, selItems) { + if (item->type() == UBGraphicsGroupContainerItem::Type) { + QList childItems = item->childItems(); + UBGraphicsGroupContainerItem *currentGroup = dynamic_cast(item); + if (currentGroup) { + currentGroup->destroy(); + } + foreach (QGraphicsItem *chItem, childItems) { + groupItem->addToGroup(chItem); + } + } else { + groupItem->addToGroup(item); + } + } + + addItem(groupItem); + groupItem->setVisible(true); + groupItem->setFocus(); + + } else if (groupAction->text() == ungroupText) { + //Considering one selected item and it's a group + if (selItems.count() > 1) { + qDebug() << "can't make sense of ungrouping more then one item. Grouping action should be performed for that purpose"; + return; + } + UBGraphicsGroupContainerItem *currentGroup = dynamic_cast(selItems.first()); + if (currentGroup) { + currentGroup->destroy(); + } } - addItem(groupItem); -// groupItem->setPos(50, 50); - groupItem->setVisible(true); - groupItem->setFocus(); - qDebug() << groupItem->boundingRect(); } bool UBGraphicsScene::inputDevicePress(const QPointF& scenePos, const qreal& pressure) @@ -397,15 +444,15 @@ bool UBGraphicsScene::inputDevicePress(const QPointF& scenePos, const qreal& pre mAddedItems.clear(); mRemovedItems.clear(); - if (UBDrawingController::drawingController()->mActiveRuler) + if (UBDrawingController::drawingController()->mActiveRuler) { UBDrawingController::drawingController()->mActiveRuler->StartLine(scenePos, width); - } - else - { - moveTo(scenePos); + } + else + { + moveTo(scenePos); drawLineTo(scenePos, width, UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line); - } + } accepted = true; } else if (currentTool == UBStylusTool::Eraser) @@ -590,8 +637,8 @@ bool UBGraphicsScene::inputDeviceRelease() mCurrentStroke = 0; } } - } - + } + if (mRemovedItems.size() > 0 || mAddedItems.size() > 0) { @@ -652,7 +699,7 @@ void UBGraphicsScene::drawPointer(const QPointF &pPoint, bool isFirstDraw) // call this function when user release mouse button in Magnifier mode void UBGraphicsScene::DisposeMagnifierQWidgets() { - if(magniferControlViewWidget) + if(magniferControlViewWidget) { magniferControlViewWidget->hide(); magniferControlViewWidget->setParent(0); @@ -660,7 +707,7 @@ void UBGraphicsScene::DisposeMagnifierQWidgets() magniferControlViewWidget = NULL; } - if(magniferDisplayViewWidget) + if(magniferDisplayViewWidget) { magniferDisplayViewWidget->hide(); magniferDisplayViewWidget->setParent(0); @@ -677,7 +724,7 @@ void UBGraphicsScene::DisposeMagnifierQWidgets() catch (...) { } - + } void UBGraphicsScene::moveTo(const QPointF &pPoint) @@ -708,7 +755,7 @@ void UBGraphicsScene::drawLineTo(const QPointF &pEndPoint, const qreal &pWidth, } } - if (bLineStyle) + if (bLineStyle) { QSetIterator itItems(mAddedItems); @@ -733,7 +780,7 @@ void UBGraphicsScene::drawLineTo(const QPointF &pEndPoint, const qreal &pWidth, mPreviousPolygonItems.append(polygonItem); - if (!bLineStyle) + if (!bLineStyle) { mPreviousPoint = pEndPoint; mPreviousWidth = pWidth; @@ -1535,6 +1582,34 @@ UBGraphicsTextItem* UBGraphicsScene::addText(const QString& pString, const QPoin , UBSettings::settings()->isItalicFont()); } +UBGraphicsTextItem* UBGraphicsScene::textForObjectName(const QString& pString, const QString& objectName) +{ + UBGraphicsTextItem* textItem = 0; + bool found = false; + //looking for a previous such item text + for(int i=0; i < mFastAccessItems.count() && !found ; i += 1){ + UBGraphicsTextItem* currentItem = dynamic_cast(mFastAccessItems.at(i)); + if(currentItem && (currentItem->objectName() == objectName || currentItem->toPlainText() == pString)){ + // The second condition is necessary because the object name isn't stored. On reopeining the file we + // need another rule than the objectName + textItem = currentItem; + found=true; + if(currentItem->objectName() != objectName) + textItem->setObjectName(objectName); + } + } + if(!textItem){ + textItem = addTextWithFont(pString,QPointF(0,0) ,72,UBSettings::settings()->fontFamily(),true,false); + textItem->setObjectName(objectName); + } + + textItem->setPlainText(pString); + textItem->adjustSize(); + QSizeF size = textItem->size(); + textItem->setPos(QPointF(-size.width()/2.0,-size.height()/2.0)); + return textItem; +} + UBGraphicsTextItem* UBGraphicsScene::addTextWithFont(const QString& pString, const QPointF& pTopLeft , int pointSize, const QString& fontFamily, bool bold, bool italic) { @@ -1981,11 +2056,11 @@ void UBGraphicsScene::addCache() } void UBGraphicsScene::addMask(const QPointF ¢er) -{ +{ UBGraphicsCurtainItem* curtain = new UBGraphicsCurtainItem(); // mem : owned and destroyed by the scene mTools << curtain; - addItem(curtain); + addItem(curtain); QRectF rect = UBApplication::boardController->activeScene()->normalizedSceneRect(); rect.setRect(center.x() - rect.width()/4, center.y() - rect.height()/4, rect.width()/2 , rect.height()/2); @@ -2060,7 +2135,7 @@ void UBGraphicsScene::setNominalSize(int pWidth, int pHeight) } void UBGraphicsScene::setSelectedZLevel(QGraphicsItem * item) -{ +{ item->setZValue(mZLayerController->generateZLevel(itemLayerType::SelectedItem)); } @@ -2230,7 +2305,7 @@ void UBGraphicsScene::keyReleaseEvent(QKeyEvent * keyEvent) UBGraphicsW3CWidgetItem *wc3_widget = dynamic_cast(item); if (0 != wc3_widget) if (!wc3_widget->hasFocus()) - wc3_widget->remove(); + wc3_widget->remove(); break; } case UBGraphicsAppleWidgetItem::Type: @@ -2238,7 +2313,7 @@ void UBGraphicsScene::keyReleaseEvent(QKeyEvent * keyEvent) UBGraphicsAppleWidgetItem *Apple_widget = dynamic_cast(item); if (0 !=Apple_widget) if (!Apple_widget->hasFocus()) - Apple_widget->remove(); + Apple_widget->remove(); break; } case UBGraphicsTextItem::Type: @@ -2246,7 +2321,7 @@ void UBGraphicsScene::keyReleaseEvent(QKeyEvent * keyEvent) UBGraphicsTextItem *text_item = dynamic_cast(item); if (0 != text_item) if (!text_item->hasFocus()) - text_item->remove(); + text_item->remove(); break; } @@ -2256,7 +2331,7 @@ void UBGraphicsScene::keyReleaseEvent(QKeyEvent * keyEvent) if (0 != ubgi) ubgi->remove(); else - UBCoreGraphicsScene::removeItem(item); + UBCoreGraphicsScene::removeItem(item); } } } diff --git a/src/domain/UBGraphicsScene.h b/src/domain/UBGraphicsScene.h index 4b9d946f..3f2da89e 100644 --- a/src/domain/UBGraphicsScene.h +++ b/src/domain/UBGraphicsScene.h @@ -133,6 +133,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem UBGraphicsAudioItem* addAudio(const QUrl& pAudioFileUrl, bool shouldPlayAsap, const QPointF& pPos = QPointF(0, 0)); UBGraphicsSvgItem* addSvg(const QUrl& pSvgFileUrl, const QPointF& pPos = QPointF(0, 0)); UBGraphicsTextItem* addText(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0)); + UBGraphicsTextItem* textForObjectName(const QString& pString, const QString &objectName = "UBTGZeroPageSessionTitle"); UBGraphicsTextItem* addTextWithFont(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0) , int pointSize = -1, const QString& fontFamily = "", bool bold = false, bool italic = false); @@ -280,10 +281,10 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem mTools << item; } - const QPointF& previousPoint() - { - return mPreviousPoint; - } + const QPointF& previousPoint() + { + return mPreviousPoint; + } void setSelectedZLevel(QGraphicsItem *item); void setOwnZlevel(QGraphicsItem *item); @@ -305,8 +306,8 @@ public slots: void setToolCursor(int tool); void selectionChangedProcessing(); - void enableGroupingButton(); - void processGroupItems(); + void updateGroupButtonState(); + void groupButtonClicked(); void moveMagnifier(QPoint newPos); void closeMagnifier(); diff --git a/src/domain/UBGraphicsWidgetItem.cpp b/src/domain/UBGraphicsWidgetItem.cpp index 13487641..7a7edb8a 100644 --- a/src/domain/UBGraphicsWidgetItem.cpp +++ b/src/domain/UBGraphicsWidgetItem.cpp @@ -91,6 +91,11 @@ void UBGraphicsWidgetItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) mDelegate->hoverLeaveEvent(event); UBGraphicsProxyWidget::hoverLeaveEvent(event); } +void UBGraphicsWidgetItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ + UBGraphicsProxyWidget::hoverMoveEvent(event); +} + bool UBGraphicsWidgetItem::eventFilter(QObject *obj, QEvent *event) { diff --git a/src/domain/UBGraphicsWidgetItem.h b/src/domain/UBGraphicsWidgetItem.h index 2b73b5bc..2d29d30c 100644 --- a/src/domain/UBGraphicsWidgetItem.h +++ b/src/domain/UBGraphicsWidgetItem.h @@ -87,6 +87,8 @@ class UBGraphicsWidgetItem : public UBGraphicsProxyWidget virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event); virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event); + virtual bool eventFilter(QObject *obj, QEvent *event); diff --git a/src/domain/UBW3CWidget.cpp b/src/domain/UBW3CWidget.cpp index 1209ba76..60c7bc52 100644 --- a/src/domain/UBW3CWidget.cpp +++ b/src/domain/UBW3CWidget.cpp @@ -246,6 +246,10 @@ QString UBW3CWidget::createNPAPIWrapperInDir(const QString& pUrl, const QDir& pD const QString& pName) { QString url = pUrl; + // if the file name start with file:// it has be removed because QFileInfo doesn't support this form + // + url = url.replace("file:///",""); + url = url.replace("file://",""); QString name = pName; QFileInfo fi(url); @@ -299,9 +303,12 @@ QString UBW3CWidget::createNPAPIWrapperInDir(const QString& pUrl, const QDir& pD } widgetLibraryDir.mkpath(widgetLibraryPath); - if (fi.exists()) { + if (fi.exists()){ QString target = widgetLibraryPath + "/" + fi.fileName(); - QFile::copy(pUrl, target); + QString source = pUrl; + source.replace("file:///",""); + source.replace("file://",""); + QFile::copy(source, target); } QFile configFile(widgetLibraryPath + "/config.xml"); diff --git a/src/domain/ubgraphicsgroupcontaineritem.cpp b/src/domain/ubgraphicsgroupcontaineritem.cpp index 22990d79..64f68eee 100644 --- a/src/domain/ubgraphicsgroupcontaineritem.cpp +++ b/src/domain/ubgraphicsgroupcontaineritem.cpp @@ -9,7 +9,7 @@ #include "core/memcheck.h" UBGraphicsGroupContainerItem::UBGraphicsGroupContainerItem(QGraphicsItem *parent) - : QGraphicsItemGroup(parent) + : QGraphicsItem(parent) { setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object); @@ -23,12 +23,137 @@ UBGraphicsGroupContainerItem::UBGraphicsGroupContainerItem(QGraphicsItem *parent UBGraphicsGroupContainerItem::setAcceptHoverEvents(true); setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::ObjectItem)); //Necessary to set if we want z value to be assigned correctly + +} + +void UBGraphicsGroupContainerItem::addToGroup(QGraphicsItem *item) +{ + if (!item) { + qWarning("UBGraphicsGroupContainerItem::addToGroup: cannot add null item"); + return; + } + if (item == this) { + qWarning("UBGraphicsGroupContainerItem::addToGroup: cannot add a group to itself"); + return; + } + + // COMBINE + bool ok; + QTransform itemTransform = item->itemTransform(this, &ok); + + if (!ok) { + qWarning("UBGraphicsGroupContainerItem::addToGroup: could not find a valid transformation from item to group coordinates"); + return; + } + + //setting item flags to given item + item->setSelected(false); + item->setFlag(QGraphicsItem::ItemIsSelectable, false); + item->setFlag( QGraphicsItem::ItemIsMovable, false); + item->setFlag(QGraphicsItem::ItemIsFocusable, true); + + QTransform newItemTransform(itemTransform); + item->setPos(mapFromItem(item, 0, 0)); + item->setParentItem(this); + + // removing position from translation component of the new transform + if (!item->pos().isNull()) + newItemTransform *= QTransform::fromTranslate(-item->x(), -item->y()); + + // removing additional transformations properties applied with itemTransform() + QPointF origin = item->transformOriginPoint(); + QMatrix4x4 m; + QList transformList = item->transformations(); + for (int i = 0; i < transformList.size(); ++i) + transformList.at(i)->applyTo(&m); + newItemTransform *= m.toTransform().inverted(); + newItemTransform.translate(origin.x(), origin.y()); + newItemTransform.rotate(-item->rotation()); + newItemTransform.scale(1/item->scale(), 1/item->scale()); + newItemTransform.translate(-origin.x(), -origin.y()); + + // ### Expensive, we could maybe use dirtySceneTransform bit for optimization + + item->setTransform(newItemTransform); +// item->d_func()->setIsMemberOfGroup(true); + prepareGeometryChange(); + itemsBoundingRect |= itemTransform.mapRect(item->boundingRect() | item->childrenBoundingRect()); + update(); +} +void UBGraphicsGroupContainerItem::removeFromGroup(QGraphicsItem *item) +{ + if (!item) { + qWarning("QGraphicsItemGroup::removeFromGroup: cannot remove null item"); + return; + } + + QGraphicsItem *newParent = parentItem(); + + // COMBINE + bool ok; + QTransform itemTransform; + if (newParent) + itemTransform = item->itemTransform(newParent, &ok); + else + itemTransform = item->sceneTransform(); + + QPointF oldPos = item->mapToItem(newParent, 0, 0); + item->setParentItem(newParent); + item->setPos(oldPos); + + // removing position from translation component of the new transform + if (!item->pos().isNull()) + itemTransform *= QTransform::fromTranslate(-item->x(), -item->y()); + + // removing additional transformations properties applied + // with itemTransform() or sceneTransform() + QPointF origin = item->transformOriginPoint(); + QMatrix4x4 m; + QList transformList = item->transformations(); + for (int i = 0; i < transformList.size(); ++i) + transformList.at(i)->applyTo(&m); + itemTransform *= m.toTransform().inverted(); + itemTransform.translate(origin.x(), origin.y()); + itemTransform.rotate(-item->rotation()); + itemTransform.scale(1 / item->scale(), 1 / item->scale()); + itemTransform.translate(-origin.x(), -origin.y()); + + // ### Expensive, we could maybe use dirtySceneTransform bit for optimization + + item->setTransform(itemTransform); +// item->d_func()->setIsMemberOfGroup(item->group() != 0); + + // ### Quite expensive. But removeFromGroup() isn't called very often. + prepareGeometryChange(); + itemsBoundingRect = childrenBoundingRect(); } +QRectF UBGraphicsGroupContainerItem::boundingRect() const +{ + return itemsBoundingRect; +} +void UBGraphicsGroupContainerItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, + QWidget *widget) +{ + Q_UNUSED(widget); + Q_UNUSED(painter); + Q_UNUSED(option); + +// we would not use paint smth for the moment +// if (option->state & QStyle::State_Selected) { +// painter->setBrush(Qt::NoBrush); +// QPen tmpPen; +// qreal tmpPenWidth = 1.0; +// tmpPen.setWidth(tmpPenWidth); +// tmpPen.setColor(Qt::lightGray); +// painter->setPen(tmpPen); +// painter->drawRect(itemsBoundingRect.adjusted(tmpPenWidth / 2, tmpPenWidth / 2, -tmpPenWidth / 2, -tmpPenWidth / 2)); +// } +} UBGraphicsScene *UBGraphicsGroupContainerItem::scene() { - UBGraphicsScene *castScene = dynamic_cast(scene()); + UBGraphicsScene *castScene = dynamic_cast(QGraphicsItem::scene()); return castScene; } @@ -55,15 +180,33 @@ void UBGraphicsGroupContainerItem::remove() mDelegate->remove(); } +void UBGraphicsGroupContainerItem::destroy() { + + foreach (QGraphicsItem *item, childItems()) { + removeFromGroup(item); + item->setFlag(QGraphicsItem::ItemIsSelectable, true); + item->setFlag(QGraphicsItem::ItemIsFocusable, true); + } + + remove(); + + if (scene()) { + qDebug() << "scene is well casted"; + scene()->removeItem(this); + } +} void UBGraphicsGroupContainerItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (mDelegate->mousePressEvent(event)) { //NOOP } else { - QGraphicsItemGroup::mousePressEvent(event); + + QGraphicsItem::mousePressEvent(event); setSelected(true); } + + } void UBGraphicsGroupContainerItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) @@ -71,18 +214,19 @@ void UBGraphicsGroupContainerItem::mouseMoveEvent(QGraphicsSceneMouseEvent *even if (mDelegate->mouseMoveEvent(event)) { // NOOP; } else { - QGraphicsItemGroup::mouseMoveEvent(event); + QGraphicsItem::mouseMoveEvent(event); } + } void UBGraphicsGroupContainerItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { - mDelegate->mouseReleaseEvent(event); - QGraphicsItemGroup::mouseReleaseEvent(event); +// mDelegate->mouseReleaseEvent(event); + QGraphicsItem::mouseReleaseEvent(event); } QVariant UBGraphicsGroupContainerItem::itemChange(GraphicsItemChange change, const QVariant &value) { QVariant newValue = mDelegate->itemChange(change, value); - return QGraphicsItemGroup::itemChange(change, newValue); + return QGraphicsItem::itemChange(change, newValue); } diff --git a/src/domain/ubgraphicsgroupcontaineritem.h b/src/domain/ubgraphicsgroupcontaineritem.h index 193a3ca7..250ef967 100644 --- a/src/domain/ubgraphicsgroupcontaineritem.h +++ b/src/domain/ubgraphicsgroupcontaineritem.h @@ -5,20 +5,33 @@ #include "domain/UBItem.h" -class UBGraphicsGroupContainerItem : public QGraphicsItemGroup, public UBItem, public UBGraphicsItem +class UBGraphicsGroupContainerItem : public QGraphicsItem, public UBItem, public UBGraphicsItem { public: UBGraphicsGroupContainerItem (QGraphicsItem *parent = 0); + + void addToGroup(QGraphicsItem *item); + void removeFromGroup(QGraphicsItem *item); + QRectF boundingRect() const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + virtual UBGraphicsItemDelegate* Delegate() const { return mDelegate;} virtual UBGraphicsScene* scene(); virtual UBGraphicsGroupContainerItem *deepCopy() const; virtual void remove(); + enum { Type = UBGraphicsItemType::groupContainerType }; + virtual int type() const + { + return Type; + } -protected: + void destroy(); + +protected: virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); @@ -26,6 +39,7 @@ protected: virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); private: + QRectF itemsBoundingRect; }; diff --git a/src/domain/ubgraphicsgroupcontaineritemdelegate.cpp b/src/domain/ubgraphicsgroupcontaineritemdelegate.cpp index 19997a2b..db50b095 100644 --- a/src/domain/ubgraphicsgroupcontaineritemdelegate.cpp +++ b/src/domain/ubgraphicsgroupcontaineritemdelegate.cpp @@ -45,21 +45,25 @@ void UBGraphicsGroupContainerItemDelegate::decorateMenu(QMenu *menu) void UBGraphicsGroupContainerItemDelegate::buildButtons() { UBGraphicsItemDelegate::buildButtons(); +} - mDestroyGroupButton = new DelegateButton(":/images/font.svg", mDelegated, mFrame, Qt::TopLeftSection); +bool UBGraphicsGroupContainerItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + Q_UNUSED(event) - mButtons << mDestroyGroupButton; + return false; +} + +bool UBGraphicsGroupContainerItemDelegate::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + Q_UNUSED(event) - connect(mDestroyGroupButton, SIGNAL(clicked()), (UBGraphicsGroupContainerItemDelegate*)this, SLOT(destroyGroup())); + return false; } -void UBGraphicsGroupContainerItemDelegate::destroyGroup() +bool UBGraphicsGroupContainerItemDelegate::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { - qDebug() << "got an event"; - foreach (QGraphicsItem *item, delegated()->childItems()) { - delegated()->removeFromGroup(item); - item->setFlag(QGraphicsItem::ItemIsSelectable, true); - } + Q_UNUSED(event) - remove(true); + return false; } diff --git a/src/domain/ubgraphicsgroupcontaineritemdelegate.h b/src/domain/ubgraphicsgroupcontaineritemdelegate.h index 7160bb00..2396b10c 100644 --- a/src/domain/ubgraphicsgroupcontaineritemdelegate.h +++ b/src/domain/ubgraphicsgroupcontaineritemdelegate.h @@ -17,9 +17,9 @@ protected: virtual void decorateMenu(QMenu *menu); virtual void buildButtons(); - -private slots: - void destroyGroup(); + virtual bool mousePressEvent(QGraphicsSceneMouseEvent *event); + virtual bool mouseMoveEvent(QGraphicsSceneMouseEvent *event); + virtual bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event); private: DelegateButton *mDestroyGroupButton; diff --git a/src/frameworks/UBFileSystemUtils.cpp b/src/frameworks/UBFileSystemUtils.cpp index 97a7d157..5d9e018c 100644 --- a/src/frameworks/UBFileSystemUtils.cpp +++ b/src/frameworks/UBFileSystemUtils.cpp @@ -16,6 +16,11 @@ #include "UBFileSystemUtils.h" #include + +#include "core/UBApplication.h" + +#include "board/UBBoardController.h" + #include "globals/UBGlobals.h" THIRD_PARTY_WARNINGS_DISABLE @@ -313,7 +318,8 @@ QString UBFileSystemUtils::normalizeFilePath(const QString& pFilePath) QString UBFileSystemUtils::digitFileFormat(const QString& s, int digit) { - return s.arg(digit, 3, 10, QLatin1Char('0')); + int pageDigit = UBApplication::boardController->pageFromSceneIndex(digit); + return s.arg(pageDigit, 3, 10, QLatin1Char('0')); } diff --git a/src/frameworks/UBPlatformUtils_mac.mm b/src/frameworks/UBPlatformUtils_mac.mm index 8ab96c0d..78f41d21 100644 --- a/src/frameworks/UBPlatformUtils_mac.mm +++ b/src/frameworks/UBPlatformUtils_mac.mm @@ -3,8 +3,6 @@ #include "UBPlatformUtils.h" #include "core/UBApplication.h" #include "core/UBSettings.h" -#include "softwareupdate/UBSoftwareUpdate.h" -#include "softwareupdate/UBSoftwareUpdateController.h" #include "frameworks/UBFileSystemUtils.h" #include diff --git a/src/gui/UBDockTeacherGuideWidget.cpp b/src/gui/UBDockTeacherGuideWidget.cpp index 0c4d5c4a..42599b66 100644 --- a/src/gui/UBDockTeacherGuideWidget.cpp +++ b/src/gui/UBDockTeacherGuideWidget.cpp @@ -27,7 +27,7 @@ UBDockTeacherGuideWidget::UBDockTeacherGuideWidget(QWidget* parent, const char* , mpTeacherGuideWidget(NULL) { mName = "TeacherGuide"; - + mVisibleState = true; SET_STYLE_SHEET(); mIconToLeft = QPixmap(":images/teacher_open.png"); diff --git a/src/gui/UBDocumentNavigator.cpp b/src/gui/UBDocumentNavigator.cpp index c2dd5df2..1c349038 100644 --- a/src/gui/UBDocumentNavigator.cpp +++ b/src/gui/UBDocumentNavigator.cpp @@ -56,6 +56,7 @@ UBDocumentNavigator::UBDocumentNavigator(QWidget *parent, const char *name):QGra setFrameShadow(QFrame::Plain); connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(addNewPage())); + connect(UBApplication::boardController, SIGNAL(setDocOnPageNavigator(UBDocumentProxy*)), this, SLOT(generateThumbnails())); connect(mScene, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged())); connect(UBApplication::boardController, SIGNAL(documentReorganized(int)), this, SLOT(onMovedToIndex(int))); connect(UBApplication::boardController, SIGNAL(scrollToSelectedPage()), this, SLOT(onScrollToSelectedPage())); @@ -113,7 +114,7 @@ void UBDocumentNavigator::generateThumbnails() { QPixmap pix = thumbs.at(i); QGraphicsPixmapItem* pixmapItem = new UBSceneThumbnailNavigPixmap(pix, mCrntDoc, i); - UBThumbnailTextItem *labelItem = new UBThumbnailTextItem(tr("Page %0").arg(i + 1)); + UBThumbnailTextItem *labelItem = new UBThumbnailTextItem(tr("Page %0").arg(UBApplication::boardController->pageFromSceneIndex(i))); UBImgTextThumbnailElement thumbWithText(pixmapItem, labelItem); thumbWithText.setBorder(border()); diff --git a/src/gui/UBDocumentTreeWidget.cpp b/src/gui/UBDocumentTreeWidget.cpp index e693e865..afc9b2d8 100644 --- a/src/gui/UBDocumentTreeWidget.cpp +++ b/src/gui/UBDocumentTreeWidget.cpp @@ -327,7 +327,7 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event) //due to incorrect generation of thumbnails of invisible scene I've used direct copying of thumbnail files //it's not universal and good way but it's faster - QString from = sourceItem.documentProxy()->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceItem.sceneIndex() + 1); + QString from = sourceItem.documentProxy()->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceItem.sceneIndex()); QString to = targetDocProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetDocProxy->pageCount()); QFile::remove(to); QFile::copy(from, to); @@ -452,4 +452,4 @@ bool UBDocumentGroupTreeItem::isDefaultFolder() const void UBDocumentTreeWidget::autoScroll() { this->verticalScrollBar()->setValue(this->verticalScrollBar()->value() + mScrollMagnitude); -} \ No newline at end of file +} diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp index 526fc23d..889bc654 100644 --- a/src/gui/UBFeaturesWidget.cpp +++ b/src/gui/UBFeaturesWidget.cpp @@ -10,7 +10,7 @@ #include "globals/UBGlobals.h" #include "board/UBBoardController.h" -UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPaletteWidget(parent) +UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPaletteWidget(parent) { setObjectName(name); mName = "FeaturesWidget"; @@ -82,7 +82,6 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale //pathListView->setMovement( QListView::Static ); 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); @@ -133,6 +132,15 @@ UBFeaturesWidget::UBFeaturesWidget(QWidget *parent, const char *name):UBDockPale this, SLOT( onAddDownloadedFileToLibrary( bool, QUrl, QString,QByteArray ) ) ); } +UBFeaturesWidget::~UBFeaturesWidget() +{ + if ( thumbSlider != NULL ) + { + delete thumbSlider; + thumbSlider = NULL; + } +} + bool UBFeaturesWidget::eventFilter( QObject *target, QEvent *event ) { if ( target == featuresListView && event->type() == QEvent::Resize ) @@ -444,9 +452,7 @@ void UBFeaturesWidget::currentPathChanged(const QString &path) */ -UBFeaturesWidget::~UBFeaturesWidget() -{ -} + UBFeaturesListView::UBFeaturesListView( QWidget* parent, const char* name ) : QListView(parent) @@ -537,15 +543,18 @@ UBFeaturesWebView::UBFeaturesWebView(QWidget* parent, const char* name):QWidget( UBFeaturesWebView::~UBFeaturesWebView() { - if(NULL != mpSankoreAPI){ + if( NULL != mpSankoreAPI ) + { delete mpSankoreAPI; mpSankoreAPI = NULL; } - if(NULL != mpView){ + if( NULL != mpView ) + { delete mpView; mpView = NULL; } - if(NULL != mpLayout){ + if( NULL != mpLayout ) + { delete mpLayout; mpLayout = NULL; } @@ -661,6 +670,55 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) ); } +UBFeatureProperties::~UBFeatureProperties() +{ + if ( mpOrigPixmap ) + { + delete mpOrigPixmap; + mpOrigPixmap = NULL; + } + if ( mpElement ) + { + delete mpElement; + mpElement = NULL; + } + if ( mpThumbnail ) + { + delete mpThumbnail; + mpThumbnail = NULL; + } + if ( mpButtonLayout ) + { + delete mpButtonLayout; + mpButtonLayout = NULL; + } + if ( mpAddPageButton ) + { + delete mpAddPageButton; + mpAddPageButton = NULL; + } + if ( mpSetAsBackgroundButton ) + { + delete mpSetAsBackgroundButton; + mpSetAsBackgroundButton = NULL; + } + if ( mpAddToLibButton ) + { + delete mpAddToLibButton; + mpAddToLibButton = NULL; + } + if ( mpObjInfoLabel ) + { + delete mpObjInfoLabel; + mpObjInfoLabel = NULL; + } + if ( mpObjInfos ) + { + delete mpObjInfos; + mpObjInfos = NULL; + } +} + void UBFeatureProperties::resizeEvent( QResizeEvent *event ) { Q_UNUSED(event); @@ -787,19 +845,7 @@ void UBFeatureProperties::onSetAsBackground() 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) { diff --git a/src/gui/UBFeaturesWidget.h b/src/gui/UBFeaturesWidget.h index 8ad8e8a3..afd29c97 100644 --- a/src/gui/UBFeaturesWidget.h +++ b/src/gui/UBFeaturesWidget.h @@ -80,7 +80,7 @@ private: QSlider *thumbSlider; QVBoxLayout *layout; //UBFeaturesPathViewer *pathViewer; - QGraphicsScene *pathScene; + //QGraphicsScene *pathScene; UBFeaturesActionBar *mActionBar; UBFeatureProperties *featureProperties; UBFeaturesWebView *webView; @@ -88,7 +88,6 @@ private: int currentStackedWidget; - QModelIndex trashIndex; private slots: void currentSelected( const QModelIndex & ); //void currentPathChanged(const QString &); @@ -131,7 +130,7 @@ class UBFeaturesWebView : public QWidget Q_OBJECT public: UBFeaturesWebView(QWidget* parent = 0, const char* name = "UBFeaturesWebView"); - ~UBFeaturesWebView(); + virtual ~UBFeaturesWebView(); void showElement(const UBFeature &elem); diff --git a/src/gui/UBNavigatorPalette.cpp b/src/gui/UBNavigatorPalette.cpp index ed5c7aa8..98a94159 100644 --- a/src/gui/UBNavigatorPalette.cpp +++ b/src/gui/UBNavigatorPalette.cpp @@ -33,8 +33,7 @@ UBNavigatorPalette::UBNavigatorPalette(QWidget *parent, const char *name): { setOrientation(eUBDockOrientation_Left); setMaximumWidth(300); - //mCollapsedIcon = QPixmap(":images/pages_open.png"); - //mIcon = QPixmap(":images/pages_close.png"); + resize(UBSettings::settings()->navigPaletteWidth->get().toInt(), height()); mLastWidth = 300; @@ -129,7 +128,7 @@ void UBNavigatorPalette::changeCurrentPage() if(NO_PAGESELECTED != iPage) { // Display the selected page - UBApplication::boardController->setActiveDocumentScene(mNavigator->currentDoc(), iPage); + UBApplication::boardController->setActiveDocumentScene(mNavigator->currentDoc(), iPage); } } diff --git a/src/gui/UBPageNavigationWidget.cpp b/src/gui/UBPageNavigationWidget.cpp index 4d751ccd..1d13223f 100644 --- a/src/gui/UBPageNavigationWidget.cpp +++ b/src/gui/UBPageNavigationWidget.cpp @@ -176,7 +176,7 @@ void UBPageNavigationWidget::updateTime() */ void UBPageNavigationWidget::setPageNumber(int current, int total) { - mPageNbr->setText(QString("%1 / %2").arg(current).arg(total)); + mPageNbr->setText(QString("%1 / %2").arg(current).arg(UBApplication::boardController->sceneIndexFromPage(total))); } /** diff --git a/src/gui/UBTGWidgetTreeDelegate.cpp b/src/gui/UBTGWidgetTreeDelegate.cpp deleted file mode 100644 index 1b3754f6..00000000 --- a/src/gui/UBTGWidgetTreeDelegate.cpp +++ /dev/null @@ -1,36 +0,0 @@ - -#include -#include -#include -#include -#include -#include -#include "UBTGWidgetTreeDelegate.h" - -#include "core/memcheck.h" - -UBTGWidgetTreeDelegate::UBTGWidgetTreeDelegate(QObject *parent) : - QStyledItemDelegate(parent) -{ - //NOOP -} - -void UBTGWidgetTreeDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const -{ - if(index.data(Qt::UserRole) != eUBTGAddSubItemWidgetType_None){ - painter->setBackgroundMode(Qt::OpaqueMode); - painter->setBackground(QBrush(QColor(Qt::red))); - QStyleOptionButton styleButton; - styleButton.text = "pipo"; - styleButton.rect = option.rect; - QApplication::style()->drawControl(QStyle::CE_PushButtonLabel,&styleButton,painter); - } - else - QStyledItemDelegate::paint(painter,option,index); -} - -QSize UBTGWidgetTreeDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - QSize size = QStyledItemDelegate::sizeHint(option,index); - return size; -} diff --git a/src/gui/UBTGWidgetTreeDelegate.h b/src/gui/UBTGWidgetTreeDelegate.h deleted file mode 100644 index 75343346..00000000 --- a/src/gui/UBTGWidgetTreeDelegate.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef UBTGWIDGETTREEDELEGATE_H -#define UBTGWIDGETTREEDELEGATE_H - -class QPainter; -class QStyleOptionViewItem; -class QModelIndex; - -#include - - -typedef enum -{ - eUBTGAddSubItemWidgetType_None, - eUBTGAddSubItemWidgetType_Action , - eUBTGAddSubItemWidgetType_Media, - eUBTGAddSubItemWidgetType_Url -}eUBTGAddSubItemWidgetType; - - -class UBTGWidgetTreeDelegate : public QStyledItemDelegate -{ - Q_OBJECT -public: - explicit UBTGWidgetTreeDelegate(QObject *parent = 0); - - virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; - virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; - -signals: - -public slots: - -}; - -#endif // UBTGWIDGETTREEDELEGATE_H diff --git a/src/gui/UBTeacherGuideDelegate.cpp b/src/gui/UBTeacherGuideDelegate.cpp deleted file mode 100644 index fd98606a..00000000 --- a/src/gui/UBTeacherGuideDelegate.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "UBTeacherGuideDelegate.h" -#include "core/memcheck.h" - -UBTeacherGuideDelegate::UBTeacherGuideDelegate() -{ -} diff --git a/src/gui/UBTeacherGuideDelegate.h b/src/gui/UBTeacherGuideDelegate.h deleted file mode 100644 index 1c1134f5..00000000 --- a/src/gui/UBTeacherGuideDelegate.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef UBTEACHERGUIDEDELEGATE_H -#define UBTEACHERGUIDEDELEGATE_H - -class UBTeacherGuideDelegate -{ -public: - UBTeacherGuideDelegate(); -}; - -#endif // UBTEACHERGUIDEDELEGATE_H diff --git a/src/gui/UBTeacherGuideWidget.cpp b/src/gui/UBTeacherGuideWidget.cpp index 1d571274..9121ce0a 100644 --- a/src/gui/UBTeacherGuideWidget.cpp +++ b/src/gui/UBTeacherGuideWidget.cpp @@ -23,8 +23,11 @@ #include "UBTeacherGuideWidget.h" +#include "adaptors/UBSvgSubsetAdaptor.h" + #include "core/UBApplication.h" #include "core/UBPersistenceManager.h" +#include "core/UBSettings.h" #include "globals/UBGlobals.h" @@ -40,10 +43,21 @@ #include "document/UBDocumentProxy.h" #include "document/UBDocumentController.h" +#include "domain/UBGraphicsTextItem.h" + #include "core/memcheck.h" #define UBTG_SEPARATOR_FIXED_HEIGHT 3 +typedef enum +{ + eUBTGAddSubItemWidgetType_None, + eUBTGAddSubItemWidgetType_Action , + eUBTGAddSubItemWidgetType_Media, + eUBTGAddSubItemWidgetType_Url +}eUBTGAddSubItemWidgetType; + + /*************************************************************************** * class UBTeacherGuideEditionWidget * @@ -62,20 +76,21 @@ UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const , mpAddAnActionItem(NULL) , mpAddAMediaItem(NULL) , mpAddALinkItem(NULL) - , mpTreeDelegate(NULL) { setObjectName(name); mpLayout = new QVBoxLayout(this); mpPageNumberLabel = new QLabel(this); mpPageNumberLabel->setAlignment(Qt::AlignRight); - mpPageNumberLabel->setObjectName("UBTGEditionPageNumberLabel"); + mpPageNumberLabel->setObjectName("UBTGPageNumberLabel"); mpLayout->addWidget(mpPageNumberLabel); // tree basic configuration - mpDocumentTitle = new QLabel(this); - mpDocumentTitle->setText("Document title"); - mpDocumentTitle->setObjectName("UBTGEditionDocumentTitle"); - mpLayout->addWidget(mpDocumentTitle); + + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){ + mpDocumentTitle = new QLabel(this); + mpDocumentTitle->setObjectName("UBTGPresentationDocumentTitle"); + mpLayout->addWidget(mpDocumentTitle); + } mpPageTitle = new UBTGAdaptableText(0,this); mpPageTitle->setObjectName("UBTGEditionPageTitle"); @@ -95,10 +110,7 @@ UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const mpTreeWidget = new QTreeWidget(this); mpLayout->addWidget(mpTreeWidget); - mpTreeDelegate = new UBTGWidgetTreeDelegate(); - mpRootWidgetItem = mpTreeWidget->invisibleRootItem(); - //mpTreeWidget->setItemDelegate(mpTreeDelegate); mpTreeWidget->setRootIsDecorated(false); mpTreeWidget->setIndentation(0); mpTreeWidget->setDropIndicatorShown(false); @@ -120,6 +132,11 @@ UBTeacherGuideEditionWidget::UBTeacherGuideEditionWidget(QWidget *parent, const mpRootWidgetItem->addChild(mpAddAnActionItem); mpRootWidgetItem->addChild(mpAddAMediaItem); mpRootWidgetItem->addChild(mpAddALinkItem); + + if(UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()){ + UBSvgSubsetAdaptor::addElementToBeStored(QString("teacherGuide"),this); + connect(UBApplication::boardController,SIGNAL(activeDocumentChanged()),this,SLOT(onActiveDocumentChanged())); + } } UBTeacherGuideEditionWidget::~UBTeacherGuideEditionWidget() @@ -132,23 +149,106 @@ UBTeacherGuideEditionWidget::~UBTeacherGuideEditionWidget() DELETEPTR(mpAddAnActionItem); DELETEPTR(mpAddAMediaItem); DELETEPTR(mpAddALinkItem); - DELETEPTR(mpTreeDelegate); DELETEPTR(mpTreeWidget) DELETEPTR(mpLayout); } void UBTeacherGuideEditionWidget::showEvent(QShowEvent* event) { - mpPageTitle->setFocus(); - mpComment->setFocus(); setFocus(); QWidget::showEvent(event); } -void UBTeacherGuideEditionWidget::onActiveSceneChanged() +void UBTeacherGuideEditionWidget::onActiveDocumentChanged() +{ + int activeSceneIndex = UBApplication::boardController->activeSceneIndex(); + if(UBApplication::boardController->pageFromSceneIndex(activeSceneIndex) != 0) + load(UBSvgSubsetAdaptor::readTeacherGuideNode(activeSceneIndex)); +} + +void UBTeacherGuideEditionWidget::load(QString element) { cleanData(); - mpPageNumberLabel->setText(tr("Page: %0").arg(UBApplication::boardController->activeSceneIndex() + 1)); + QDomDocument doc("TeacherGuide"); + doc.setContent(element); + + for(QDomElement element = doc.documentElement().firstChildElement(); !element.isNull(); element = element.nextSiblingElement()) { + QString tagName = element.tagName(); + if(tagName == "title") + mpPageTitle->setInitialText(element.attribute("value")); + else if(tagName == "comment") + mpComment->setInitialText(element.attribute("value")); + else if(tagName == "media") + onAddItemClicked(mpAddAMediaItem,0,&element); + else if(tagName == "link") + onAddItemClicked(mpAddALinkItem,0,&element); + else if(tagName == "action") + onAddItemClicked(mpAddAnActionItem,0,&element); + } +} + + + +QVector UBTeacherGuideEditionWidget::save(int pageIndex) +{ + QVector result; + if(pageIndex != UBApplication::boardController->currentPage()) + return result; + tIDataStorage* data = new tIDataStorage(); + data->name = "teacherGuide"; + data->type = eElementType_START; + data->attributes.insert("version","1.50"); + result << data; + + data = new tIDataStorage(); + data->name = "title"; + data->type = eElementType_UNIQUE; + data->attributes.insert("value",mpPageTitle->text()); + if(mpPageTitle->text().length()){ + result << data; + } + + data = new tIDataStorage(); + data->name = "comment"; + data->type = eElementType_UNIQUE; + data->attributes.insert("value",mpComment->text()); + if(mpComment->text().length()) + result << data; + + QList children = getChildrenList(mpAddAnActionItem); + children << getChildrenList(mpAddAMediaItem); + children << getChildrenList(mpAddALinkItem); + + foreach(QTreeWidgetItem* widgetItem, children){ + tUBGEElementNode* node = dynamic_cast(mpTreeWidget->itemWidget(widgetItem,0))->saveData(); + if(node){ + data = new tIDataStorage(); + data->name = node->name; + data->type = eElementType_UNIQUE; + foreach(QString currentKey, node->attributes.keys()) + data->attributes.insert(currentKey,node->attributes.value(currentKey)); + result << data; + } + } + + data = new tIDataStorage(); + data->name = "teacherGuide"; + data->type = eElementType_END; + result << data; + return result; +} + +void UBTeacherGuideEditionWidget::onActiveSceneChanged() +{ + int currentPage = UBApplication::boardController->currentPage(); + if(currentPage > 0){ + cleanData(); + load(UBSvgSubsetAdaptor::readTeacherGuideNode(UBApplication::boardController->activeSceneIndex())); + mpPageNumberLabel->setText(tr("Page: %0").arg(currentPage)); + UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument(); + if(mpDocumentTitle) + mpDocumentTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString()); + } } void UBTeacherGuideEditionWidget::cleanData() @@ -162,7 +262,6 @@ void UBTeacherGuideEditionWidget::cleanData() foreach(QTreeWidgetItem* item, children){ DELETEPTR(item); } - } QList UBTeacherGuideEditionWidget::getChildrenList(QTreeWidgetItem* widgetItem) @@ -177,12 +276,12 @@ QVector UBTeacherGuideEditionWidget::getPageAndCommentData() { QVectorresult; tUBGEElementNode* pageTitle = new tUBGEElementNode(); - pageTitle->type = "pageTitle"; + pageTitle->name = "pageTitle"; pageTitle->attributes.insert("value",mpPageTitle->text()); result << pageTitle; tUBGEElementNode* comment = new tUBGEElementNode(); - comment->type = "comment"; + comment->name = "comment"; comment->attributes.insert("value",mpComment->text()); result << comment; return result; @@ -196,32 +295,42 @@ QVector UBTeacherGuideEditionWidget::getData() children << getChildrenList(mpAddALinkItem); result << getPageAndCommentData(); foreach(QTreeWidgetItem* widgetItem, children){ - tUBGEElementNode* node = dynamic_cast(mpTreeWidget->itemWidget(widgetItem,0))->saveData(); + tUBGEElementNode* node = dynamic_cast(mpTreeWidget->itemWidget(widgetItem,0))->saveData(); if(node) result << node; } return result; } -void UBTeacherGuideEditionWidget::onAddItemClicked(QTreeWidgetItem* widget, int column) +void UBTeacherGuideEditionWidget::onAddItemClicked(QTreeWidgetItem* widget, int column, QDomElement *element) { int addSubItemWidgetType = widget->data(column,Qt::UserRole).toInt(); - if(column == 0 && addSubItemWidgetType != eUBTGAddSubItemWidgetType_None){ + if(addSubItemWidgetType != eUBTGAddSubItemWidgetType_None){ QTreeWidgetItem* newWidgetItem = new QTreeWidgetItem(widget); newWidgetItem->setData(column,Qt::UserRole,eUBTGAddSubItemWidgetType_None); newWidgetItem->setData(1,Qt::UserRole,eUBTGAddSubItemWidgetType_None); newWidgetItem->setIcon(1,QIcon(":images/close.svg")); + switch(addSubItemWidgetType) { - case eUBTGAddSubItemWidgetType_Action: - mpTreeWidget->setItemWidget(newWidgetItem,0,new UBTGActionWidget(widget)); + case eUBTGAddSubItemWidgetType_Action:{ + UBTGActionWidget* actionWidget = new UBTGActionWidget(widget); + if(element) actionWidget->initializeWithDom(*element); + mpTreeWidget->setItemWidget(newWidgetItem,0,actionWidget); break; - case eUBTGAddSubItemWidgetType_Media: - mpTreeWidget->setItemWidget(newWidgetItem,0,new UBTGMediaWidget(widget)); + } + case eUBTGAddSubItemWidgetType_Media:{ + UBTGMediaWidget* mediaWidget = new UBTGMediaWidget(widget); + if(element) mediaWidget->initializeWithDom(*element); + mpTreeWidget->setItemWidget(newWidgetItem,0,mediaWidget); break; - case eUBTGAddSubItemWidgetType_Url: - mpTreeWidget->setItemWidget(newWidgetItem,0,new UBTGUrlWidget()); + } + case eUBTGAddSubItemWidgetType_Url:{ + UBTGUrlWidget* urlWidget = new UBTGUrlWidget(); + if(element) urlWidget->initializeWithDom(*element); + mpTreeWidget->setItemWidget(newWidgetItem,0,urlWidget); break; + } default: delete newWidgetItem; qCritical() << "onAddItemClicked no action set"; @@ -237,6 +346,8 @@ void UBTeacherGuideEditionWidget::onAddItemClicked(QTreeWidgetItem* widget, int } } else if(column == 1 && addSubItemWidgetType == eUBTGAddSubItemWidgetType_None){ + UBTGMediaWidget* media = dynamic_cast(mpTreeWidget->itemWidget(widget,0)); + if(media) media->removeSource(); int index = mpTreeWidget->currentIndex().row(); QTreeWidgetItem* toBeDeletedWidgetItem = widget->parent()->takeChild(index); delete toBeDeletedWidgetItem; @@ -280,7 +391,7 @@ UBTeacherGuidePresentationWidget::UBTeacherGuidePresentationWidget(QWidget *pare mpPageNumberLabel = new QLabel(this); mpPageNumberLabel->setAlignment(Qt::AlignRight); - mpPageNumberLabel->setObjectName("UBTGPresentationPageNumberLabel"); + mpPageNumberLabel->setObjectName("UBTGPageNumberLabel"); mpLayout->addWidget(mpPageNumberLabel); @@ -289,15 +400,16 @@ UBTeacherGuidePresentationWidget::UBTeacherGuidePresentationWidget(QWidget *pare mpModePushButton = new QPushButton(this); mpModePushButton->setIcon(QIcon(":images/pencil.svg")); mpModePushButton->setMaximumWidth(32); + mpModePushButton->installEventFilter(this); connect(mpModePushButton,SIGNAL(clicked()),parentWidget(),SLOT(changeMode())); - - mpDocumentTitle = new QLabel(this); - mpDocumentTitle->setObjectName("UBTGPresentationDocumentTitle"); - mpDocumentTitle->setText(tr("Document title")); - mpButtonTitleLayout->addWidget(mpModePushButton); - mpButtonTitleLayout->addWidget(mpDocumentTitle); + + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){ + mpDocumentTitle = new QLabel(this); + mpDocumentTitle->setObjectName("UBTGPresentationDocumentTitle"); + mpButtonTitleLayout->addWidget(mpDocumentTitle); + } mpLayout->addLayout(mpButtonTitleLayout); @@ -318,10 +430,11 @@ UBTeacherGuidePresentationWidget::UBTeacherGuidePresentationWidget(QWidget *pare mpSeparator->setObjectName("UBTGSepartor"); mpLayout->addWidget(mpSeparator); - mpTreeWidget = new QTreeWidget(this); + mpTreeWidget = new UBTGDraggableTreeItem(this); mpLayout->addWidget(mpTreeWidget); mpRootWidgetItem = mpTreeWidget->invisibleRootItem(); + mpTreeWidget->setDragEnabled(true); mpTreeWidget->setRootIsDecorated(false); mpTreeWidget->setIndentation(0); mpTreeWidget->setDropIndicatorShown(false); @@ -345,6 +458,14 @@ UBTeacherGuidePresentationWidget::~UBTeacherGuidePresentationWidget() DELETEPTR(mpLayout); } +bool UBTeacherGuidePresentationWidget::eventFilter(QObject* object, QEvent* event) +{ + Q_UNUSED(object); + if(event->type() == QEvent::HoverEnter || event->type() == QEvent::HoverMove || event->type() == QEvent::HoverLeave) + return true; + return false; +} + void UBTeacherGuidePresentationWidget::cleanData() { mpPageTitle->showText(""); @@ -361,15 +482,16 @@ void UBTeacherGuidePresentationWidget::cleanData() void UBTeacherGuidePresentationWidget::onActiveSceneChanged() { cleanData(); - mpPageNumberLabel->setText(tr("Page: %0").arg(UBApplication::boardController->activeSceneIndex() + 1)); + mpPageNumberLabel->setText(tr("Page: %0").arg(UBApplication::boardController->currentPage())); + UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument(); + if(mpDocumentTitle) + mpDocumentTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString()); } void UBTeacherGuidePresentationWidget::createMediaButtonItem() { if(!mpMediaSwitchItem){ - //create the media button mpMediaSwitchItem = new QTreeWidgetItem(mpRootWidgetItem); - //mpMediaSwitchItem->setIcon(0,QIcon(":images/plus.svg")); mpMediaSwitchItem->setText(0,"+"); mpMediaSwitchItem->setExpanded(false); mpMediaSwitchItem->setData(0,tUBTGTreeWidgetItemRole_HasAnAction,tUBTGActionAssociateOnClickItem_EXPAND); @@ -386,13 +508,14 @@ void UBTeacherGuidePresentationWidget::showData(QVector data) cleanData(); foreach(tUBGEElementNode* element, data){ - if(element->type == "pageTitle") + if(element->name == "pageTitle") mpPageTitle->showText(element->attributes.value("value")); - else if (element->type == "comment") + else if (element->name == "comment") mpComment->showText(element->attributes.value("value")); - else if(element->type == "action"){ + else if(element->name == "action"){ QTreeWidgetItem* newWidgetItem = new QTreeWidgetItem(mpRootWidgetItem); newWidgetItem->setText(0,element->attributes.value("task")); + newWidgetItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); QString colorString = element->attributes.value("owner").toInt() == 0 ? "red":"green"; UBTGAdaptableText* textWidget = new UBTGAdaptableText(newWidgetItem,0); textWidget->bottomMargin(14); @@ -403,13 +526,21 @@ void UBTeacherGuidePresentationWidget::showData(QVector data) mpRootWidgetItem->addChild(newWidgetItem); } - else if(element->type == "media"){ + else if(element->name == "media"){ createMediaButtonItem(); QTreeWidgetItem* newWidgetItem = new QTreeWidgetItem(mpMediaSwitchItem); newWidgetItem->setIcon(0,QIcon(":images/teacherGuide/"+ element->attributes.value("mediaType") +".png")); newWidgetItem->setText(0,element->attributes.value("title")); newWidgetItem->setData(0,tUBTGTreeWidgetItemRole_HasAnAction,tUBTGActionAssociateOnClickItem_MEDIA); newWidgetItem->setData(0,Qt::FontRole, QVariant(QFont(QApplication::font().family(),11))); + QString mimeTypeString; +#ifdef Q_WS_WIN + mimeTypeString = QUrl::fromLocalFile(UBApplication::boardController->activeDocument()->persistencePath()+ "/" + element->attributes.value("relativePath")).toString(); +#else + mimeTypeString = UBApplication::boardController->activeDocument()->persistencePath()+ "/" + element->attributes.value("relativePath"); +#endif + newWidgetItem->setData(0, TG_USER_ROLE_MIME_TYPE, mimeTypeString); + newWidgetItem->setFlags(Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsSelectable); mpRootWidgetItem->addChild(newWidgetItem); QTreeWidgetItem* mediaItem = new QTreeWidgetItem(newWidgetItem); @@ -418,7 +549,7 @@ void UBTeacherGuidePresentationWidget::showData(QVector data) newWidgetItem->setExpanded(false); mpTreeWidget->setItemWidget(mediaItem,0,mediaWidget); } - else if(element->type == "link"){ + else if(element->name == "link"){ createMediaButtonItem(); QTreeWidgetItem* newWidgetItem = new QTreeWidgetItem(mpMediaSwitchItem); newWidgetItem->setIcon(0,QIcon(":images/teacherGuide/link.png")); @@ -426,6 +557,7 @@ void UBTeacherGuidePresentationWidget::showData(QVector data) newWidgetItem->setData(0,tUBTGTreeWidgetItemRole_HasAnAction,tUBTGActionAssociateOnClickItem_URL); newWidgetItem->setData(0,tUBTGTreeWidgetItemRole_HasAnUrl,QVariant(element->attributes.value("url"))); newWidgetItem->setData(0,Qt::FontRole, QVariant(QFont(QApplication::font().family(),11))); + newWidgetItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); mpRootWidgetItem->addChild(newWidgetItem); } } @@ -461,7 +593,7 @@ void UBTeacherGuidePresentationWidget::onAddItemClicked(QTreeWidgetItem* widget, /*************************************************************************** * class UBTeacherGuidePageZeroEditionWidget * ***************************************************************************/ -UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget* parent, const char* name): QWidget(parent) +UBTeacherGuidePageZeroWidget::UBTeacherGuidePageZeroWidget(QWidget* parent, const char* name): QWidget(parent) , mpLayout(NULL) , mpButtonTitleLayout(NULL) , mpModePushButton(NULL) @@ -473,18 +605,18 @@ UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget , mpSeparatorAuthors(NULL) , mpCreationLabel(NULL) , mpLastModifiedLabel(NULL) - , mpGoalsLabel(NULL) - , mpGoals(NULL) - , mpSeparatorGoals(NULL) + , mpObjectivesLabel(NULL) + , mpObjectives(NULL) + , mpSeparatorObjectives(NULL) , mpIndexLabel(NULL) , mpKeywordsLabel(NULL) , mpKeywords(NULL) , mpSchoolLevelItemLabel(NULL) , mpSchoolLevelBox(NULL) , mpSchoolLevelValueLabel(NULL) - , mpSchoolBranchItemLabel(NULL) - , mpSchoolBranchBox(NULL) - , mpSchoolBranchValueLabel(NULL) + , mpSchoolSubjectsItemLabel(NULL) + , mpSchoolSubjectsBox(NULL) + , mpSchoolSubjectsValueLabel(NULL) , mpSchoolTypeItemLabel(NULL) , mpSchoolTypeBox(NULL) , mpSchoolTypeValueLabel(NULL) @@ -493,13 +625,15 @@ UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget , mpLicenceBox(NULL) , mpLicenceIcon(NULL) , mpLicenceLayout(NULL) + , mpSceneItemSessionTitle(NULL) { setObjectName(name); - - mpLayout = new QVBoxLayout(this); + QString chapterStyle("QLabel {font-size:16px; font-weight:bold;}"); + mpLayout = new QVBoxLayout(0); + setLayout(mpLayout); mpPageNumberLabel = new QLabel(this); mpPageNumberLabel->setAlignment(Qt::AlignRight); - mpPageNumberLabel->setObjectName("UBTGPresentationPageNumberLabel"); + mpPageNumberLabel->setObjectName("UBTGPageNumberLabel"); mpPageNumberLabel->setText(tr("Page 0")); mpLayout->addWidget(mpPageNumberLabel); @@ -508,12 +642,12 @@ UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget mpModePushButton = new QPushButton(this); mpModePushButton->setIcon(QIcon(":images/pencil.svg")); mpModePushButton->setMaximumWidth(32); + mpModePushButton->installEventFilter(this); mpButtonTitleLayout->addWidget(mpModePushButton); connect(mpModePushButton,SIGNAL(clicked()),this,SLOT(switchToMode())); - mpSessionTitle = new UBTGAdaptableText(0,this); + mpSessionTitle = new UBTGAdaptableText(0,this,"UBTGSessionTitle"); mpSessionTitle->setPlaceHolderText(tr("Type session title here ...")); - mpSessionTitle->setObjectName("UBTGEditionModeSessionTitle"); mpButtonTitleLayout->addWidget(mpSessionTitle); mpLayout->addLayout(mpButtonTitleLayout); @@ -526,6 +660,7 @@ UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget mpAuthorsLabel = new QLabel(this); mpAuthorsLabel->setObjectName("UBTGZeroPageEditionModeTitle"); mpAuthorsLabel->setText(tr("Author(s)")); + mpAuthorsLabel->setStyleSheet(chapterStyle); mpLayout->addWidget(mpAuthorsLabel); mpAuthors = new UBTGAdaptableText(0,this); @@ -546,29 +681,32 @@ UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget mpSeparatorAuthors->setObjectName("UBTGSeparator"); mpLayout->addWidget(mpSeparatorAuthors); - mpGoalsLabel = new QLabel(this); - mpGoalsLabel->setObjectName("UBTGZeroPageEditionModeTitle"); - mpGoalsLabel->setText(tr("Goal(s)")); - mpLayout->addWidget(mpGoalsLabel); + mpObjectivesLabel = new QLabel(this); + mpObjectivesLabel->setObjectName("UBTGZeroPageEditionModeTitle"); + mpObjectivesLabel->setText(tr("Objective(s)")); + mpObjectivesLabel->setStyleSheet(chapterStyle); + mpLayout->addWidget(mpObjectivesLabel); - mpGoals = new UBTGAdaptableText(0,this); - mpGoals->setObjectName("UBTGZeroPageInputText"); - mpGoals->setPlaceHolderText(tr("Type goals here...")); - mpLayout->addWidget(mpGoals); + mpObjectives = new UBTGAdaptableText(0,this); + mpObjectives->setObjectName("UBTGZeroPageInputText"); + mpObjectives->setPlaceHolderText(tr("Type objectives here...")); + mpLayout->addWidget(mpObjectives); - mpSeparatorGoals = new QFrame(this); - mpSeparatorGoals->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); - mpSeparatorGoals->setObjectName("UBTGSeparator"); - mpLayout->addWidget(mpSeparatorGoals); + mpSeparatorObjectives = new QFrame(this); + mpSeparatorObjectives->setFixedHeight(UBTG_SEPARATOR_FIXED_HEIGHT); + mpSeparatorObjectives->setObjectName("UBTGSeparator"); + mpLayout->addWidget(mpSeparatorObjectives); mpIndexLabel = new QLabel(this); mpIndexLabel->setObjectName("UBTGZeroPageEditionModeTitle"); mpIndexLabel->setText(tr("Resource indexing")); + mpIndexLabel->setStyleSheet(chapterStyle); mpLayout->addWidget(mpIndexLabel); mpKeywordsLabel = new QLabel(this); mpKeywordsLabel->setObjectName("UBTGZeroPageItemLabel"); mpKeywordsLabel->setText(tr("Keywords:")); + mpKeywordsLabel->setStyleSheet(chapterStyle); mpLayout->addWidget(mpKeywordsLabel); mpKeywords = new UBTGAdaptableText(0,this); mpKeywords->setPlaceHolderText(tr("Type keywords here ...")); @@ -577,29 +715,35 @@ UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget mpSchoolLevelItemLabel = new QLabel(this); mpSchoolLevelItemLabel->setObjectName("UBTGZeroPageItemLabel"); mpSchoolLevelItemLabel->setText(tr("Level:")); + mpSchoolLevelItemLabel->setStyleSheet(chapterStyle); mpLayout->addWidget(mpSchoolLevelItemLabel); mpSchoolLevelBox = new QComboBox(this); + mpSchoolLevelBox->setMinimumHeight(22); mpSchoolLevelBox->setObjectName("DockPaletteWidgetComboBox"); connect(mpSchoolLevelBox,SIGNAL(currentIndexChanged(QString)),this,SLOT(onSchoolLevelChanged(QString))); mpLayout->addWidget(mpSchoolLevelBox); mpSchoolLevelValueLabel = new QLabel(this); mpLayout->addWidget(mpSchoolLevelValueLabel); - mpSchoolBranchItemLabel = new QLabel(this); - mpSchoolBranchItemLabel->setObjectName("UBTGZeroPageItemLabel"); - mpSchoolBranchItemLabel->setText(tr("Branch:")); - mpLayout->addWidget(mpSchoolBranchItemLabel); - mpSchoolBranchBox = new QComboBox(this); - mpSchoolBranchBox->setObjectName("DockPaletteWidgetComboBox"); - mpLayout->addWidget(mpSchoolBranchBox); - mpSchoolBranchValueLabel = new QLabel(this); - mpLayout->addWidget(mpSchoolBranchValueLabel); + mpSchoolSubjectsItemLabel = new QLabel(this); + mpSchoolSubjectsItemLabel->setObjectName("UBTGZeroPageItemLabel"); + mpSchoolSubjectsItemLabel->setText(tr("Subjects:")); + mpSchoolSubjectsItemLabel->setStyleSheet(chapterStyle); + mpLayout->addWidget(mpSchoolSubjectsItemLabel); + mpSchoolSubjectsBox = new QComboBox(this); + mpSchoolSubjectsBox->setMinimumHeight(22); + mpSchoolSubjectsBox->setObjectName("DockPaletteWidgetComboBox"); + mpLayout->addWidget(mpSchoolSubjectsBox); + mpSchoolSubjectsValueLabel = new QLabel(this); + mpLayout->addWidget(mpSchoolSubjectsValueLabel); mpSchoolTypeItemLabel = new QLabel(this); mpSchoolTypeItemLabel->setObjectName("UBTGZeroPageItemLabel"); mpSchoolTypeItemLabel->setText(tr("Type:")); + mpSchoolTypeItemLabel->setStyleSheet(chapterStyle); mpLayout->addWidget(mpSchoolTypeItemLabel); mpSchoolTypeBox = new QComboBox(this); + mpSchoolTypeBox->setMinimumHeight(22); mpSchoolTypeBox->setObjectName("DockPaletteWidgetComboBox"); mpLayout->addWidget(mpSchoolTypeBox); mpSchoolTypeValueLabel = new QLabel(this); @@ -612,9 +756,11 @@ UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget mpLicenceLabel = new QLabel(this); mpLicenceLabel->setObjectName("UBTGZeroPageItemLabel"); - mpLicenceLabel->setText(tr("Licence:")); + mpLicenceLabel->setText(tr("Licence")); + mpLicenceLabel->setStyleSheet(chapterStyle); mpLayout->addWidget(mpLicenceLabel); mpLicenceBox = new QComboBox(this); + mpLicenceBox->setMinimumHeight(22); mpLicenceBox->setObjectName("DockPaletteWidgetComboBox"); mpLayout->addWidget(mpLicenceBox); mpLicenceLayout = new QHBoxLayout(0); @@ -624,11 +770,13 @@ UBTeacherGuidePageZeroEditionWidget::UBTeacherGuidePageZeroEditionWidget(QWidget mpLicenceLayout->addWidget(mpLicenceValueLabel); mpLayout->addLayout(mpLicenceLayout); mpLayout->addStretch(1); + + connect(UBApplication::boardController,SIGNAL(activeSceneChanged()), this, SLOT(onActiveSceneChanged())); fillComboBoxes(); } -UBTeacherGuidePageZeroEditionWidget::~UBTeacherGuidePageZeroEditionWidget() +UBTeacherGuidePageZeroWidget::~UBTeacherGuidePageZeroWidget() { DELETEPTR(mpPageNumberLabel); DELETEPTR(mpSessionTitle); @@ -638,16 +786,16 @@ UBTeacherGuidePageZeroEditionWidget::~UBTeacherGuidePageZeroEditionWidget() DELETEPTR(mpSeparatorAuthors); DELETEPTR(mpCreationLabel); DELETEPTR(mpLastModifiedLabel); - DELETEPTR(mpGoalsLabel); - DELETEPTR(mpGoals); - DELETEPTR(mpSeparatorGoals); + DELETEPTR(mpObjectivesLabel); + DELETEPTR(mpObjectives); + DELETEPTR(mpSeparatorObjectives); DELETEPTR(mpIndexLabel); DELETEPTR(mpKeywordsLabel); DELETEPTR(mpKeywords); DELETEPTR(mpSchoolLevelItemLabel); DELETEPTR(mpSchoolLevelBox); - DELETEPTR(mpSchoolBranchItemLabel); - DELETEPTR(mpSchoolBranchBox); + DELETEPTR(mpSchoolSubjectsItemLabel); + DELETEPTR(mpSchoolSubjectsBox); DELETEPTR(mpSchoolTypeItemLabel); DELETEPTR(mpSchoolTypeBox); DELETEPTR(mpSeparatorIndex); @@ -661,7 +809,15 @@ UBTeacherGuidePageZeroEditionWidget::~UBTeacherGuidePageZeroEditionWidget() DELETEPTR(mpLayout); } -void UBTeacherGuidePageZeroEditionWidget::fillComboBoxes() +bool UBTeacherGuidePageZeroWidget::eventFilter(QObject* object, QEvent* event) +{ + Q_UNUSED(object); + if(event->type() == QEvent::HoverEnter || event->type() == QEvent::HoverMove || event->type() == QEvent::HoverLeave) + return true; + return false; +} + +void UBTeacherGuidePageZeroWidget::fillComboBoxes() { QString parametersConfigFilePath = UBSettings::settings()->applicationCustomizationDirectory() + "/teacherGuide/indexingParameters.xml"; QFile parametersFile(parametersConfigFilePath); @@ -702,49 +858,111 @@ void UBTeacherGuidePageZeroEditionWidget::fillComboBoxes() QStringList licences; licences << tr("Attribution CC BY") << tr("Attribution-NoDerivs CC BY-ND") << tr("Attribution-ShareAlike CC BY-SA") << tr("Attribution-NonCommercial CC BY-NC") << tr("Attribution-NonCommercial-NoDerivs CC BY-NC-ND") << tr("Attribution-NonCommercial-ShareAlike CC BY-NC-SA") << tr("Public domain") << tr("Copyright"); - mpLicenceBox->addItems(licences); + QStringList licenceIconList; + licenceIconList << ":images/licenses/ccby.png" << ":images/licenses/ccbynd.png" << ":images/licenses/ccbysa.png" << ":images/licenses/ccbync.png" << ":images/licenses/ccbyncnd.png" << ":images/licenses/ccbyncsa.png"; + for(int i = 0; i < licenceIconList.count(); i+=1) + mpLicenceBox->setItemData(i,licenceIconList.at(i)); } -void UBTeacherGuidePageZeroEditionWidget::onSchoolLevelChanged(QString schoolLevel) +void UBTeacherGuidePageZeroWidget::onSchoolLevelChanged(QString schoolLevel) { QStringList subjects = mSubjects.value(mGradeLevelsMap.value(schoolLevel)); - mpSchoolBranchBox->clear(); + mpSchoolSubjectsBox->clear(); if(subjects.count()){ - mpSchoolBranchItemLabel->setEnabled(true); - mpSchoolBranchBox->setEnabled(true); - mpSchoolBranchBox->addItems(subjects); + mpSchoolSubjectsItemLabel->setEnabled(true); + mpSchoolSubjectsBox->setEnabled(true); + mpSchoolSubjectsBox->addItems(subjects); } else{ - mpSchoolBranchItemLabel->setDisabled(true); - mpSchoolBranchBox->setDisabled(true); + mpSchoolSubjectsItemLabel->setDisabled(true); + mpSchoolSubjectsBox->setDisabled(true); } } -void UBTeacherGuidePageZeroEditionWidget::onActiveSceneChanged() +void UBTeacherGuidePageZeroWidget::onActiveSceneChanged() { - UBDocumentProxy* documentProxy = UBApplication::documentController ? UBApplication::documentController->getCurrentDocument() : 0; - if(UBApplication::documentController && UBApplication::boardController->activeSceneIndex() == 0){ -// QDateTime creationDate = documentProxy->documentDate(); -// mpCreationLabel->setText(tr("Created the:") + creationDate.toString(Qt::SystemLocaleShortDate)); -// QDateTime updatedDate = documentProxy->lastUpdate(); -// mpLastModifiedLabel->setText(tr("Updated the:") + updatedDate.toString(Qt::SystemLocaleShortDate)); + UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument(); + if(documentProxy && UBApplication::boardController->currentPage() == 0){ + QDateTime creationDate = documentProxy->documentDate(); + mpCreationLabel->setText(tr("Created the:\n") + creationDate.toString(Qt::DefaultLocaleShortDate)); + QDateTime updatedDate = documentProxy->lastUpdate(); + mpLastModifiedLabel->setText(tr("Updated the:\n") + updatedDate.toString(Qt::DefaultLocaleShortDate)); + loadData(); + updateSceneTitle(); } } +void UBTeacherGuidePageZeroWidget::hideEvent ( QHideEvent * event ) +{ + persistData(); + QWidget::hideEvent(event); +} -void UBTeacherGuidePageZeroEditionWidget::switchToMode(tUBTGZeroPageMode mode) +void UBTeacherGuidePageZeroWidget::loadData() +{ + UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument(); + mpSessionTitle->setText(documentProxy->metaData(UBSettings::sessionTitle).toString()); + mpAuthors->setText(documentProxy->metaData(UBSettings::sessionAuthors).toString()); + mpObjectives->setText(documentProxy->metaData(UBSettings::sessionObjectives).toString()); + mpKeywords->setText(documentProxy->metaData(UBSettings::sessionKeywords).toString()); + + int currentIndex = mpSchoolLevelBox->findText(documentProxy->metaData(UBSettings::sessionGradeLevel).toString()); + mpSchoolLevelBox->setCurrentIndex((currentIndex!=-1) ? currentIndex : 0); + + currentIndex = mpSchoolSubjectsBox->findText(documentProxy->metaData(UBSettings::sessionSubjects).toString()); + mpSchoolSubjectsBox->setCurrentIndex((currentIndex!=-1) ? currentIndex : 0); + + currentIndex = mpSchoolTypeBox->findText(documentProxy->metaData(UBSettings::sessionType).toString()); + mpSchoolTypeBox->setCurrentIndex((currentIndex!=-1) ? currentIndex : 0); + + currentIndex = mpLicenceBox->findText(documentProxy->metaData(UBSettings::sessionLicence).toString()); + mpLicenceBox->setCurrentIndex((currentIndex!=-1) ? currentIndex : 0); +} + +void UBTeacherGuidePageZeroWidget::persistData() +{ + // check necessary because at document closing hide event is send after boardcontroller set + // to NULL + if(UBApplication::boardController){ + UBDocumentProxy* documentProxy = UBApplication::boardController->activeDocument(); + documentProxy->setMetaData(UBSettings::sessionTitle,mpSessionTitle->text()); + documentProxy->setMetaData(UBSettings::sessionAuthors, mpAuthors->text()); + documentProxy->setMetaData(UBSettings::sessionObjectives,mpObjectives->text()); + documentProxy->setMetaData(UBSettings::sessionKeywords,mpKeywords->text()); + documentProxy->setMetaData(UBSettings::sessionGradeLevel,mpSchoolLevelBox->currentText()); + documentProxy->setMetaData(UBSettings::sessionSubjects,mpSchoolSubjectsBox->currentText()); + documentProxy->setMetaData(UBSettings::sessionType,mpSchoolTypeBox->currentText()); + documentProxy->setMetaData(UBSettings::sessionLicence,mpLicenceBox->currentText()); + } +} + +void UBTeacherGuidePageZeroWidget::updateSceneTitle() +{ + QString sessionTitle = mpSessionTitle->text(); + if(!sessionTitle.isEmpty()) + UBApplication::boardController->activeScene()->textForObjectName(mpSessionTitle->text()); +} + +void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode) { if(mode == tUBTGZeroPageMode_EDITION){ + QString inputStyleSheet("QTextEdit { background: white; border-radius: 10px; border: 2px;}"); mpModePushButton->hide(); mpSessionTitle->setReadOnly(false); + mpSessionTitle->setStyleSheet(inputStyleSheet); + QFont titleFont(QApplication::font().family(),11,-1); + mpSessionTitle->document()->setDefaultFont(titleFont); mpAuthors->setReadOnly(false); - mpGoals->setReadOnly(false); + mpAuthors->setStyleSheet(inputStyleSheet); + mpObjectives->setReadOnly(false); + mpObjectives->setStyleSheet(inputStyleSheet); mpKeywords->setReadOnly(false); + mpKeywords->setStyleSheet(inputStyleSheet); mpSchoolLevelValueLabel->hide(); mpSchoolLevelBox->show(); - mpSchoolBranchValueLabel->hide(); - mpSchoolBranchBox->show(); + mpSchoolSubjectsValueLabel->hide(); + mpSchoolSubjectsBox->show(); mpSchoolTypeValueLabel->hide(); mpSchoolTypeBox->show(); mpLicenceIcon->hide(); @@ -752,84 +970,94 @@ void UBTeacherGuidePageZeroEditionWidget::switchToMode(tUBTGZeroPageMode mode) mpLicenceBox->show(); } else{ + QString inputStyleSheet("QTextEdit { background: transparent; border: none;}"); mpModePushButton->show(); - mpSessionTitle->setReadOnly(true); - mpAuthors->setReadOnly(true); - mpGoals->setReadOnly(true); - mpKeywords->setReadOnly(true); + mpSessionTitle->showText(mpSessionTitle->text()); + mpSessionTitle->setStyleSheet(inputStyleSheet); + updateSceneTitle(); + QFont titleFont(QApplication::font().family(),14,1); + mpSessionTitle->document()->setDefaultFont(titleFont); + mpAuthors->setStyleSheet(inputStyleSheet); + mpAuthors->setTextColor(QColor(Qt::black)); + mpAuthors->showText(mpAuthors->text()); + mpObjectives->setStyleSheet(inputStyleSheet); + mpObjectives->setTextColor(QColor(Qt::black)); + mpObjectives->showText(mpObjectives->text()); + mpKeywords->setStyleSheet(inputStyleSheet); + mpKeywords->setTextColor(QColor(Qt::black)); + mpKeywords->showText(mpKeywords->text()); mpSchoolLevelValueLabel->setText(mpSchoolLevelBox->currentText()); mpSchoolLevelValueLabel->show(); mpSchoolLevelBox->hide(); - mpSchoolBranchValueLabel->setText(mpSchoolBranchBox->currentText()); - mpSchoolBranchValueLabel->show(); - mpSchoolBranchBox->hide(); + mpSchoolSubjectsValueLabel->setText(mpSchoolSubjectsBox->currentText()); + mpSchoolSubjectsValueLabel->show(); + mpSchoolSubjectsBox->hide(); mpSchoolTypeValueLabel->setText(mpSchoolTypeBox->currentText()); mpSchoolTypeValueLabel->show(); mpSchoolTypeBox->hide(); mpLicenceValueLabel->setText(mpLicenceBox->currentText()); - QStringList licenceIconList; - licenceIconList << ":images/licenses/ccby.png" << ":images/licenses/ccbynd.png" << ":images/licenses/ccbysa.png" << ":images/licenses/ccbync.png" << ":images/licenses/ccbyncnd.png" << ":images/licenses/ccbyncsa.png"; - int licenceBoxCurrentIndex = mpLicenceBox->currentIndex(); - // -1 is return if there is no values on the box - if(licenceBoxCurrentIndex > 0 && licenceBoxCurrentIndex < licenceIconList.count()){ - mpLicenceIcon->setPixmap(licenceIconList.at(licenceBoxCurrentIndex)); + QString licenceIconPath = mpLicenceBox->itemData(mpLicenceBox->currentIndex()).toString(); + if(!licenceIconPath.isEmpty()){ + mpLicenceIcon->setPixmap(QPixmap(licenceIconPath)); mpLicenceIcon->show(); } mpLicenceValueLabel->show(); mpLicenceBox->hide(); + persistData(); } + update(); } -QVector UBTeacherGuidePageZeroEditionWidget::getData() +QVector UBTeacherGuidePageZeroWidget::getData() { QVectorresult; tUBGEElementNode* elementNode = new tUBGEElementNode(); - elementNode->type = "sessionTitle"; + elementNode->name = "sessionTitle"; elementNode->attributes.insert("value",mpSessionTitle->text()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "authors"; + elementNode->name = "authors"; elementNode->attributes.insert("value",mpAuthors->text()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "creationDate"; + elementNode->name = "creationDate"; elementNode->attributes.insert("value",mpCreationLabel->text()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "lastModifiedDate"; + elementNode->name = "lastModifiedDate"; elementNode->attributes.insert("value",mpLastModifiedLabel->text()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "goals"; - elementNode->attributes.insert("value",mpGoals->text()); + elementNode->name = "goals"; + elementNode->attributes.insert("value",mpObjectives->text()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "keywords"; + elementNode->name = "keywords"; elementNode->attributes.insert("value",mpKeywords->text()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "schoolLevel"; + elementNode->name = "schoolLevel"; elementNode->attributes.insert("value",mpSchoolLevelBox->currentText()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "schoolBranch"; - elementNode->attributes.insert("value",mpSchoolBranchBox->currentText()); + elementNode->name = "schoolBranch"; + elementNode->attributes.insert("value",mpSchoolSubjectsBox->currentText()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "schoolType"; + elementNode->name = "schoolType"; elementNode->attributes.insert("value",mpSchoolTypeBox->currentText()); result << elementNode; elementNode = new tUBGEElementNode(); - elementNode->type = "licence"; + elementNode->name = "licence"; elementNode->attributes.insert("value",mpLicenceBox->currentText()); result << elementNode; return result; @@ -839,46 +1067,59 @@ QVector UBTeacherGuidePageZeroEditionWidget::getData() * class UBTeacherGuideWidget * ***************************************************************************/ UBTeacherGuideWidget::UBTeacherGuideWidget(QWidget* parent, const char* name): QStackedWidget(parent) - , mpPageZeroEditonWidget(NULL) + , mpPageZeroWidget(NULL) , mpEditionWidget(NULL) , mpPresentationWidget(NULL) { setObjectName(name); - - mpPageZeroEditonWidget = new UBTeacherGuidePageZeroEditionWidget(this); - addWidget(mpPageZeroEditonWidget); - setCurrentWidget(mpPageZeroEditonWidget); - // mpEditionWidget = new UBTeacherGuideEditionWidget(this); -// addWidget(mpEditionWidget); -// mpPresentationWidget = new UBTeacherGuidePresentationWidget(this); -// addWidget(mpPresentationWidget); -// setCurrentWidget(mpPresentationWidget); - + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){ + mpPageZeroWidget = new UBTeacherGuidePageZeroWidget(this); + addWidget(mpPageZeroWidget); + } + if(UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()){ + mpEditionWidget = new UBTeacherGuideEditionWidget(this); + addWidget(mpEditionWidget); + mpPresentationWidget = new UBTeacherGuidePresentationWidget(this); + addWidget(mpPresentationWidget); + } connect(UBApplication::boardController->controlView(),SIGNAL(clickOnBoard()),this,SLOT(showPresentationMode())); connectToStylusPalette(); + connect(UBApplication::boardController,SIGNAL(activeSceneChanged()),this,SLOT(onActiveSceneChanged())); } UBTeacherGuideWidget::~UBTeacherGuideWidget() { + DELETEPTR(mpPageZeroWidget); DELETEPTR(mpEditionWidget); DELETEPTR(mpPresentationWidget); } + +void UBTeacherGuideWidget::onActiveSceneChanged() +{ + if(UBApplication::boardController->currentPage() == 0){ + setCurrentWidget(mpPageZeroWidget); + mpPageZeroWidget->switchToMode(tUBTGZeroPageMode_EDITION); + }else + setCurrentWidget(mpEditionWidget); + +} + void UBTeacherGuideWidget::connectToStylusPalette() { if(UBApplication::boardController->paletteManager()) connect(UBApplication::boardController->paletteManager()->stylusPalette(),SIGNAL(itemOnActionPaletteChanged()),this,SLOT(showPresentationMode())); else - QTimer::singleShot(500,this,SLOT(connectToStylusPalette())); + QTimer::singleShot(100,this,SLOT(connectToStylusPalette())); } void UBTeacherGuideWidget::showPresentationMode() { - if(currentWidget()==mpPageZeroEditonWidget){ - mCurrentData = mpPageZeroEditonWidget->getData(); - mpPageZeroEditonWidget->switchToMode(tUBTGZeroPageMode_PRESENTATION); + if(currentWidget()==mpPageZeroWidget){ + mCurrentData = mpPageZeroWidget->getData(); + mpPageZeroWidget->switchToMode(tUBTGZeroPageMode_PRESENTATION); } else if(currentWidget()==mpEditionWidget){ mCurrentData = mpEditionWidget->getData(); diff --git a/src/gui/UBTeacherGuideWidget.h b/src/gui/UBTeacherGuideWidget.h index 20d7e395..1a8b78b7 100644 --- a/src/gui/UBTeacherGuideWidget.h +++ b/src/gui/UBTeacherGuideWidget.h @@ -22,9 +22,12 @@ class QLabel; class QVBoxLayout; class QPushButton; class UBDocumentProxy; +class UBGraphicsTextItem; + #include "UBTeacherGuideWidgetsTools.h" -#include "UBTGWidgetTreeDelegate.h" + +#include "interfaces/IDataStorage.h" typedef enum { @@ -35,7 +38,7 @@ typedef enum /*************************************************************************** * class UBTeacherGuideEditionWidget * ***************************************************************************/ -class UBTeacherGuideEditionWidget : public QWidget +class UBTeacherGuideEditionWidget : public QWidget , public IDataStorage { Q_OBJECT public: @@ -44,8 +47,11 @@ public: void cleanData(); QVector getData(); + void load(QString element); + QVector save(int pageIndex); + public slots: - void onAddItemClicked(QTreeWidgetItem* widget, int column); + void onAddItemClicked(QTreeWidgetItem* widget, int column, QDomElement* element = 0); void onActiveSceneChanged(); void showEvent(QShowEvent* event); @@ -64,7 +70,9 @@ private: UBAddItem* mpAddAnActionItem; UBAddItem* mpAddAMediaItem; UBAddItem* mpAddALinkItem; - UBTGWidgetTreeDelegate* mpTreeDelegate; + +private slots: + void onActiveDocumentChanged(); }; @@ -86,6 +94,8 @@ public slots: void onActiveSceneChanged(); private: + bool eventFilter(QObject* object, QEvent* event); + void createMediaButtonItem(); UBTGAdaptableText* mpPageTitle; @@ -96,22 +106,22 @@ private: QLabel* mpPageNumberLabel; QFrame* mpSeparator; QPushButton* mpModePushButton; - QTreeWidget* mpTreeWidget; + UBTGDraggableTreeItem* mpTreeWidget; QTreeWidgetItem* mpRootWidgetItem; QTreeWidgetItem* mpMediaSwitchItem; }; /*************************************************************************** - * class UBTeacherGuidePageZeroPresentationWidget * + * class UBTeacherGuidePageZeroWidget * ***************************************************************************/ -class UBTeacherGuidePageZeroEditionWidget : public QWidget +class UBTeacherGuidePageZeroWidget : public QWidget { Q_OBJECT public: - explicit UBTeacherGuidePageZeroEditionWidget(QWidget* parent, const char* name = "UBTeacherGuidePageZeroEditionWidget"); - ~UBTeacherGuidePageZeroEditionWidget(); + explicit UBTeacherGuidePageZeroWidget(QWidget* parent, const char* name = "UBTeacherGuidePageZeroEditionWidget"); + ~UBTeacherGuidePageZeroWidget(); QVector getData(); @@ -122,6 +132,10 @@ public slots: private: void fillComboBoxes(); + void loadData(); + void hideEvent(QHideEvent* event); + bool eventFilter(QObject* object, QEvent* event); + void updateSceneTitle(); QVBoxLayout* mpLayout; QHBoxLayout* mpButtonTitleLayout; @@ -136,9 +150,9 @@ private: QLabel* mpCreationLabel; QLabel* mpLastModifiedLabel; - QLabel* mpGoalsLabel; - UBTGAdaptableText* mpGoals; - QFrame* mpSeparatorGoals; + QLabel* mpObjectivesLabel; + UBTGAdaptableText* mpObjectives; + QFrame* mpSeparatorObjectives; QLabel* mpIndexLabel; QLabel* mpKeywordsLabel; @@ -148,9 +162,9 @@ private: QComboBox* mpSchoolLevelBox; QLabel* mpSchoolLevelValueLabel; - QLabel* mpSchoolBranchItemLabel; - QComboBox* mpSchoolBranchBox; - QLabel* mpSchoolBranchValueLabel; + QLabel* mpSchoolSubjectsItemLabel; + QComboBox* mpSchoolSubjectsBox; + QLabel* mpSchoolSubjectsValueLabel; QLabel* mpSchoolTypeItemLabel; QComboBox* mpSchoolTypeBox; @@ -163,11 +177,14 @@ private: QLabel* mpLicenceIcon; QHBoxLayout* mpLicenceLayout; + UBGraphicsTextItem* mpSceneItemSessionTitle; + QMap mGradeLevelsMap; QMap mSubjects; private slots: void onSchoolLevelChanged(QString schoolLevel); + void persistData(); }; /*************************************************************************** @@ -185,13 +202,13 @@ public slots: void changeMode(); void showPresentationMode(); void connectToStylusPalette(); + void onActiveSceneChanged(); private: - UBTeacherGuidePageZeroEditionWidget* mpPageZeroEditonWidget; + UBTeacherGuidePageZeroWidget* mpPageZeroWidget; UBTeacherGuideEditionWidget* mpEditionWidget; UBTeacherGuidePresentationWidget* mpPresentationWidget; QVectormCurrentData; - }; #endif // UBTEACHERGUIDEWIDGET_H diff --git a/src/gui/UBTeacherGuideWidgetsTools.cpp b/src/gui/UBTeacherGuideWidgetsTools.cpp index adf91d11..cba4e8bc 100644 --- a/src/gui/UBTeacherGuideWidgetsTools.cpp +++ b/src/gui/UBTeacherGuideWidgetsTools.cpp @@ -21,12 +21,16 @@ #include #include #include -#include -#include #include #include "UBTeacherGuideWidgetsTools.h" -#include "UBTGWidgetTreeDelegate.h" + +#include "core/UBPersistenceManager.h" +#include "core/UBApplication.h" + +#include "board/UBBoardController.h" + +#include "domain/UBW3CWidget.h" #include "globals/UBGlobals.h" @@ -77,8 +81,8 @@ UBTGActionWidget::UBTGActionWidget(QTreeWidgetItem* widget, QWidget* parent, con mpTask->setAcceptRichText(true); mpTask->setTextColor(QColor().green()); mpTask->setObjectName("ActionWidgetTaskTextEdit"); - mpLayout->addWidget(mpOwner,0); - mpLayout->addWidget(mpTask,1); + mpLayout->addWidget(mpOwner); + mpLayout->addWidget(mpTask); } UBTGActionWidget::~UBTGActionWidget() @@ -88,10 +92,16 @@ UBTGActionWidget::~UBTGActionWidget() DELETEPTR(mpLayout); } +void UBTGActionWidget::initializeWithDom(QDomElement element) +{ + mpOwner->setCurrentIndex(element.attribute("owner").toInt()); + mpTask->setInitialText(element.attribute("task")); +} + tUBGEElementNode* UBTGActionWidget::saveData() { tUBGEElementNode* result = new tUBGEElementNode(); - result->type = "action"; + result->name = "action"; result->attributes.insert("owner",QString("%0").arg(mpOwner->currentIndex())); result->attributes.insert("task",mpTask->text()); return result; @@ -103,16 +113,18 @@ tUBGEElementNode* UBTGActionWidget::saveData() UBTGAdaptableText::UBTGAdaptableText(QTreeWidgetItem* widget, QWidget* parent, const char* name):QTextEdit(parent) , mBottomMargin(5) , mpTreeWidgetItem(widget) - , mMinimumHeight(20) + , mMinimumHeight(0) , mHasPlaceHolder(false) , mIsUpdatingSize(false) { setObjectName(name); - setStyleSheet( "QWidget {background: white; border:1 solid #999999; border-radius : 10px; padding: 2px;}"); connect(this,SIGNAL(textChanged()),this,SLOT(onTextChanged())); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + + mMinimumHeight = document()->size().height() + mBottomMargin; setMinimumHeight(mMinimumHeight); + } void UBTGAdaptableText::setPlaceHolderText(QString text) @@ -128,10 +140,17 @@ void UBTGAdaptableText::setPlaceHolderText(QString text) void UBTGAdaptableText::keyPressEvent(QKeyEvent* e) { + if(isReadOnly()){ + // this is important if you set a placeholder. In this case even if the text field is readonly the + // keypressed event came here. So if you don't ignore it you'll have a flick on the text zone + e->ignore(); + return; + } + if(toPlainText() == mPlaceHolderText){ - setTextColor(QColor(Qt::black)); setPlainText(""); } + setTextColor(QColor(Qt::black)); QTextEdit::keyPressEvent(e); } @@ -150,6 +169,8 @@ void UBTGAdaptableText::showEvent(QShowEvent* e) Q_UNUSED(e); if(!mIsUpdatingSize && mHasPlaceHolder && toPlainText().isEmpty()) setPlainText(mPlaceHolderText); + else + onTextChanged(); } QString UBTGAdaptableText::text() @@ -163,31 +184,39 @@ QString UBTGAdaptableText::text() void UBTGAdaptableText::onTextChanged() { + qreal documentSize = document()->size().height(); + if(height() == documentSize + mBottomMargin) + return; mIsUpdatingSize = true; - if(document()->size().height() < mMinimumHeight) + + + if(documentSize < mMinimumHeight) setFixedHeight(mMinimumHeight); else - setFixedHeight(document()->size().height()+mBottomMargin); + setFixedHeight(documentSize+mBottomMargin); + updateGeometry(); - //to trig the widget item to resize it + //to trig a resize on the tree widget item if(mpTreeWidgetItem){ - mpTreeWidgetItem->setExpanded(false); + mpTreeWidgetItem->setDisabled(true); mpTreeWidgetItem->setExpanded(true); + mpTreeWidgetItem->setDisabled(false); setFocus(); } mIsUpdatingSize = false; } +void UBTGAdaptableText::setInitialText(const QString& text) +{ + setText(text); + setReadOnly(false); + onTextChanged(); +} void UBTGAdaptableText::showText(const QString & text) { setText(text); - //A first rendering has to be done to calculate the text's size. - show(); - hide(); setReadOnly(true); onTextChanged(); - if(isHidden()) - show(); } void UBTGAdaptableText::bottomMargin(int newValue) @@ -196,10 +225,52 @@ void UBTGAdaptableText::bottomMargin(int newValue) onTextChanged(); } -void UBTGAdaptableText::resizeEvent(QResizeEvent* e) + +/*************************************************************************** + * class UBTGDraggableWeb * + ***************************************************************************/ +UBDraggableWeb::UBDraggableWeb(QString& relativePath, QWidget* parent): QWebView(parent) + , mDragStartPosition(QPoint(-1,-1)) + , mDragStarted(false) + { - QTextEdit::resizeEvent(e); - QTimer::singleShot(100,this,SLOT(onTextChanged())); + if(!relativePath.startsWith("file://")) + mRelativePath = QUrl::fromLocalFile(relativePath).toString(); + else + mRelativePath = relativePath; + //NOOP +} + +void UBDraggableWeb::mousePressEvent(QMouseEvent* event) +{ + mDragStartPosition = event->pos(); + mDragStarted = true; + QWebView::mousePressEvent(event); +} + +void UBDraggableWeb::mouseReleaseEvent(QMouseEvent* event) +{ + mDragStarted = false; + QWebView::mouseReleaseEvent(event); +} + +void UBDraggableWeb::mouseMoveEvent(QMouseEvent* event) +{ + if(mDragStarted && (event->pos() - mDragStartPosition).manhattanLength() > QApplication::startDragDistance()){ + QDrag *drag = new QDrag(this); + QMimeData *mimeData = new QMimeData; + QList urlList; + urlList << QUrl(mRelativePath); + mimeData->setUrls(urlList); + drag->setMimeData(mimeData); + + drag->exec(); + event->accept(); + mDragStarted = false; + } + else + QWebView::mouseMoveEvent(event); + } /*************************************************************************** @@ -214,8 +285,9 @@ UBTGMediaWidget::UBTGMediaWidget(QTreeWidgetItem* widget, QWidget* parent,const , mpMediaLabelWidget(NULL) , mpMediaWidget(NULL) , mpWebView(NULL) - , mRelativePath(QString("")) + , mMediaPath(QString("")) , mIsPresentationMode(false) + , mIsInitializationMode(false) { setObjectName(name); mpDropMeWidget = new QLabel(); @@ -225,10 +297,10 @@ UBTGMediaWidget::UBTGMediaWidget(QTreeWidgetItem* widget, QWidget* parent,const setAcceptDrops(true); addWidget(mpDropMeWidget); - setMinimumHeight(200); + setMinimumHeight(250); } -UBTGMediaWidget::UBTGMediaWidget(QString relativePath, QTreeWidgetItem* widget, QWidget* parent,const char* name): QStackedWidget(parent) +UBTGMediaWidget::UBTGMediaWidget(QString mediaPath, QTreeWidgetItem* widget, QWidget* parent,const char* name): QStackedWidget(parent) , mpTreeWidgetItem(widget) , mpDropMeWidget(NULL) , mpWorkWidget(NULL) @@ -237,14 +309,15 @@ UBTGMediaWidget::UBTGMediaWidget(QString relativePath, QTreeWidgetItem* widget, , mpMediaLabelWidget(NULL) , mpMediaWidget(NULL) , mpWebView(NULL) - , mRelativePath(relativePath) , mIsPresentationMode(true) , mMediaType("") + , mIsInitializationMode(false) { setObjectName(name); + mMediaPath = UBApplication::boardController->activeDocument()->persistencePath()+ "/" + mediaPath; setAcceptDrops(false); - createWorkWidget(mRelativePath); - setMinimumHeight(200); + createWorkWidget(); + setFixedHeight(200); } UBTGMediaWidget::~UBTGMediaWidget() @@ -261,14 +334,50 @@ UBTGMediaWidget::~UBTGMediaWidget() DELETEPTR(mpWorkWidget); } +void UBTGMediaWidget::initializeWithDom(QDomElement element) +{ + mIsInitializationMode = true; + setAcceptDrops(false); + mMediaPath = UBApplication::boardController->activeDocument()->persistencePath() + "/" + element.attribute("relativePath"); + createWorkWidget(); + setFixedHeight(200); + mpTitle->setInitialText(element.attribute("title")); + mIsInitializationMode = false; +} + +void UBTGMediaWidget::removeSource() +{ + QFileInfo fileInfo(mMediaPath); + if(fileInfo.isFile()) + QFile(mMediaPath).remove(); + else + UBFileSystemUtils::deleteDir(mMediaPath); +} + +void UBTGMediaWidget::hideEvent(QHideEvent* event) +{ + if(mpWebView) + mpWebView->page()->mainFrame()->setContent(UBW3CWidget::freezedWidgetPage().toAscii()); + QWidget::hideEvent(event); +} + +void UBTGMediaWidget::showEvent(QShowEvent* event) +{ + QWidget::showEvent(event); + if(mpWebView) + mpWebView->load(QUrl(mMediaPath + "/index.htm")); +} + tUBGEElementNode* UBTGMediaWidget::saveData() { if(!mpTitle) return 0; tUBGEElementNode* result = new tUBGEElementNode(); - result->type = "media"; + QString relativePath = mMediaPath; + relativePath = relativePath.replace(UBApplication::boardController->activeDocument()->persistencePath()+"/",""); + result->name = "media"; result->attributes.insert("title",mpTitle->text()); - result->attributes.insert("relativePath",mRelativePath); + result->attributes.insert("relativePath",relativePath); result->attributes.insert("mediaType",mMediaType); return result; } @@ -278,27 +387,40 @@ void UBTGMediaWidget::dragEnterEvent(QDragEnterEvent *event) event->accept(); } -void UBTGMediaWidget::createWorkWidget(QString& path) +void UBTGMediaWidget::createWorkWidget() { - QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(path); - qDebug() << mimeType; + QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(mMediaPath); bool setMedia = true; + UBDocumentProxy* proxyDocument = UBApplication::boardController->activeDocument(); if(mimeType.contains("audio") || mimeType.contains("video")){ mMediaType = mimeType.contains("audio")? "audio":"movie"; mpMediaWidget = new UBMediaWidget(mimeType.contains("audio")?eMediaType_Audio:eMediaType_Video); - mpMediaWidget->setFile(path); + if(mIsPresentationMode || mIsInitializationMode){ + mpMediaWidget->setFile(mMediaPath); + } + else{ + mMediaPath = UBPersistenceManager::persistenceManager()->addObjectToTeacherGuideDirectory(proxyDocument, mMediaPath); + mpMediaWidget->setFile(mMediaPath); + } } else if(mimeType.contains("image")){ mMediaType = "image"; + if(!(mIsPresentationMode || mIsInitializationMode)) + mMediaPath = UBPersistenceManager::persistenceManager()->addObjectToTeacherGuideDirectory(proxyDocument, mMediaPath); + mpMediaLabelWidget = new QLabel(); - QPixmap pixmap = QPixmap(QUrl(path).toLocalFile()); + QPixmap pixmap = QPixmap(mMediaPath); pixmap = pixmap.scaledToWidth(mpTreeWidgetItem->treeWidget()->size().width()); mpMediaLabelWidget->setPixmap(pixmap); mpMediaLabelWidget->setScaledContents(true); } else if(mimeType.contains("application")){ mMediaType = "w3c"; - mpWebView = new QWebView(0); + if(!(mIsPresentationMode || mIsInitializationMode)){ + QDir baseW3CDirectory(UBPersistenceManager::persistenceManager()->teacherGuideAbsoluteObjectPath(proxyDocument)); + mMediaPath = UBW3CWidget::createNPAPIWrapperInDir(mMediaPath,baseW3CDirectory,mimeType,QSize(100,100),QUuid::createUuid()); + } + mpWebView = new UBDraggableWeb(mMediaPath); mpWebView->setAcceptDrops(false); mpWebView->settings()->setAttribute(QWebSettings::JavaEnabled, true); mpWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); @@ -307,8 +429,8 @@ void UBTGMediaWidget::createWorkWidget(QString& path) mpWebView->settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true); mpWebView->settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true); mpWebView->settings()->setAttribute(QWebSettings::DnsPrefetchEnabled, true); - mpWebView->load(QUrl(path)); - mpWebView->show(); + + mpWebView->load(QUrl(mMediaPath+"/index.htm")); } else{ qDebug() << "createWorkWidget mime type not handled" << mimeType; @@ -316,45 +438,44 @@ void UBTGMediaWidget::createWorkWidget(QString& path) } if(setMedia){ - mRelativePath = path; setAcceptDrops(false); mpWorkWidget = new QWidget(this); mpLayout = new QVBoxLayout(mpWorkWidget); if(!mIsPresentationMode){ mpTitle = new UBTGAdaptableText(mpTreeWidgetItem,mpWorkWidget); mpTitle->setPlaceHolderText(tr("Type title here...")); - mpLayout->addWidget(mpTitle,1); + mpLayout->addWidget(mpTitle); } if(mpMediaLabelWidget){ + mpMediaLabelWidget->setMaximumHeight(width()); mpMediaLabelWidget->setParent(mpWorkWidget); mpLayout->addWidget(mpMediaLabelWidget); } else if (mpMediaWidget){ - mpMediaWidget->setMaximumHeight(mpTreeWidgetItem->treeWidget()->size().width()); + mpMediaWidget->setMaximumHeight(width()); mpMediaWidget->setParent(mpWorkWidget); mpLayout->addWidget(mpMediaWidget); } else if (mpWebView){ - mpWebView->setMaximumHeight(mpTreeWidgetItem->treeWidget()->size().width()); + mpWebView->setMaximumHeight(width()); mpWebView->setParent(mpWorkWidget); mpLayout->addWidget(mpWebView); + mpWebView->show(); } mpWorkWidget->setLayout(mpLayout); addWidget(mpWorkWidget); setCurrentWidget(mpWorkWidget); - updateSize(); } } void UBTGMediaWidget::parseMimeData(const QMimeData* pMimeData) { - QString path; if(pMimeData){ if(pMimeData->hasText()){ - path = QUrl::fromLocalFile(pMimeData->text()).toString(); + mMediaPath = QUrl::fromLocalFile(pMimeData->text()).toString(); } else if(pMimeData->hasUrls()){ - path = pMimeData->urls().at(0).toString(); + mMediaPath = pMimeData->urls().at(0).toString(); } else if(pMimeData->hasImage()){ qDebug() << "Not yet implemented"; @@ -363,7 +484,7 @@ void UBTGMediaWidget::parseMimeData(const QMimeData* pMimeData) else qDebug() << "No mime data present"; - createWorkWidget(path); + createWorkWidget(); } void UBTGMediaWidget::dropEvent(QDropEvent* event) @@ -379,9 +500,13 @@ void UBTGMediaWidget::mousePressEvent(QMouseEvent *event) else{ QDrag *drag = new QDrag(this); - QMimeData *mimeData = new QMimeData; + QMimeData *mimeData = new QMimeData(); QList urlList; - urlList << QUrl(mRelativePath); +#ifdef Q_WS_WIN + urlList << QUrl::fromLocalFile(mMediaPath); +#else + urlList << QUrl(mMediaPath); +#endif mimeData->setUrls(urlList); drag->setMimeData(mimeData); @@ -390,18 +515,8 @@ void UBTGMediaWidget::mousePressEvent(QMouseEvent *event) } } -void UBTGMediaWidget::updateSize() -{ - if(mpTreeWidgetItem){ - mpTreeWidgetItem->setExpanded(false); - mpTreeWidgetItem->setExpanded(true); - if(!mIsPresentationMode) - mpTitle->setFocus(); - } -} - /*************************************************************************** - * class UBTGUrlWdiget * + * class UBTGUrlWidget * ***************************************************************************/ UBTGUrlWidget::UBTGUrlWidget(QWidget* parent, const char* name ):QWidget(parent) , mpLayout(NULL) @@ -428,11 +543,35 @@ UBTGUrlWidget::~UBTGUrlWidget() DELETEPTR(mpLayout); } +void UBTGUrlWidget::initializeWithDom(QDomElement element) +{ + mpTitle->setText(element.attribute("title")); + mpUrl->setText(element.attribute("url")); +} + tUBGEElementNode* UBTGUrlWidget::saveData() { tUBGEElementNode* result = new tUBGEElementNode(); - result->type = "link"; + result->name = "link"; result->attributes.insert("title",mpTitle->text()); result->attributes.insert("url",mpUrl->text()); return result; } + + +/*************************************************************************** + * class UBTGDraggableTreeItem * + ***************************************************************************/ +UBTGDraggableTreeItem::UBTGDraggableTreeItem(QWidget* parent, const char* name) : QTreeWidget(parent) +{ + setObjectName(name); +} + +QMimeData* UBTGDraggableTreeItem::mimeData(const QList items) const +{ + QMimeData* result = new QMimeData(); + QList urls; + urls << QUrl(items.at(0)->data(0,TG_USER_ROLE_MIME_TYPE).toString()); + result->setUrls(urls); + return result; +} diff --git a/src/gui/UBTeacherGuideWidgetsTools.h b/src/gui/UBTeacherGuideWidgetsTools.h index fe1248d8..7249c6dd 100644 --- a/src/gui/UBTeacherGuideWidgetsTools.h +++ b/src/gui/UBTeacherGuideWidgetsTools.h @@ -29,6 +29,9 @@ #include "customWidgets/UBMediaWidget.h" +#define TG_USER_ROLE_MIME_TYPE (Qt::UserRole+50) + + class QTreeWidget; class QVBoxLayout; class QComboBox; @@ -39,12 +42,12 @@ class QDomElement; typedef struct { - QString type; + QString name; QMap attributes; }tUBGEElementNode; -class iUBTGSavableData +class iUBTGSaveData { public: virtual tUBGEElementNode* saveData() = 0; @@ -62,7 +65,7 @@ signals: public slots: }; -class UBTGActionWidget : public QWidget, public iUBTGSavableData +class UBTGActionWidget : public QWidget, public iUBTGSaveData { Q_OBJECT @@ -71,6 +74,7 @@ public: ~UBTGActionWidget(); void update(); tUBGEElementNode* saveData(); + void initializeWithDom(QDomElement element); private: QVBoxLayout* mpLayout; @@ -91,6 +95,7 @@ public: void bottomMargin(int newValue); void setPlaceHolderText(QString text); QString text(); + void setInitialText(const QString& text); public slots: void onTextChanged(); @@ -99,7 +104,6 @@ protected: void keyPressEvent(QKeyEvent* e); void keyReleaseEvent(QKeyEvent* e); void showEvent(QShowEvent* e); - void resizeEvent(QResizeEvent* e); private: int mBottomMargin; @@ -111,23 +115,43 @@ private: }; -class UBTGMediaWidget : public QStackedWidget , public iUBTGSavableData +class UBDraggableWeb : public QWebView +{ + Q_OBJECT +public: + explicit UBDraggableWeb(QString& relativePath, QWidget* parent = 0); + +private: + void mousePressEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + + QString mRelativePath; + QPoint mDragStartPosition; + bool mDragStarted; +}; + +class UBTGMediaWidget : public QStackedWidget , public iUBTGSaveData { Q_OBJECT public: UBTGMediaWidget(QTreeWidgetItem* widget = 0, QWidget* parent = 0, const char* name = "UBTGMediaWidget"); - UBTGMediaWidget(QString relativePath, QTreeWidgetItem* widget = 0, QWidget* parent = 0, const char* name = "UBTGMediaWidget"); + UBTGMediaWidget(QString mediaPath, QTreeWidgetItem* widget = 0, QWidget* parent = 0, const char* name = "UBTGMediaWidget"); ~UBTGMediaWidget(); tUBGEElementNode* saveData(); + void initializeWithDom(QDomElement element); + void removeSource(); protected: void dragEnterEvent(QDragEnterEvent* event); void dropEvent(QDropEvent* event); void mousePressEvent(QMouseEvent* event); + void hideEvent(QHideEvent* event); + void showEvent(QShowEvent* event); private: void parseMimeData(const QMimeData* pMimeData); - void createWorkWidget(QString& path); + void createWorkWidget(); void updateSize(); QTreeWidgetItem* mpTreeWidgetItem; @@ -137,25 +161,36 @@ private: UBTGAdaptableText* mpTitle; QLabel* mpMediaLabelWidget; UBMediaWidget* mpMediaWidget; - QWebView* mpWebView; - QString mRelativePath; + UBDraggableWeb* mpWebView; + QString mMediaPath; bool mIsPresentationMode; QString mMediaType; + bool mIsInitializationMode; }; -class UBTGUrlWidget : public QWidget , public iUBTGSavableData +class UBTGUrlWidget : public QWidget , public iUBTGSaveData { Q_OBJECT public: UBTGUrlWidget(QWidget* parent = 0, const char* name = "UBTGUrlWidget"); ~UBTGUrlWidget(); tUBGEElementNode* saveData(); + void initializeWithDom(QDomElement element); private: QVBoxLayout* mpLayout; QLineEdit* mpTitle; QLineEdit* mpUrl; }; +class UBTGDraggableTreeItem : public QTreeWidget +{ + Q_OBJECT +public: + UBTGDraggableTreeItem(QWidget* parent = 0, const char* name = "UBTGDraggableTreeItem"); + +private: + QMimeData* mimeData(const QList items) const; +}; #endif // UBTEACHERGUIDEWIDGETSTOOLS_H diff --git a/src/gui/UBThumbnailWidget.cpp b/src/gui/UBThumbnailWidget.cpp index a3c631fb..4f22cc42 100644 --- a/src/gui/UBThumbnailWidget.cpp +++ b/src/gui/UBThumbnailWidget.cpp @@ -18,6 +18,8 @@ #include "UBThumbnailWidget.h" #include "UBRubberBand.h" +#include "board/UBBoardController.h" + #include "core/UBSettings.h" #include "core/UBApplication.h" @@ -354,7 +356,7 @@ void UBThumbnailWidget::mouseMoveEvent(QMouseEvent *event) // for vertical moving - QSet incSelectedItemsY = scene()->items(incrementYSelection, Qt::IntersectsItemBoundingRect).toSet(); + QSet incSelectedItemsY = scene()->items(incrementYSelection, Qt::IntersectsItemBoundingRect).toSet(); foreach (QGraphicsItem *lassoSelectedItem, incSelectedItemsY) { if (lassoSelectedItem) @@ -389,7 +391,7 @@ void UBThumbnailWidget::mouseMoveEvent(QMouseEvent *event) { item->setSelected(false); } - + mSelectedThumbnailItems += lassoSelectedThumbnailItems; mPrevLassoRect = lassoRect; @@ -749,8 +751,10 @@ UBSceneThumbnailNavigPixmap::UBSceneThumbnailNavigPixmap(const QPixmap& pix, UBD , bCanMoveUp(false) , bCanMoveDown(false) { - setAcceptsHoverEvents(true); - setFlag(QGraphicsItem::ItemIsSelectable, true); + if(UBApplication::boardController->pageFromSceneIndex(pSceneIndex)){ + setAcceptsHoverEvents(true); + setFlag(QGraphicsItem::ItemIsSelectable, true); + } } UBSceneThumbnailNavigPixmap::~UBSceneThumbnailNavigPixmap() @@ -822,7 +826,7 @@ void UBSceneThumbnailNavigPixmap::updateButtonsState() bCanMoveDown = false; UBDocumentProxy* p = proxy(); - if(NULL != p) + if(NULL != p && UBApplication::boardController->pageFromSceneIndex(sceneIndex())) { int iNbPages = p->pageCount(); if(1 < iNbPages) @@ -838,6 +842,8 @@ void UBSceneThumbnailNavigPixmap::updateButtonsState() } } } + if(UBSettings::settings()->teacherGuidePageZeroActivated && sceneIndex()<=1) + bCanMoveUp = false; if(bCanDelete || bCanMoveUp || bCanMoveDown) { diff --git a/src/gui/gui.pri b/src/gui/gui.pri index a1dd1218..52939d44 100644 --- a/src/gui/gui.pri +++ b/src/gui/gui.pri @@ -50,9 +50,7 @@ HEADERS += src/gui/UBThumbnailView.h \ src/gui/UBFeaturesActionBar.h \ src/gui/UBDockTeacherGuideWidget.h \ src/gui/UBTeacherGuideWidget.h \ - src/gui/UBTeacherGuideWidgetsTools.h \ - src/gui/UBTeacherGuideDelegate.h \ - src/gui/UBTGWidgetTreeDelegate.h + src/gui/UBTeacherGuideWidgetsTools.h SOURCES += src/gui/UBThumbnailView.cpp \ src/gui/UBFloatingPalette.cpp \ @@ -105,9 +103,7 @@ SOURCES += src/gui/UBThumbnailView.cpp \ src/gui/UBFeaturesActionBar.cpp \ src/gui/UBDockTeacherGuideWidget.cpp \ src/gui/UBTeacherGuideWidget.cpp \ - src/gui/UBTeacherGuideWidgetsTools.cpp \ - src/gui/UBTeacherGuideDelegate.cpp \ - src/gui/UBTGWidgetTreeDelegate.cpp + src/gui/UBTeacherGuideWidgetsTools.cpp win32 { diff --git a/src/softwareupdate/UBSoftwareUpdate.h b/src/interfaces/IDataStorage.h similarity index 55% rename from src/softwareupdate/UBSoftwareUpdate.h rename to src/interfaces/IDataStorage.h index 0cdf9f90..8de8a585 100644 --- a/src/softwareupdate/UBSoftwareUpdate.h +++ b/src/interfaces/IDataStorage.h @@ -13,28 +13,30 @@ * along with this program. If not, see . */ -#ifndef UBSOFTWAREUPDATE_H_ -#define UBSOFTWAREUPDATE_H_ +#ifndef IDATASTORAGE_H +#define IDATASTORAGE_H -#include +#include +#include -#include "frameworks/UBVersion.h" - -class UBSoftwareUpdate +typedef enum { - public: - UBSoftwareUpdate(); - UBSoftwareUpdate(UBVersion& version, const QString &downloadUrl); - virtual ~UBSoftwareUpdate(); - - UBVersion version() const; - QString downloadUrl() const; + eElementType_START, + eElementType_END, + eElementType_UNIQUE +}eElementType; - bool operator==(const UBSoftwareUpdate &other) const; +typedef struct +{ + QString name; + QMap attributes; + eElementType type; +}tIDataStorage; - private: - UBVersion mVersion; - QString mDownloadUrl; +class IDataStorage +{ +public: + //virtual void load(QString element) = 0; + virtual QVectorsave(int pageIndex) = 0 ; }; - -#endif // UBSOFTWAREUPDATE_H_ +#endif // IDATASTORAGE_H diff --git a/src/interfaces/IDropable.h b/src/interfaces/IDropable.h deleted file mode 100644 index a75f4f16..00000000 --- a/src/interfaces/IDropable.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef IDROPABLE_H -#define IDROPABLE_H - -#include -#include -#include -#include - -class IDropable -{ -public: - virtual ~IDropable(){} - -protected: - virtual void dropEvent(QDropEvent* pEvent) = 0; - virtual void dragEnterEvent(QDragEnterEvent* pEvent) = 0; - virtual void dragMoveEvent(QDragMoveEvent* pEvent) = 0; - virtual void dragLeaveEvent(QDragLeaveEvent* pEvent) = 0; -}; - -#endif // IDROPABLE_H diff --git a/src/interfaces/IResizeable.h b/src/interfaces/IResizeable.h deleted file mode 100644 index b84ac8e5..00000000 --- a/src/interfaces/IResizeable.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef IRESIZEABLE_H -#define IRESIZEABLE_H - -#include - -class IResizeable -{ -public: - ~IResizeable(); - -protected: - virtual void resizeEvent(QResizeEvent* pEvent) = 0; -}; - -#endif // IRESIZEABLE_H diff --git a/src/interfaces/interfaces.pri b/src/interfaces/interfaces.pri index 55098bf3..bac61bda 100644 --- a/src/interfaces/interfaces.pri +++ b/src/interfaces/interfaces.pri @@ -1,3 +1,2 @@ -HEADERS += src/interfaces/IDropable.h \ - src/interfaces/IDropable.h \ - src/interfaces/IResizeable.h +HEADERS += \ + src/interfaces/IDataStorage.h diff --git a/src/softwareupdate/UBRssHandler.cpp b/src/softwareupdate/UBRssHandler.cpp deleted file mode 100644 index 5097600a..00000000 --- a/src/softwareupdate/UBRssHandler.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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 "frameworks/UBVersion.h" - -#include "UBRssHandler.h" -#include "UBSoftwareUpdate.h" - -#include "core/memcheck.h" - -const QString UBRssHandler::sRssItemElementName = "item"; -const QString UBRssHandler::sRssLinkElementName = "link"; -const QString UBRssHandler::sUniboardVersionElementName = "ub:version"; // TODO UB 4.x map properly ub namespace - -UBRssHandler::UBRssHandler() - : mRssTagParsed(false) - , mInItem(false) - , mInVersion(false) -{ - // NOOP -} - -UBRssHandler::~UBRssHandler(void) -{ - while (!mSoftwareUpdates.isEmpty()) - { - delete mSoftwareUpdates.takeFirst(); - } -} - -bool UBRssHandler::startElement( - const QString & /* namespaceURI */, - const QString & /* localName */, - const QString &qualifiedName, - const QXmlAttributes &attributes) -{ - bool ok = true; - if (!mRssTagParsed && qualifiedName != "rss") - { - mError = "This file is not a RSS source."; - ok = false; - } - else if (qualifiedName == "rss") - { - QString version = attributes.value("version"); - if (!version.isEmpty() && version != "2.0") - { - mError = "Can only handle RSS 2.0."; - ok = false; - } - else - { - mRssTagParsed = true; - } - } - else if (qualifiedName == sRssItemElementName) - { - mInItem = true; - } - else if (qualifiedName == sUniboardVersionElementName) - { - mInVersion = true; - } - mCurrentText = ""; - return ok; -} - -bool UBRssHandler::characters(const QString &str) -{ - mCurrentText += str; - return true; -} - -bool UBRssHandler::endElement( - const QString & /* namespaceURI */, - const QString & /* localName */, - const QString &qualifiedName) -{ - bool ok = true; - if (qualifiedName == sRssItemElementName) - { - mInItem = false; - if (mVersion.isValid() && !mDownloadUrl.isEmpty()) - { - UBSoftwareUpdate *softwareUpdate = new UBSoftwareUpdate(mVersion, mDownloadUrl); - mSoftwareUpdates.append(softwareUpdate); - } - mVersion = UBVersion(); - mDownloadUrl = ""; - } - else if (qualifiedName == sRssLinkElementName) - { - if (mInItem) - { - QUrl url(mCurrentText); - if (url.isValid()) - mDownloadUrl = mCurrentText; - else - ok = false; - } - } - else if (qualifiedName == sUniboardVersionElementName) - { - if (mInItem) - { - mVersion.setString(mCurrentText); - ok = mVersion.isValid(); - mInVersion = false; - } - } - return ok; -} - -bool UBRssHandler::fatalError(const QXmlParseException &exception) -{ - qWarning() << "Fatal error at line " << exception.lineNumber() - << ", column " << exception.columnNumber() << ": " - << exception.message() << mError; - return false; -} - -QString UBRssHandler::error() const -{ - return mError; -} - -QList UBRssHandler::softwareUpdates() const -{ - return mSoftwareUpdates; -} diff --git a/src/softwareupdate/UBRssHandler.h b/src/softwareupdate/UBRssHandler.h deleted file mode 100644 index 04d75dcc..00000000 --- a/src/softwareupdate/UBRssHandler.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 UBRSSHANDLER_H_ -#define UBRSSHANDLER_H_ - -#include -#include - -#include "frameworks/UBVersion.h" -class UBSoftwareUpdate; - -class UBRssHandler: public QXmlDefaultHandler -{ - public: - UBRssHandler(); - virtual ~UBRssHandler(void); - - // QXmlDefaultHandler - virtual bool startElement(const QString &namespaceURI, - const QString &localName, const QString &qualifiedName, - const QXmlAttributes &attributes); - virtual bool endElement(const QString &namespaceURI, - const QString &localName, const QString &qualifiedName); - virtual bool characters(const QString &str); - virtual bool fatalError(const QXmlParseException &exception); - - // UBRssHandler - QString error() const; - QList softwareUpdates() const; - - private: - QList mSoftwareUpdates; - bool mRssTagParsed; - bool mInItem; - bool mInVersion; - QString mError; - QString mCurrentText; - UBVersion mVersion; - QString mDownloadUrl; - - static const QString sRssItemElementName; - static const QString sRssLinkElementName; - static const QString sUniboardVersionElementName; -}; - -#endif /* UBRSSHANDLER_H_ */ diff --git a/src/softwareupdate/UBSoftwareUpdate.cpp b/src/softwareupdate/UBSoftwareUpdate.cpp deleted file mode 100644 index 84a3e450..00000000 --- a/src/softwareupdate/UBSoftwareUpdate.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 "frameworks/UBVersion.h" - -#include "UBSoftwareUpdate.h" - -#include "core/memcheck.h" - -UBSoftwareUpdate::UBSoftwareUpdate() -{ - // NOOP -} - -UBSoftwareUpdate::UBSoftwareUpdate(UBVersion& version, const QString &downloadUrl) - : mVersion(version) - , mDownloadUrl(downloadUrl) -{ - // NOOP -} - -UBSoftwareUpdate::~UBSoftwareUpdate() -{ - // NOOP -} - -UBVersion UBSoftwareUpdate::version() const -{ - return mVersion; -} - -QString UBSoftwareUpdate::downloadUrl() const -{ - return mDownloadUrl; -} - -bool UBSoftwareUpdate::operator==(const UBSoftwareUpdate &other) const -{ - return version() == other.version(); -} diff --git a/src/softwareupdate/UBSoftwareUpdateController.cpp b/src/softwareupdate/UBSoftwareUpdateController.cpp deleted file mode 100644 index 6f651db1..00000000 --- a/src/softwareupdate/UBSoftwareUpdateController.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/* - * 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 "frameworks/UBVersion.h" -//#include "frameworks/UBFileSystemUtils.h" -//#include "frameworks/UBPlatformUtils.h" - -//#include "UBSoftwareUpdateController.h" -//#include "UBRssHandler.h" -//#include "UBSoftwareUpdate.h" - -//#include "core/UBApplication.h" -//#include "core/UBSettings.h" -//#include "core/UBSetting.h" - -//#include "board/UBBoardController.h" - -//#include "document/UBDocumentProxy.h" - -//#include "network/UBHttpGet.h" -//#include "network/UBServerXMLHttpRequest.h" -//#include "network/UBNetworkAccessManager.h" - -//const qreal UBSoftwareUpdateController::sProgressPercentageStep = 1; -//const int UBSoftwareUpdateController::sMinDisplayedDownloadedSizeInBytes = 2 * 1024 * 1024; - -//UBSoftwareUpdateController::UBSoftwareUpdateController(QObject *parent) -// : QObject(parent) -// , mHttp(0) -//{ -// // NOOP -//} - - -//UBSoftwareUpdateController::~UBSoftwareUpdateController() -//{ -// delete mHttp; -//} - - -//void UBSoftwareUpdateController::beginRssDownload(const QUrl &url) -//{ -// UBServerXMLHttpRequest * request = new UBServerXMLHttpRequest(UBNetworkAccessManager::defaultAccessManager()); -// connect(request, SIGNAL(finished(bool, const QByteArray &)), this, SLOT(rssDownloadFinished(bool, const QByteArray &))); - -// request->get(url); -//} - - -//void UBSoftwareUpdateController::beginInstallerDownload(const QUrl &url) -//{ -// delete mHttp; -// mHttp = new UBHttpGet(); - -// connect(mHttp, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(installerDownloadProgress(qint64, qint64))); -// connect(mHttp, SIGNAL(downloadFinished(bool, QUrl, QString, QByteArray, QPointF, QSize, bool)), -// this, SLOT(installerDownloadFinished(bool, QUrl, QString, QByteArray))); - -// mLastDisplayedProgress = 0; - -// UBApplication::showMessage(tr("Downloading software update (%1%)").arg(0), true); -// mHttp->get(url, QPointF(), QSize()); -//} - - -//void UBSoftwareUpdateController::rssDownloadFinished(bool success, const QByteArray &payload) -//{ -// if (!success) -// { -// qWarning() << "Failed to download RSS file."; -// failedToRetrieveSoftwareUpdateInfo(); -// return; -// } - -// parseRss(payload); -//} - - -//void UBSoftwareUpdateController::installerDownloadProgress(qint64 receivedBytes, qint64 bytesTotal) -//{ -// if (bytesTotal > sMinDisplayedDownloadedSizeInBytes) -// { -// qreal progress = ((qreal)(receivedBytes * 100) / bytesTotal); -// if (progress >= mLastDisplayedProgress + sProgressPercentageStep || receivedBytes == bytesTotal) -// { -// mLastDisplayedProgress = progress; -// UBApplication::showMessage(tr("Downloading software update (%1%)").arg(progress, 0, 'f', 0), true); -// } -// } -//} - - -//void UBSoftwareUpdateController::installerDownloadFinished(bool success, QUrl sourceUrl, QString contentTypeHeader, QByteArray data) -//{ -// Q_UNUSED(contentTypeHeader); - -// if (!success) -// { -// UBApplication::showMessage(tr("Downloading software update failed")); -// return; -// } - -// UBApplication::showMessage(tr("Download finished")); - -// QStringList urlParts = sourceUrl.toString().split("/"); -// QString installerFileName = urlParts.last(); -// QString tempDirPath = UBFileSystemUtils::createTempDir(UBFileSystemUtils::defaultTempDirName(), false); -// QString installerFilePath = tempDirPath + "/" + installerFileName; - -// QFile file(installerFilePath); - -// if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) -// { -// qCritical() << "Cannot open " << installerFilePath << " for writing..."; -// return; -// } - -// file.write(data); -// file.flush(); -// file.close(); - -// if (QMessageBox::question( -// QApplication::activeWindow(), -// tr("Software Update"), -// tr("Are you sure you want to install this new version of Uniboard now?\nThis session will close as soon as installation begins."), -// QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) -// { - -// UBDocumentProxy* document = UBApplication::boardController->activeDocument(); -// int sceneIndex = UBApplication::boardController->activeSceneIndex(); - -// if (document) -// { -// UBSettings::settings()->appLastSessionDocumentUUID->set(UBStringUtils::toCanonicalUuid(document->uuid())); -// UBSettings::settings()->appLastSessionPageIndex->set(sceneIndex); -// } - -// UBSettings::settings()->appIsInSoftwareUpdateProcess->set(true); - -// UBPlatformUtils::runInstaller(installerFilePath); - -// UBApplication::quit(); -// } -//} - - -//void UBSoftwareUpdateController::parseRss(const QByteArray &rssContent) -//{ -// UBRssHandler rssHandler; -// QXmlSimpleReader xmlReader; -// xmlReader.setContentHandler(&rssHandler); -// xmlReader.setErrorHandler(&rssHandler); -// QXmlInputSource source; -// source.setData(rssContent); - -// if (!xmlReader.parse(source)) -// { -// failedToRetrieveSoftwareUpdateInfo(); -// return; -// } - -// if (rssHandler.error().length() > 0) -// { -// qWarning() << "Failed to parse RSS file. Reason: " << rssHandler.error(); -// failedToRetrieveSoftwareUpdateInfo(); -// return; -// } - -// if (rssHandler.softwareUpdates().isEmpty()) -// { -// qWarning() << "RSS file does not contain software update info."; -// failedToRetrieveSoftwareUpdateInfo(); -// return; -// } - -// UBVersion installedVersion(qApp->applicationVersion()); -// if (!installedVersion.isValid()) -// { -// qWarning() << "Failed to parse installed version format: " << qApp->applicationVersion(); -// failedToRetrieveSoftwareUpdateInfo(); -// return; -// } - -// QList softwareUpdates = rssHandler.softwareUpdates(); -// const UBSoftwareUpdate *mostRecentSoftwareUpdate = searchForMoreRecentAndAsStableSoftwareUpdate(installedVersion, softwareUpdates); - -// if (mostRecentSoftwareUpdate) -// { -// emit softwareUpdateAvailable(installedVersion, *mostRecentSoftwareUpdate); -// } -// else -// { -// emit noSoftwareUpdateAvailable(); -// } -//} - - -//const UBSoftwareUpdate* UBSoftwareUpdateController::searchForMoreRecentAndAsStableSoftwareUpdate(const UBVersion &installedVersion, const QList &softwareUpdates) -//{ -// const UBSoftwareUpdate *mostRecentSoftwareUpdate = 0; -// foreach (const UBSoftwareUpdate *softwareUpdate, softwareUpdates) -// { -// bool moreRecentAndAsStable = false; - -// if (Alpha == installedVersion.releaseStage()) -// { -// if (installedVersion < softwareUpdate->version() && -// installedVersion.platformNumber() == softwareUpdate->version().platformNumber()) -// { -// moreRecentAndAsStable = true; -// } -// } -// else if (Beta == installedVersion.releaseStage()) -// { -// if (Alpha != softwareUpdate->version().releaseStage() && -// installedVersion < softwareUpdate->version() && -// installedVersion.platformNumber() == softwareUpdate->version().platformNumber()) -// { -// moreRecentAndAsStable = true; -// } -// } -// else -// { -// if (ReleaseCandidate == softwareUpdate->version().releaseStage() && -// installedVersion < softwareUpdate->version() && -// installedVersion.platformNumber() == softwareUpdate->version().platformNumber()) -// { -// moreRecentAndAsStable = true; -// } -// } - -// if (moreRecentAndAsStable) -// { -// if (mostRecentSoftwareUpdate) -// { -// if (mostRecentSoftwareUpdate->version() < softwareUpdate->version()) -// { -// mostRecentSoftwareUpdate = softwareUpdate; -// } -// } -// else -// { -// mostRecentSoftwareUpdate = softwareUpdate; -// } -// } -// } - -// return mostRecentSoftwareUpdate; -//} diff --git a/src/softwareupdate/UBSoftwareUpdateController.h b/src/softwareupdate/UBSoftwareUpdateController.h deleted file mode 100644 index 306efe4c..00000000 --- a/src/softwareupdate/UBSoftwareUpdateController.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 UBSOFTWAREUPDATECONTROLLER_H_ -//#define UBSOFTWAREUPDATECONTROLLER_H_ - -//#include -//#include - -//class UBVersion; -//class UBSoftwareUpdate; -//class UBHttpGet; - -//class UBSoftwareUpdateController : public QObject -//{ -// Q_OBJECT; - -// public: -// UBSoftwareUpdateController(QObject *parent = 0); -// virtual ~UBSoftwareUpdateController(); - -// void beginRssDownload(const QUrl &url); -// void beginInstallerDownload(const QUrl &url); - -// static const UBSoftwareUpdate* searchForMoreRecentAndAsStableSoftwareUpdate(const UBVersion &installedVersion, -// const QList &softwareUpdates); - -// signals: -// void softwareUpdateAvailable(const UBVersion &installedVersion, const UBSoftwareUpdate &softwareUpdate); -// void noSoftwareUpdateAvailable(); -// void failedToRetrieveSoftwareUpdateInfo(); - -// private slots: -// void rssDownloadFinished(bool success, const QByteArray &payload); -// void installerDownloadProgress(qint64 receivedBytes, qint64 bytesTotal); -// void installerDownloadFinished(bool success, QUrl sourceUrl, QString header, QByteArray data); - -// private: -// // Helpers -// void parseRss(const QByteArray &rssContent); - -// UBHttpGet *mHttp; -// qreal mLastDisplayedProgress; - -// static const int sMinDisplayedDownloadedSizeInBytes; -// static const qreal sProgressPercentageStep; -//}; - -//#endif // UBSOFTWAREUPDATECONTROLLER_H_ diff --git a/src/softwareupdate/softwareupdate.pri b/src/softwareupdate/softwareupdate.pri deleted file mode 100644 index 3e496778..00000000 --- a/src/softwareupdate/softwareupdate.pri +++ /dev/null @@ -1,8 +0,0 @@ - -HEADERS += src/softwareupdate/UBSoftwareUpdateController.h \ - src/softwareupdate/UBRssHandler.h \ - src/softwareupdate/UBSoftwareUpdate.h - -SOURCES += src/softwareupdate/UBSoftwareUpdateController.cpp \ - src/softwareupdate/UBRssHandler.cpp \ - src/softwareupdate/UBSoftwareUpdate.cpp \ No newline at end of file diff --git a/src/tools/UBGraphicsCompass.cpp b/src/tools/UBGraphicsCompass.cpp index f2bc45df..c0386d1a 100644 --- a/src/tools/UBGraphicsCompass.cpp +++ b/src/tools/UBGraphicsCompass.cpp @@ -71,6 +71,7 @@ UBGraphicsCompass::UBGraphicsCompass() unsetCursor(); setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::CppTool)); //Necessary to set if we want z value to be assigned correctly + setFlag(QGraphicsItem::ItemIsSelectable, false); connect(UBApplication::boardController, SIGNAL(penColorChanged()), this, SLOT(penColorChanged())); connect(UBDrawingController::drawingController(), SIGNAL(lineWidthIndexChanged(int)), this, SLOT(lineWidthChanged())); diff --git a/src/tools/UBGraphicsProtractor.cpp b/src/tools/UBGraphicsProtractor.cpp index e73f0d02..f00bf275 100644 --- a/src/tools/UBGraphicsProtractor.cpp +++ b/src/tools/UBGraphicsProtractor.cpp @@ -64,6 +64,7 @@ UBGraphicsProtractor::UBGraphicsProtractor() mRotateSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::CppTool)); //Necessary to set if we want z value to be assigned correctly + setFlag(QGraphicsItem::ItemIsSelectable, false); scale(1.5, 1.5); } diff --git a/src/tools/UBGraphicsProtractor.h b/src/tools/UBGraphicsProtractor.h index 0d704126..7eb79963 100644 --- a/src/tools/UBGraphicsProtractor.h +++ b/src/tools/UBGraphicsProtractor.h @@ -28,7 +28,7 @@ class UBGraphicsScene; class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipseItem, public UBItem { - Q_OBJECT; + Q_OBJECT public: UBGraphicsProtractor (); diff --git a/src/tools/UBGraphicsRuler.cpp b/src/tools/UBGraphicsRuler.cpp index 27bcc713..720b7b22 100644 --- a/src/tools/UBGraphicsRuler.cpp +++ b/src/tools/UBGraphicsRuler.cpp @@ -46,7 +46,8 @@ UBGraphicsRuler::UBGraphicsRuler() setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::CppTool)); //Necessary to set if we want z value to be assigned correctly - updateResizeCursor(); + setFlag(QGraphicsItem::ItemIsSelectable, false); + updateResizeCursor(); } void UBGraphicsRuler::updateResizeCursor() diff --git a/src/tools/UBGraphicsTriangle.cpp b/src/tools/UBGraphicsTriangle.cpp index bd4156e0..ef946af7 100644 --- a/src/tools/UBGraphicsTriangle.cpp +++ b/src/tools/UBGraphicsTriangle.cpp @@ -55,6 +55,7 @@ UBGraphicsTriangle::UBGraphicsTriangle() mRotateSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::CppTool)); //Necessary to set if we want z value to be assigned correctly + setFlag(QGraphicsItem::ItemIsSelectable, false); updateResizeCursor(); }