diff --git a/JournalDesModifications.pdf b/JournalDesModifications.pdf index a9e38bd6..088a09cd 100644 Binary files a/JournalDesModifications.pdf and b/JournalDesModifications.pdf differ diff --git a/ReleaseNotes.pdf b/ReleaseNotes.pdf index 3edddab7..22443f42 100644 Binary files a/ReleaseNotes.pdf and b/ReleaseNotes.pdf differ diff --git a/Sankore_3.1.pro b/Sankore_3.1.pro index f6aab45e..5f1a5b9e 100644 --- a/Sankore_3.1.pro +++ b/Sankore_3.1.pro @@ -11,7 +11,7 @@ CONFIG += debug_and_release \ VERSION_MAJ = 2 VERSION_MIN = 00 VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error -VERSION_PATCH = 07 +VERSION_PATCH = 08 VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = $$replace(VERSION, "\\.r", "") diff --git a/resources/i18n/sankore_ar.ts b/resources/i18n/sankore_ar.ts index d0563711..f968263f 100644 --- a/resources/i18n/sankore_ar.ts +++ b/resources/i18n/sankore_ar.ts @@ -1511,6 +1511,21 @@ سلة المهملات + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + إلغاء + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2096,6 +2111,10 @@ Do you want to ignore these errors for this host? Cache تخزين مؤقت + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_bg.ts b/resources/i18n/sankore_bg.ts index e7b021aa..d91721df 100644 --- a/resources/i18n/sankore_bg.ts +++ b/resources/i18n/sankore_bg.ts @@ -1503,6 +1503,21 @@ Кошче + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Отмени + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2094,6 +2109,10 @@ Do you want to ignore these errors for this host? Cache Кеш + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_ca.ts b/resources/i18n/sankore_ca.ts index e6365c40..e834ed9a 100644 --- a/resources/i18n/sankore_ca.ts +++ b/resources/i18n/sankore_ca.ts @@ -1504,6 +1504,21 @@ Paperera + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Cancel·la + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2090,6 +2105,10 @@ Voleu ignorar aquests errors per a aquest amfitrió? Cache Memòria cau + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_cs.ts b/resources/i18n/sankore_cs.ts index c445e919..996b0efd 100644 --- a/resources/i18n/sankore_cs.ts +++ b/resources/i18n/sankore_cs.ts @@ -1506,6 +1506,21 @@ Koš + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Zrušit + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2097,6 +2112,10 @@ Chcete ignorovat tyto chyby na tomto serveru? Magnifier Lupa + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_da.ts b/resources/i18n/sankore_da.ts index ba78f4f9..9ecd53d7 100644 --- a/resources/i18n/sankore_da.ts +++ b/resources/i18n/sankore_da.ts @@ -1502,6 +1502,21 @@ Papirkurv + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Annuller + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2093,6 +2108,10 @@ Do you want to ignore these errors for this host? Cache Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_de.ts b/resources/i18n/sankore_de.ts index 2b504d9c..66561e7e 100644 --- a/resources/i18n/sankore_de.ts +++ b/resources/i18n/sankore_de.ts @@ -1502,6 +1502,21 @@ Papierkorb + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Abbrechen + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2101,6 +2116,10 @@ Möchten Sie diese Fehler auf diesem Computer ignorieren? Cache Zwischenspeicher + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_el.ts b/resources/i18n/sankore_el.ts index ff22d029..7493a349 100644 --- a/resources/i18n/sankore_el.ts +++ b/resources/i18n/sankore_el.ts @@ -1502,6 +1502,21 @@ Κάδος ανακύκλωσης + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Άκυρο + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2093,6 +2108,10 @@ Do you want to ignore these errors for this host? Cache Προβολέας + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_en.ts b/resources/i18n/sankore_en.ts index 2fa83d94..777fff1d 100644 --- a/resources/i18n/sankore_en.ts +++ b/resources/i18n/sankore_en.ts @@ -1500,6 +1500,21 @@ + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2085,6 +2100,10 @@ Do you want to ignore these errors for this host? Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_en_UK.ts b/resources/i18n/sankore_en_UK.ts index b201acef..de1feb6a 100644 --- a/resources/i18n/sankore_en_UK.ts +++ b/resources/i18n/sankore_en_UK.ts @@ -1500,6 +1500,21 @@ + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2085,6 +2100,10 @@ Do you want to ignore these errors for this host? Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_es.ts b/resources/i18n/sankore_es.ts index 6170c441..c4bedb1f 100644 --- a/resources/i18n/sankore_es.ts +++ b/resources/i18n/sankore_es.ts @@ -1502,6 +1502,21 @@ Papelera + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Cancelar + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2087,6 +2102,10 @@ Do you want to ignore these errors for this host? Cache Caché + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_fr.ts b/resources/i18n/sankore_fr.ts index 7889d130..94da0ee4 100644 --- a/resources/i18n/sankore_fr.ts +++ b/resources/i18n/sankore_fr.ts @@ -39,7 +39,7 @@ Stop - Stop + Arrêter Open @@ -73,11 +73,11 @@ Stylus - Stylet + Stylets Backgrounds - Fond + Fonds Undo @@ -373,15 +373,15 @@ Tutorial - Tutoriel + Tutoriels Show Desktop - Bureau + Afficher le bureau Ctrl+Shift+H - Ctrl+Shift+H + Ctrl+Maj+H Rename Content @@ -393,11 +393,11 @@ Use Document Wide Size (16/9) - Utiliser un format de document 16/9 + Utiliser un format large (16/9) Use Document Regular Size (4/3) - Utiliser un format de document 4/3 + Utiliser un format normal (4/3) Use Custom Document Size @@ -461,11 +461,11 @@ Highlight - Surligner + Surligner Ctrl+M - + Ctrl+M Select And Modify Objects @@ -481,11 +481,11 @@ Laser Pointer - Pointer avec le laser + Utiliser le "pointeur laser" Virtual Laser Pointer - Pointer avec le laser + Utiliser le "pointeur laser" Ctrl+G @@ -497,7 +497,7 @@ Ctrl+J - + Ctrl+J Write Text @@ -553,11 +553,11 @@ Open the tutorial - Ouvrir le tutoriel + Ouvrir les tutoriels Check Update - Contrôler les mises à jour + Contrôler la mise à jour Ctrl+H @@ -645,11 +645,11 @@ Wide Size (16/9) - Format 16/9 + Format large (16/9) Regular Size (4/3) - Format 4/3 + Format normal (4/3) Custom Size @@ -781,7 +781,7 @@ Show Open-Sankoré Widgets Editor - Ouvrir l'éditeur Sankoré + Ouvrir l'éditeur d'appliquettes Open-Sankoré Hide Open-Sankoré @@ -801,23 +801,24 @@ Group items - Grouper + Grouper les objets Play - Jouer + j'hésite avec Lancer (dépend du contexte d'usage) + Jouer Interact with items - Interagir avec des objets + Interagir avec des objets Erase Background - Effacer le fond + Effacer le fond Remove the backgound - Supprimer le fond + Supprimer le fond Group @@ -859,26 +860,26 @@ Save username and password for future use - Enregistrer le nom d'utilisateur et le mot de passe pour une utilisation future + Enregistrer le nom d'utilisateur et le mot de passe pour la prochaine.utilisation QObject Element ID = - ID de l'élément = + ID de l'élément = Content is not supported in destination format. - Le contenu n'est pas supporté dans le format destinataire. + Contenu non supporté dans le format souhaité. Remove Page - Supprimer la page + Supprimer la page Are you sure you want to remove 1 page from the selected document '%0'? - Voulez-vous vraiment effacer 1 page de ce document '%0'? + Voulez-vous vraiment effacer 1 page de ce document '%0'? @@ -900,7 +901,7 @@ New update available, would you go to the web page ? - Nouvelle mise à jour disponible, voulez-vous aller à la page Web ? + Nouvelle mise à jour disponible : voulez-vous accéder à la page de téléchargement ? No update available @@ -943,15 +944,15 @@ Delete page %1 from document - + Supprimer la page %1 du document Page %1 deleted - Page %1 effacée + Page %1 supprimée Add file operation failed: file copying error - Echec d'ajout de document : erreur de copie + Echec d'ajout de document : erreur de copie Group @@ -970,7 +971,7 @@ CapturedImage - Image capturée + Image capturée @@ -1000,6 +1001,7 @@ UBDesktopPalette Show Uniboard + Attention : dans la version en anglais le terme Uniboard devrait être remplacé par open-Sankoré ! Afficher Open-Sankoré @@ -1139,7 +1141,7 @@ The document '%1' has been generated with a newer version of Sankore (%2). By opening it, you may lose some information. Do you want to proceed? - Le document '%1' a été créé avec une version plus récente de Sankoré (%2). En l'ouvrant, vous risquez de perdre certains éléments. Désirez-vous continuer ? + Le document '%1' a été créé avec une version plus récente d'Open-Sankoré (%2). En l'ouvrant, vous risquez de perdre certains éléments. Désirez-vous continuer ? Are you sure you want to remove %n page(s) from the selected document '%1'? @@ -1150,15 +1152,15 @@ Title page - Page de titre + Page de titre Folder does not contain any image files - Le dossier ne contient pas d'image + Le dossier ne contient pas d'image Untitled Documents - Documents sans titre + Documents sans titre @@ -1185,23 +1187,24 @@ File %1 saved - Fichier %1 sauvé + Fichier %1 enregistré Inserting page %1 of %2 - Ajout de la page %1 de %2 + Ajout de la page %1 sur %2 Import successful. - Importation terminée. + Importation réussie. Import of file %1 successful. - Importation du document %1 terminée. + Importation du document %1 réussie. Importing file %1 - Importation du document %1 en cours + j'ai raccourci la phrase pour eviter les soucis de place ! + Importation de %1 en cours @@ -1212,18 +1215,18 @@ Title page - Page 0 + Page de titre UBDocumentPublisher Export failed. - Echec de l'exportation. + Echec de l'export. Export canceled ... - Exportation annulée ... + Export annulée ... Converting page %1/%2 ... @@ -1231,11 +1234,11 @@ Credentials has to not been filled out yet. - Les informations n'ont pas encore été fournies. + Les nom d'utilisateur et mot de passe n'ont pas été encore renseignés. Uploading Sankore File on Web. - Fichier Open-Sankoré en cours de transfert vers Planète Sankoré. + Fichier Open-Sankoré en cours de transfert vers Planète-Sankoré. Document uploaded correctly on the web. @@ -1243,7 +1246,7 @@ Failed to upload document on the web. - Echec du transfert du document sur le Web. + Echec du transfert du document vers Planète-Sankoré. @@ -1258,7 +1261,7 @@ %1 pages copied - + %1 page copiée %1 pages copiées @@ -1279,37 +1282,37 @@ UBExportAdaptor Warnings during export was appeared - Avertissements lors de l'exportation + Avertissements lors de l'exportation UBExportCFF Export to IWB - Exporter au format CFF (*.iwb) + Exporter au format CFF (*.iwb) Export as IWB File - Exporter au format CFF (*.iwb) + Exporter au format CFF (*.iwb) Exporting document... - Exportation du document... + Exportation du document... Export successful. - Export réussi. + Export réussi. Export failed. - Echec de l'exportation. + Echec de l'export. UBExportDocument Export as UBZ File - Exporter au format UBZ (*.ubz) + Exporter au format UBZ (*.ubz) Export successful. @@ -1336,7 +1339,7 @@ UBExportFullPDF Export as PDF File - Exporter au format PDF (*.pdf) + Exporter au format PDF (*.pdf) Exporting document... @@ -1348,14 +1351,14 @@ Export successful. - Exportation terminée. + Export terminé. UBExportPDF Export as PDF File - Exporter au format PDF (*.pdf) + Exporter au format PDF (*.pdf) Exporting page %1 of %2 @@ -1363,7 +1366,7 @@ Export successful. - Exportation terminée. + Export terminé. Exporting document... @@ -1371,7 +1374,7 @@ Export to PDF - Exporter au format PDF (*.pdf) + Exporter au format PDF (*.pdf) @@ -1390,11 +1393,11 @@ Export successful. - Exportation réussie. + Export réussi. Export failed. - Echec de l'exportation. + Echec de l'export. Export to Web Browser @@ -1405,119 +1408,137 @@ UBFeatureProperties Add to page - Ajout à la page + j'ai choisi de rendre le bouton plus compact (mais info moins complète) + Ajout page Set as background - Ajout en fond + j'ai choisi de rendre le bouton plus compact (mais info moins complète) + Ajout en fond Add to library - Ajout à la bibliothèque + j'ai choisi de rendre le bouton plus compact (mais info moins complète) + Ajout bibliothèque Object informations - Informations + Informations UBFeaturesActionBar Add to favorites - Ajouter aux favoris + Ajouter aux favoris Share - Partager + Partager Search - Rechercher + Rechercher Delete - Supprimer + Supprimer Back to folder - Retour au répertoire + Retour au répertoire Remove from favorites - Supprimer des favoris + Supprimer des favoris Create new folder - Créer un nouveau dossier + Créer nouveau dossier Rescan file system - Rescanner le système de fichiers + Parcourir le système de fichiers UBFeaturesController ImportedImage - Image importée + Image importée Audios - Sons + Sons Movies - Vidéos + Vidéos Pictures - Images + Images Animations - Animations + Animations Interactivities - Interactivités + Interactivités Applications - Applications + Applications Shapes - Formes + Formes Favorites - Favoris + Favoris Web search - Recherche Web + Recherche Web Trash - Corbeille + Corbeille + + + + UBFeaturesNewFolderDialog + + Accept + Accepter + + + Cancel + Annuler + + + Enter a new folder name + Saisir le nom du nouveau dossier UBFeaturesProgressInfo Loading - Chargement en cours + Chargement en cours UBGraphicsGroupContainerItemDelegate Locked - Verrouillé + Verrouillé Visible on Extended Screen - Visible sur l'écran de projection + Visible sur l'écran étendu @@ -1528,7 +1549,7 @@ Visible on Extended Screen - Visible sur l'écran de projection + Visible sur l'écran étendu Go to Content Source @@ -1539,7 +1560,7 @@ UBGraphicsTextItem <Type Text Here> - <Ecrire votre texte ici> + <Saisir votre texte ici> @@ -1557,18 +1578,18 @@ UBGraphicsW3CWidgetItem Web - Web + Web UBGraphicsWidgetItem Cannot load content - Impossible de charger le contenu + Impossible de charger le contenu Loading ... - Chargement en cours ... + Chargement en cours ... @@ -1594,15 +1615,15 @@ Import of file %1 failed. - Echec de l'importation du fichier %1. + Echec de l'import du fichier %1. Import successful. - Importation terminée. + Import terminée. Import failed. - Echec de l'importation. + Echec de l'import. @@ -1613,11 +1634,11 @@ Import successful. - Importation terminée. + Import terminé. Import of file %1 failed. - Échec de l'importation du fichier %1. + Échec de l'import du fichier %1. Open-Sankore (*.ubz) @@ -1635,11 +1656,11 @@ UBImportPDF Portable Document Format (*.pdf) - Format de document portable (*.pdf) + Format PDF (*.pdf) PDF import failed. - Échec de l'importation du fichier PDF. + Échec de l'import du fichier PDF. Importing page %1 of %2 @@ -1690,14 +1711,14 @@ UBMessagesDialog Close - Fermer + Fermer UBNetworkAccessManager <qt>Enter username and password for "%1" at %2</qt> - <qt>Saisir le nom de l'utilisateur et le mot de passe pour "%1" à %2</qt> + <qt>Renseigner le nom de l'utilisateur et le mot de passe pour "%1" à %2</qt> Failed to log to Proxy @@ -1711,7 +1732,7 @@ %2 Do you want to ignore these errors for this host? - Erreur SSL: + Erreur SSL (Secure Socket Layer) sur un serveur sécurisé: %1 @@ -1736,7 +1757,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? Document Repository Loss - Accès perdu au répertoire des documents + Accès perdu vers le répertoire des documents Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well. @@ -1774,7 +1795,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? No Podcast encoder available ... - Aucun encodeur pour le podcast disponible... + Aucun encodeur disponible.pour le podcast... Part %1 @@ -1826,7 +1847,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? Sankore Cast - Open-Sankoré Cast + Podcast Open-Sankoré @@ -1844,7 +1865,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? UBProxyLoginDlg Proxy Login - Identification Proxy + Identification sur le Proxy Username: @@ -1859,7 +1880,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? UBPublicationDlg Publish document on the web - Publier un fichier Open-Sankoré sur Planète Sankoré + Publier un fichier Open-Sankoré sur Planète-Sankoré Title: @@ -1885,33 +1906,33 @@ Voulez-vous ignorer les erreurs pour ce serveur ? UBTGActionWidget Teacher - Professeur + Enseignant Student - Elève + Elève/Etudiant Type task here ... - Saisir une action ici ... + Proposer une action ici ... UBTGMediaWidget drop media here ... - Glisser une ressource ici ... + Glisser un média ici ... Type title here... - Saisir le titre ici ... + Renseigner le titre ici ... UBTGUrlWidget Insert link title here... - Saisir le titre du lien ici ... + Renseigner le titre du lien ici ... @@ -1925,131 +1946,132 @@ Voulez-vous ignorer les erreurs pour ce serveur ? UBTeacherGuideEditionWidget Type title here ... - Saisir le titre de l'activité ici ... + Renseigner le titre de l'activité... Type comment here ... - Saisir le commentaire ici ... + Renseigner le commentaire ici ... Add an action - Ajouter une action + Ajouter une action Add a media - Ajouter un média + Ajouter un média Add a link - Ajouter un lien + Ajouter un lien.web Page: %0 - Page: %0 + Page: %0 UBTeacherGuidePageZeroWidget Type session title here ... - Saisir le titre de la séance ... + Renseigner le titre de la séance ... Author(s) - Auteur(s) : + Auteur(s) : Type authors here ... - Saisir les auteurs ici ... + Ajouter les auteurs ici ... Objective(s) - Objectif(s) : + Objectif(s) de la séance : Type objectives here... - Saisir les objectifs ici ... + Ajouter les objectifs ici ... Resource indexing - Indexation de la ressource + Métadonnées de la ressource Keywords: - Mot(s) clé(s) : + Mot(s) clé(s) : Type keywords here ... - Saisir le(s) mot(s) clé(s) ici ... + Ajouter le(s) mot(s) clé(s) ici ... Level: - Niveau scolaire : + Niveau(x) scolaire(s) : Subjects: - Discipline : + Discipline(s) : Type: - Type : + Type(s) : Licence - Licence + Licence Attribution CC BY - Licence Planète Sankoré (CC Paternité 3.0) + Licence recommandée (CC Paternité 3.0) Attribution-NoDerivs CC BY-ND - CC Paternité, Pas de modification + CC Paternité, Pas de modification Attribution-ShareAlike CC BY-SA - CC Paternité, Partage à l'identique + CC Paternité, Partage à l'identique Attribution-NonCommercial CC BY-NC - CC Paternité, Pas d'utilisation Commerciale + CC Paternité, Pas d'utilisation commerciale Attribution-NonCommercial-NoDerivs CC BY-NC-ND - CC Paternité, Pas d'utilisation Commerciale, Pas de modification + CC Paternité, Pas d'utilisation commerciale, Pas de modification Attribution-NonCommercial-ShareAlike CC BY-NC-SA - CC Paternité, Pas d'utilisation Commerciale, Partage à l'identique + CC Paternité, Pas d'utilisation commerciale, Partage à l'identique Public domain - Domaine public + Domaine public Copyright - Droit d'auteur + attention le copyright n'est pas une protection ou une licence puisque ca existe même pour les licences libres les plus ouvertes. C'est simplement la mention détenteur des droits de reproduction (celui qui fixe la licence) . Le terme est donc impropre même en anglais. + Protection par le droit d'auteur Created the: - Créé le : + Créé le : Updated the: - Modifié le : + Modifié le : Title page - Page de titre + Page de titre UBTeacherGuidePresentationWidget Page: %0 - Page: %0 + Page: %0 @@ -2093,6 +2115,10 @@ Voulez-vous ignorer les erreurs pour ce serveur ? Cache Spot + + Aristo + + UBTrapFlashController @@ -2113,7 +2139,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? files require an update. - fichiers nécessitent une mise à jour. + fichiers nécessitant une mise à jour. Backup path: @@ -2169,7 +2195,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. UBWebPublisher Publish Document on Sankore Web - Publier un fichier Open-Sankoré sur Planète Sankoré + Publier un fichier Open-Sankoré sur Planète-Sankoré @@ -2195,11 +2221,11 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. Open-Sankore - + Open-Sankoré OpenSankore - + Open-Sankoré @@ -2276,11 +2302,11 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. UniboardSankoreTransition Import old Uniboard/Sankore documents - Importer les anciens documents Uniboard/Sankoré + Importer des documents depuis le format Uniboard ou Sankoré There are no documents that should be imported - Aucun document trouvé à importer + Aucun document au format Uniboard n'a été trouvé @@ -2322,7 +2348,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. - %4 %5 remaining - - %4 %5 restant(s) + - %4 %5 restante(s) %1 of %2 (%3/sec) %4 @@ -2331,7 +2357,8 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. ? unknown file size - ? + si je me fie aux commentaires des développeurs... + Taille de fichier inconnue %1 of %2 - Stopped @@ -2381,7 +2408,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. %1 items - %1 éléments + %1 élément(s) @@ -2399,19 +2426,19 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. Clone Tab - Dupliquer l'onglet + Dupliquer onglet &Close Tab - &Fermer l'onglet + &Fermer onglet Close &Other Tabs - Fermer les &autres onglets + Fermer &autres onglets Reload Tab - Recharger l'onglet + Recharger &onglet Reload All Tabs @@ -2437,7 +2464,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. No Recent Searches - Aucun historique des recherches + Aucune recherche récente Recent Searches @@ -2486,7 +2513,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. Title - Titre + Titre du podcast Description @@ -2506,7 +2533,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. YouTube Username - Utilisateur YouTube + Nom d'utilisateur YouTube YouTube Password @@ -2753,7 +2780,7 @@ p, li { white-space: pre-wrap; } Swap control display and view display - Inverser les écrans + Inverser la disposition des écrans Mode @@ -2773,7 +2800,7 @@ p, li { white-space: pre-wrap; } Proxy User: - Utilisateur Proxy : + Nom d'utilisateur : Pass: @@ -2781,11 +2808,11 @@ p, li { white-space: pre-wrap; } Planète Sankoré ID - Identifiant Planète Sankoré + Identifiant Planète-Sankoré User: - Utilisateur : + Nom d'utilisateur : Pass: @@ -3230,11 +3257,12 @@ DAMAGES. END OF TERMS AND CONDITIONS + non traduisible en l'état (sauf disponibilité d'une version non officielle introuvable sur le web) Credits - + Crédits <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3245,7 +3273,14 @@ p, li { white-space: pre-wrap; } <tr> <td style="border: none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">The licences are in English to respect the official and legal approved translation.</span></p></td></tr></table></body></html> - + <!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:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> +<tr> +<td style="border: none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Les licences proposées ci-dessous sont rédigées en langue anglaise afin de respecter le cadre légal et officiel des traductions aprouvées par les auteurs de ces textes. licences.</span></p></td></tr></table></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3256,6 +3291,7 @@ p, li { white-space: pre-wrap; } <tr> <td style="border: none;"> <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-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;">Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler</span><span style=" font-family:'Ubuntu'; font-size:12pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 3. This notice may not be removed or altered from any source distribution.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"> </span></p></td></tr></table></body></html> + ATTENTION : Je ne vois pas à quelle partie ce texte fait référence : si ce sont les crédits des tierces parties alors il en manque et elle ne sont pas à jour par rapport aux librairies utilisées effectivement dans le code source (voir les mentions légales sur Github dans les tierces parties). Ce problème a déja été mentionné dans des messages précédents. @@ -3268,7 +3304,16 @@ p, li { white-space: pre-wrap; } <td style="border: none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Open-Sankoré version 1.4 , Copyright (C) 2010-2012 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br /><br />Open-Sankoré est un logiciel libre : vous pouvez le redistribuer et/ou le modifier en respectant les termes de la Lesser GNU general Public Licence (GNU LGPL) telle que publiée par la Free Software Foundation en version 2 ou une version plus récente.<br />Vous pouvez consulter et charger le code source du logiciel sur </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER.<br />Veuillez consulter la licence Lesser GNU General Public Licence située dans l'onglet Licences ou consulter le site </span><a href="http://www.gnu.org/licenses/"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;http://www.gnu.org/licenses/&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">.<br /><br />Open-Sankoré is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. You can find the source code of this software at </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details.<br /><br /></span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Contact : <br />Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br />Délégation Interministérielle à l'Education Numérique en Afrique<br />20 Avenue Ségur Paris 75007<br />Téléphone : 01 43 17 68 08<br />email: </span><a href="mailto:contact@sankore.org"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">&quot;</span></p></td></tr></table></body></html> - + ATTENTION AU NUMERO DE VERSION MENTIONNÉ DANS LA VERSION ANGLAISE ! (RESTE EN 1.4) + <!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:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> +<tr> +<td style="border: none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Open-Sankoré version 2.0 , Copyright (C) 2010-2012 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br /><br />Open-Sankoré est un logiciel libre : vous pouvez le redistribuer et/ou le modifier en respectant les termes de la Lesser GNU general Public Licence (GNU LGPL) telle que publiée par la Free Software Foundation en version 2 ou une version plus récente.<br />Vous pouvez consulter et charger le code source du logiciel sur </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER.<br />Veuillez consulter la licence Lesser GNU General Public Licence située dans l'onglet Licences ou consulter le site </span><a href="http://www.gnu.org/licenses/"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;http://www.gnu.org/licenses/&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">.<br /><br />Open-Sankoré is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. You can find the source code of this software at </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details.<br /><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Contact : <br />Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br />Délégation Interministérielle à l'Education Numérique en Afrique<br />20 Avenue Ségur Paris 75007<br />Téléphone : 01 43 17 68 08<br />email: </span><a href="mailto:contact@sankore.org"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">&quot;</span></p></td></tr></table></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3320,7 +3365,56 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Autorisation pour un usage non commercial</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices.html</span></p></body></html> - + attention ce texte est en français par défaut ce qui signifie qu'il devrait être traduit en anglais pour les utilisateurs non francophones ! + <!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:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Crédits police scolaire Open-Sankoré : </span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">La police Andika Basic dispose d'une licence Open Font License </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Sil international</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=andika</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Licence OFL (traduction française non officielle) http://fontforge.sourceforge.net/OFL-Unofficial-fr.html</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence OFL : </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier Court </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier Ligne Court</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Jean-Marie Douteau (douteau.ecolier@sfr.fr)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence Creative Commons BY NC ND :</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier lignes pointillés</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier pointillés</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier CP</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier CP pointillés</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Jean-Marie Douteau (douteau.ecolier@sfr.fr)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Cursive sont l'oeuvre d'Antoine Fetet (antoine.fetet@laposte.net) à partir d'une police proposée par Jean-Claude Gineau</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://lps13.free.fr/contenu/construire/Cursive_standard.zip et http://fr.fontriver.com/font/gino_school_script/</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">L'auteur en autorise l'utilisation dans le cadre du logiciel open-Sankoré pour un usage non commercial</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Script (Ecole et CaseEcole) sont l'oeuvre d'Henri Rogelet</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/SCRIPTCO.zip</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/SCRIPTCA.zip</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Autorisation pour un usage non commercial</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices.html</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">La police phonétique, Alphonet est l'oeuvre d'Henri Rogelet</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/ALPHONET.zip</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Autorisation pour un usage non commercial</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices.html</span></p></body></html> diff --git a/resources/i18n/sankore_fr_CH.ts b/resources/i18n/sankore_fr_CH.ts index 7889d130..94da0ee4 100644 --- a/resources/i18n/sankore_fr_CH.ts +++ b/resources/i18n/sankore_fr_CH.ts @@ -39,7 +39,7 @@ Stop - Stop + Arrêter Open @@ -73,11 +73,11 @@ Stylus - Stylet + Stylets Backgrounds - Fond + Fonds Undo @@ -373,15 +373,15 @@ Tutorial - Tutoriel + Tutoriels Show Desktop - Bureau + Afficher le bureau Ctrl+Shift+H - Ctrl+Shift+H + Ctrl+Maj+H Rename Content @@ -393,11 +393,11 @@ Use Document Wide Size (16/9) - Utiliser un format de document 16/9 + Utiliser un format large (16/9) Use Document Regular Size (4/3) - Utiliser un format de document 4/3 + Utiliser un format normal (4/3) Use Custom Document Size @@ -461,11 +461,11 @@ Highlight - Surligner + Surligner Ctrl+M - + Ctrl+M Select And Modify Objects @@ -481,11 +481,11 @@ Laser Pointer - Pointer avec le laser + Utiliser le "pointeur laser" Virtual Laser Pointer - Pointer avec le laser + Utiliser le "pointeur laser" Ctrl+G @@ -497,7 +497,7 @@ Ctrl+J - + Ctrl+J Write Text @@ -553,11 +553,11 @@ Open the tutorial - Ouvrir le tutoriel + Ouvrir les tutoriels Check Update - Contrôler les mises à jour + Contrôler la mise à jour Ctrl+H @@ -645,11 +645,11 @@ Wide Size (16/9) - Format 16/9 + Format large (16/9) Regular Size (4/3) - Format 4/3 + Format normal (4/3) Custom Size @@ -781,7 +781,7 @@ Show Open-Sankoré Widgets Editor - Ouvrir l'éditeur Sankoré + Ouvrir l'éditeur d'appliquettes Open-Sankoré Hide Open-Sankoré @@ -801,23 +801,24 @@ Group items - Grouper + Grouper les objets Play - Jouer + j'hésite avec Lancer (dépend du contexte d'usage) + Jouer Interact with items - Interagir avec des objets + Interagir avec des objets Erase Background - Effacer le fond + Effacer le fond Remove the backgound - Supprimer le fond + Supprimer le fond Group @@ -859,26 +860,26 @@ Save username and password for future use - Enregistrer le nom d'utilisateur et le mot de passe pour une utilisation future + Enregistrer le nom d'utilisateur et le mot de passe pour la prochaine.utilisation QObject Element ID = - ID de l'élément = + ID de l'élément = Content is not supported in destination format. - Le contenu n'est pas supporté dans le format destinataire. + Contenu non supporté dans le format souhaité. Remove Page - Supprimer la page + Supprimer la page Are you sure you want to remove 1 page from the selected document '%0'? - Voulez-vous vraiment effacer 1 page de ce document '%0'? + Voulez-vous vraiment effacer 1 page de ce document '%0'? @@ -900,7 +901,7 @@ New update available, would you go to the web page ? - Nouvelle mise à jour disponible, voulez-vous aller à la page Web ? + Nouvelle mise à jour disponible : voulez-vous accéder à la page de téléchargement ? No update available @@ -943,15 +944,15 @@ Delete page %1 from document - + Supprimer la page %1 du document Page %1 deleted - Page %1 effacée + Page %1 supprimée Add file operation failed: file copying error - Echec d'ajout de document : erreur de copie + Echec d'ajout de document : erreur de copie Group @@ -970,7 +971,7 @@ CapturedImage - Image capturée + Image capturée @@ -1000,6 +1001,7 @@ UBDesktopPalette Show Uniboard + Attention : dans la version en anglais le terme Uniboard devrait être remplacé par open-Sankoré ! Afficher Open-Sankoré @@ -1139,7 +1141,7 @@ The document '%1' has been generated with a newer version of Sankore (%2). By opening it, you may lose some information. Do you want to proceed? - Le document '%1' a été créé avec une version plus récente de Sankoré (%2). En l'ouvrant, vous risquez de perdre certains éléments. Désirez-vous continuer ? + Le document '%1' a été créé avec une version plus récente d'Open-Sankoré (%2). En l'ouvrant, vous risquez de perdre certains éléments. Désirez-vous continuer ? Are you sure you want to remove %n page(s) from the selected document '%1'? @@ -1150,15 +1152,15 @@ Title page - Page de titre + Page de titre Folder does not contain any image files - Le dossier ne contient pas d'image + Le dossier ne contient pas d'image Untitled Documents - Documents sans titre + Documents sans titre @@ -1185,23 +1187,24 @@ File %1 saved - Fichier %1 sauvé + Fichier %1 enregistré Inserting page %1 of %2 - Ajout de la page %1 de %2 + Ajout de la page %1 sur %2 Import successful. - Importation terminée. + Importation réussie. Import of file %1 successful. - Importation du document %1 terminée. + Importation du document %1 réussie. Importing file %1 - Importation du document %1 en cours + j'ai raccourci la phrase pour eviter les soucis de place ! + Importation de %1 en cours @@ -1212,18 +1215,18 @@ Title page - Page 0 + Page de titre UBDocumentPublisher Export failed. - Echec de l'exportation. + Echec de l'export. Export canceled ... - Exportation annulée ... + Export annulée ... Converting page %1/%2 ... @@ -1231,11 +1234,11 @@ Credentials has to not been filled out yet. - Les informations n'ont pas encore été fournies. + Les nom d'utilisateur et mot de passe n'ont pas été encore renseignés. Uploading Sankore File on Web. - Fichier Open-Sankoré en cours de transfert vers Planète Sankoré. + Fichier Open-Sankoré en cours de transfert vers Planète-Sankoré. Document uploaded correctly on the web. @@ -1243,7 +1246,7 @@ Failed to upload document on the web. - Echec du transfert du document sur le Web. + Echec du transfert du document vers Planète-Sankoré. @@ -1258,7 +1261,7 @@ %1 pages copied - + %1 page copiée %1 pages copiées @@ -1279,37 +1282,37 @@ UBExportAdaptor Warnings during export was appeared - Avertissements lors de l'exportation + Avertissements lors de l'exportation UBExportCFF Export to IWB - Exporter au format CFF (*.iwb) + Exporter au format CFF (*.iwb) Export as IWB File - Exporter au format CFF (*.iwb) + Exporter au format CFF (*.iwb) Exporting document... - Exportation du document... + Exportation du document... Export successful. - Export réussi. + Export réussi. Export failed. - Echec de l'exportation. + Echec de l'export. UBExportDocument Export as UBZ File - Exporter au format UBZ (*.ubz) + Exporter au format UBZ (*.ubz) Export successful. @@ -1336,7 +1339,7 @@ UBExportFullPDF Export as PDF File - Exporter au format PDF (*.pdf) + Exporter au format PDF (*.pdf) Exporting document... @@ -1348,14 +1351,14 @@ Export successful. - Exportation terminée. + Export terminé. UBExportPDF Export as PDF File - Exporter au format PDF (*.pdf) + Exporter au format PDF (*.pdf) Exporting page %1 of %2 @@ -1363,7 +1366,7 @@ Export successful. - Exportation terminée. + Export terminé. Exporting document... @@ -1371,7 +1374,7 @@ Export to PDF - Exporter au format PDF (*.pdf) + Exporter au format PDF (*.pdf) @@ -1390,11 +1393,11 @@ Export successful. - Exportation réussie. + Export réussi. Export failed. - Echec de l'exportation. + Echec de l'export. Export to Web Browser @@ -1405,119 +1408,137 @@ UBFeatureProperties Add to page - Ajout à la page + j'ai choisi de rendre le bouton plus compact (mais info moins complète) + Ajout page Set as background - Ajout en fond + j'ai choisi de rendre le bouton plus compact (mais info moins complète) + Ajout en fond Add to library - Ajout à la bibliothèque + j'ai choisi de rendre le bouton plus compact (mais info moins complète) + Ajout bibliothèque Object informations - Informations + Informations UBFeaturesActionBar Add to favorites - Ajouter aux favoris + Ajouter aux favoris Share - Partager + Partager Search - Rechercher + Rechercher Delete - Supprimer + Supprimer Back to folder - Retour au répertoire + Retour au répertoire Remove from favorites - Supprimer des favoris + Supprimer des favoris Create new folder - Créer un nouveau dossier + Créer nouveau dossier Rescan file system - Rescanner le système de fichiers + Parcourir le système de fichiers UBFeaturesController ImportedImage - Image importée + Image importée Audios - Sons + Sons Movies - Vidéos + Vidéos Pictures - Images + Images Animations - Animations + Animations Interactivities - Interactivités + Interactivités Applications - Applications + Applications Shapes - Formes + Formes Favorites - Favoris + Favoris Web search - Recherche Web + Recherche Web Trash - Corbeille + Corbeille + + + + UBFeaturesNewFolderDialog + + Accept + Accepter + + + Cancel + Annuler + + + Enter a new folder name + Saisir le nom du nouveau dossier UBFeaturesProgressInfo Loading - Chargement en cours + Chargement en cours UBGraphicsGroupContainerItemDelegate Locked - Verrouillé + Verrouillé Visible on Extended Screen - Visible sur l'écran de projection + Visible sur l'écran étendu @@ -1528,7 +1549,7 @@ Visible on Extended Screen - Visible sur l'écran de projection + Visible sur l'écran étendu Go to Content Source @@ -1539,7 +1560,7 @@ UBGraphicsTextItem <Type Text Here> - <Ecrire votre texte ici> + <Saisir votre texte ici> @@ -1557,18 +1578,18 @@ UBGraphicsW3CWidgetItem Web - Web + Web UBGraphicsWidgetItem Cannot load content - Impossible de charger le contenu + Impossible de charger le contenu Loading ... - Chargement en cours ... + Chargement en cours ... @@ -1594,15 +1615,15 @@ Import of file %1 failed. - Echec de l'importation du fichier %1. + Echec de l'import du fichier %1. Import successful. - Importation terminée. + Import terminée. Import failed. - Echec de l'importation. + Echec de l'import. @@ -1613,11 +1634,11 @@ Import successful. - Importation terminée. + Import terminé. Import of file %1 failed. - Échec de l'importation du fichier %1. + Échec de l'import du fichier %1. Open-Sankore (*.ubz) @@ -1635,11 +1656,11 @@ UBImportPDF Portable Document Format (*.pdf) - Format de document portable (*.pdf) + Format PDF (*.pdf) PDF import failed. - Échec de l'importation du fichier PDF. + Échec de l'import du fichier PDF. Importing page %1 of %2 @@ -1690,14 +1711,14 @@ UBMessagesDialog Close - Fermer + Fermer UBNetworkAccessManager <qt>Enter username and password for "%1" at %2</qt> - <qt>Saisir le nom de l'utilisateur et le mot de passe pour "%1" à %2</qt> + <qt>Renseigner le nom de l'utilisateur et le mot de passe pour "%1" à %2</qt> Failed to log to Proxy @@ -1711,7 +1732,7 @@ %2 Do you want to ignore these errors for this host? - Erreur SSL: + Erreur SSL (Secure Socket Layer) sur un serveur sécurisé: %1 @@ -1736,7 +1757,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? Document Repository Loss - Accès perdu au répertoire des documents + Accès perdu vers le répertoire des documents Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well. @@ -1774,7 +1795,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? No Podcast encoder available ... - Aucun encodeur pour le podcast disponible... + Aucun encodeur disponible.pour le podcast... Part %1 @@ -1826,7 +1847,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? Sankore Cast - Open-Sankoré Cast + Podcast Open-Sankoré @@ -1844,7 +1865,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? UBProxyLoginDlg Proxy Login - Identification Proxy + Identification sur le Proxy Username: @@ -1859,7 +1880,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? UBPublicationDlg Publish document on the web - Publier un fichier Open-Sankoré sur Planète Sankoré + Publier un fichier Open-Sankoré sur Planète-Sankoré Title: @@ -1885,33 +1906,33 @@ Voulez-vous ignorer les erreurs pour ce serveur ? UBTGActionWidget Teacher - Professeur + Enseignant Student - Elève + Elève/Etudiant Type task here ... - Saisir une action ici ... + Proposer une action ici ... UBTGMediaWidget drop media here ... - Glisser une ressource ici ... + Glisser un média ici ... Type title here... - Saisir le titre ici ... + Renseigner le titre ici ... UBTGUrlWidget Insert link title here... - Saisir le titre du lien ici ... + Renseigner le titre du lien ici ... @@ -1925,131 +1946,132 @@ Voulez-vous ignorer les erreurs pour ce serveur ? UBTeacherGuideEditionWidget Type title here ... - Saisir le titre de l'activité ici ... + Renseigner le titre de l'activité... Type comment here ... - Saisir le commentaire ici ... + Renseigner le commentaire ici ... Add an action - Ajouter une action + Ajouter une action Add a media - Ajouter un média + Ajouter un média Add a link - Ajouter un lien + Ajouter un lien.web Page: %0 - Page: %0 + Page: %0 UBTeacherGuidePageZeroWidget Type session title here ... - Saisir le titre de la séance ... + Renseigner le titre de la séance ... Author(s) - Auteur(s) : + Auteur(s) : Type authors here ... - Saisir les auteurs ici ... + Ajouter les auteurs ici ... Objective(s) - Objectif(s) : + Objectif(s) de la séance : Type objectives here... - Saisir les objectifs ici ... + Ajouter les objectifs ici ... Resource indexing - Indexation de la ressource + Métadonnées de la ressource Keywords: - Mot(s) clé(s) : + Mot(s) clé(s) : Type keywords here ... - Saisir le(s) mot(s) clé(s) ici ... + Ajouter le(s) mot(s) clé(s) ici ... Level: - Niveau scolaire : + Niveau(x) scolaire(s) : Subjects: - Discipline : + Discipline(s) : Type: - Type : + Type(s) : Licence - Licence + Licence Attribution CC BY - Licence Planète Sankoré (CC Paternité 3.0) + Licence recommandée (CC Paternité 3.0) Attribution-NoDerivs CC BY-ND - CC Paternité, Pas de modification + CC Paternité, Pas de modification Attribution-ShareAlike CC BY-SA - CC Paternité, Partage à l'identique + CC Paternité, Partage à l'identique Attribution-NonCommercial CC BY-NC - CC Paternité, Pas d'utilisation Commerciale + CC Paternité, Pas d'utilisation commerciale Attribution-NonCommercial-NoDerivs CC BY-NC-ND - CC Paternité, Pas d'utilisation Commerciale, Pas de modification + CC Paternité, Pas d'utilisation commerciale, Pas de modification Attribution-NonCommercial-ShareAlike CC BY-NC-SA - CC Paternité, Pas d'utilisation Commerciale, Partage à l'identique + CC Paternité, Pas d'utilisation commerciale, Partage à l'identique Public domain - Domaine public + Domaine public Copyright - Droit d'auteur + attention le copyright n'est pas une protection ou une licence puisque ca existe même pour les licences libres les plus ouvertes. C'est simplement la mention détenteur des droits de reproduction (celui qui fixe la licence) . Le terme est donc impropre même en anglais. + Protection par le droit d'auteur Created the: - Créé le : + Créé le : Updated the: - Modifié le : + Modifié le : Title page - Page de titre + Page de titre UBTeacherGuidePresentationWidget Page: %0 - Page: %0 + Page: %0 @@ -2093,6 +2115,10 @@ Voulez-vous ignorer les erreurs pour ce serveur ? Cache Spot + + Aristo + + UBTrapFlashController @@ -2113,7 +2139,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ? files require an update. - fichiers nécessitent une mise à jour. + fichiers nécessitant une mise à jour. Backup path: @@ -2169,7 +2195,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. UBWebPublisher Publish Document on Sankore Web - Publier un fichier Open-Sankoré sur Planète Sankoré + Publier un fichier Open-Sankoré sur Planète-Sankoré @@ -2195,11 +2221,11 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. Open-Sankore - + Open-Sankoré OpenSankore - + Open-Sankoré @@ -2276,11 +2302,11 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. UniboardSankoreTransition Import old Uniboard/Sankore documents - Importer les anciens documents Uniboard/Sankoré + Importer des documents depuis le format Uniboard ou Sankoré There are no documents that should be imported - Aucun document trouvé à importer + Aucun document au format Uniboard n'a été trouvé @@ -2322,7 +2348,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. - %4 %5 remaining - - %4 %5 restant(s) + - %4 %5 restante(s) %1 of %2 (%3/sec) %4 @@ -2331,7 +2357,8 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. ? unknown file size - ? + si je me fie aux commentaires des développeurs... + Taille de fichier inconnue %1 of %2 - Stopped @@ -2381,7 +2408,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. %1 items - %1 éléments + %1 élément(s) @@ -2399,19 +2426,19 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. Clone Tab - Dupliquer l'onglet + Dupliquer onglet &Close Tab - &Fermer l'onglet + &Fermer onglet Close &Other Tabs - Fermer les &autres onglets + Fermer &autres onglets Reload Tab - Recharger l'onglet + Recharger &onglet Reload All Tabs @@ -2437,7 +2464,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. No Recent Searches - Aucun historique des recherches + Aucune recherche récente Recent Searches @@ -2486,7 +2513,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. Title - Titre + Titre du podcast Description @@ -2506,7 +2533,7 @@ Veuillez redémarrer l'application pour accéder aux documents mis à jour. YouTube Username - Utilisateur YouTube + Nom d'utilisateur YouTube YouTube Password @@ -2753,7 +2780,7 @@ p, li { white-space: pre-wrap; } Swap control display and view display - Inverser les écrans + Inverser la disposition des écrans Mode @@ -2773,7 +2800,7 @@ p, li { white-space: pre-wrap; } Proxy User: - Utilisateur Proxy : + Nom d'utilisateur : Pass: @@ -2781,11 +2808,11 @@ p, li { white-space: pre-wrap; } Planète Sankoré ID - Identifiant Planète Sankoré + Identifiant Planète-Sankoré User: - Utilisateur : + Nom d'utilisateur : Pass: @@ -3230,11 +3257,12 @@ DAMAGES. END OF TERMS AND CONDITIONS + non traduisible en l'état (sauf disponibilité d'une version non officielle introuvable sur le web) Credits - + Crédits <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3245,7 +3273,14 @@ p, li { white-space: pre-wrap; } <tr> <td style="border: none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">The licences are in English to respect the official and legal approved translation.</span></p></td></tr></table></body></html> - + <!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:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> +<tr> +<td style="border: none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Les licences proposées ci-dessous sont rédigées en langue anglaise afin de respecter le cadre légal et officiel des traductions aprouvées par les auteurs de ces textes. licences.</span></p></td></tr></table></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3256,6 +3291,7 @@ p, li { white-space: pre-wrap; } <tr> <td style="border: none;"> <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-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;">Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler</span><span style=" font-family:'Ubuntu'; font-size:12pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"><br /></span><span style=" font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;"> 3. This notice may not be removed or altered from any source distribution.</span><span style=" font-family:'Ubuntu'; font-size:9pt;"> </span></p></td></tr></table></body></html> + ATTENTION : Je ne vois pas à quelle partie ce texte fait référence : si ce sont les crédits des tierces parties alors il en manque et elle ne sont pas à jour par rapport aux librairies utilisées effectivement dans le code source (voir les mentions légales sur Github dans les tierces parties). Ce problème a déja été mentionné dans des messages précédents. @@ -3268,7 +3304,16 @@ p, li { white-space: pre-wrap; } <td style="border: none;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Open-Sankoré version 1.4 , Copyright (C) 2010-2012 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br /><br />Open-Sankoré est un logiciel libre : vous pouvez le redistribuer et/ou le modifier en respectant les termes de la Lesser GNU general Public Licence (GNU LGPL) telle que publiée par la Free Software Foundation en version 2 ou une version plus récente.<br />Vous pouvez consulter et charger le code source du logiciel sur </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER.<br />Veuillez consulter la licence Lesser GNU General Public Licence située dans l'onglet Licences ou consulter le site </span><a href="http://www.gnu.org/licenses/"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;http://www.gnu.org/licenses/&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">.<br /><br />Open-Sankoré is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. You can find the source code of this software at </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details.<br /><br /></span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Contact : <br />Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br />Délégation Interministérielle à l'Education Numérique en Afrique<br />20 Avenue Ségur Paris 75007<br />Téléphone : 01 43 17 68 08<br />email: </span><a href="mailto:contact@sankore.org"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">&quot;</span></p></td></tr></table></body></html> - + ATTENTION AU NUMERO DE VERSION MENTIONNÉ DANS LA VERSION ANGLAISE ! (RESTE EN 1.4) + <!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:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> +<tr> +<td style="border: none;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Open-Sankoré version 2.0 , Copyright (C) 2010-2012 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br /><br />Open-Sankoré est un logiciel libre : vous pouvez le redistribuer et/ou le modifier en respectant les termes de la Lesser GNU general Public Licence (GNU LGPL) telle que publiée par la Free Software Foundation en version 2 ou une version plus récente.<br />Vous pouvez consulter et charger le code source du logiciel sur </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER.<br />Veuillez consulter la licence Lesser GNU General Public Licence située dans l'onglet Licences ou consulter le site </span><a href="http://www.gnu.org/licenses/"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;http://www.gnu.org/licenses/&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">.<br /><br />Open-Sankoré is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. You can find the source code of this software at </span><a href="https://github.com/Sankore"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">&lt;https://github.com/Sankore&gt;</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;"><br />Open-Sankoré is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details.<br /><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:11pt;">Contact : <br />Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)<br />Délégation Interministérielle à l'Education Numérique en Afrique<br />20 Avenue Ségur Paris 75007<br />Téléphone : 01 43 17 68 08<br />email: </span><a href="mailto:contact@sankore.org"><span style=" font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;">contact@sankore.org</span></a><span style=" font-family:'Ubuntu'; font-size:11pt;">&quot;</span></p></td></tr></table></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -3320,7 +3365,56 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Autorisation pour un usage non commercial</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices.html</span></p></body></html> - + attention ce texte est en français par défaut ce qui signifie qu'il devrait être traduit en anglais pour les utilisateurs non francophones ! + <!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:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Crédits police scolaire Open-Sankoré : </span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">La police Andika Basic dispose d'une licence Open Font License </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Sil international</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=andika</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Licence OFL (traduction française non officielle) http://fontforge.sourceforge.net/OFL-Unofficial-fr.html</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence OFL : </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier Court </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier Ligne Court</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Jean-Marie Douteau (douteau.ecolier@sfr.fr)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence Creative Commons BY NC ND :</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Ecolier lignes pointillés</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier pointillés</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier CP</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">- Écolier CP pointillés</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Jean-Marie Douteau (douteau.ecolier@sfr.fr)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Cursive sont l'oeuvre d'Antoine Fetet (antoine.fetet@laposte.net) à partir d'une police proposée par Jean-Claude Gineau</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://lps13.free.fr/contenu/construire/Cursive_standard.zip et http://fr.fontriver.com/font/gino_school_script/</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">L'auteur en autorise l'utilisation dans le cadre du logiciel open-Sankoré pour un usage non commercial</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Les polices Script (Ecole et CaseEcole) sont l'oeuvre d'Henri Rogelet</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/SCRIPTCO.zip</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/SCRIPTCA.zip</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Autorisation pour un usage non commercial</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices.html</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"><br /></span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">La police phonétique, Alphonet est l'oeuvre d'Henri Rogelet</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices/ALPHONET.zip</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> © Henri Rogelet &lt;h.rogelet@free.fr&gt;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Autorisation pour un usage non commercial</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;">Source : http://pointecole.free.fr/polices.html</span></p></body></html> diff --git a/resources/i18n/sankore_it.ts b/resources/i18n/sankore_it.ts index 17e06832..c041d0ed 100644 --- a/resources/i18n/sankore_it.ts +++ b/resources/i18n/sankore_it.ts @@ -1504,6 +1504,21 @@ Sei sicuro di voler rimuovere %n pagina(e) dal documento '%1' selezion Cestino + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Annulla + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2098,6 +2113,10 @@ risorsa multimediale ... Cache Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_iw.ts b/resources/i18n/sankore_iw.ts index 6bc9e519..e8844096 100644 --- a/resources/i18n/sankore_iw.ts +++ b/resources/i18n/sankore_iw.ts @@ -1499,6 +1499,21 @@ Trash + סל + + + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + בטל + + + Enter a new folder name @@ -2088,6 +2103,10 @@ Do you want to ignore these errors for this host? Cache מטמון + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_ja.ts b/resources/i18n/sankore_ja.ts index b7fa009a..d15cee05 100644 --- a/resources/i18n/sankore_ja.ts +++ b/resources/i18n/sankore_ja.ts @@ -1500,6 +1500,21 @@ ゴミ箱 + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + キャンセル + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2092,6 +2107,10 @@ Do you want to ignore these errors for this host? Cache キャッシュ + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_ko.ts b/resources/i18n/sankore_ko.ts index c6f407b6..f37e3275 100644 --- a/resources/i18n/sankore_ko.ts +++ b/resources/i18n/sankore_ko.ts @@ -1500,6 +1500,21 @@ 휴지통 + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + 취소 + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2091,6 +2106,10 @@ Do you want to ignore these errors for this host? Cache 캐시 + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_mg.ts b/resources/i18n/sankore_mg.ts index 8a5989b6..f2f58f7a 100644 --- a/resources/i18n/sankore_mg.ts +++ b/resources/i18n/sankore_mg.ts @@ -1502,6 +1502,21 @@ Daba + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Ajanony + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2093,6 +2108,10 @@ Tena tsy te hiraharaha an'ireo tsy mety ho an'ilay milina ve ianao?Cache Tahiry + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_nb.ts b/resources/i18n/sankore_nb.ts index 9704ec84..980ee822 100644 --- a/resources/i18n/sankore_nb.ts +++ b/resources/i18n/sankore_nb.ts @@ -1505,6 +1505,21 @@ Søppel + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Avbryt + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2091,6 +2106,10 @@ Do you want to ignore these errors for this host? Cache Skjul + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_nl.ts b/resources/i18n/sankore_nl.ts index b86a92a2..a8d5b5ce 100644 --- a/resources/i18n/sankore_nl.ts +++ b/resources/i18n/sankore_nl.ts @@ -1502,6 +1502,21 @@ Prullenbak + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Annuleren + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2087,6 +2102,10 @@ Do you want to ignore these errors for this host? Cache Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_pl.ts b/resources/i18n/sankore_pl.ts index c1e1789d..7447a12d 100644 --- a/resources/i18n/sankore_pl.ts +++ b/resources/i18n/sankore_pl.ts @@ -1509,6 +1509,21 @@ Kosz + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Anuluj + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2100,6 +2115,10 @@ Czy chcesz ignorować te błędy dla tego hosta? Cache Pamięć podręczna + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_pt.ts b/resources/i18n/sankore_pt.ts index 0e289b26..0df640a2 100644 --- a/resources/i18n/sankore_pt.ts +++ b/resources/i18n/sankore_pt.ts @@ -1505,6 +1505,21 @@ Lixo + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Cancelar + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2092,6 +2107,10 @@ Quer ignorar estes erros, deste servidor? Cache Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_rm.ts b/resources/i18n/sankore_rm.ts index da91b02b..b6f7d258 100644 --- a/resources/i18n/sankore_rm.ts +++ b/resources/i18n/sankore_rm.ts @@ -1500,6 +1500,21 @@ + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2085,6 +2100,10 @@ Do you want to ignore these errors for this host? Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_ro.ts b/resources/i18n/sankore_ro.ts index 76116524..4717d96c 100644 --- a/resources/i18n/sankore_ro.ts +++ b/resources/i18n/sankore_ro.ts @@ -1502,6 +1502,21 @@ Coş de gunoi + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Anulare + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2093,6 +2108,10 @@ Doriţi să ignoraţi aceste erori pentru acest host? Cache Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_ru.ts b/resources/i18n/sankore_ru.ts index ce0e1eb2..3da00209 100644 --- a/resources/i18n/sankore_ru.ts +++ b/resources/i18n/sankore_ru.ts @@ -1502,6 +1502,21 @@ Корзина + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Отмена + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2093,6 +2108,10 @@ Do you want to ignore these errors for this host? Cache Кэш + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_sk.ts b/resources/i18n/sankore_sk.ts index 09da571c..2abdedfd 100644 --- a/resources/i18n/sankore_sk.ts +++ b/resources/i18n/sankore_sk.ts @@ -1506,6 +1506,21 @@ Kôš + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Zrušiť + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2097,6 +2112,10 @@ Chcete ignorovať tieto chyby na tomto serveri? Magnifier Lupa + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_sv.ts b/resources/i18n/sankore_sv.ts index 915b07bc..30c626fb 100644 --- a/resources/i18n/sankore_sv.ts +++ b/resources/i18n/sankore_sv.ts @@ -1502,6 +1502,21 @@ Papperskorg + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + Avsluta + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2093,6 +2108,10 @@ Vill du ignorera felen för den här värden? Cache Cache + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_tr.ts b/resources/i18n/sankore_tr.ts index 4d14209b..1cebe4c5 100755 --- a/resources/i18n/sankore_tr.ts +++ b/resources/i18n/sankore_tr.ts @@ -1501,6 +1501,21 @@ Çöp + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + İptal + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2091,6 +2106,10 @@ Bu host için yukarıdaki hatalar yok sayılsın mı? Cache Gizli Yer + + Aristo + + UBTrapFlashController diff --git a/resources/i18n/sankore_zh.ts b/resources/i18n/sankore_zh.ts index 1c00fe69..c5317571 100644 --- a/resources/i18n/sankore_zh.ts +++ b/resources/i18n/sankore_zh.ts @@ -1500,6 +1500,21 @@ 回收站 + + UBFeaturesNewFolderDialog + + Accept + + + + Cancel + 取消 + + + Enter a new folder name + + + UBFeaturesProgressInfo @@ -2091,6 +2106,10 @@ Do you want to ignore these errors for this host? Cache 高级缓存 + + Aristo + + UBTrapFlashController diff --git a/resources/images/toolPalette/aristoTool.png b/resources/images/toolPalette/aristoTool.png new file mode 100644 index 00000000..225c0b1e Binary files /dev/null and b/resources/images/toolPalette/aristoTool.png differ diff --git a/resources/images/toque.png b/resources/images/toque.png deleted file mode 100644 index a976e147..00000000 Binary files a/resources/images/toque.png and /dev/null differ diff --git a/resources/images/toque.svg b/resources/images/toque.svg new file mode 100644 index 00000000..146cddc5 --- /dev/null +++ b/resources/images/toque.svg @@ -0,0 +1,131 @@ + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/library/applications/OpenStreetMap.wgt/index.html b/resources/library/applications/OpenStreetMap.wgt/index.html index 5b7da167..750e1a6e 100755 --- a/resources/library/applications/OpenStreetMap.wgt/index.html +++ b/resources/library/applications/OpenStreetMap.wgt/index.html @@ -68,7 +68,7 @@ * along with this program. If not, see . */ - /* API identifier */ + /* Geonames API identifier */ var geonamesUser = "yimgo"; /* map variable will be used to manipulate the map. This will be initialized like an OpenLayers.Map object. */ @@ -149,6 +149,17 @@ }); } + function importData(data) + { + map.setCenter(new OpenLayers.LonLat(data["center"]["lon"], data["center"]["lat"]), data["zoom"]); + } + + function exportData() + { + if (window.sankore) + sankore.setPreference("osm", JSON.stringify({center: map.getCenter(), zoom: map.getZoom()})); + } + window.onload = function() { map = new OpenLayers.Map({ div: "map" @@ -198,7 +209,21 @@ map.setBaseLayer(newLayer); return false; - }); + }); + + /* importing state from Sankoré preferences */ + if (window.sankore) { + if (sankore.preference("osm","")) { + importData(JSON.parse(sankore.preference("osm",""))); + } + } + + /* exporting state when receiving a leave event */ + if (window.widget) { + window.widget.onleave = function() { + exportData(); + } + } }; --> diff --git a/resources/library/interactivities/Cat images.wgt/js/script.js b/resources/library/interactivities/Cat images.wgt/js/script.js index 441c3ea1..ecf2d8aa 100644 --- a/resources/library/interactivities/Cat images.wgt/js/script.js +++ b/resources/library/interactivities/Cat images.wgt/js/script.js @@ -112,7 +112,7 @@ function start(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -341,7 +341,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -413,12 +413,11 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } - }); - checkCorrectness(imgs_container); + }); } all_imgs = $("
").appendTo(container); @@ -458,6 +457,7 @@ function importData(data){ } }); container.appendTo("#data"); + checkCorrectness(all_imgs); } } } @@ -520,7 +520,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -531,7 +531,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -561,9 +561,9 @@ function addCategory(obj){ $("").appendTo(imgs_container); $("").appendTo(imgs_container); imgs_container.attr("ondragenter", "return false;") - .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);"); + .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;") + .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;") + .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);"); } //add new container @@ -686,8 +686,7 @@ function returnId(){ } //a func for checking when smth will drop -function checkOnDrop(dest, source){ - dest.append(source); +function checkOnDrop(dest){ var tmp_count = dest.find("input[name='count']").val(); var tmp_mask = dest.find("input[name='mask']").val(); if(dest.find(".img_block").size() == tmp_count){ @@ -697,47 +696,35 @@ function checkOnDrop(dest, source){ tmp_right = false; }); if(tmp_right) - dest.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); + dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont"); else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } //checking source on correctness function checkCorrectness(source){ if(!source.hasClass("all_imgs")){ - var tmp_count = source.find("input[name='count']").val(); - var tmp_mask = source.find("input[name='mask']").val(); - if(source.find(".img_block").size() == tmp_count){ - var tmp_right = true; - source.find(".img_block").each(function(){ - if($(this).find("input").val() != tmp_mask) - tmp_right = false; - }); - - if(tmp_right) - source.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); - } else if(source.find(".img_block").size() == 0) - source.addClass("def_cont") - .removeClass("green_cont") - .removeClass("red_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + if(source.parent().find(".all_imgs").find(".img_block").size() == 0){ + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } + } else { + if(source.find(".img_block").size() > 0){ + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } } } diff --git a/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js b/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js index ab48d98b..aad7172e 100644 --- a/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js +++ b/resources/library/interactivities/Cat images.wgt/locales/fr/js/script.js @@ -130,7 +130,7 @@ function start(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -358,7 +358,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -430,7 +430,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -475,6 +475,7 @@ function importData(data){ } }); container.appendTo("#data"); + checkCorrectness(all_imgs); } } } @@ -537,7 +538,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -548,7 +549,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -578,9 +579,9 @@ function addCategory(obj){ $("").appendTo(imgs_container); $("").appendTo(imgs_container); imgs_container.attr("ondragenter", "return false;") - .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);"); + .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;") + .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;") + .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);"); } //add new container @@ -599,9 +600,9 @@ function addContainer(){ $("").appendTo(imgs_container); $("").appendTo(imgs_container); imgs_container.attr("ondragenter", "return false;") - .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);"); + .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;") + .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;") + .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);"); container.insertBefore($(".add_block")); } @@ -704,8 +705,7 @@ function returnId(){ } //a func for checking when smth will drop -function checkOnDrop(dest, source){ - dest.append(source); +function checkOnDrop(dest){ var tmp_count = dest.find("input[name='count']").val(); var tmp_mask = dest.find("input[name='mask']").val(); if(dest.find(".img_block").size() == tmp_count){ @@ -715,47 +715,35 @@ function checkOnDrop(dest, source){ tmp_right = false; }); if(tmp_right) - dest.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); + dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont"); else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } //checking source on correctness function checkCorrectness(source){ if(!source.hasClass("all_imgs")){ - var tmp_count = source.find("input[name='count']").val(); - var tmp_mask = source.find("input[name='mask']").val(); - if(source.find(".img_block").size() == tmp_count){ - var tmp_right = true; - source.find(".img_block").each(function(){ - if($(this).find("input").val() != tmp_mask) - tmp_right = false; - }); - - if(tmp_right) - source.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); - } else if(source.find(".img_block").size() == 0) - source.addClass("def_cont") - .removeClass("green_cont") - .removeClass("red_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + if(source.parent().find(".all_imgs").find(".img_block").size() == 0){ + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } + } else { + if(source.find(".img_block").size() > 0){ + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } } } diff --git a/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js b/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js index 367e5630..dc92f1e6 100644 --- a/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js +++ b/resources/library/interactivities/Cat images.wgt/locales/ru/js/script.js @@ -111,7 +111,7 @@ function start(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -342,7 +342,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -414,7 +414,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -459,6 +459,7 @@ function importData(data){ } }); container.appendTo("#data"); + checkCorrectness(all_imgs); } } } @@ -521,7 +522,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -532,7 +533,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -562,9 +563,9 @@ function addCategory(obj){ $("").appendTo(imgs_container); $("").appendTo(imgs_container); imgs_container.attr("ondragenter", "return false;") - .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);"); + .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;") + .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;") + .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);"); } //add new container @@ -583,9 +584,9 @@ function addContainer(){ $("").appendTo(imgs_container); $("").appendTo(imgs_container); imgs_container.attr("ondragenter", "return false;") - .attr("ondragleave", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondragover", "$(this).css(\"background-color\",\"\"); return false;") - .attr("ondrop", "$(this).css(\"background-color\",\"\"); return onDropTarget(this,event);"); + .attr("ondragleave", "$(this).css(\"background-color\",\"#e6f6ff\"); return false;") + .attr("ondragover", "$(this).css(\"background-color\",\"#c3e9ff\"); return false;") + .attr("ondrop", "$(this).css(\"background-color\",\"#e6f6ff\"); return onDropTarget(this,event);"); container.insertBefore($(".add_block")); } @@ -688,8 +689,7 @@ function returnId(){ } //a func for checking when smth will drop -function checkOnDrop(dest, source){ - dest.append(source); +function checkOnDrop(dest){ var tmp_count = dest.find("input[name='count']").val(); var tmp_mask = dest.find("input[name='mask']").val(); if(dest.find(".img_block").size() == tmp_count){ @@ -699,47 +699,35 @@ function checkOnDrop(dest, source){ tmp_right = false; }); if(tmp_right) - dest.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); + dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont"); else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } //checking source on correctness function checkCorrectness(source){ if(!source.hasClass("all_imgs")){ - var tmp_count = source.find("input[name='count']").val(); - var tmp_mask = source.find("input[name='mask']").val(); - if(source.find(".img_block").size() == tmp_count){ - var tmp_right = true; - source.find(".img_block").each(function(){ - if($(this).find("input").val() != tmp_mask) - tmp_right = false; - }); - - if(tmp_right) - source.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); - } else if(source.find(".img_block").size() == 0) - source.addClass("def_cont") - .removeClass("green_cont") - .removeClass("red_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + if(source.parent().find(".all_imgs").find(".img_block").size() == 0){ + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } + } else { + if(source.find(".img_block").size() > 0){ + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } } } diff --git a/resources/library/interactivities/Cat text.wgt/js/script.js b/resources/library/interactivities/Cat text.wgt/js/script.js index 12653ac4..0dededfa 100644 --- a/resources/library/interactivities/Cat text.wgt/js/script.js +++ b/resources/library/interactivities/Cat text.wgt/js/script.js @@ -120,7 +120,7 @@ function start(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -339,7 +339,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -410,12 +410,11 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } - }); - checkCorrectness(imgs_container); + }); } all_imgs = $("
").appendTo(container); @@ -452,7 +451,8 @@ function importData(data){ } } } - }); + }); + checkCorrectness(all_imgs); } } } @@ -516,7 +516,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -527,7 +527,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -685,8 +685,7 @@ function changeStyle(val){ } //a func for checking when smth will drop -function checkOnDrop(dest, source){ - dest.append(source); +function checkOnDrop(dest){ var tmp_count = dest.find("input[name='count']").val(); var tmp_mask = dest.find("input[name='mask']").val(); if(dest.find(".img_block").size() == tmp_count){ @@ -696,46 +695,34 @@ function checkOnDrop(dest, source){ tmp_right = false; }); if(tmp_right) - dest.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); + dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont"); else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } //checking source on correctness function checkCorrectness(source){ if(!source.hasClass("all_imgs")){ - var tmp_count = source.find("input[name='count']").val(); - var tmp_mask = source.find("input[name='mask']").val(); - if(source.find(".img_block").size() == tmp_count){ - var tmp_right = true; - source.find(".img_block").each(function(){ - if($(this).find("input").val() != tmp_mask) - tmp_right = false; - }); - - if(tmp_right) - source.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); - } else if(source.find(".img_block").size() == 0) - source.addClass("def_cont") - .removeClass("green_cont") - .removeClass("red_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + if(source.parent().find(".all_imgs").find(".img_block").size() == 0){ + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } + } else { + if(source.find(".img_block").size() > 0){ + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } } } diff --git a/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js b/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js index 8d7149ed..606f4a4a 100644 --- a/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js +++ b/resources/library/interactivities/Cat text.wgt/locales/fr/js/script.js @@ -141,7 +141,7 @@ function start(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -360,7 +360,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -431,7 +431,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -473,7 +473,8 @@ function importData(data){ } } } - }); + }); + checkCorrectness(all_imgs); } } } @@ -537,7 +538,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -548,7 +549,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -706,8 +707,7 @@ function changeStyle(val){ } //a func for checking when smth will drop -function checkOnDrop(dest, source){ - dest.append(source); +function checkOnDrop(dest){ var tmp_count = dest.find("input[name='count']").val(); var tmp_mask = dest.find("input[name='mask']").val(); if(dest.find(".img_block").size() == tmp_count){ @@ -717,46 +717,34 @@ function checkOnDrop(dest, source){ tmp_right = false; }); if(tmp_right) - dest.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); + dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont"); else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } //checking source on correctness function checkCorrectness(source){ if(!source.hasClass("all_imgs")){ - var tmp_count = source.find("input[name='count']").val(); - var tmp_mask = source.find("input[name='mask']").val(); - if(source.find(".img_block").size() == tmp_count){ - var tmp_right = true; - source.find(".img_block").each(function(){ - if($(this).find("input").val() != tmp_mask) - tmp_right = false; - }); - - if(tmp_right) - source.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); - } else if(source.find(".img_block").size() == 0) - source.addClass("def_cont") - .removeClass("green_cont") - .removeClass("red_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + if(source.parent().find(".all_imgs").find(".img_block").size() == 0){ + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } + } else { + if(source.find(".img_block").size() > 0){ + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } } } diff --git a/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js b/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js index dade5268..86bef6bd 100644 --- a/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js +++ b/resources/library/interactivities/Cat text.wgt/locales/ru/js/script.js @@ -120,7 +120,7 @@ function start(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -339,7 +339,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -410,7 +410,7 @@ function importData(data){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -452,7 +452,8 @@ function importData(data){ } } } - }); + }); + checkCorrectness(all_imgs); } } } @@ -516,7 +517,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -527,7 +528,7 @@ function showExample(){ drop: function(event, ui) { if($(ui.draggable).parent().parent().html() == $(this).parent().html()){ var tmp_ui = $(ui.draggable).parent(); - checkOnDrop($(this), $(ui.draggable)); + $(this).append($(ui.draggable)); checkCorrectness(tmp_ui); } } @@ -685,8 +686,7 @@ function changeStyle(val){ } //a func for checking when smth will drop -function checkOnDrop(dest, source){ - dest.append(source); +function checkOnDrop(dest){ var tmp_count = dest.find("input[name='count']").val(); var tmp_mask = dest.find("input[name='mask']").val(); if(dest.find(".img_block").size() == tmp_count){ @@ -696,46 +696,34 @@ function checkOnDrop(dest, source){ tmp_right = false; }); if(tmp_right) - dest.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); + dest.removeClass("def_cont").removeClass("red_cont").addClass("green_cont"); else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } else - dest.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + dest.removeClass("def_cont").removeClass("green_cont").addClass("red_cont"); } //checking source on correctness function checkCorrectness(source){ if(!source.hasClass("all_imgs")){ - var tmp_count = source.find("input[name='count']").val(); - var tmp_mask = source.find("input[name='mask']").val(); - if(source.find(".img_block").size() == tmp_count){ - var tmp_right = true; - source.find(".img_block").each(function(){ - if($(this).find("input").val() != tmp_mask) - tmp_right = false; - }); - - if(tmp_right) - source.removeClass("def_cont") - .removeClass("red_cont") - .addClass("green_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); - } else if(source.find(".img_block").size() == 0) - source.addClass("def_cont") - .removeClass("green_cont") - .removeClass("red_cont"); - else - source.removeClass("def_cont") - .removeClass("green_cont") - .addClass("red_cont"); + if(source.parent().find(".all_imgs").find(".img_block").size() == 0){ + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } + } else { + if(source.find(".img_block").size() > 0){ + source.parent().find(".imgs_cont").each(function(){ + $(this).addClass("def_cont").removeClass("green_cont").removeClass("red_cont"); + }) + } else { + source.parent().find(".imgs_cont").each(function(){ + checkOnDrop($(this)) + }) + } } } \ No newline at end of file diff --git a/resources/sankore.qrc b/resources/sankore.qrc index 8965e022..fcefa2e8 100644 --- a/resources/sankore.qrc +++ b/resources/sankore.qrc @@ -165,6 +165,7 @@ images/toolPalette/triangleTool.png images/toolPalette/protractorTool.png images/toolPalette/compassTool.png + images/toolPalette/aristoTool.png images/toolPalette/maskTool.png images/toolPalette/magnifierTool.png images/extraPalette/blackout.png @@ -365,6 +366,6 @@ images/teacherGuide/pencil.svg images/duplicateDisabled.svg images/teacherGuide/flash_24x24.svg - images/toque.png + images/toque.svg diff --git a/src/adaptors/UBImportDocument.cpp b/src/adaptors/UBImportDocument.cpp index 0bf32c82..ca5944f3 100644 --- a/src/adaptors/UBImportDocument.cpp +++ b/src/adaptors/UBImportDocument.cpp @@ -171,8 +171,11 @@ UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString& return NULL; } - - UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup); + bool addTitlePage = false; + if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() && !QFile(documentRootFolder+"/page000.svg").exists()) + addTitlePage=true; + + UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup, "", false, addTitlePage); UBApplication::showMessage(tr("Import successful.")); return newDocument; } diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index bcfa5199..cabc74ad 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -941,18 +941,6 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() readGroupRoot(); } -// 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 @@ -976,17 +964,6 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene() 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); -// } -// } - - } } @@ -1147,17 +1124,10 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex) QDomElement groupRoot = groupDomDocument.createElement(tGroups); groupDomDocument.appendChild(groupRoot); - - static int i = 0; - qDebug() << "persist call no is " << ++i; - QBuffer buffer; buffer.open(QBuffer::WriteOnly); mXmlWriter.setDevice(&buffer); - //Unused variable - //QTime timer = QTime::currentTime(); - mXmlWriter.setAutoFormatting(true); mXmlWriter.writeStartDocument(); @@ -3120,7 +3090,7 @@ UBGraphicsTriangle* UBSvgSubsetAdaptor::UBSvgSubsetReader::triangleFromSvg() UBGraphicsCache* UBSvgSubsetAdaptor::UBSvgSubsetReader::cacheFromSvg() { - UBGraphicsCache* pCache = new UBGraphicsCache(); + UBGraphicsCache* pCache = UBGraphicsCache::instance(mScene); pCache->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); graphicsItemFromSvg(pCache); diff --git a/src/adaptors/UBThumbnailAdaptor.cpp b/src/adaptors/UBThumbnailAdaptor.cpp index 1a90f108..556dc340 100644 --- a/src/adaptors/UBThumbnailAdaptor.cpp +++ b/src/adaptors/UBThumbnailAdaptor.cpp @@ -23,7 +23,12 @@ #include "core/UBApplication.h" #include "core/UBSettings.h" + +#include "gui/UBDockTeacherGuideWidget.h" +#include "gui/UBTeacherGuideWidget.h" + #include "board/UBBoardController.h" +#include "board/UBBoardPaletteManager.h" #include "document/UBDocumentProxy.h" @@ -120,7 +125,7 @@ void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* p QFile thumbFile(fileName); - if (pScene->isModified() || overrideModified || !thumbFile.exists()) + if (pScene->isModified() || overrideModified || !thumbFile.exists() || UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()) { qreal nominalWidth = pScene->nominalSize().width(); qreal nominalHeight = pScene->nominalSize().height(); @@ -152,6 +157,12 @@ void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* p pScene->render(&painter, imageRect, sceneRect, Qt::KeepAspectRatio); + if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()){ + QPixmap toque(":images/toque.svg"); + painter.setOpacity(0.6); + painter.drawPixmap(QPoint(width - toque.width(),0),toque); + } + pScene->setRenderingContext(UBGraphicsScene::Screen); pScene->setRenderingQuality(UBItem::RenderingQualityNormal); diff --git a/src/api/UBLibraryAPI.cpp b/src/api/UBLibraryAPI.cpp index 8d75a568..073ed404 100644 --- a/src/api/UBLibraryAPI.cpp +++ b/src/api/UBLibraryAPI.cpp @@ -40,7 +40,7 @@ UBLibraryAPI::~UBLibraryAPI() void UBLibraryAPI::addObject(QString pUrl, int width, int height, int x, int y, bool background) { if (UBApplication::boardController) - UBApplication::boardController->downloadURL(QUrl(pUrl), QPointF(x, y), QSize(width, height), background); + UBApplication::boardController->downloadURL(QUrl(pUrl), QString(), QPointF(x, y), QSize(width, height), background); } diff --git a/src/api/UBWidgetUniboardAPI.cpp b/src/api/UBWidgetUniboardAPI.cpp index b86e7aa1..32c62f32 100644 --- a/src/api/UBWidgetUniboardAPI.cpp +++ b/src/api/UBWidgetUniboardAPI.cpp @@ -201,7 +201,7 @@ void UBWidgetUniboardAPI::addObject(QString pUrl, int width, int height, int x, if (UBApplication::boardController->activeScene() != mScene) return; - UBApplication::boardController->downloadURL(QUrl(pUrl), QPointF(x, y), QSize(width, height), background); + UBApplication::boardController->downloadURL(QUrl(pUrl), QString(), QPointF(x, y), QSize(width, height), background); } @@ -506,7 +506,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QGraphicsSceneDragDropEvent *event) sDownloadFileDesc desc; desc.dest = sDownloadFileDesc::graphicsWidget; desc.modal = true; - desc.url = url; + desc.srcUrl = url; desc.currentSize = 0; desc.name = QFileInfo(url).fileName(); desc.totalSize = 0; // The total size will be retrieved during the download diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index 544f92e9..b269b8fa 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -95,6 +95,7 @@ UBBoardController::UBBoardController(UBMainWindow* mainWindow) , mCleanupDone(false) , mCacheWidgetIsEnabled(false) , mDeletingSceneIndex(-1) + , mMovingSceneIndex(-1) , mActionGroupText(tr("Group")) , mActionUngroupText(tr("Ungroup")) { @@ -131,7 +132,7 @@ void UBBoardController::init() , this, SLOT(lastWindowClosed())); connect(UBDownloadManager::downloadManager(), SIGNAL(downloadModalFinished()), this, SLOT(onDownloadModalFinished())); - connect(UBDownloadManager::downloadManager(), SIGNAL(addDownloadedFileToBoard(bool,QUrl,QString,QByteArray,QPointF,QSize,bool)), this, SLOT(downloadFinished(bool,QUrl,QString,QByteArray,QPointF,QSize,bool))); + connect(UBDownloadManager::downloadManager(), SIGNAL(addDownloadedFileToBoard(bool,QUrl,QUrl,QString,QByteArray,QPointF,QSize,bool)), this, SLOT(downloadFinished(bool,QUrl,QUrl,QString,QByteArray,QPointF,QSize,bool))); UBDocumentProxy* doc = UBPersistenceManager::persistenceManager()->createDocument(); @@ -562,7 +563,12 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item) } UBMimeType::Enum itemMimeType; - QString contentTypeHeader = UBFileSystemUtils::mimeTypeFromFileName(item->sourceUrl().toLocalFile()); + + QString srcFile = item->sourceUrl().toLocalFile(); + if (srcFile.isEmpty()) + srcFile = item->sourceUrl().toString(); + + QString contentTypeHeader = UBFileSystemUtils::mimeTypeFromFileName(srcFile); if(NULL != qgraphicsitem_cast(commonItem)) itemMimeType = UBMimeType::Group; else @@ -587,8 +593,9 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item) if (mitem) { sourceUrl = mitem->mediaFileUrl(); + downloadURL(sourceUrl, srcFile, itemPos, QSize(itemSize.width(), itemSize.height()), false, false); } - }break; + }return NULL; // async operation case UBMimeType::VectorImage: { @@ -661,7 +668,7 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item) if (retItem) return retItem; - UBItem *createdItem = downloadFinished(true, sourceUrl, contentTypeHeader, pData, itemPos, QSize(itemSize.width(), itemSize.height()), false); + UBItem *createdItem = downloadFinished(true, sourceUrl, sourceUrl, contentTypeHeader, pData, itemPos, QSize(itemSize.width(), itemSize.height()), false); if (createdItem) { createdItem->setSourceUrl(item->sourceUrl()); @@ -675,6 +682,7 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item) retItem = dynamic_cast(createdItem); } + return retItem; } @@ -960,7 +968,7 @@ void UBBoardController::groupButtonClicked() } } -void UBBoardController::downloadURL(const QUrl& url, const QPointF& pPos, const QSize& pSize, bool isBackground, bool internalData) +void UBBoardController::downloadURL(const QUrl& url, QString contentSourceUrl, const QPointF& pPos, const QSize& pSize, bool isBackground, bool internalData) { qDebug() << "something has been dropped on the board! Url is: " << url.toString(); QString sUrl = url.toString(); @@ -971,7 +979,7 @@ void UBBoardController::downloadURL(const QUrl& url, const QPointF& pPos, const if(sUrl.startsWith("uniboardTool://")) { - downloadFinished(true, url, "application/vnd.mnemis-uniboard-tool", QByteArray(), pPos, pSize, isBackground); + downloadFinished(true, url, QUrl(), "application/vnd.mnemis-uniboard-tool", QByteArray(), pPos, pSize, isBackground); } else if (sUrl.startsWith("file://") || sUrl.startsWith("/")) { @@ -984,22 +992,37 @@ void UBBoardController::downloadURL(const QUrl& url, const QPointF& pPos, const || contentType.startsWith("application/widget") || contentType.startsWith("application/vnd.apple-widget"); - QFile file(fileName); - if (shouldLoadFileData) + { + QFile file(fileName); file.open(QIODevice::ReadOnly); - - downloadFinished(true, formedUrl, contentType, file.readAll(), pPos, pSize, isBackground, internalData); - - if (shouldLoadFileData) + downloadFinished(true, formedUrl, QUrl(), contentType, file.readAll(), pPos, pSize, isBackground, internalData); file.close(); + } + else + { + // media items should be copyed in separate thread + + sDownloadFileDesc desc; + desc.modal = false; + desc.srcUrl = sUrl; + desc.originalSrcUrl = contentSourceUrl; + desc.currentSize = 0; + desc.name = QFileInfo(url.toString()).fileName(); + desc.totalSize = 0; // The total size will be retrieved during the download + desc.pos = pPos; + desc.size = pSize; + desc.isBackground = isBackground; + + UBDownloadManager::downloadManager()->addFileToDownload(desc); + } } else { // When we fall there, it means that we are dropping something from the web to the board sDownloadFileDesc desc; desc.modal = true; - desc.url = url.toString(); + desc.srcUrl = url.toString(); desc.currentSize = 0; desc.name = QFileInfo(url.toString()).fileName(); desc.totalSize = 0; // The total size will be retrieved during the download @@ -1022,7 +1045,7 @@ void UBBoardController::downloadURL(const QUrl& url, const QPointF& pPos, const } -UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QString pContentTypeHeader, +UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl contentUrl, QString pContentTypeHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground, bool internalData) { @@ -1157,11 +1180,9 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri qDebug() << "accepting mime type" << mimeType << "as video"; UBGraphicsMediaItem *mediaVideoItem = 0; - + QUuid uuid = QUuid::createUuid(); if (pData.length() > 0) { - QUuid uuid = QUuid::createUuid(); - QString destFile; bool b = UBPersistenceManager::persistenceManager()->addFileToDocument(selectedDocument(), sourceUrl.toString(), @@ -1178,16 +1199,19 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri QUrl url = QUrl::fromLocalFile(destFile); mediaVideoItem = mActiveScene->addMedia(url, false, pPos); - - mediaVideoItem->setSourceUrl(sourceUrl); - mediaVideoItem->setUuid(uuid); } else { - mediaVideoItem = addVideo(sourceUrl, false, pPos); + qDebug() << sourceUrl.toString(); + mediaVideoItem = addVideo(sourceUrl, false, pPos, true); } if(mediaVideoItem){ + if (contentUrl.isEmpty()) + mediaVideoItem->setSourceUrl(sourceUrl); + else + mediaVideoItem->setSourceUrl(contentUrl); + mediaVideoItem->setUuid(uuid); connect(this, SIGNAL(activeSceneChanged()), mediaVideoItem, SLOT(activeSceneChanged())); } @@ -1201,10 +1225,9 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri UBGraphicsMediaItem *audioMediaItem = 0; + QUuid uuid = QUuid::createUuid(); if (pData.length() > 0) { - QUuid uuid = QUuid::createUuid(); - QString destFile; bool b = UBPersistenceManager::persistenceManager()->addFileToDocument(selectedDocument(), sourceUrl.toString(), @@ -1221,16 +1244,18 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri QUrl url = QUrl::fromLocalFile(destFile); audioMediaItem = mActiveScene->addMedia(url, false, pPos); - - audioMediaItem->setSourceUrl(sourceUrl); - audioMediaItem->setUuid(uuid); } else { - audioMediaItem = addAudio(sourceUrl, false, pPos); + audioMediaItem = addAudio(sourceUrl, false, pPos, true); } if(audioMediaItem){ + if (contentUrl.isEmpty()) + audioMediaItem->setSourceUrl(sourceUrl); + else + audioMediaItem->setSourceUrl(contentUrl); + audioMediaItem->setUuid(uuid); connect(this, SIGNAL(activeSceneChanged()), audioMediaItem, SLOT(activeSceneChanged())); } @@ -1362,6 +1387,11 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri mActiveScene->addMask(pPos); UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); } + else if (sourceUrl.toString() == UBToolsManager::manager()->aristo.id) + { + mActiveScene->addAristo(pPos); + UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); + } else { showMessage(tr("Unknown tool type %1").arg(sourceUrl.toString())); @@ -1450,9 +1480,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy, { freezeW3CWidgets(true); - if(sceneChange) - emit activeSceneWillChange(); - persistCurrentScene(); ClearUndoStack(); @@ -1500,14 +1527,17 @@ void UBBoardController::moveSceneToIndex(int source, int target) { if (selectedDocument()) { + persistCurrentScene(); UBDocumentContainer::movePageToIndex(source, target); selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); UBMetadataDcSubsetAdaptor::persist(selectedDocument()); - + mMovingSceneIndex = source; setActiveDocumentScene(target); + mMovingSceneIndex = -1; + } } @@ -1786,6 +1816,13 @@ qreal UBBoardController::currentZoom() return 1.0; } +void UBBoardController::removeTool(UBToolWidget* toolWidget) +{ + toolWidget->hide(); + + delete toolWidget; +} + void UBBoardController::hide() { UBApplication::mainWindow->actionLibrary->setChecked(false); @@ -1800,11 +1837,9 @@ void UBBoardController::persistCurrentScene() { if(UBPersistenceManager::persistenceManager() && selectedDocument() && mActiveScene && mActiveSceneIndex != mDeletingSceneIndex - && (mActiveSceneIndex >= 0) + && (mActiveSceneIndex >= 0) && mActiveSceneIndex != mMovingSceneIndex && (mActiveScene->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()))) { - emit activeSceneWillBePersisted(); - UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex); updatePage(mActiveSceneIndex); } @@ -2016,23 +2051,28 @@ void UBBoardController::grabScene(const QRectF& pSceneRect) } } -UBGraphicsMediaItem* UBBoardController::addVideo(const QUrl& pSourceUrl, bool startPlay, const QPointF& pos) +UBGraphicsMediaItem* UBBoardController::addVideo(const QUrl& pSourceUrl, bool startPlay, const QPointF& pos, bool bUseSource) { QUuid uuid = QUuid::createUuid(); QUrl concreteUrl = pSourceUrl; - QString destFile; - bool b = UBPersistenceManager::persistenceManager()->addFileToDocument(selectedDocument(), - pSourceUrl.toLocalFile(), - UBPersistenceManager::videoDirectory, - uuid, - destFile); - if (!b) + // media file is not in document folder yet + if (!bUseSource) { - showMessage(tr("Add file operation failed: file copying error")); - return NULL; - } - concreteUrl = QUrl::fromLocalFile(destFile); + QString destFile; + bool b = UBPersistenceManager::persistenceManager()->addFileToDocument(selectedDocument(), + pSourceUrl.toLocalFile(), + UBPersistenceManager::videoDirectory, + uuid, + destFile); + if (!b) + { + showMessage(tr("Add file operation failed: file copying error")); + return NULL; + } + concreteUrl = QUrl::fromLocalFile(destFile); + }// else we just use source Url. + UBGraphicsMediaItem* vi = mActiveScene->addMedia(concreteUrl, startPlay, pos); selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); @@ -2046,23 +2086,27 @@ UBGraphicsMediaItem* UBBoardController::addVideo(const QUrl& pSourceUrl, bool st } -UBGraphicsMediaItem* UBBoardController::addAudio(const QUrl& pSourceUrl, bool startPlay, const QPointF& pos) +UBGraphicsMediaItem* UBBoardController::addAudio(const QUrl& pSourceUrl, bool startPlay, const QPointF& pos, bool bUseSource) { QUuid uuid = QUuid::createUuid(); QUrl concreteUrl = pSourceUrl; - QString destFile; - bool b = UBPersistenceManager::persistenceManager()->addFileToDocument(selectedDocument(), - pSourceUrl.toLocalFile(), - UBPersistenceManager::audioDirectory, - uuid, - destFile); - if (!b) + // media file is not in document folder yet + if (!bUseSource) { - showMessage(tr("Add file operation failed: file copying error")); - return NULL; - } - concreteUrl = QUrl::fromLocalFile(destFile); + QString destFile; + bool b = UBPersistenceManager::persistenceManager()->addFileToDocument(selectedDocument(), + pSourceUrl.toLocalFile(), + UBPersistenceManager::audioDirectory, + uuid, + destFile); + if (!b) + { + showMessage(tr("Add file operation failed: file copying error")); + return NULL; + } + concreteUrl = QUrl::fromLocalFile(destFile); + }// else we just use source Url. UBGraphicsMediaItem* ai = mActiveScene->addMedia(concreteUrl, startPlay, pos); selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); @@ -2236,7 +2280,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint if("" != url) { - downloadURL(url, pPos); + downloadURL(url, QString(), pPos); return; } } @@ -2256,7 +2300,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint foreach(const QUrl url, urls){ QPointF pos(pPos + QPointF(index * 15, index * 15)); - downloadURL(url, pos, QSize(), false, internalData); + downloadURL(url, QString(), pos, QSize(), false, internalData); index++; } @@ -2282,7 +2326,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint // Sometimes, it is possible to have an URL as text. we check here if it is the case QString qsTmp = pMimeData->text().remove(QRegExp("[\\0]")); if(qsTmp.startsWith("http")){ - downloadURL(QUrl(qsTmp), pPos); + downloadURL(QUrl(qsTmp), QString(), pPos); } else{ mActiveScene->addTextHtml(pMimeData->html(), pPos); @@ -2296,7 +2340,7 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint QString qsUrl = UBPlatformUtils::urlFromClipboard(); if("" != qsUrl){ // We finally got the url of the dropped ressource! Let's import it! - downloadURL(qsUrl, pPos); + downloadURL(qsUrl, qsUrl, pPos); return; } #endif @@ -2313,31 +2357,32 @@ void UBBoardController::togglePodcast(bool checked) void UBBoardController::moveGraphicsWidgetToControlView(UBGraphicsWidgetItem* graphicsWidget) { - graphicsWidget->remove(); - mActiveScene->setURStackEnable(false); - UBGraphicsItem *toolW3C = duplicateItem(dynamic_cast(graphicsWidget)); - UBGraphicsWidgetItem *copyedGraphicsWidget = NULL; - - if (UBGraphicsWidgetItem::Type == toolW3C->type()) - copyedGraphicsWidget = static_cast(toolW3C); - - UBToolWidget *toolWidget = new UBToolWidget(copyedGraphicsWidget); - mActiveScene->addItem(toolWidget); - qreal ssf = 1 / UBApplication::boardController->systemScaleFactor(); - - toolWidget->setScale(ssf); - toolWidget->setPos(graphicsWidget->scenePos()); + graphicsWidget->remove(false); + mActiveScene->addItemToDeletion(graphicsWidget); + + UBToolWidget *toolWidget = new UBToolWidget(graphicsWidget, mControlView); mActiveScene->setURStackEnable(true); + + QPoint controlViewPos = mControlView->mapFromScene(graphicsWidget->sceneBoundingRect().center()); + toolWidget->centerOn(mControlView->mapTo(mControlContainer, controlViewPos)); + toolWidget->show(); } void UBBoardController::moveToolWidgetToScene(UBToolWidget* toolWidget) { - UBGraphicsWidgetItem *graphicsWidgetItem = addW3cWidget(toolWidget->graphicsWidgetItem()->widgetUrl(), QPointF(0, 0)); - graphicsWidgetItem->setPos(toolWidget->pos()); + UBGraphicsWidgetItem *widgetToScene = toolWidget->toolWidget(); + + widgetToScene->resetTransform(); + + QPoint mainWindowCenter = toolWidget->mapTo(mMainWindow, QPoint(toolWidget->width(), toolWidget->height()) / 2); + QPoint controlViewCenter = mControlView->mapFrom(mMainWindow, mainWindowCenter); + QPointF scenePos = mControlView->mapToScene(controlViewCenter); + + mActiveScene->addGraphicsWidget(widgetToScene, scenePos); + toolWidget->remove(); - graphicsWidgetItem->setSelected(true); } diff --git a/src/board/UBBoardController.h b/src/board/UBBoardController.h index ed40b26a..d7f44e37 100644 --- a/src/board/UBBoardController.h +++ b/src/board/UBBoardController.h @@ -193,8 +193,8 @@ class UBBoardController : public UBDocumentContainer void firstScene(); void lastScene(); void groupButtonClicked(); - void downloadURL(const QUrl& url, const QPointF& pPos = QPointF(0.0, 0.0), const QSize& pSize = QSize(), bool isBackground = false, bool internalData = false); - UBItem *downloadFinished(bool pSuccess, QUrl sourceUrl, QString pHeader, + void downloadURL(const QUrl& url, QString contentSourceUrl = QString(), const QPointF& pPos = QPointF(0.0, 0.0), const QSize& pSize = QSize(), bool isBackground = false, bool internalData = false); + UBItem *downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl contentUrl, QString pHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground = false, bool internalData = false); void changeBackground(bool isDark, bool isCrossed); @@ -203,14 +203,15 @@ class UBBoardController : public UBDocumentContainer void hideMessage(); void setDisabled(bool disable); void setColorIndex(int pColorIndex); + void removeTool(UBToolWidget* toolWidget); void hide(); void show(); void setWidePageSize(bool checked); void setRegularPageSize(bool checked); void stylusToolChanged(int tool); void grabScene(const QRectF& pSceneRect); - UBGraphicsMediaItem* addVideo(const QUrl& pUrl, bool startPlay, const QPointF& pos); - UBGraphicsMediaItem* addAudio(const QUrl& pUrl, bool startPlay, const QPointF& pos); + UBGraphicsMediaItem* addVideo(const QUrl& pUrl, bool startPlay, const QPointF& pos, bool bUseSource = false); + UBGraphicsMediaItem* addAudio(const QUrl& pUrl, bool startPlay, const QPointF& pos, bool bUseSource = false); UBGraphicsWidgetItem *addW3cWidget(const QUrl& pUrl, const QPointF& pos); void cut(); @@ -228,8 +229,6 @@ class UBBoardController : public UBDocumentContainer signals: void newPageAdded(); - void activeSceneWillBePersisted(); - void activeSceneWillChange(); void activeSceneChanged(); void zoomChanged(qreal pZoomFactor); void systemScaleFactorChanged(qreal pSystemScaleFactor); @@ -285,6 +284,7 @@ class UBBoardController : public UBDocumentContainer bool mCacheWidgetIsEnabled; QGraphicsItem* mLastCreatedItem; int mDeletingSceneIndex; + int mMovingSceneIndex; QString mActionGroupText; QString mActionUngroupText; diff --git a/src/board/UBBoardPaletteManager.cpp b/src/board/UBBoardPaletteManager.cpp index 2652bb15..612813cd 100644 --- a/src/board/UBBoardPaletteManager.cpp +++ b/src/board/UBBoardPaletteManager.cpp @@ -995,6 +995,7 @@ void UBBoardPaletteManager::startDownloads() mDownloadInProgress = true; mpDownloadWidget->setVisibleState(true); mRightPalette->addTab(mpDownloadWidget); + mpDownloadWidget; } } diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index 3ccc7640..1d68cc8a 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -61,6 +61,7 @@ #include "tools/UBGraphicsCache.h" #include "tools/UBGraphicsTriangle.h" #include "tools/UBGraphicsProtractor.h" +#include "tools/UBGraphicsAristo.h" #include "core/memcheck.h" @@ -307,7 +308,6 @@ UBBoardView::event (QEvent * e) if (gestureEvent) { QSwipeGesture* swipe = dynamic_cast (gestureEvent->gesture (Qt::SwipeGesture)); - if (swipe) { if (swipe->horizontalDirection () == QSwipeGesture::Left) @@ -362,9 +362,7 @@ void UBBoardView::tabletEvent (QTabletEvent * event) QPointF scenePos = viewportTransform ().inverted ().map (tabletPos); qreal pressure = 1.0; - if (((currentTool == UBStylusTool::Pen || currentTool == UBStylusTool::Line) - && mPenPressureSensitive) - || (currentTool == UBStylusTool::Marker && mMarkerPressureSensitive)) + if (((currentTool == UBStylusTool::Pen || currentTool == UBStylusTool::Line) && mPenPressureSensitive) || (currentTool == UBStylusTool::Marker && mMarkerPressureSensitive)) pressure = event->pressure (); @@ -521,6 +519,7 @@ Here we determines cases when items should to get mouse press event at pressing case UBGraphicsTriangle::Type: case UBGraphicsCompass::Type: case UBGraphicsCache::Type: + case UBGraphicsAristo::Type: return true; case UBGraphicsDelegateFrame::Type: @@ -553,8 +552,8 @@ Here we determines cases when items should to get mouse press event at pressing return false; break; - case UBToolWidget::Type: - return true; + //case UBToolWidget::Type: + // return true; case QGraphicsWebView::Type: return true; @@ -1123,7 +1122,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event) DelegateButton::Type != movingItem->type() && QGraphicsSvgItem::Type != movingItem->type() && UBGraphicsDelegateFrame::Type != movingItem->type() && - UBToolWidget::Type != movingItem->type() && +// UBToolWidget::Type != movingItem->type() && UBGraphicsCache::Type != movingItem->type() && QGraphicsWebView::Type != movingItem->type() && // for W3C widgets as Tools. !(!isMultipleSelectionEnabled() && movingItem->parentItem() && UBGraphicsWidgetItem::Type == movingItem->type() && UBGraphicsGroupContainerItem::Type == movingItem->parentItem()->type())) @@ -1364,6 +1363,11 @@ void UBBoardView::dropEvent (QDropEvent *event) event->acceptProposedAction(); } } + //prevent features in UBFeaturesWidget deletion from the model when event is processing inside + //Qt base classes + if (event->dropAction() == Qt::MoveAction) { + event->setDropAction(Qt::CopyAction); + } } void diff --git a/src/board/UBFeaturesController.cpp b/src/board/UBFeaturesController.cpp index a9bbeb08..049ee301 100644 --- a/src/board/UBFeaturesController.cpp +++ b/src/board/UBFeaturesController.cpp @@ -711,7 +711,7 @@ void UBFeaturesController::addItemToPage(const UBFeature &item) void UBFeaturesController::addItemAsBackground(const UBFeature &item) { - UBApplication::boardController->downloadURL( item.getFullPath(), QPointF(), QSize(), true ); + UBApplication::boardController->downloadURL( item.getFullPath(), QString(), QPointF(), QSize(), true ); } UBFeature UBFeaturesController::getDestinationFeatureForUrl( const QUrl &url ) diff --git a/src/core/UB.h b/src/core/UB.h index 716df59c..aeb619d2 100644 --- a/src/core/UB.h +++ b/src/core/UB.h @@ -145,6 +145,7 @@ struct UBGraphicsItemType TriangleItemType, MagnifierItemType, cacheItemType, + AristoItemType, groupContainerType, ToolWidgetItemType, GraphicsWidgetItemType, diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index deb11c6e..a2043121 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -130,6 +130,8 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing || args.contains("log"); + setupTranslators(args); + UBResources::resources(); if (!undoStack) @@ -139,8 +141,6 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing UBSettings *settings = UBSettings::settings(); - setupTranslators(args); - connect(settings->appToolBarPositionedAtTop, SIGNAL(changed(QVariant)), this, SLOT(toolBarPositionChanged(QVariant))); connect(settings->appToolBarDisplayText, SIGNAL(changed(QVariant)), this, SLOT(toolBarDisplayTextChanged(QVariant))); updateProtoActionsState(); diff --git a/src/core/UBDownloadManager.cpp b/src/core/UBDownloadManager.cpp index 4127851f..e120038a 100644 --- a/src/core/UBDownloadManager.cpp +++ b/src/core/UBDownloadManager.cpp @@ -14,12 +14,79 @@ */ #include "UBDownloadManager.h" #include "core/UBApplication.h" +#include "core/UBPersistenceManager.h" #include "gui/UBMainWindow.h" #include "board/UBBoardController.h" #include "board/UBBoardPaletteManager.h" +#include "frameworks/UBFileSystemUtils.h" #include "core/memcheck.h" + +UBAsyncLocalFileDownloader::UBAsyncLocalFileDownloader(sDownloadFileDesc desc, QObject *parent) +: QThread(parent) +, mDesc(desc) +, m_bAborting(false) +{ + +} + +UBAsyncLocalFileDownloader *UBAsyncLocalFileDownloader::download() +{ + if (!QFile::exists(QUrl(mDesc.srcUrl).toLocalFile())) { + qDebug() << "file" << mDesc.srcUrl << "does not present in fs"; + return this; + } + + start(); + + return this; +} + +void UBAsyncLocalFileDownloader::run() +{ + + QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(mDesc.srcUrl); + + int position=mimeType.indexOf(";"); + if(position != -1) + mimeType=mimeType.left(position); + + UBMimeType::Enum itemMimeType = UBFileSystemUtils::mimeTypeFromString(mimeType); + + + QString destDirectory; + if (UBMimeType::Video == itemMimeType) + destDirectory = UBPersistenceManager::videoDirectory; + else + if (UBMimeType::Audio == itemMimeType) + destDirectory = UBPersistenceManager::audioDirectory; + + if (mDesc.originalSrcUrl.isEmpty()) + mDesc.originalSrcUrl = mDesc.srcUrl; + + QString uuid = QUuid::createUuid(); + UBPersistenceManager::persistenceManager()->addFileToDocument(UBApplication::boardController->selectedDocument(), + QUrl(mDesc.srcUrl).toLocalFile(), + destDirectory, + uuid, + mTo, + NULL); + + if (m_bAborting) + { + if (QFile::exists(mTo)) + QFile::remove(mTo); + } + else + emit signal_asyncCopyFinished(mDesc.id, !mTo.isEmpty(), QUrl::fromLocalFile(mTo), QUrl::fromLocalFile(mDesc.originalSrcUrl), "", NULL, mDesc.pos, mDesc.size, mDesc.isBackground); +} + +void UBAsyncLocalFileDownloader::abort() +{ + m_bAborting = true; +} + /** The unique instance of the download manager */ static UBDownloadManager* pInstance = NULL; @@ -100,7 +167,7 @@ void UBDownloadManager::init() { mCrntDL.clear(); mPendingDL.clear(); - mReplies.clear(); + mDownloads.clear(); mLastID = 1; mDLAvailability.clear(); for(int i=0; iget(url, desc.pos, desc.size, desc.isBackground); + if (desc.srcUrl.startsWith("file://") || desc.srcUrl.startsWith("/")) + { + UBAsyncLocalFileDownloader * cpHelper = new UBAsyncLocalFileDownloader(desc, this); + connect(cpHelper, SIGNAL(signal_asyncCopyFinished(int, bool, QUrl, QUrl, QString, QByteArray, QPointF, QSize, bool)), this, SLOT(onDownloadFinished(int, bool, QUrl, QUrl,QString, QByteArray, QPointF, QSize, bool))); + QObject *res = dynamic_cast(cpHelper->download()); + if (!res) + delete res; + else + mDownloads[desc.id] = res; + } + else + { + UBDownloadHttpFile* http = new UBDownloadHttpFile(desc.id, this); + connect(http, SIGNAL(downloadProgress(int, qint64,qint64)), this, SLOT(onDownloadProgress(int,qint64,qint64))); + connect(http, SIGNAL(downloadFinished(int, bool, QUrl, QUrl, QString, QByteArray, QPointF, QSize, bool)), this, SLOT(onDownloadFinished(int, bool, QUrl, QUrl, QString, QByteArray, QPointF, QSize, bool))); + + //the desc.srcUrl is encoded. So we have to decode it before. + QUrl url; + url.setEncodedUrl(desc.srcUrl.toUtf8()); + // We send here the request and store its reply in order to be able to cancel it if needed + mDownloads[desc.id] = dynamic_cast(http->get(url, desc.pos, desc.size, desc.isBackground)); + } } /** @@ -356,10 +437,18 @@ void UBDownloadManager::checkIfModalRemains() void UBDownloadManager::cancelDownloads() { // Stop the current downloads - QMap::iterator it = mReplies.begin(); - for(; it!=mReplies.end();it++) + QMap::iterator it = mDownloads.begin(); + for(; it!=mDownloads.end();it++) { - dynamic_cast(it.value())->abort(); + QNetworkReply *netReply = dynamic_cast(it.value()); + if (netReply) + netReply->abort(); + else + { + UBAsyncLocalFileDownloader *localDownload = dynamic_cast(it.value()); + if (localDownload) + localDownload->abort(); + } } // Clear all the lists @@ -372,7 +461,8 @@ void UBDownloadManager::cancelDownloads() void UBDownloadManager::onDownloadError(int id) { - QNetworkReply* pReply = mReplies.value(id); + QNetworkReply *pReply = dynamic_cast(mDownloads.value(id)); + if(NULL != pReply) { // Check which error occured: @@ -402,9 +492,25 @@ void UBDownloadManager::finishDownloads(bool cancel) void UBDownloadManager::cancelDownload(int id) { + if (!mDownloads.size()) + return; + // Stop the download - mReplies[id]->abort(); - mReplies.remove(id); + + QNetworkReply *pNetworkDownload = dynamic_cast(mDownloads[id]); + if (pNetworkDownload) + pNetworkDownload->abort(); + else + { + UBAsyncLocalFileDownloader *pLocalDownload = dynamic_cast(mDownloads[id]); + if (pLocalDownload) + { + if (pLocalDownload->isRunning()) + pLocalDownload->abort(); + } + } + + mDownloads.remove(id); // Remove the canceled download from the download lists bool bFound = false; @@ -494,7 +600,7 @@ void UBDownloadHttpFile::onDownloadFinished(bool pSuccess, QUrl sourceUrl, QStri if(pSuccess) { // Notify the end of the download - emit downloadFinished(mId, pSuccess, sourceUrl, pContentTypeHeader, pData, pPos, pSize, isBackground); + emit downloadFinished(mId, pSuccess, sourceUrl, sourceUrl, pContentTypeHeader, pData, pPos, pSize, isBackground); } else { diff --git a/src/core/UBDownloadManager.h b/src/core/UBDownloadManager.h index 2b5c52c0..cefa8f40 100644 --- a/src/core/UBDownloadManager.h +++ b/src/core/UBDownloadManager.h @@ -52,7 +52,8 @@ struct sDownloadFileDesc int id; int totalSize; int currentSize; - QString url; + QString srcUrl; + QString originalSrcUrl; QString contentTypeHeader; bool modal; QPointF pos; // For board drop only @@ -75,7 +76,7 @@ public: signals: void downloadProgress(int id, qint64 current,qint64 total); - void downloadFinished(int id, bool pSuccess, QUrl sourceUrl, QString pContentTypeHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground); + void downloadFinished(int id, bool pSuccess, QUrl sourceUrl, QUrl contentUrl, QString pContentTypeHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground); void downloadError(int id); private slots: @@ -86,6 +87,28 @@ private: int mId; }; +class UBAsyncLocalFileDownloader : public QThread +{ + Q_OBJECT +public: + UBAsyncLocalFileDownloader(sDownloadFileDesc desc, QObject *parent = 0); + + UBAsyncLocalFileDownloader *download(); + void run(); + void abort(); + +signals: + void finished(QString srcUrl, QString resUrl); + void signal_asyncCopyFinished(int id, bool pSuccess, QUrl sourceUrl, QUrl contentUrl, QString pContentTypeHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground); + + +private: + sDownloadFileDesc mDesc; + bool m_bAborting; + QString mFrom; + QString mTo; +}; + class UBDownloadManager : public QObject { Q_OBJECT @@ -108,7 +131,7 @@ signals: void downloadFinished(bool pSuccess, int id, QUrl sourceUrl, QString pContentTypeHeader, QByteArray pData); void downloadFinished(bool pSuccess, sDownloadFileDesc desc, QByteArray pData); void downloadModalFinished(); - void addDownloadedFileToBoard(bool pSuccess, QUrl sourceUrl, QString pContentTypeHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground); + void addDownloadedFileToBoard(bool pSuccess, QUrl sourceUrl, QUrl contentUrl, QString pContentTypeHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground); void addDownloadedFileToLibrary(bool pSuccess, QUrl sourceUrl, QString pContentTypeHeader, QByteArray pData); void cancelAllDownloads(); void allDownloadsFinished(); @@ -116,7 +139,7 @@ signals: private slots: void onUpdateDownloadLists(); void onDownloadProgress(int id, qint64 received, qint64 total); - void onDownloadFinished(int id, bool pSuccess, QUrl sourceUrl, QString pContentTypeHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground); + void onDownloadFinished(int id, bool pSuccess, QUrl sourceUrl, QUrl contentUrl, QString pContentTypeHeader, QByteArray pData, QPointF pPos, QSize pSize, bool isBackground); void onDownloadError(int id); private: @@ -138,7 +161,7 @@ private: /** The current download availability (-1 = free, otherwise the file ID is recorded)*/ QVector mDLAvailability; /** A map containing the replies of the GET operations */ - QMap mReplies; + QMap mDownloads; }; #endif // UBDOWNLOADMANAGER_H diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 21733038..f1806705 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -265,7 +265,7 @@ UBDocumentProxy* UBPersistenceManager::createDocument(const QString& pGroupName, return doc; } -UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName, const QString& pName, bool withEmptyPage) +UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName, const QString& pName, bool withEmptyPage, bool addTitlePage) { checkIfDocumentRepositoryExists(); @@ -280,7 +280,8 @@ UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDoc { doc->setMetaData(UBSettings::documentName, pName); } - if (withEmptyPage) createDocumentSceneAt(doc, 0); + if(withEmptyPage) createDocumentSceneAt(doc, 0); + if(addTitlePage) persistDocumentScene(doc, mSceneCache.createScene(doc, 0, false), 0); QMap metadatas = UBMetadataDcSubsetAdaptor::load(pDocumentDirectory); @@ -463,11 +464,6 @@ void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QL } } - - foreach(int index, compactedIndexes) - { - emit documentSceneDeleted(proxy, index); - } } @@ -576,8 +572,6 @@ void UBPersistenceManager::moveSceneToIndex(UBDocumentProxy* proxy, int source, thumb.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", target)); mSceneCache.moveScene(proxy, source, target); - - emit documentSceneMoved(proxy, target); } @@ -612,7 +606,7 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBBoardPaletteManager* paletteManager = UBApplication::boardController->paletteManager(); bool teacherGuideModified = false; - if(paletteManager->teacherGuideDockWidget()) + if(UBApplication::app()->boardController->currentPage() == pSceneIndex && paletteManager->teacherGuideDockWidget()) teacherGuideModified = paletteManager->teacherGuideDockWidget()->teacherGuideWidget()->isModified(); if (pDocumentProxy->isModified() || teacherGuideModified) @@ -628,8 +622,6 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, } mSceneCache.insert(pDocumentProxy, pSceneIndex, pScene); - - emit documentCommitted(pDocumentProxy); } diff --git a/src/core/UBPersistenceManager.h b/src/core/UBPersistenceManager.h index c38e9895..6a514bcb 100644 --- a/src/core/UBPersistenceManager.h +++ b/src/core/UBPersistenceManager.h @@ -47,7 +47,7 @@ class UBPersistenceManager : public QObject static void destroy(); 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* createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = false, bool addTitlePage = false); virtual UBDocumentProxy* persistDocumentMetadata(UBDocumentProxy* pDocumentProxy); @@ -117,13 +117,10 @@ class UBPersistenceManager : public QObject void documentCreated(UBDocumentProxy* pDocumentProxy); void documentMetadataChanged(UBDocumentProxy* pDocumentProxy); - void documentCommitted(UBDocumentProxy* pDocumentProxy); void documentWillBeDeleted(UBDocumentProxy* pDocumentProxy); void documentSceneCreated(UBDocumentProxy* pDocumentProxy, int pIndex); - void documentSceneMoved(UBDocumentProxy* pDocumentProxy, int pIndex); void documentSceneWillBeDeleted(UBDocumentProxy* pDocumentProxy, int pIndex); - void documentSceneDeleted(UBDocumentProxy* pDocumentProxy, int pDeletedIndex); private: diff --git a/src/core/main.cpp b/src/core/main.cpp index 28a631b7..55c4e0a8 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -129,7 +129,7 @@ int main(int argc, char *argv[]) QObject::connect(&app, SIGNAL(messageReceived(const QString&)), &app, SLOT(handleOpenMessage(const QString&))); - qDebug() << fileToOpen; + qDebug() << "file name argument" << fileToOpen; int result = app.exec(fileToOpen); app.cleanup(); diff --git a/src/document/UBDocumentContainer.cpp b/src/document/UBDocumentContainer.cpp index ce8549a7..3fe49207 100644 --- a/src/document/UBDocumentContainer.cpp +++ b/src/document/UBDocumentContainer.cpp @@ -94,7 +94,6 @@ void UBDocumentContainer::updatePage(int index) void UBDocumentContainer::deleteThumbPage(int index) { mDocumentThumbs.removeAt(index); - emit documentPageDeleted(index); } void UBDocumentContainer::updateThumbPage(int index) @@ -106,7 +105,6 @@ void UBDocumentContainer::updateThumbPage(int index) void UBDocumentContainer::insertThumbPage(int index) { mDocumentThumbs.insert(index, UBThumbnailAdaptor::get(mCurrentDocument, index)); - emit documentPageAdded(index); } void UBDocumentContainer::reloadThumbnails() diff --git a/src/document/UBDocumentContainer.h b/src/document/UBDocumentContainer.h index b1c2aba1..d5694ae0 100644 --- a/src/document/UBDocumentContainer.h +++ b/src/document/UBDocumentContainer.h @@ -58,8 +58,6 @@ class UBDocumentContainer : public QObject signals: void documentSet(UBDocumentProxy* document); - void documentPageAdded(int index); - void documentPageDeleted(int index); void documentPageUpdated(int index); void documentThumbnailsUpdated(UBDocumentContainer* source); }; diff --git a/src/domain/UBGraphicsDelegateFrame.cpp b/src/domain/UBGraphicsDelegateFrame.cpp index 89d1e95f..cc0505cd 100644 --- a/src/domain/UBGraphicsDelegateFrame.cpp +++ b/src/domain/UBGraphicsDelegateFrame.cpp @@ -563,8 +563,7 @@ void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) mTranslateX += fixedPoint.x() - bottomRight.x(); mTranslateY += fixedPoint.y() - bottomRight.y(); } - else if (moving() || rotating()) - delegated()->setTransform(tr); + delegated()->setTransform(buildTransform()); } else // resizing/resizing horizontally { diff --git a/src/domain/UBGraphicsItemDelegate.cpp b/src/domain/UBGraphicsItemDelegate.cpp index 0b23509f..a1d57202 100644 --- a/src/domain/UBGraphicsItemDelegate.cpp +++ b/src/domain/UBGraphicsItemDelegate.cpp @@ -58,6 +58,7 @@ DelegateButton::DelegateButton(const QString & fileName, QGraphicsItem* pDelegat { setAcceptedMouseButtons(Qt::LeftButton); setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); + setCacheMode(QGraphicsItem::NoCache); /* because of SANKORE-1017: this allows pixmap to be refreshed when grabbing window, thus teacher screen is synchronized with main screen. */ } DelegateButton::~DelegateButton() diff --git a/src/domain/UBGraphicsMediaItem.cpp b/src/domain/UBGraphicsMediaItem.cpp index 1faba0ce..9d3c8705 100644 --- a/src/domain/UBGraphicsMediaItem.cpp +++ b/src/domain/UBGraphicsMediaItem.cpp @@ -73,7 +73,11 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte mMediaObject = new Phonon::MediaObject(this); - if (pMediaFileUrl.toLocalFile().contains("videos")) + QString mediaPath = pMediaFileUrl.toString(); + if ("" == mediaPath) + mediaPath = pMediaFileUrl.toLocalFile(); + + if (mediaPath.toLower().contains("videos")) { mMediaType = mediaType_Video; @@ -91,7 +95,7 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte haveLinkedImage = true; } else - if (pMediaFileUrl.toLocalFile().contains("audios")) + if (mediaPath.toLower().contains("audios")) { mMediaType = mediaType_Audio; mAudioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this); @@ -191,7 +195,7 @@ void UBGraphicsMediaItem::setSourceUrl(const QUrl &pSourceUrl) UBAudioPresentationWidget* pAudioWidget = dynamic_cast(mAudioWidget); if (pAudioWidget) { - pAudioWidget->setTitle(UBFileSystemUtils::lastPathComponent(pSourceUrl.toString())); + pAudioWidget->setTitle(UBFileSystemUtils::lastPathComponent(pSourceUrl.toLocalFile())); } UBItem::setSourceUrl(pSourceUrl); diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 90b40f61..621dc9a4 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -39,6 +39,7 @@ #include "tools/UBGraphicsTriangle.h" #include "tools/UBGraphicsCurtainItem.h" #include "tools/UBGraphicsCache.h" +#include "tools/UBGraphicsAristo.h" #include "document/UBDocumentProxy.h" @@ -581,8 +582,8 @@ bool UBGraphicsScene::inputDeviceRelease() addItem(pStrokes); mDrawWithCompass = false; - }else if (mCurrentStroke) - { + } + else if (mCurrentStroke){ UBGraphicsStrokesGroup* pStrokes = new UBGraphicsStrokesGroup(); // Remove the strokes that were just drawn here and replace them by a stroke item @@ -628,8 +629,8 @@ bool UBGraphicsScene::inputDeviceRelease() if (mCurrentStroke && mCurrentStroke->polygons().empty()){ delete mCurrentStroke; + mCurrentStroke = NULL; } - mCurrentStroke = NULL; return accepted; } @@ -1216,6 +1217,11 @@ void UBGraphicsScene::textUndoCommandAdded(UBGraphicsTextItem *textItem) } UBGraphicsMediaItem* UBGraphicsScene::addMedia(const QUrl& pMediaFileUrl, bool shouldPlayAsap, const QPointF& pPos) { + qDebug() << pMediaFileUrl.toLocalFile(); + if (!QFile::exists(pMediaFileUrl.toLocalFile())) + if (!QFile::exists(pMediaFileUrl.toString())) + return NULL; + UBGraphicsMediaItem* mediaItem = new UBGraphicsMediaItem(pMediaFileUrl); if(mediaItem){ connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), mediaItem, SLOT(activeSceneChanged())); @@ -1310,7 +1316,7 @@ void UBGraphicsScene::addGraphicsWidget(UBGraphicsWidgetItem* graphicsWidget, co if (graphicsWidget->canBeContent()) { -// graphicsWidget->widgetWebView()->loadMainHtml(); + graphicsWidget->loadMainHtml(); graphicsWidget->setSelected(true); if (mUndoRedoStackEnabled) { //should be deleted after scene own undo stack implemented @@ -1602,6 +1608,9 @@ void UBGraphicsScene::removeItem(QGraphicsItem* item) --mItemCount; mFastAccessItems.removeAll(item); + /* delete the item if it is cache to allow its reinstanciation, because Cache implements design pattern Singleton. */ + if (dynamic_cast(item)) + UBCoreGraphicsScene::deleteItem(item); } void UBGraphicsScene::removeItems(const QSet& items) @@ -1937,19 +1946,35 @@ void UBGraphicsScene::addCompass(QPointF center) compass->setVisible(true); } -void UBGraphicsScene::addCache() +void UBGraphicsScene::addAristo(QPointF center) { - UBGraphicsCache* cache = new UBGraphicsCache(); - mTools << cache; + UBGraphicsAristo* aristo = new UBGraphicsAristo(); + mTools << aristo; - addItem(cache); + aristo->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); - cache->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); + addItem(aristo); - cache->setVisible(true); - cache->setSelected(true); - UBApplication::boardController->notifyCache(true); - UBApplication::boardController->notifyPageChanged(); + QPointF itemSceneCenter = aristo->sceneBoundingRect().center(); + aristo->moveBy(center.x() - itemSceneCenter.x(), center.y() - itemSceneCenter.y()); + + aristo->setVisible(true); + setModified(true); +} + +void UBGraphicsScene::addCache() +{ + UBGraphicsCache* cache = UBGraphicsCache::instance(this); + if (!items().contains(cache)) { + addItem(cache); + + cache->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); + + cache->setVisible(true); + cache->setSelected(true); + UBApplication::boardController->notifyCache(true); + UBApplication::boardController->notifyPageChanged(); + } } void UBGraphicsScene::addMask(const QPointF ¢er) @@ -2277,10 +2302,12 @@ void UBGraphicsScene::setToolCursor(int tool) if (mCurrentStroke && mCurrentStroke->polygons().empty()){ delete mCurrentStroke; + mCurrentStroke = NULL; } - mCurrentStroke = NULL; + } -void UBGraphicsScene::initStroke(){ +void UBGraphicsScene::initStroke() +{ mCurrentStroke = new UBGraphicsStroke(); } diff --git a/src/domain/UBGraphicsScene.h b/src/domain/UBGraphicsScene.h index 1c9c847f..6d496369 100644 --- a/src/domain/UBGraphicsScene.h +++ b/src/domain/UBGraphicsScene.h @@ -216,6 +216,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem void addCompass(QPointF center); void addTriangle(QPointF center); void addMagnifier(UBMagnifierParams params); + void addAristo(QPointF center); void addMask(const QPointF ¢er = QPointF()); void addCache(); diff --git a/src/domain/UBGraphicsWidgetItem.cpp b/src/domain/UBGraphicsWidgetItem.cpp index 5bd2b725..53ecc53a 100644 --- a/src/domain/UBGraphicsWidgetItem.cpp +++ b/src/domain/UBGraphicsWidgetItem.cpp @@ -563,7 +563,8 @@ void UBGraphicsWidgetItem::injectInlineJavaScript() void UBGraphicsWidgetItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { - if (scene()->renderingContext() != UBGraphicsScene::Screen) + + if (scene() && scene()->renderingContext() != UBGraphicsScene::Screen) { painter->drawPixmap(0, 0, snapshot()); } @@ -622,52 +623,52 @@ void UBGraphicsWidgetItem::mainFrameLoadFinished (bool ok) update(boundingRect()); } -void UBGraphicsWidgetItem::wheelEvent(QGraphicsSceneWheelEvent *event) -{ - if (Delegate()->weelEvent(event)) - { - QGraphicsWebView::wheelEvent(event); - event->accept(); - } -} - -QVariant UBGraphicsWidgetItem::itemChange(GraphicsItemChange change, const QVariant &value) -{ - if ((change == QGraphicsItem::ItemSelectedHasChanged) && scene()) { - if (isSelected()) - scene()->setActiveWindow(this); - else - if(scene()->activeWindow() == this) - scene()->setActiveWindow(0); - } - - QVariant newValue = Delegate()->itemChange(change, value); - return QGraphicsWebView::itemChange(change, newValue); -} - -void UBGraphicsWidgetItem::resize(qreal w, qreal h) -{ - UBGraphicsWidgetItem::resize(QSizeF(w, h)); -} - - -void UBGraphicsWidgetItem::resize(const QSizeF & pSize) -{ - if (pSize != size()) { - QGraphicsWebView::setMaximumSize(pSize.width(), pSize.height()); - QGraphicsWebView::resize(pSize.width(), pSize.height()); - if (Delegate()) - Delegate()->positionHandles(); - if (scene()) - scene()->setModified(true); - } -} - -QSizeF UBGraphicsWidgetItem::size() const -{ - return QGraphicsWebView::size(); -} - +void UBGraphicsWidgetItem::wheelEvent(QGraphicsSceneWheelEvent *event) +{ + if (Delegate()->weelEvent(event)) + { + QGraphicsWebView::wheelEvent(event); + event->accept(); + } +} + +QVariant UBGraphicsWidgetItem::itemChange(GraphicsItemChange change, const QVariant &value) +{ + if ((change == QGraphicsItem::ItemSelectedHasChanged) && scene()) { + if (isSelected()) + scene()->setActiveWindow(this); + else + if(scene()->activeWindow() == this) + scene()->setActiveWindow(0); + } + + QVariant newValue = Delegate()->itemChange(change, value); + return QGraphicsWebView::itemChange(change, newValue); +} + +void UBGraphicsWidgetItem::resize(qreal w, qreal h) +{ + UBGraphicsWidgetItem::resize(QSizeF(w, h)); +} + + +void UBGraphicsWidgetItem::resize(const QSizeF & pSize) +{ + if (pSize != size()) { + QGraphicsWebView::setMaximumSize(pSize.width(), pSize.height()); + QGraphicsWebView::resize(pSize.width(), pSize.height()); + if (Delegate()) + Delegate()->positionHandles(); + if (scene()) + scene()->setModified(true); + } +} + +QSizeF UBGraphicsWidgetItem::size() const +{ + return QGraphicsWebView::size(); +} + UBGraphicsAppleWidgetItem::UBGraphicsAppleWidgetItem(const QUrl& pWidgetUrl, QGraphicsItem *parent) diff --git a/src/frameworks/UBFileSystemUtils.cpp b/src/frameworks/UBFileSystemUtils.cpp index 36a61945..2bde7364 100644 --- a/src/frameworks/UBFileSystemUtils.cpp +++ b/src/frameworks/UBFileSystemUtils.cpp @@ -19,7 +19,6 @@ #include "core/UBApplication.h" -#include "board/UBBoardController.h" #include "document/UBDocumentContainer.h" #include "globals/UBGlobals.h" @@ -854,5 +853,4 @@ QString UBFileSystemUtils::readTextFile(QString path) } return ""; -} - +} \ No newline at end of file diff --git a/src/frameworks/UBFileSystemUtils.h b/src/frameworks/UBFileSystemUtils.h index 13c82dbf..6a0597f6 100644 --- a/src/frameworks/UBFileSystemUtils.h +++ b/src/frameworks/UBFileSystemUtils.h @@ -17,14 +17,17 @@ #define UBFILESYSTEMUTILS_H_ #include +#include #include "core/UB.h" class QuaZipFile; class UBProcessingProgressListener; -class UBFileSystemUtils +class UBFileSystemUtils : public QObject { + Q_OBJECT + public: UBFileSystemUtils(); diff --git a/src/frameworks/UBPlatformUtils_linux.cpp b/src/frameworks/UBPlatformUtils_linux.cpp index 8c10c4c9..5566116a 100644 --- a/src/frameworks/UBPlatformUtils_linux.cpp +++ b/src/frameworks/UBPlatformUtils_linux.cpp @@ -17,6 +17,7 @@ #include +#include #include #include diff --git a/src/gui/UBDocumentNavigator.cpp b/src/gui/UBDocumentNavigator.cpp index 90b45615..4faaa83b 100644 --- a/src/gui/UBDocumentNavigator.cpp +++ b/src/gui/UBDocumentNavigator.cpp @@ -89,27 +89,9 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source) { const QPixmap* pix = source->pageAt(i); - QPixmap result(pix->width(),pix->height()); int pageIndex = UBDocumentContainer::pageFromSceneIndex(i); - QPainter composePainter; - composePainter.begin(&result); - composePainter.drawPixmap(QPoint(0,0),*pix); - - if(pageIndex == UBApplication::boardController->currentPage() && - ((pageIndex == 0 && UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()) || - (pageIndex && UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool())) - ) { - if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()){ - QPixmap toque(":images/toque.png"); - composePainter.setOpacity(0.6); - composePainter.drawPixmap(QPoint(pix->width() - toque.width(),0),toque); - } - } - - composePainter.end(); - - UBSceneThumbnailNavigPixmap* pixmapItem = new UBSceneThumbnailNavigPixmap(result, source->selectedDocument(), i); + UBSceneThumbnailNavigPixmap* pixmapItem = new UBSceneThumbnailNavigPixmap(*pix, source->selectedDocument(), i); QString label = pageIndex == 0 ? tr("Title page") : tr("Page %0").arg(pageIndex); UBThumbnailTextItem *labelItem = new UBThumbnailTextItem(label); @@ -128,7 +110,6 @@ void UBDocumentNavigator::generateThumbnails(UBDocumentContainer* source) void UBDocumentNavigator::onScrollToSelectedPage(int index) { - qDebug() << "Selection in widget: " << index; int c = 0; foreach(UBImgTextThumbnailElement el, mThumbsWithLabels) { @@ -286,7 +267,6 @@ void UBDocumentNavigator::mousePressEvent(QMouseEvent *event) break; } } - qDebug() << "Selected Scene: " << index; UBApplication::boardController->setActiveDocumentScene(index); } QGraphicsView::mousePressEvent(event); diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp index ee052027..e5e6ab69 100644 --- a/src/gui/UBFeaturesWidget.cpp +++ b/src/gui/UBFeaturesWidget.cpp @@ -12,10 +12,6 @@ const char *UBFeaturesWidget::objNamePathList = "PathList"; const char *UBFeaturesWidget::objNameFeatureList = "FeatureList"; -const QString UBFeaturesNewFolderDialog::acceptText = tr("Accept"); -const QString UBFeaturesNewFolderDialog::cancelText = tr("Cancel"); -const QString UBFeaturesNewFolderDialog::labelText = tr("Enter a new folder name"); - const QMargins FeatureListMargins(0, 0, 0, 30); const int FeatureListBorderOffset = 10; const char featureTypeSplitter = ':'; @@ -198,7 +194,6 @@ void UBFeaturesWidget::lockIt(bool pLock) mActionBar->setEnabled(!pLock); pathListView->setEnabled(!pLock); centralWidget->setLockedExcludingAdditional(pLock); -// pathListView->setLocked(true); } void UBFeaturesWidget::addToFavorite( const UBFeaturesMimeData * mimeData ) @@ -578,6 +573,9 @@ void UBFeaturesCentralWidget::scanFinished() } UBFeaturesNewFolderDialog::UBFeaturesNewFolderDialog(QWidget *parent) : QWidget(parent) + , acceptText(tr("Accept")) + , cancelText(tr("Cancel")) + , labelText(tr("Enter a new folder name")) { this->setStyleSheet("background:white;"); @@ -1048,8 +1046,8 @@ void UBFeatureProperties::onAddToLib() desc.modal = false; desc.name = QFileInfo( mpElement->getFullPath().toString()).fileName(); qDebug() << desc.name; - desc.url = mpElement->getFullPath().toString(); - qDebug() << desc.url; + desc.srcUrl = mpElement->getFullPath().toString(); + qDebug() << desc.srcUrl; UBDownloadManager::downloadManager()->addFileToDownload(desc); } } diff --git a/src/gui/UBFeaturesWidget.h b/src/gui/UBFeaturesWidget.h index a86f6697..e4fb9775 100644 --- a/src/gui/UBFeaturesWidget.h +++ b/src/gui/UBFeaturesWidget.h @@ -193,9 +193,9 @@ public: void setLockedExcludingAdditional(bool pLock); QStackedWidget *mStackedWidget; - UBFeaturesNavigatorWidget *mNavigator; - UBFeatureProperties *mFeatureProperties; - UBFeaturesWebView *webView; + UBFeaturesNavigatorWidget *mNavigator; + UBFeatureProperties *mFeatureProperties; + UBFeaturesWebView *webView; QStackedWidget *mAdditionalDataContainer; @@ -226,10 +226,6 @@ class UBFeaturesNewFolderDialog : public QWidget Q_OBJECT public: - static const QString acceptText; - static const QString cancelText; - static const QString labelText; - UBFeaturesNewFolderDialog(QWidget *parent = 0); void setRegexp(const QRegExp pRegExp); bool validString(const QString &pStr); @@ -249,7 +245,9 @@ private: QRegExpValidator *mValidator; QStringList mFileNameList; QPushButton *acceptButton; - + const QString acceptText; + const QString cancelText; + const QString labelText; }; class UBFeaturesProgressInfo: public QWidget { diff --git a/src/gui/UBTeacherGuideWidgetsTools.cpp b/src/gui/UBTeacherGuideWidgetsTools.cpp index 0a6a0121..db2d8bf7 100644 --- a/src/gui/UBTeacherGuideWidgetsTools.cpp +++ b/src/gui/UBTeacherGuideWidgetsTools.cpp @@ -230,10 +230,8 @@ void UBTGAdaptableText::bottomMargin(int newValue) void UBTGAdaptableText::focusInEvent(QFocusEvent* e) { - qDebug() << "pippa"; if(isReadOnly()){ e->ignore(); - qDebug() << "ignored"; } managePlaceholder(true); QTextEdit::focusInEvent(e); @@ -247,7 +245,6 @@ void UBTGAdaptableText::focusOutEvent(QFocusEvent* e){ void UBTGAdaptableText::managePlaceholder(bool focus){ if(focus){ if(toPlainText() == mPlaceHolderText){ - qDebug() << "Place holder found"; setTextColor(QColor(Qt::black)); setPlainText(""); } diff --git a/src/gui/UBToolWidget.cpp b/src/gui/UBToolWidget.cpp index 5b8a601b..84afd33d 100644 --- a/src/gui/UBToolWidget.cpp +++ b/src/gui/UBToolWidget.cpp @@ -32,32 +32,32 @@ QPixmap* UBToolWidget::sClosePixmap = 0; QPixmap* UBToolWidget::sUnpinPixmap = 0; -UBToolWidget::UBToolWidget(const QUrl& pUrl, QGraphicsItem *pParent) - : QGraphicsWidget(pParent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) +UBToolWidget::UBToolWidget(const QUrl& pUrl, QWidget *pParent) + : QWidget(pParent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) , mShouldMoveWidget(false) , mContentMargin(0) , mFrameWidth(0) - , mGraphicsWebView(0) - , mGraphicsWidgetItem(0) + , mWebView(0) + , mToolWidget(0) { int widgetType = UBGraphicsWidgetItem::widgetType(pUrl); if (widgetType == UBWidgetType::Apple) - mGraphicsWidgetItem = new UBGraphicsAppleWidgetItem(pUrl, this); + mToolWidget = new UBGraphicsAppleWidgetItem(pUrl); else if (widgetType == UBWidgetType::W3C) - mGraphicsWidgetItem = new UBGraphicsW3CWidgetItem(pUrl, this); + mToolWidget = new UBGraphicsW3CWidgetItem(pUrl); else qDebug() << "UBToolWidget::UBToolWidget: Unknown widget Type"; initialize(); } -UBToolWidget::UBToolWidget(UBGraphicsWidgetItem *pWidget, QGraphicsItem *pParent) - : QGraphicsWidget(pParent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) +UBToolWidget::UBToolWidget(UBGraphicsWidgetItem *pWidget, QWidget *pParent) + : QWidget(pParent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) , mShouldMoveWidget(false) , mContentMargin(0) , mFrameWidth(0) - , mGraphicsWebView(0) - , mGraphicsWidgetItem(pWidget) + , mWebView(0) + , mToolWidget(pWidget) { initialize(); javaScriptWindowObjectCleared(); @@ -76,50 +76,66 @@ void UBToolWidget::initialize() if(!sUnpinPixmap) sUnpinPixmap = new QPixmap(":/images/unpin.svg"); - UBGraphicsScene *wscene = dynamic_cast(mGraphicsWidgetItem->scene()); + UBGraphicsScene *wscene = dynamic_cast(mToolWidget->scene()); if (wscene) { - wscene->removeItemFromDeletion(mGraphicsWidgetItem); - wscene->removeItem(mGraphicsWidgetItem); + wscene->removeItemFromDeletion(mToolWidget); + wscene->removeItem(mToolWidget); } - mGraphicsWidgetItem->setParent(this); - - QGraphicsLinearLayout *graphicsLayout = new QGraphicsLinearLayout(Qt::Vertical, this); + mWebView = new QWebView(this); + + QPalette palette = mWebView->page()->palette(); + palette.setBrush(QPalette::Base, QBrush(Qt::transparent)); + mWebView->page()->setPalette(palette); + + + mWebView->installEventFilter(this); + mFrameWidth = UBSettings::settings()->objectFrameWidth; mContentMargin = sClosePixmap->width() / 2 + mFrameWidth; - graphicsLayout->setContentsMargins(mContentMargin, mContentMargin, mContentMargin, mContentMargin); - setPreferredSize(mGraphicsWidgetItem->preferredWidth() + mContentMargin * 2, mGraphicsWidgetItem->preferredHeight() + mContentMargin * 2); + setLayout(new QVBoxLayout()); + layout()->setContentsMargins(mContentMargin, mContentMargin, mContentMargin, mContentMargin); + layout()->addWidget(mWebView); - mGraphicsWebView = new QGraphicsWebView(this); - connect(mGraphicsWebView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared())); - mGraphicsWebView->load(mGraphicsWidgetItem->mainHtml()); - graphicsLayout->addItem(mGraphicsWebView); + setFixedSize(mToolWidget->boundingRect().width() + mContentMargin * 2, mToolWidget->boundingRect().height() + mContentMargin * 2); - mGraphicsWebView->setAcceptDrops(false); - mGraphicsWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); - mGraphicsWebView->setAttribute(Qt::WA_OpaquePaintEvent, false); + connect(mWebView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared())); + mWebView->load(mToolWidget->mainHtml()); - QPalette palette = mGraphicsWebView->page()->palette(); - palette.setBrush(QPalette::Base, QBrush(Qt::transparent)); - mGraphicsWebView->page()->setPalette(palette); - setLayout(graphicsLayout); + mWebView->setAcceptDrops(false); + mWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); + mWebView->setAttribute(Qt::WA_OpaquePaintEvent, false); + connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(javaScriptWindowObjectCleared())); } -bool UBToolWidget::event(QEvent *event) + +bool UBToolWidget::eventFilter(QObject *obj, QEvent *event) { - if (event->type() == QEvent::ShortcutOverride) - event->accept(); - return QGraphicsWidget::event(event); + if (mShouldMoveWidget && obj == mWebView && event->type() == QEvent::MouseMove) + { + QMouseEvent *mouseMoveEvent = static_cast(event); + + if (mouseMoveEvent->buttons() & Qt::LeftButton) + { + move(pos() - mMousePressPos + mWebView->mapTo(this, mouseMoveEvent->pos())); + + event->accept(); + return true; + } + } + + // standard event processing + return QObject::eventFilter(obj, event); } -void UBToolWidget::mousePressEvent(QGraphicsSceneMouseEvent *event) +void UBToolWidget::mousePressEvent(QMouseEvent *event) { - QGraphicsWidget::mousePressEvent(event); + QWidget::mousePressEvent(event); /* did webkit consume the mouse press ? */ mShouldMoveWidget = !event->isAccepted() && (event->buttons() & Qt::LeftButton); @@ -128,108 +144,92 @@ void UBToolWidget::mousePressEvent(QGraphicsSceneMouseEvent *event) update(); } -void UBToolWidget::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +void UBToolWidget::mouseMoveEvent(QMouseEvent *event) { if(mShouldMoveWidget && (event->buttons() & Qt::LeftButton)) { - setPos(pos() - mMousePressPos + event->pos()); + move(pos() - mMousePressPos + event->pos()); event->accept(); } - QGraphicsWidget::mouseMoveEvent(event); + QWidget::mouseMoveEvent(event); } -void UBToolWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +void UBToolWidget::mouseReleaseEvent(QMouseEvent *event) { mShouldMoveWidget = false; if (event->pos().x() >= 0 && event->pos().x() < sClosePixmap->width() && event->pos().y() >= 0 && event->pos().y() < sClosePixmap->height()) { - remove(); + UBApplication::boardController->removeTool(this); event->accept(); } - else if (mGraphicsWidgetItem->canBeContent() && event->pos().x() >= mContentMargin && event->pos().x() < mContentMargin + sUnpinPixmap->width() && event->pos().y() >= 0 && event->pos().y() < sUnpinPixmap->height()) { + else if (mToolWidget->canBeContent() && event->pos().x() >= mContentMargin && event->pos().x() < mContentMargin + sUnpinPixmap->width() && event->pos().y() >= 0 && event->pos().y() < sUnpinPixmap->height()) { UBApplication::boardController->moveToolWidgetToScene(this); event->accept(); } else - QGraphicsWidget::mouseReleaseEvent(event); /* don't propgate to parent, the widget is deleted in UBApplication */ + QWidget::mouseReleaseEvent(event); /* don't propgate to parent, the widget is deleted in UBApplication */ } -void UBToolWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +void UBToolWidget::paintEvent(QPaintEvent *event) { - QGraphicsWidget::paint(painter, option, widget); - - /* painting lightweight toolbar */ - if (isActiveWindow()) { - painter->setRenderHint(QPainter::Antialiasing); - painter->setPen(Qt::NoPen); - painter->setBrush(QColor(127, 127, 127, 127)); - - painter->drawRoundedRect(QRectF(sClosePixmap->width() / 2, sClosePixmap->height() / 2, preferredWidth() - sClosePixmap->width(), mFrameWidth), mFrameWidth / 2, mFrameWidth / 2); - painter->drawPixmap(0, 0, *sClosePixmap); - if (mGraphicsWidgetItem->canBeContent()) - painter->drawPixmap(mContentMargin, 0, *sUnpinPixmap); + QWidget::paintEvent(event); + + //if (isActiveWindow()) + { + QPainter painter(this); + painter.setRenderHint(QPainter::Antialiasing); + painter.setPen(Qt::NoPen); + painter.setBrush(QColor(127, 127, 127, 127)); + + painter.drawRoundedRect(QRectF(sClosePixmap->width() / 2 + , sClosePixmap->height() / 2 + , width() - sClosePixmap->width() + , mFrameWidth) + , mFrameWidth / 2 + , mFrameWidth / 2); + + painter.drawPixmap(0, 0, *sClosePixmap); + + if (mToolWidget->canBeContent()) + painter.drawPixmap(mContentMargin, 0, *sUnpinPixmap); } } void UBToolWidget::javaScriptWindowObjectCleared() { - UBWidgetUniboardAPI *uniboardAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene(), mGraphicsWidgetItem); + UBWidgetUniboardAPI *uniboardAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene(), mToolWidget); - mGraphicsWebView->page()->mainFrame()->addToJavaScriptWindowObject("sankore", uniboardAPI); + mWebView->page()->mainFrame()->addToJavaScriptWindowObject("sankore", uniboardAPI); - UBGraphicsW3CWidgetItem *graphicsW3cWidgetItem = dynamic_cast(mGraphicsWidgetItem); + UBGraphicsW3CWidgetItem *graphicsW3cWidgetItem = dynamic_cast(mToolWidget); if (graphicsW3cWidgetItem) { UBW3CWidgetAPI* widgetAPI = new UBW3CWidgetAPI(graphicsW3cWidgetItem); - mGraphicsWebView->page()->mainFrame()->addToJavaScriptWindowObject("widget", widgetAPI); + mWebView->page()->mainFrame()->addToJavaScriptWindowObject("widget", widgetAPI); } } -UBGraphicsWidgetItem* UBToolWidget::graphicsWidgetItem() const +UBGraphicsWidgetItem* UBToolWidget::toolWidget() const { - return mGraphicsWidgetItem; + return mToolWidget; } -QPointF UBToolWidget::naturalCenter() const +QPoint UBToolWidget::naturalCenter() const { - if (mGraphicsWebView) - return mGraphicsWebView->geometry().center(); + if (mWebView) + return mWebView->geometry().center(); else - return QPointF(0, 0); -} - -void UBToolWidget::centerOn(const QPointF& pos) -{ - QGraphicsWidget::setPos(pos - QPointF(preferredWidth() / 2, preferredHeight() / 2)); + return QPoint(0, 0); } void UBToolWidget::remove() { - mGraphicsWebView->setHtml(QString()); - scene()->removeItem(this); -} - -UBGraphicsScene* UBToolWidget::scene() -{ - return qobject_cast(QGraphicsItem::scene()); -} - -QPointF UBToolWidget::pos() const -{ - return QPointF(QGraphicsItem::pos().x() + mContentMargin * scale(), QGraphicsItem::pos().y() + mContentMargin * scale()); -} - -void UBToolWidget::setPos(const QPointF &point) -{ - UBToolWidget::setPos(point.x(), point.y()); -} - -void UBToolWidget::setPos(qreal x, qreal y) -{ - QGraphicsItem::setPos(x - mContentMargin * scale(), y - mContentMargin * scale()); + mToolWidget = NULL; + hide(); + deleteLater(); } -int UBToolWidget::type() const +void UBToolWidget::centerOn(const QPoint& pos) { - return Type; + QWidget::move(pos - QPoint(width() / 2, height() / 2)); } diff --git a/src/gui/UBToolWidget.h b/src/gui/UBToolWidget.h index 94939d0f..3e413dff 100644 --- a/src/gui/UBToolWidget.h +++ b/src/gui/UBToolWidget.h @@ -17,60 +17,52 @@ #define UBTOOLWIDGET_H_ #include -#include -#include "core/UB.h" -class UBGraphicsScene; class UBGraphicsWidgetItem; +class QWidget; +class UBGraphicsScene; +class QWebView; -class UBToolWidget : public QGraphicsWidget +class UBToolWidget : public QWidget { - Q_OBJECT + Q_OBJECT; public: - UBToolWidget(const QUrl& pUrl, QGraphicsItem *pParent = 0); - UBToolWidget(UBGraphicsWidgetItem* pGraphicsWidgetItem, QGraphicsItem *pParent = 0); + UBToolWidget(const QUrl& pUrl, QWidget* pParent = 0); + UBToolWidget(UBGraphicsWidgetItem* pWidget, QWidget* pParent = 0); virtual ~UBToolWidget(); - UBGraphicsWidgetItem* graphicsWidgetItem() const; - QPointF naturalCenter() const; - - void centerOn(const QPointF& pos); void remove(); + void centerOn(const QPoint& pos); - virtual UBGraphicsScene* scene(); - virtual QPointF pos() const; - virtual void setPos(const QPointF &point); - virtual void setPos(qreal x, qreal y); - virtual int type() const; - - enum - { - Type = UBGraphicsItemType::ToolWidgetItemType - }; + QPoint naturalCenter() const; + + UBGraphicsWidgetItem *toolWidget() const; protected: void initialize(); + virtual void paintEvent(QPaintEvent *event); + + virtual void mousePressEvent(QMouseEvent *event); + virtual void mouseMoveEvent(QMouseEvent *event); + virtual void mouseReleaseEvent(QMouseEvent *event); - virtual bool event(QEvent *event); - virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); - virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + virtual bool eventFilter(QObject *obj, QEvent *event); private slots: void javaScriptWindowObjectCleared(); protected: - bool mShouldMoveWidget; - int mContentMargin; - int mFrameWidth; - QGraphicsWebView *mGraphicsWebView; - UBGraphicsWidgetItem *mGraphicsWidgetItem; - QPointF mMousePressPos; + QWebView *mWebView; + UBGraphicsWidgetItem *mToolWidget; static QPixmap *sClosePixmap; static QPixmap *sUnpinPixmap; + + QPoint mMousePressPos; + bool mShouldMoveWidget; + int mContentMargin; + int mFrameWidth; }; #endif /* UBTOOLWIDGET_H_ */ diff --git a/src/tools/UBGraphicsAristo.cpp b/src/tools/UBGraphicsAristo.cpp new file mode 100644 index 00000000..61762774 --- /dev/null +++ b/src/tools/UBGraphicsAristo.cpp @@ -0,0 +1,828 @@ +/* + * 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 "UBGraphicsAristo.h" +#include "board/UBBoardController.h" +#include "board/UBDrawingController.h" +#include "core/UBApplication.h" +#include "domain/UBGraphicsScene.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "core/memcheck.h" + +const QRectF UBGraphicsAristo::sDefaultRect = QRectF(0, 0, 800, 500); +const UBGraphicsAristo::Orientation UBGraphicsAristo::sDefaultOrientation = UBGraphicsAristo::Bottom; + +UBGraphicsAristo::UBGraphicsAristo() + : UBAbstractDrawRuler() + , QGraphicsPathItem() + , mMarking(false) + , mResizing(false) + , mRotating(false) + , mOrientation(Undefined) + , mRotatedAngle(0) + , mMarkerAngle(0) + , mStartAngle(0) + , mSpan(180) + , mHFlipSvgItem(0) + , mMarkerSvgItem(0) + , mResizeSvgItem(0) + , mRotateSvgItem(0) +{ + mHFlipSvgItem = new QGraphicsSvgItem(":/images/vflipTool.svg", this); + mHFlipSvgItem->setVisible(false); + mHFlipSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); + + mResizeSvgItem = new QGraphicsSvgItem(":/images/resizeTool.svg", this); + mResizeSvgItem->setVisible(false); + mResizeSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); + + mRotateSvgItem = new QGraphicsSvgItem(":/images/rotateTool.svg", this); + mRotateSvgItem->setVisible(false); + mRotateSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); + + mMarkerSvgItem = new QGraphicsSvgItem(":/images/angleMarker.svg", this); + mMarkerSvgItem->setVisible(false); + mMarkerSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); + mMarkerSvgItem->setVisible(true); + + create(*this); + setBoundingRect(sDefaultRect); + setOrientation(sDefaultOrientation); +} + +UBGraphicsAristo::~UBGraphicsAristo() +{ + /* NOOP */ +} + +/* + * setOrientation() modify the tool orientation. + * makeGeometryChange() is called so points are recomputed, control items are positionnated and shape is determined according to this modification. + */ +void UBGraphicsAristo::setOrientation(Orientation orientation) +{ + mOrientation = orientation; + makeGeometryChange(); +} + +/* calculatePoints() is used to calculate polygon's apexes coordinates. + * This function handles orientation changes too. + */ +void UBGraphicsAristo::calculatePoints() +{ + switch (mOrientation) { + case Bottom: + C.setX(boundingRect().center().x()); + C.setY(boundingRect().bottom()); + + A.setX(boundingRect().left()); + A.setY(boundingRect().bottom() - boundingRect().width() / 2); + + B.setX(boundingRect().right()); + B.setY(boundingRect().bottom() - boundingRect().width() / 2); + break; + case Top: + C.setX(boundingRect().center().x()); + C.setY(boundingRect().top()); + + A.setX(boundingRect().left()); + A.setY(boundingRect().top() + boundingRect().width() / 2); + + B.setX(boundingRect().right()); + B.setY(boundingRect().top() + boundingRect().width() / 2); + break; + default: + break; + } +} + +/* + * setItemsPos() places control items according to A, B and C positions. + * Call this function after A, B or C position modification, mostly after calling calculatePoints(). + * These positions has to be set when calling setPath() to allow hover events on items which are not into the main polygon. + */ +void UBGraphicsAristo::setItemsPos() +{ + mCloseSvgItem->setPos(closeButtonRect().topLeft() + rotationCenter()); + mHFlipSvgItem->setPos(hFlipRect().topLeft() + rotationCenter()); + mRotateSvgItem->setPos(rotateRect().topLeft() + rotationCenter()); + mResizeSvgItem->setPos(resizeButtonRect().topLeft() + rotationCenter()); + mMarkerSvgItem->setPos(markerButtonRect().topLeft() + rotationCenter()); +} + +/* + * determinePath() modify the shape according to apexes coordinates and control item positions. + * This is useful when orientation is modified. + * Returns the painter path corresponding to object parameters. + */ +QPainterPath UBGraphicsAristo::determinePath() +{ + QPainterPath path; + + QPolygonF polygon; + polygon << A << B << C; + path.addPolygon(polygon); + + path.addPath(mResizeSvgItem->shape().translated(mResizeSvgItem->pos())); + path.addPath(mMarkerSvgItem->shape().translated(mMarkerSvgItem->pos())); + + return path; +} + +/* + * setBoundingRect() is a helper to set the given rectangle as the new shape to limit apexes coordinates. + * This is useful when instanciating or resizing the object. + * makeGeometryChange() is called so points are recomputed, control items are positionnated and shape is determined according to this modification. + * Setting bounds' width less than 300 is not allowed. + */ +void UBGraphicsAristo::setBoundingRect(QRectF boundingRect) +{ + if (boundingRect.width() < 300) + return; + + QPainterPath path; + path.addRect(boundingRect); + setPath(path); + if (mOrientation != Undefined) + makeGeometryChange(); +} + +void UBGraphicsAristo::makeGeometryChange() +{ + calculatePoints(); + setItemsPos(); + setPath(determinePath()); +} + + +UBItem* UBGraphicsAristo::deepCopy(void) const +{ + UBGraphicsAristo* copy = new UBGraphicsAristo(); + copyItemParameters(copy); + return copy; +} + +void UBGraphicsAristo::copyItemParameters(UBItem *copy) const +{ + UBGraphicsAristo* cp = dynamic_cast(copy); + if (cp) + { + /* TODO: copy all members */ + cp->setPos(this->pos()); + cp->setTransform(this->transform()); + cp->setBoundingRect(boundingRect()); + cp->setOrientation(mOrientation); + cp->mRotatedAngle = mRotatedAngle; + cp->mMarkerAngle = mMarkerAngle; + } +} + + +void UBGraphicsAristo::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) +{ + QPolygonF polygon; + + painter->setBrush(fillBrush()); + painter->setPen(drawColor()); + + polygon << A << B << C; + painter->drawPolygon(polygon); + polygon.clear(); + + paintGraduations(painter); + paintMarker(painter); +} + +QBrush UBGraphicsAristo::fillBrush() const +{ + QColor fillColor = edgeFillColor();// scene()->isDarkBackground() ? sDarkBackgroundFillColor : sFillColor; + QColor fillColorCenter = middleFillColor();//scene()->isDarkBackground() ? sDarkBackgroundFillColorCenter : sFillColorCenter; + QColor transparentWhite = Qt::white; + transparentWhite.setAlpha(scene()->isDarkBackground() ? sDrawTransparency : sFillTransparency); + QRadialGradient radialGradient(boundingRect().center(), radius(), boundingRect().center()); + radialGradient.setColorAt(0, fillColorCenter); + radialGradient.setColorAt(1, fillColor); + return radialGradient; +} + +/* paintGraduations() paints graduations on the ruler side (length graduations) and the two other sides (angle graduation) */ +void UBGraphicsAristo::paintGraduations(QPainter *painter) +{ + paintRulerGraduations(painter); + paintProtractorGraduations(painter); +} + +void UBGraphicsAristo::paintRulerGraduations(QPainter *painter) +{ + /* defining useful constants */ + const int centimeterGraduationHeight = 15; + const int halfCentimeterGraduationHeight = 10; + const int millimeterGraduationHeight = 5; + const int millimetersPerCentimeter = 10; + const int millimetersPerHalfCentimeter = 5; + + painter->save(); + painter->setFont(font()); + QFontMetricsF fontMetrics(painter->font()); + + /* Browsing milliters in half width of ruler side */ + for (int millimeters = 0; millimeters < (boundingRect().width() / 2 - sLeftEdgeMargin - sRoundingRadius) / sPixelsPerMillimeter; millimeters++) + { + /* defining graduationHeight ; values are different to draw bigger lines if millimiter considered is a centimeter or a half centimeter */ + int graduationHeight = (0 == millimeters % millimetersPerCentimeter) ? + centimeterGraduationHeight : + ((0 == millimeters % millimetersPerHalfCentimeter) ? + halfCentimeterGraduationHeight : millimeterGraduationHeight); + + /* correcting graduationHeight: draw the line in the other direction in case ruler is top-oriented, to stay inside the tool and inside the rect */ + graduationHeight = mOrientation == Bottom ? graduationHeight : - graduationHeight; + + /* drawing graduation to the left and to the right of origin, which is the center of graduated side */ + painter->drawLine(QLine(rotationCenter().x() + sPixelsPerMillimeter * millimeters, rotationCenter().y(), rotationCenter().x() + sPixelsPerMillimeter * millimeters, rotationCenter().y() + graduationHeight)); + if (millimeters != 0) + painter->drawLine(QLine(rotationCenter().x() - sPixelsPerMillimeter * millimeters, rotationCenter().y(), rotationCenter().x() - sPixelsPerMillimeter * millimeters, rotationCenter().y() + graduationHeight)); + + /* drawing associated value if considered graduation is a centimeter */ + if (0 == millimeters % millimetersPerCentimeter) + { + /* defining graduation value */ + QString text = QString("%1").arg((int)(millimeters / millimetersPerCentimeter)); + + /* staying inside polygon */ + if (rotationCenter().x() + sPixelsPerMillimeter * millimeters + fontMetrics.width(text) / 2 < boundingRect().right()) + { + qreal textWidth = fontMetrics.width(text); + qreal textHeight = fontMetrics.tightBoundingRect(text).height() + 5; + + /* text y-coordinate is different according to tool's orientation */ + qreal textY = mOrientation == Bottom ? A.y() + 5 + centimeterGraduationHeight : A.y() - 5 - centimeterGraduationHeight + graduationHeight; + + /* if text's rect is not out of polygon's bounds, drawing value below or above graduation */ + QPointF intersectionPoint; + + bool paint = false; + + if (mOrientation == Bottom && QLineF(QPointF(rotationCenter().x() - sPixelsPerMillimeter * millimeters - textWidth / 2, rotationCenter().y()), QPointF(rotationCenter().x() - sPixelsPerMillimeter * millimeters - textWidth / 2, textY + textHeight)).intersect(QLineF(A, C), &intersectionPoint) != QLineF::BoundedIntersection && QLineF(QPointF(rotationCenter().x() - sPixelsPerMillimeter * millimeters + textWidth / 2, rotationCenter().y()), QPointF(rotationCenter().x() - sPixelsPerMillimeter * millimeters + textWidth / 2, textY + textHeight)).intersect(QLineF(A, C), &intersectionPoint) != QLineF::BoundedIntersection) { + paint = true; + } + else if (mOrientation == Top && QLineF(QPointF(rotationCenter().x() - sPixelsPerMillimeter * millimeters - textWidth / 2, rotationCenter().y()), QPointF(rotationCenter().x() - sPixelsPerMillimeter * millimeters - textWidth / 2, textY - textHeight)).intersect(QLineF(A, C), &intersectionPoint) != QLineF::BoundedIntersection && QLineF(QPointF(rotationCenter().x() - sPixelsPerMillimeter * millimeters + textWidth / 2, rotationCenter().y()), QPointF(rotationCenter().x() - sPixelsPerMillimeter * millimeters + textWidth / 2, textY - textHeight)).intersect(QLineF(A, C), &intersectionPoint) != QLineF::BoundedIntersection) { + paint = true; + } + + if (paint) { + painter->drawText( + QRectF(rotationCenter().x() + sPixelsPerMillimeter * millimeters - textWidth / 2, textY, textWidth, textHeight), + Qt::AlignVCenter, text); + if (millimeters != 0) + painter->drawText( + QRectF(rotationCenter().x() - sPixelsPerMillimeter * millimeters - textWidth / 2, textY, textWidth, textHeight), + Qt::AlignVCenter, text); + } + } + } + } + painter->restore(); +} + +void UBGraphicsAristo::paintProtractorGraduations(QPainter* painter) +{ + /* defining useful constants */ + const int tenDegreeGraduationLength = 15; + const int fiveDegreeGraduationLength = 10; + const int oneDegreeGraduationLength = 5; + + painter->save(); + + QFont font1 = painter->font(); +#ifdef Q_WS_MAC + font1.setPointSizeF(font1.pointSizeF() - 3); +#endif + QFontMetricsF fm1(font1); + + //Font for internal arc + QFont font2 = painter->font(); + font2.setPointSizeF(font1.pointSizeF()/1.5); + QFontMetricsF fm2(font2); + + /* defining virtual arc diameter */ + qreal rad = radius(); + + QPointF center = rotationCenter(); + + /* browsing angles */ + for (int angle = 1; angle < mSpan; angle++) + { + int graduationLength = (0 == angle % 10) ? tenDegreeGraduationLength : ((0 == angle % 5) ? fiveDegreeGraduationLength : oneDegreeGraduationLength); + + qreal co = cos(((qreal)angle + mStartAngle) * PI/180); + qreal si = sin(((qreal)angle + mStartAngle) * PI/180); + + /* inverse sinus according to the orientation, to draw graduations on the polygon */ + si = mOrientation == Bottom ? -si : si; + + /* drawing the graduation around the virtual arc */ + if (angle >= sArcAngleMargin && angle <= mSpan - sArcAngleMargin) + painter->drawLine(QLineF(QPointF(center.x()+ rad/2*co, center.y() - rad/2*si), + QPointF(center.x()+ (rad/2 + graduationLength)*co, + center.y() - (rad/2 + graduationLength)*si))); + + + QPointF intersectionPoint; + QLineF referenceLine; + if (angle < 90) + referenceLine.setP1(B); + else + referenceLine.setP1(A); + referenceLine.setP2(C); + + /* if angle is 10-multiple, drawing it's value, rotated to be easily red */ + if (0 == angle % 10) { + QString grad = QString("%1").arg((int)(angle)); + QString grad2 = QString("%1").arg((int)mSpan - angle); + + painter->setFont(font2); + + painter->save(); + painter->translate(center.x() + (rad/2 + graduationLength*1.5)*co, center.y() - (rad/2 + graduationLength*1.5)*si); + int degrees = mOrientation == Bottom ? angle : -angle; + painter->rotate(-90 + degrees); + painter->drawText(- fm2.width(grad)/2, - fm2.height()/2, fm2.width(grad), fm2.height(), Qt::AlignCenter, grad); + painter->restore(); + + painter->setFont(font1); + + + /* drawing the graduation near tool's side */ + if (QLineF(QPointF(center.x()+ rad/2*co, center.y() - rad/2*si), + QPointF(center.x()+ (rad/2 + graduationLength)*co, + center.y() - (rad/2 + graduationLength)*si)).intersect(referenceLine, &intersectionPoint) == QLineF::UnboundedIntersection) + + painter->drawLine(QLineF(QPointF(center.x() + (rad/2 + graduationLength*1.5 + fm2.width(grad)/2)*co, + center.y() - (rad/2 + graduationLength*1.5 + fm2.height()/2)*si), + intersectionPoint)); + + } + + /* drawing the graduation near tool's side */ + else + if (QLineF(QPointF(center.x()+ rad/2*co, center.y() - rad/2*si), + QPointF(center.x()+ (rad/2 + graduationLength)*co, + center.y() - (rad/2 + graduationLength)*si)).intersect(referenceLine, &intersectionPoint) == QLineF::UnboundedIntersection) + + painter->drawLine(QLineF(QPointF(intersectionPoint.x() - (graduationLength*1.5)*co, + intersectionPoint.y() + (graduationLength*1.5)*si), + intersectionPoint)); + } + + painter->restore(); +} + +/* paintMarker() adjust marker button according to the current angle, draw the line allowing user to set precisely the angle, and draw the current angle's value. */ +void UBGraphicsAristo::paintMarker(QPainter *painter) +{ + /* adjusting marker button */ + mMarkerSvgItem->resetTransform(); + mMarkerSvgItem->translate(-markerButtonRect().left(), -markerButtonRect().top()); + mMarkerSvgItem->rotate(mMarkerAngle); + mMarkerSvgItem->translate(markerButtonRect().left(), markerButtonRect().top()); + + + qreal co = cos((mMarkerAngle) * PI/180); + qreal si = sin((mMarkerAngle) * PI/180); + + /* Setting point composing the line (from point C) which intersects the line we want to draw. */ + QPointF referencePoint; + if (mOrientation == Bottom) { + if ((int)mMarkerAngle % 360 < 90) + referencePoint = B; + else + referencePoint = A; + } + else if (mOrientation == Top) { + if ((int)mMarkerAngle % 360 < 270 && (int)mMarkerAngle % 360 > 0) + referencePoint = A; + else + referencePoint = B; + } + + /* getting intersection point to draw the wanted line */ + QLineF intersectedLine(rotationCenter(), QPointF(rotationCenter().x()+co, rotationCenter().y()+si)); + QPointF intersectionPoint; + if (intersectedLine.intersect(QLineF(referencePoint, C), &intersectionPoint)) + painter->drawLine(QLineF(intersectionPoint, rotationCenter())); + + /* drawing angle value */ + qreal rightAngle = mOrientation == Bottom ? mMarkerAngle : 360 - mMarkerAngle; + + + QString angleText = QString("%1°").arg(rightAngle, 0, 'f', 1); + + QFont font1 = painter->font(); +#ifdef Q_WS_MAC + font1.setPointSizeF(font1.pointSizeF() - 3); +#endif + QFontMetricsF fm1(font1); + + if (mOrientation == Bottom) + painter->drawText(rotationCenter().x() - fm1.width(angleText)/2 - radius()/8, rotationCenter().y() + radius()/8 - fm1.height()/2, fm1.width(angleText), fm1.height(), Qt::AlignCenter, angleText); + else + painter->drawText(rotationCenter().x() - fm1.width(angleText)/2 - radius()/8, rotationCenter().y() - radius()/8 - fm1.height()/2, fm1.width(angleText), fm1.height(), Qt::AlignCenter, angleText); +} + + +void UBGraphicsAristo::rotateAroundCenter(qreal angle) +{ + qreal oldAngle = mRotatedAngle; + mRotatedAngle = angle; + QTransform transform; + rotateAroundCenter(transform, rotationCenter()); + setTransform(transform, true); + mRotatedAngle = oldAngle + angle; // We have to store absolute value for FLIP case +} + +void UBGraphicsAristo::rotateAroundCenter(QTransform& transform, QPointF center) +{ + transform.translate(center.x(), center.y()); + transform.rotate(mRotatedAngle); + transform.translate(- center.x(), - center.y()); +} + +void UBGraphicsAristo::resize(qreal factor) +{ + prepareGeometryChange(); + translate(rotationCenter().x(), rotationCenter().y()); + scale(factor, factor); + translate(-rotationCenter().x(), -rotationCenter().y()); +} + + +QPointF UBGraphicsAristo::rotationCenter() const +{ + return QPointF((A.x() + B.x()) / 2, (A.y() + B.y()) / 2); +} + +QRectF UBGraphicsAristo::closeButtonRect() const +{ + qreal y = radius() / 4 + hFlipRect().height() + 3 + rotateRect().height() + 3; + if (mOrientation == Top) + y = -y; + return QRectF(- mCloseSvgItem->boundingRect().width() / 2, y, mCloseSvgItem->boundingRect().width(), mCloseSvgItem->boundingRect().height()); +} + +QRectF UBGraphicsAristo::hFlipRect() const +{ + qreal y = radius() / 4; + if (mOrientation == Top) + y = -y; + + return QRectF(- mHFlipSvgItem->boundingRect().width() / 2, y, mHFlipSvgItem->boundingRect().width(), mHFlipSvgItem->boundingRect().height()); +} + +QRectF UBGraphicsAristo::markerButtonRect() const +{ + return QRectF (radius()/2 - mMarkerSvgItem->boundingRect().width(), - mMarkerSvgItem->boundingRect().height()/2, mMarkerSvgItem->boundingRect().width(), mMarkerSvgItem->boundingRect().height()); +} + +QRectF UBGraphicsAristo::resizeButtonRect() const +{ + return QRectF((B - rotationCenter()).x() - 100 - mResizeSvgItem->boundingRect().width()/2, - mResizeSvgItem->boundingRect().height()/2, mResizeSvgItem->boundingRect().width(), mResizeSvgItem->boundingRect().height()); +} + +QRectF UBGraphicsAristo::rotateRect() const +{ + qreal y = radius() / 4 + hFlipRect().height() + 3; + if (mOrientation == Top) + y = -y; + return QRectF(- mRotateSvgItem->boundingRect().width() / 2, y, mRotateSvgItem->boundingRect().width(), mRotateSvgItem->boundingRect().height()); + +} + +QCursor UBGraphicsAristo::flipCursor() const +{ + return Qt::ArrowCursor; +} + +QCursor UBGraphicsAristo::markerCursor() const +{ + return Qt::ArrowCursor; +} + +QCursor UBGraphicsAristo::resizeCursor() const +{ + return Qt::ArrowCursor; +} + + +void UBGraphicsAristo::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + switch (toolFromPos(event->pos())) { + case Rotate: + mRotating = true; + event->accept(); + break; + case Resize: + mResizing = true; + event->accept(); + break; + case MoveMarker: + mMarking = true; + event->accept(); + break; + default: + QGraphicsItem::mousePressEvent(event); + break; + } + + mShowButtons = false; + mHFlipSvgItem->setVisible(false); + mCloseSvgItem->setVisible(false); + mRotateSvgItem->setVisible(mRotating); + mResizeSvgItem->setVisible(mResizing); + update(); +} + +void UBGraphicsAristo::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + + if (!mResizing && !mRotating && !mMarking) + { + QGraphicsItem::mouseMoveEvent(event); + } + else + { + QLineF currentLine(rotationCenter(), event->pos()); + QLineF lastLine(rotationCenter(), event->lastPos()); + + if (mRotating) { + + rotateAroundCenter(currentLine.angleTo(lastLine)); + } + else if (mResizing) { + QPointF delta = event->pos() - event->lastPos(); + setBoundingRect(QRectF(boundingRect().topLeft(), QSizeF(boundingRect().width() + delta.x(), boundingRect().height() + delta.x()))); + } + else if(mMarking) { + qreal angle = currentLine.angleTo(lastLine); + + mMarkerAngle += angle; + mMarkerAngle -= (int)(mMarkerAngle/360)*360; + + if (mOrientation == Bottom) { + if (mMarkerAngle >= 270) + mMarkerAngle = 0; + else if (mMarkerAngle > 180) + mMarkerAngle = 180; + } + else if (mOrientation == Top) { + if (mMarkerAngle < 90) + mMarkerAngle = 360; + else if (mMarkerAngle < 180) + mMarkerAngle = 180; + } + update(); + } + + event->accept(); + } +} + +void UBGraphicsAristo::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (mResizing || mRotating || mMarking) + { + mResizing = false; + mRotating = false; + mMarking = false; + event->accept(); + } + else + { + switch (toolFromPos(event->pos())) { + case Close : + hide(); + emit hidden(); + break; + case HorizontalFlip: + /* substracting difference to zero [2pi] twice, to obtain the desired angle */ + mMarkerAngle -= 2 * (mMarkerAngle - (int)(mMarkerAngle/360)*360) - 360; + /* setting new orientation */ + switch(mOrientation) { + case Bottom: + setOrientation(Top); + break; + case Top: + setOrientation(Bottom); + break; + default: + break; + } + default: + QGraphicsItem::mouseReleaseEvent(event); + break; + } + } + + mShowButtons = true; + update(); + if (scene()) + scene()->setModified(true); +} + +void UBGraphicsAristo::hoverEnterEvent(QGraphicsSceneHoverEvent *event) +{ + UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool (); + + if (currentTool == UBStylusTool::Selector) { + mShowButtons = true; + mHFlipSvgItem->setVisible(true); + mRotateSvgItem->setVisible(true); + mResizeSvgItem->setVisible(true); + mCloseSvgItem->setVisible(true); + + switch (toolFromPos(event->pos())) { + case HorizontalFlip: + setCursor(flipCursor()); + break; + case Rotate: + setCursor(rotateCursor()); + break; + case Resize: + setCursor(resizeCursor()); + break; + case MoveMarker: + setCursor(markerCursor()); + break; + case Close: + setCursor(closeCursor()); + break; + default: + setCursor(moveCursor()); + break; + } + + event->accept(); + update(); + + } else if (UBDrawingController::drawingController()->isDrawingTool()) { + setCursor(drawRulerLineCursor()); + UBDrawingController::drawingController()->mActiveRuler = this; + event->accept(); + } +} + +void UBGraphicsAristo::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ + mShowButtons = false; + setCursor(Qt::ArrowCursor); + mHFlipSvgItem->setVisible(false); + mRotateSvgItem->setVisible(false); + mResizeSvgItem->setVisible(false); + mCloseSvgItem->setVisible(false); + UBDrawingController::drawingController()->mActiveRuler = NULL; + event->accept(); + update(); +} + +void UBGraphicsAristo::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ + UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool (); + + if (currentTool == UBStylusTool::Selector) + { + mShowButtons = true; + mHFlipSvgItem->setVisible(true); + mRotateSvgItem->setVisible(true); + mResizeSvgItem->setVisible(true); + mCloseSvgItem->setVisible(true); + + switch (toolFromPos(event->pos())) { + case HorizontalFlip: + setCursor(flipCursor()); + break; + case Rotate: + setCursor(rotateCursor()); + break; + case Resize: + setCursor(resizeCursor()); + break; + case MoveMarker: + setCursor(markerCursor()); + break; + case Close: + setCursor(closeCursor()); + break; + default: + setCursor(moveCursor()); + break; + } + + event->accept(); + } + else if (UBDrawingController::drawingController()->isDrawingTool()) + event->accept(); +} + +/* + * toolfromPos() returns the item type corresponding to the given position. + * This method is used to reduce the amount of code in each event function and improve class' maintainability. + * pos: event's position ; a rotation is done to counter elements rotation, like the marker button. + */ +UBGraphicsAristo::Tool UBGraphicsAristo::toolFromPos(QPointF pos) +{ + pos = pos - rotationCenter(); + + qreal rotationAngle = mOrientation == Bottom ? - mMarkerAngle : Top ? 360 * (int)(mMarkerAngle / 360 + 1) - mMarkerAngle : 0; + + QTransform t; + t.rotate(rotationAngle); + QPointF p2 = t.map(pos); + + if (resizeButtonRect().contains(pos)) + return Resize; + else if (closeButtonRect().contains(pos)) + return Close; + else if (rotateRect().contains(pos)) + return Rotate; + else if (markerButtonRect().contains(p2)) + return MoveMarker; + else if (hFlipRect().contains(pos)) + return HorizontalFlip; + else if (shape().contains(pos)) + return Move; + else + return None; +} + + +void UBGraphicsAristo::StartLine(const QPointF &scenePos, qreal width) +{ + QPointF itemPos = mapFromScene(scenePos); + + qreal y; + + y = rotationCenter().y(); + + if (itemPos.x() < boundingRect().x() + sLeftEdgeMargin) + itemPos.setX(boundingRect().x() + sLeftEdgeMargin); + if (itemPos.x() > boundingRect().x() + boundingRect().width() - sLeftEdgeMargin) + itemPos.setX(boundingRect().x() + boundingRect().width() - sLeftEdgeMargin); + + itemPos.setY(y); + itemPos = mapToScene(itemPos); + + scene()->moveTo(itemPos); + scene()->drawLineTo(itemPos, width, true); +} + +void UBGraphicsAristo::DrawLine(const QPointF &scenePos, qreal width) +{ + QPointF itemPos = mapFromScene(scenePos); + + qreal y; + + y = rotationCenter().y(); + + if (itemPos.x() < boundingRect().x() + sLeftEdgeMargin) + itemPos.setX(boundingRect().x() + sLeftEdgeMargin); + if (itemPos.x() > boundingRect().x() + boundingRect().width() - sLeftEdgeMargin) + itemPos.setX(boundingRect().x() + boundingRect().width() - sLeftEdgeMargin); + + itemPos.setY(y); + itemPos = mapToScene(itemPos); + + // We have to use "pointed" line for marker tool + scene()->drawLineTo(itemPos, width, + UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker); +} + +void UBGraphicsAristo::EndLine() +{ + /* NOOP */ +} + + +UBGraphicsScene* UBGraphicsAristo::scene() const +{ + return static_cast(QGraphicsPathItem::scene()); +} diff --git a/src/tools/UBGraphicsAristo.h b/src/tools/UBGraphicsAristo.h new file mode 100644 index 00000000..8d23d7e5 --- /dev/null +++ b/src/tools/UBGraphicsAristo.h @@ -0,0 +1,156 @@ +/* + * 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 UBGRAPHICSARISTO_H_ +#define UBGRAPHICSARISTO_H_ + +#include "core/UB.h" +#include "domain/UBItem.h" +#include "domain/UBGraphicsScene.h" +#include "tools/UBAbstractDrawRuler.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class UBGraphicsAristo : public UBAbstractDrawRuler, public QGraphicsPathItem, public UBItem +{ +Q_OBJECT + +public: + UBGraphicsAristo(); + virtual ~UBGraphicsAristo(); + + enum { + Type = UBGraphicsItemType::AristoItemType + }; + + enum Tool { + None, + Move, + Resize, + Rotate, + Close, + MoveMarker, + HorizontalFlip + }; + + enum Orientation + { + Bottom = 0, + Top, + Undefined + }; + + void setOrientation(Orientation orientation); + void setBoundingRect(QRectF boundingRect); + + virtual UBItem* deepCopy() const; + virtual void copyItemParameters(UBItem *copy) const; + + virtual void StartLine(const QPointF& scenePos, qreal width); + virtual void DrawLine(const QPointF& position, qreal width); + virtual void EndLine(); + + virtual int type() const + { + return Type; + } + UBGraphicsScene* scene() const; + +protected: + virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *styleOption, QWidget *widget); + + virtual void rotateAroundCenter(qreal angle); + virtual void resize(qreal factor); + + virtual QPointF rotationCenter() const; + + virtual QRectF closeButtonRect() const; + QRectF hFlipRect() const; + QRectF markerButtonRect() const; + QRectF resizeButtonRect () const; + QRectF rotateRect() const; + + QCursor flipCursor() const; + QCursor markerCursor() const; + QCursor resizeCursor() const; + + virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event); + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event); + +private: + Tool toolFromPos(QPointF pos); + + QTransform calculateRotationTransform(); + void rotateAroundCenter(QTransform& transform, QPointF center); + + void calculatePoints(); + QPainterPath determinePath(); + void setItemsPos(); + void makeGeometryChange(); + + QBrush fillBrush() const; + void paintGraduations(QPainter *painter); + void paintMarker(QPainter *painter); + void paintProtractorGraduations(QPainter* painter); + void paintRulerGraduations(QPainter *painter); + + inline qreal radius () const + { + return sqrt(((B.x() - A.x())*(B.x() - A.x()))+((B.y() - A.y())*(B.y() - A.y()))) * 9 / 16 - 20; + } + + bool mMarking; + bool mResizing; + bool mRotating; + + Orientation mOrientation; + + qreal mRotatedAngle; + qreal mMarkerAngle; + qreal mStartAngle; + + qreal mSpan; + + QGraphicsSvgItem* mHFlipSvgItem; + QGraphicsSvgItem* mMarkerSvgItem; + QGraphicsSvgItem* mResizeSvgItem; + QGraphicsSvgItem* mRotateSvgItem; + + QPointF A, B, C; + + static const int sArcAngleMargin = 5; + static const Orientation sDefaultOrientation; + static const QRectF sDefaultRect; +}; + +#endif /* UBGRAPHICSARISTO_H_ */ diff --git a/src/tools/UBGraphicsCache.cpp b/src/tools/UBGraphicsCache.cpp index 7a89c534..dfde3b4f 100644 --- a/src/tools/UBGraphicsCache.cpp +++ b/src/tools/UBGraphicsCache.cpp @@ -24,11 +24,21 @@ #include "core/memcheck.h" -UBGraphicsCache::UBGraphicsCache():QGraphicsRectItem() +QMap UBGraphicsCache::sInstances; + +UBGraphicsCache* UBGraphicsCache::instance(UBGraphicsScene *scene) +{ + if (!sInstances.contains(scene)) + sInstances.insert(scene, new UBGraphicsCache(scene)); + return sInstances[scene]; +} + +UBGraphicsCache::UBGraphicsCache(UBGraphicsScene *scene) : QGraphicsRectItem() , mMaskColor(Qt::black) , mMaskShape(eMaskShape_Circle) , mShapeWidth(100) , mDrawMask(false) + , mScene(scene) { // Get the board size and pass it to the shape QRect boardRect = UBApplication::boardController->displayView()->rect(); @@ -39,11 +49,12 @@ UBGraphicsCache::UBGraphicsCache():QGraphicsRectItem() UBGraphicsCache::~UBGraphicsCache() { + sInstances.remove(mScene); } UBItem* UBGraphicsCache::deepCopy() const { - UBGraphicsCache* copy = new UBGraphicsCache(); + UBGraphicsCache* copy = new UBGraphicsCache(mScene); copyItemParameters(copy); diff --git a/src/tools/UBGraphicsCache.h b/src/tools/UBGraphicsCache.h index 9ca07d0d..413aa352 100644 --- a/src/tools/UBGraphicsCache.h +++ b/src/tools/UBGraphicsCache.h @@ -30,7 +30,7 @@ typedef enum class UBGraphicsCache : public QGraphicsRectItem, public UBItem { public: - UBGraphicsCache(); + static UBGraphicsCache* instance(UBGraphicsScene *scene); ~UBGraphicsCache(); enum { Type = UBGraphicsItemType::cacheItemType }; @@ -55,8 +55,7 @@ protected: void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); private: - void init(); - QRectF updateRect(QPointF currentPoint); + static QMap sInstances; QColor mMaskColor; eMaskShape mMaskShape; @@ -65,6 +64,13 @@ private: QPointF mShapePos; int mOldShapeWidth; QPointF mOldShapePos; + UBGraphicsScene* mScene; + + + UBGraphicsCache(UBGraphicsScene *scene); + + void init(); + QRectF updateRect(QPointF currentPoint); }; #endif // UBGRAPHICSCACHE_H diff --git a/src/tools/UBToolsManager.cpp b/src/tools/UBToolsManager.cpp index 95b40eec..d30e4fa1 100644 --- a/src/tools/UBToolsManager.cpp +++ b/src/tools/UBToolsManager.cpp @@ -91,6 +91,12 @@ UBToolsManager::UBToolsManager(QObject *parent) mDescriptors << cache; // -------------------------------------------------------------------------------- + aristo.id = "uniboardTool://uniboard.mnemis.com/aristo"; + aristo.icon = QPixmap(":/images/toolPalette/aristoTool.png"); + aristo.label = tr("Aristo"); + aristo.version = "1.0"; + mToolsIcon.insert(aristo.id, ":/images/toolPalette/aristoTool.png"); + mDescriptors << aristo; } UBToolsManager::~UBToolsManager() diff --git a/src/tools/UBToolsManager.h b/src/tools/UBToolsManager.h index eee12d61..410b224f 100644 --- a/src/tools/UBToolsManager.h +++ b/src/tools/UBToolsManager.h @@ -76,6 +76,7 @@ class UBToolsManager : public QObject UBToolDescriptor triangle; UBToolDescriptor magnifier; UBToolDescriptor cache; + UBToolDescriptor aristo; QString iconFromToolId(QString id) { return mToolsIcon.value(id);} diff --git a/src/tools/tools.pri b/src/tools/tools.pri index 90e69659..0196f84d 100644 --- a/src/tools/tools.pri +++ b/src/tools/tools.pri @@ -1,20 +1,21 @@ - -HEADERS += src/tools/UBGraphicsRuler.h \ - src/tools/UBGraphicsTriangle.h \ +HEADERS += src/tools/UBGraphicsRuler.h \ + src/tools/UBGraphicsTriangle.h \ src/tools/UBGraphicsProtractor.h \ src/tools/UBGraphicsCompass.h \ + src/tools/UBGraphicsAristo.h \ src/tools/UBToolsManager.h \ src/tools/UBGraphicsCurtainItem.h \ src/tools/UBGraphicsCurtainItemDelegate.h \ src/tools/UBAbstractDrawRuler.h \ - src/tools/UBGraphicsCache.h - -SOURCES += src/tools/UBGraphicsRuler.cpp \ - src/tools/UBGraphicsTriangle.cpp \ + src/tools/UBGraphicsCache.h + +SOURCES += src/tools/UBGraphicsRuler.cpp \ + src/tools/UBGraphicsTriangle.cpp \ src/tools/UBGraphicsProtractor.cpp \ src/tools/UBGraphicsCompass.cpp \ + src/tools/UBGraphicsAristo.cpp \ src/tools/UBToolsManager.cpp \ src/tools/UBGraphicsCurtainItem.cpp \ src/tools/UBGraphicsCurtainItemDelegate.cpp \ src/tools/UBAbstractDrawRuler.cpp \ - src/tools/UBGraphicsCache.cpp + src/tools/UBGraphicsCache.cpp diff --git a/src/web/UBTrapFlashController.cpp b/src/web/UBTrapFlashController.cpp index 25cb37e9..6458f203 100644 --- a/src/web/UBTrapFlashController.cpp +++ b/src/web/UBTrapFlashController.cpp @@ -200,7 +200,7 @@ void UBTrapFlashController::createWidget() // flash widget UBWebKitUtils::HtmlObject selectedObject = mAvailableFlashes.at(selectedIndex - 1); UBApplication::applicationController->showBoard(); - UBApplication::boardController->downloadURL(QUrl(selectedObject.source), QPoint(0, 0), QSize(selectedObject.width, selectedObject.height)); + UBApplication::boardController->downloadURL(QUrl(selectedObject.source), QString(), QPoint(0, 0), QSize(selectedObject.width, selectedObject.height)); } QString freezedWidgetPath = UBPlatformUtils::applicationResourcesDirectory() + "/etc/freezedWidgetWrapper.html"; diff --git a/src/web/browser/WBWebTrapWebView.cpp b/src/web/browser/WBWebTrapWebView.cpp index 971ed75c..2c97626c 100644 --- a/src/web/browser/WBWebTrapWebView.cpp +++ b/src/web/browser/WBWebTrapWebView.cpp @@ -281,7 +281,7 @@ void WBWebTrapWebView::trapElementAtPos(const QPoint& pos) emit objectCaptured(QUrl(page()->currentFrame()->url().toString() + "/" + source), type, htr.boundingRect().width(), htr.boundingRect().height()); - UBApplication::boardController->downloadURL(QUrl(source), QPointF(0.0, 0.0)); + UBApplication::boardController->downloadURL(QUrl(source)); UBApplication::applicationController->showBoard(); } }