Z level implementation. Not tested

preferencesAboutTextFull
Ilia Ryabokon 11 years ago
commit 004a13660b
  1. 0
      LICENSE
  2. 2
      Open-Sankore.packproj
  3. 5
      Sankore_3.1.pro
  4. BIN
      resources/customizations/fonts/AndBasR.ttf
  5. BIN
      resources/customizations/fonts/ec_cour.ttf
  6. BIN
      resources/customizations/fonts/ecl_cour.ttf
  7. 218
      resources/customizations/teacherGuide/indexingParameters.xml
  8. 54
      resources/etc/Tutorial/tutorial_en/CSS/grid.css
  9. 29
      resources/etc/Tutorial/tutorial_en/CSS/reset.css
  10. 94
      resources/etc/Tutorial/tutorial_en/CSS/typography.css
  11. BIN
      resources/etc/Tutorial/tutorial_en/images/logo_open_sankore.png
  12. BIN
      resources/etc/Tutorial/tutorial_en/images/manuel.png
  13. BIN
      resources/etc/Tutorial/tutorial_en/images/pedago.png
  14. BIN
      resources/etc/Tutorial/tutorial_en/images/tech.png
  15. BIN
      resources/etc/Tutorial/tutorial_en/images/video.png
  16. 72
      resources/etc/Tutorial/tutorial_en/index.html
  17. 54
      resources/etc/Tutorial/tutorial_fr/CSS/grid.css
  18. 29
      resources/etc/Tutorial/tutorial_fr/CSS/reset.css
  19. 94
      resources/etc/Tutorial/tutorial_fr/CSS/typography.css
  20. BIN
      resources/etc/Tutorial/tutorial_fr/images/logo_open_sankore.png
  21. BIN
      resources/etc/Tutorial/tutorial_fr/images/manuel.png
  22. BIN
      resources/etc/Tutorial/tutorial_fr/images/pedago.png
  23. BIN
      resources/etc/Tutorial/tutorial_fr/images/tech.png
  24. BIN
      resources/etc/Tutorial/tutorial_fr/images/video.png
  25. 72
      resources/etc/Tutorial/tutorial_fr/index.html
  26. 40
      resources/forms/mainWindow.ui
  27. 93
      resources/forms/preferences.ui
  28. 132
      resources/forms/webPublishing.ui
  29. BIN
      resources/images/duration1.png
  30. BIN
      resources/images/duration2.png
  31. BIN
      resources/images/duration3.png
  32. BIN
      resources/images/licenses/ccby.png
  33. BIN
      resources/images/licenses/ccbync.png
  34. BIN
      resources/images/licenses/ccbyncnd.png
  35. BIN
      resources/images/licenses/ccbyncsa.png
  36. BIN
      resources/images/licenses/ccbynd.png
  37. BIN
      resources/images/licenses/ccbysa.png
  38. 91
      resources/images/teacherGuide/audio_24x24.svg
  39. 33
      resources/images/teacherGuide/flash_24x24.svg
  40. 81
      resources/images/teacherGuide/image_24x24.svg
  41. 168
      resources/images/teacherGuide/link_24x24.svg
  42. 40
      resources/images/teacherGuide/movie_24x24.svg
  43. 61
      resources/images/teacherGuide/pencil.svg
  44. 112
      resources/images/teacherGuide/w3c_24x24.svg
  45. BIN
      resources/images/teacher_close.png
  46. BIN
      resources/images/teacher_close_disabled.png
  47. BIN
      resources/images/teacher_open.png
  48. BIN
      resources/images/teacher_open_disabled.png
  49. 131
      resources/images/toque.svg
  50. 21
      resources/sankore.qrc
  51. 8
      src/adaptors/UBCFFSubsetAdaptor.cpp
  52. 6
      src/adaptors/UBExportCFF.cpp
  53. 6
      src/adaptors/UBImportDocument.cpp
  54. 50
      src/adaptors/UBMetadataDcSubsetAdaptor.cpp
  55. 145
      src/adaptors/UBSvgSubsetAdaptor.cpp
  56. 9
      src/adaptors/UBSvgSubsetAdaptor.h
  57. 24
      src/adaptors/UBThumbnailAdaptor.cpp
  58. 1
      src/adaptors/UBThumbnailAdaptor.h
  59. 61
      src/adaptors/UBWebPublisher.cpp
  60. 51
      src/adaptors/UBWebPublisher.h
  61. 2
      src/adaptors/adaptors.pri
  62. 636
      src/adaptors/publishing/UBDocumentPublisher.cpp
  63. 58
      src/adaptors/publishing/UBDocumentPublisher.h
  64. 133
      src/board/UBBoardController.cpp
  65. 1
      src/board/UBBoardController.h
  66. 22
      src/board/UBBoardPaletteManager.cpp
  67. 4
      src/board/UBBoardPaletteManager.h
  68. 13
      src/board/UBBoardView.cpp
  69. 1
      src/board/UBBoardView.h
  70. 2
      src/board/UBFeaturesController.cpp
  71. 4
      src/core/UB.h
  72. 6
      src/core/UBApplication.cpp
  73. 2
      src/core/UBApplication.h
  74. 52
      src/core/UBApplicationController.cpp
  75. 4
      src/core/UBApplicationController.h
  76. 9
      src/core/UBDocumentManager.cpp
  77. 111
      src/core/UBPersistenceManager.cpp
  78. 4
      src/core/UBPersistenceManager.h
  79. 80
      src/core/UBPreferencesController.cpp
  80. 7
      src/core/UBPreferencesController.h
  81. 13
      src/core/UBSettings.cpp
  82. 13
      src/core/UBSettings.h
  83. 90
      src/customWidgets/UBActionableWidget.cpp
  84. 68
      src/customWidgets/UBActionableWidget.h
  85. 368
      src/customWidgets/UBMediaWidget.cpp
  86. 137
      src/customWidgets/UBMediaWidget.h
  87. 8
      src/customWidgets/customWidgets.pri
  88. 10
      src/document/UBDocumentContainer.cpp
  89. 41
      src/document/UBDocumentController.cpp
  90. 4
      src/document/UBDocumentController.h
  91. 10
      src/document/UBDocumentProxy.cpp
  92. 2
      src/domain/UBAbstractUndoCommand.h
  93. 55
      src/domain/UBDocumentUndoCommand.cpp
  94. 55
      src/domain/UBDocumentUndoCommand.h
  95. 2
      src/domain/UBGraphicsItemUndoCommand.cpp
  96. 4
      src/domain/UBGraphicsItemUndoCommand.h
  97. 61
      src/domain/UBGraphicsScene.cpp
  98. 5
      src/domain/UBGraphicsScene.h
  99. 26
      src/domain/UBGraphicsTextItem.cpp
  100. 2
      src/domain/UBGraphicsTextItem.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -28,7 +28,7 @@
<key>Mode</key>
<integer>1</integer>
<key>Path</key>
<string>LICENSE.txt</string>
<string>LICENSE</string>
<key>Path Type</key>
<integer>2</integer>
</dict>

@ -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 = 06
VERSION_PATCH = 08
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "")
@ -49,8 +49,6 @@ include(src/podcast/podcast.pri)
include(src/tools/tools.pri)
include(src/desktop/desktop.pri)
include(src/web/web.pri)
include(src/interfaces/interfaces.pri)
include(src/customWidgets/customWidgets.pri)
DEPENDPATH += src/pdf-merger
INCLUDEPATH += src/pdf-merger
@ -76,7 +74,6 @@ FORMS += resources/forms/mainWindow.ui \
resources/forms/blackoutWidget.ui \
resources/forms/trapFlash.ui \
resources/forms/youTubePublishingDialog.ui \
resources/forms/webPublishing.ui \
resources/forms/capturePublishing.ui \
resources/forms/intranetPodcastPublishingDialog.ui

@ -1,218 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<teacherGuide>
<gradeLevels>
<gradeLevel label="" baseLevel="Maternelle"/>
<gradeLevel label="Petite Section (3-4 ans)" baseLevel="Maternelle"/>
<gradeLevel label="Moyenne Section (4-5 ans)" baseLevel="Maternelle"/>
<gradeLevel label="Grande Section (5-6 ans)" baseLevel="Maternelle"/>
<gradeLevel label="CP (6-7 ans)" baseLevel="Elémentaire"/>
<gradeLevel label="CE1 (7-8 ans)" baseLevel="Elémentaire"/>
<gradeLevel label="CE2 (8-9 ans)" baseLevel="Elémentaire"/>
<gradeLevel label="CM1 (9-10ans)" baseLevel="Elémentaire"/>
<gradeLevel label="CM2 (10-11 ans)" baseLevel="Elémentaire"/>
<gradeLevel label="6ème (11-12 ans)" baseLevel="Collège"/>
<gradeLevel label="5ème (12-13 ans)" baseLevel="Collège"/>
<gradeLevel label="4ème (13-14 ans)" baseLevel="Collège"/>
<gradeLevel label="3ème (14-15 ans)" baseLevel="Collège"/>
<gradeLevel label="2nde dont CAP/BEP (15-16 ans)" baseLevel="Lycée"/>
<gradeLevel label="1ère dont CAP/BEP (16-17 ans)" baseLevel="Lycée"/>
<gradeLevel label="Terminale dont Bac Pro (17-18 ans)" baseLevel="Lycée"/>
<gradeLevel label="Bac+2 professionnel" baseLevel="Enseignement Professionnel" />
<gradeLevel label="Niveau universitaire" baseLevel="Enseignement Professionnel" />
<gradeLevel label="Formation continue Professionnelle" baseLevel="Enseignement Professionnel" />
<gradeLevel label="Education Spécialisée" baseLevel="Enseignement Professionnel" />
</gradeLevels>
<subjects baseLevel="Maternelle">
<subject label="" />
<subject label="Percevoir, sentir, imaginer, créer" />
<subject label="Découvrir l'écrit" />
<subject label="S'approprier le langage" />
<subject label="Agir et s'exprimer avec son corps" />
<subject label="Découvrir le monde" />
</subjects>
<subjects baseLevel="Elémentaire">
<subject label="" />
<subject label="Pratiques artistiques" />
<subject label="Pratiques artistiques - arts visuels" />
<subject label="Pratiques artistiques - éducation musicale" />
<subject label="Histoire des arts" />
<subject label="Langues vivantes étrangères" />
<subject label="Langue nationale français" />
<subject label="Langue nationale français - lecture" />
<subject label="Langue nationale français - écriture" />
<subject label="Langue nationale français - langage oral" />
<subject label="Langue nationale français - grammaire" />
<subject label="Langue nationale français - orthographe" />
<subject label="Langue nationale français - vocabulaire" />
<subject label="Mathématiques - informatique" />
<subject label="EPS (éducation physique et sportive)" />
<subject label="Découverte du monde" />
<subject label="Sciences expérimentales et technologie" />
<subject label="Instruction civique et morale" />
<subject label="Histoire et géographie" />
<subject label="TUIC" />
</subjects>
<subjects baseLevel="Collège">
<subject label="" />
<subject label="Pratiques artistiques" />
<subject label="Pratiques artistiques - arts visuels" />
<subject label="Pratiques artistiques - éducation musicale" />
<subject label="Histoire des arts" />
<subject label="Langues vivantes étrangères" />
<subject label="Langues vivantes étrangères - anglais" />
<subject label="Langues vivantes étrangères - allemand" />
<subject label="Langues vivantes étrangères - espagnol" />
<subject label="Langues vivantes étrangères - italien" />
<subject label="Langues vivantes étrangères - néerlandais" />
<subject label="Langues vivantes étrangères - chinois" />
<subject label="Langues vivantes étrangères - portugais" />
<subject label="Langues vivantes étrangères - russe" />
<subject label="Langues vivantes étrangères - arabe" />
<subject label="Langues et cultures de l'Antiquité (latin,grec ancien)" />
<subject label="Langue nationale français" />
<subject label="Mathématiques - informatique" />
<subject label="EPS (éducation physique et sportive)" />
<subject label="Education à la sécurité" />
<subject label="Education à la santé" />
<subject label="SVT (sciences de la vie et de la Terre)" />
<subject label="Sciences physiques et chimiques" />
<subject label="Technologie" />
<subject label="Culture scientifique et technique" />
<subject label="Histoire - éducation civique" />
<subject label="Géographie" />
<subject label="EDD (éducation au développement durable)" />
<subject label="Education aux médias" />
</subjects>
<subjects baseLevel="Lycée">
<subject label="" />
<subject label="Enseignements artistiques" />
<subject label="Agriculture" />
<subject label="Arts" />
<subject label="Banque - Assurances - Immobilier" />
<subject label="Commerce" />
<subject label="Défense publique - Sécurité" />
<subject label="Economie - Droit - Sciences politiques" />
<subject label="Electricité - Electronique" />
<subject label="Environnement - Energies - Aménagement - Propreté" />
<subject label="Fonction production - Transport" />
<subject label="Formation générale - Lettres et langues - Enseignement" />
<subject label="Génie civil - Construction - Architecture" />
<subject label="Gestion des entreprises" />
<subject label="Hôtellerie - Restauration - Tourisme" />
<subject label="Information - Communication" />
<subject label="Informatique" />
<subject label="Mécanique" />
<subject label="Santé - Social - Sport" />
<subject label="Sciences" />
<subject label="Sciences humaines et sociales" />
<subject label="Transformation" />
<subject label="Langues et cultures de l'Antiquité (latin,grec ancien)" />
<subject label="Langues vivantes étrangères" />
<subject label="Langues vivantes étrangères - anglais" />
<subject label="Langues vivantes étrangères - allemand" />
<subject label="Langues vivantes étrangères - espagnol" />
<subject label="Langues vivantes étrangères - italien" />
<subject label="Langues vivantes étrangères - néerlandais" />
<subject label="Langues vivantes étrangères - chinois" />
<subject label="Langues vivantes étrangères - portugais" />
<subject label="Langues vivantes étrangères - russe" />
<subject label="Langues vivantes étrangères - arabe" />
<subject label="Langue nationale français" />
<subject label="Mathématiques - informatique" />
<subject label="EPS" />
<subject label="Physique-chimie" />
<subject label="SVT (sciences de la vie et de la Terre)" />
<subject label="Histoire-géographie et éducation civique" />
<subject label="SES (sciences économiques et sociales)" />
<subject label="Economie" />
<subject label="Droit" />
<subject label="Langues et cultures de l'Antiquité" />
<subject label="Philosophie" />
</subjects>
<subjects baseLevel="Enseignement Professionnel">
<subject label="" />
<subject label="Enseignements artistiques" />
<subject label="Agriculture" />
<subject label="Arts" />
<subject label="Banque - Assurances - Immobilier" />
<subject label="Commerce" />
<subject label="Défense publique - Sécurité" />
<subject label="Economie - Droit - Sciences politiques" />
<subject label="Electricité - Electronique" />
<subject label="Environnement - Energies - Aménagement - Propreté" />
<subject label="Fonction production - Transport" />
<subject label="Formation générale - Lettres et langues - Enseignement" />
<subject label="Génie civil - Construction - Architecture" />
<subject label="Gestion des entreprises" />
<subject label="Hôtellerie - Restauration - Tourisme" />
<subject label="Information - Communication" />
<subject label="Informatique" />
<subject label="Mécanique" />
<subject label="Santé - Social - Sport" />
<subject label="Sciences" />
<subject label="Sciences humaines et sociales" />
<subject label="Transformation" />
<subject label="Langues vivantes étrangères" />
<subject label="Langues vivantes étrangères - anglais" />
<subject label="Langues vivantes étrangères - allemand" />
<subject label="Langues vivantes étrangères - espagnol" />
<subject label="Langues vivantes étrangères - italien" />
<subject label="Langues vivantes étrangères - néerlandais" />
<subject label="Langues vivantes étrangères - chinois" />
<subject label="Langues vivantes étrangères - portugais" />
<subject label="Langues vivantes étrangères - russe" />
<subject label="Langues vivantes étrangères - arabe" />
<subject label="Langue nationale français" />
<subject label="Mathématiques - informatique" />
<subject label="EPS" />
<subject label="Physique-chimie" />
<subject label="SVT (sciences de la vie et de la Terre)" />
<subject label="Histoire-géographie et éducation civique" />
<subject label="SES (sciences économiques et sociales)" />
<subject label="Economie" />
<subject label="Droit" />
<subject label="Langues et cultures de l'Antiquité" />
<subject label="Philosophie" />
</subjects>
<types>
<type label="" />
<type label="Activité : Evaluation/Travail à la maison" />
<type label="Activité : Exercice" />
<type label="Activité : Travaux Pratiques" />
<type label="Activité : Jeux" />
<type label="Activité : Grapheur/Tableur" />
<type label="Activité : Collection de sujets" />
<type label="Activité : WebQuest" />
<type label="Composant : Animation/Simulation" />
<type label="Composant : Article" />
<type label="Composant : Audio" />
<type label="Composant : Diagramme/illustration" />
<type label="Composant : Glossaire / Liste de vocabulaire" />
<type label="Composant : Table des Matières" />
<type label="Composant : Photographie" />
<type label="Composant : Référence" />
<type label="Composant : Scénario" />
<type label="Composant : Etude/Données/Recherche" />
<type label="Composant : Graphique/Diagramme" />
<type label="Composant : Modèle de Document" />
<type label="Composant : Video/Présentation/Diapo" />
<type label="Composant : Webcast/Podcast" />
<type label="Livre : Fiction" />
<type label="Livre : Documentaire" />
<type label="Livre : Notes de lecture" />
<type label="Livre : Manuel scolaire" />
<type label="Parcours : Réponse" />
<type label="Parcours : Evaluation/Test" />
<type label="Parcours : Cours complet" />
<type label="Parcours : Plan de cours" />
<type label="Parcours : Rubrique" />
<type label="Parcours : Séquence" />
<type label="Parcours : Standard ou programme" />
<type label="Parcours : Polycopié / notes de cours" />
<type label="Parcours : Programme" />
<type label="Parcours : Tutoriel" />
<type label="Parcours : Unité pédagogique" />
<type label="Parcours : Cahier d'activité" />
<type label="Autres" />
</types>
</teacherGuide>

@ -1,54 +0,0 @@
.main {margin:0 auto; width:800px; padding-top:10px; }
.g320,.g480,.g640,.g960,.g80,.g240,.g400,.g560,.g720,.g880,.g960 {float:left; display: inline; padding-top: 10px;}
.g800 {float:left; display: inline; width:800px;}
.g200 {float:left; display: inline; width:190px; padding-top: 10px; padding-left: 10px;}
.g200left {float:left; display: inline; width:190px; padding-top: 10px; padding-left: 5px}
.g160 {width:150px; }
.g320 {width:310px;}
.g480 {width:470px;}
.g600 {width:600px;}
.g640 {width:630px;}
.g800 {width:790px;}
.g960 {width:950px;}
.g80 {width:70px;}
.g240 {width:230px;}
.g400 {width:390px;}
.g560 {width:550px;}
.g720 {width:710px;}
.g880 {width:870px;}
.ml80{margin-left:90px;}
.ml160{margin-left:170px;}
.ml240{margin-left:250px;}
.ml320{margin-left:330px;}
.ml400{margin-left:410px;}
.ml480{margin-left:490px;}
.ml560{margin-left:560px;}
.ml640{margin-left:650px;}
.ml720{margin-left:730px;}
.ml800{margin-left:810px;}
.ml880{margin-left:890px;}
.ml960{margin-left:970px;}
.inside{margin-left:0;}
p.grid{ padding-left:10px;}
.clear {clear:both;}
.clearfix, .main{ display:block;}
.clearfix:after, .main:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}

@ -1,29 +0,0 @@
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* Tables still need 'cellspacing="0"' in the markup. */
table { border-collapse: separate; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; }
table, td, th { vertical-align: middle; }
/* Remove possible quote marks (") from <q>, <blockquote>. */
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
blockquote, q { quotes: "" ""; }
/* Remove annoying border on linked images. */
a img { border: none; }

@ -1,94 +0,0 @@
body { font:75%/1.5em "lucida grande","lucida sans unicode", sans-serif;}
p { padding:0 0 1em 0;color:#111;}
p.first:first-letter{ float:left;font-family: Palatino,'Palatino Linotype',Georgia, sans-serif;font-size:3em;font-weight:700;line-height:1em;margin-bottom:-0.2em;padding:0.2em 0.1em 0 0; }
p img { float: left; margin: 0.3em 0.833em 0.833em 0; padding: 0; }
p img.right { float: right; margin: 0.3em 0 0.833em 0.833em; }
h1,h2{ line-height: normal; font-family: Helvetica, Verdana, Arial, sans-serif; font-weight:normal; color: #333; }
h3,h4,h5,h6 { font-family: Helvetica, Verdana, Arial, sans-serif; text-align: left; line-height: normal; font-weight: normal; color: #333; }
h1 { font-size: 2.2em; margin-bottom: 0.682em; }
h2 { font-size: 1.9em; margin-bottom: 0.79em; }
h3 { font-size: 1.7em; margin-bottom: 0.882em; }
h4 { font-size: 1.4em; margin-bottom: 1.071em; }
h5,h6 { font-size: 1.2em; margin-bottom: 1.154em; }
/* Color palete */
.water { color:#5582d1; }
.earth { color:#4e3e2c; }
.air { color:#f1fff7; }
.fire { color:#ff8a19; }
.wine { color:#4a040a; }
.beer { color:#F0C030; }
.caffe { color:#473523; }
.caffe-cream { color:#b68d3d; }
.espresso { color:#2c1901; }
.caramel{ color:#ab671f; }
.chocolate { color:#290200; }
.black-pepper { color:#444334; }
.pepper-lite { color:#8d8a72; }
.lipstick { color:#c20c0c; }
li ul,
li ol { margin:0 1.5em; }
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
dl { margin: 0 0 1.5em 0; }
dl dt { font-weight: bold; }
dl dd { margin-left: 1.5em; }
a { color:#035292; text-decoration:none; }
a:hover { text-decoration: underline; }
table { margin-bottom:1.5em; border-collapse: collapse; }
th { font-weight:bold; }
tr,th,td { margin:0; padding:0 1.5em 0 1em; height:18px; }
tfoot { font-style: italic; }
caption { text-align:center; font-family:Georgia, serif; }
abbr, acronym { border-bottom:1px dotted #000; }
address { margin-top:1.5em; font-style: italic; }
del {color:#000;}
blockquote { padding:1em 1em 1em 1.5em; font-family:baskerville,"palatino linotype",serif; }
blockquote > *:first-child:before { content:"\201C";font-size:2.5em;margin-left:-.62em;font-family:georgia,serif;padding-right:.2em;color:#aaa;line-height:0; }/* From Tripoli */
strong { ont-weight: bold; }
em, dfn { font-style: italic; }
dfn { font-weight: bold; }
pre, code { margin: 1.5em 0; white-space: pre; }
pre, code, tt { font: 1em monospace; line-height: 1.5; }
tt { display: block; margin: 1.5em 0; }
hr { margin-bottom:1.5em; }
/*other small things */
.tc { text-align:center; }
.tr { text-align:right; }
.tl { text-align:left; }
.b { font-weight:bold; }
.i { font-style:italic; }
.indent { text-indent:1.5em;}
.open { font-variant: small-caps; }
p.break { text-align:center;text-indent:0;line-height:0; }
p.zero{padding:0; margin:0}
p.one { padding:0 1em 1em 1em;color:#111;}
p img.right10 { float: right; margin:0.833em; }
.oldbook { font-family:"Book Antiqua","Warnock Pro","Goudy Old Style","Palatino",Georgia,serif; }
.note { font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; font-size:0.9em; margin:0.1em; color:#333; }
.mono { font-family:"Courier New", Courier, monospace; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

@ -1,72 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="CSS/grid.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="CSS/reset.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="CSS/typography.css" type="text/css" media="screen, projection">
<style>
body {
background-color:#fff;
}
.main {
background-color:#fff;
}
.clear {
height:10px;
}
</style>
</head>
<body>
<div class="main">
<div class="g800">
<img src="images/logo_open_sankore.png" style="width: 800px"/>
</div>
<div class="g800">
<h4>Welcome to the tutorial space of Open-Sankoré. We propose you a set of online ressources to help you discover our software and improve your teaching and technical knowledge. If you have questions to ask us or want to contribute to the project, simply visit our website <a href="http://open-sankore.org/" target="_blank">open-sankore.org</a></h4>
</div>
<div class="g200left">
<a href="http://www.youtube.com/user/OpenSankore" target="_blank"><img src="images/video.png" style="width: 188px; border: 1px solid #999"/></a>
<br/><br/><a href="http://www.youtube.com/user/OpenSankore" target="_blank"><h5 style="text-align: center;">Video tutorials</h5></a>
</div>
<div class="g200">
<a href="http://planete.sankore.org/xwiki/bin/view/Pedagogique/User+manual+EN+2.00" target="_blank"><img src="images/manuel.png" style="width: 188px; border: 1px solid #999"/></a>
<br/><br/><a href="http://planete.sankore.org/xwiki/bin/view/Pedagogique/User+manual+EN+2.00" target="_blank">
<h5 style="text-align: center;">The user manual</h5></a>
</div>
<div class="g200">
<a href="http://planete.sankore.org/xwiki/bin/view/Pedagogique/WebHome_EN" target="_blank"><img src="images/pedago.png" style="width: 188px; border: 1px solid #999"/></a>
<br/><br/><a href="http://planete.sankore.org/xwiki/bin/view/Pedagogique/Tutoriels" target="_blank">
<h5 style="text-align: center;">The teaching space</h5></a>
</div>
<div class="g200">
<a href="http://planete.sankore.org/xwiki/bin/view/Technologique/WebHome_EN" target="_blank"><img src="images/tech.png" style="width: 188px; border: 1px solid #999"/></a>
<br/><br/><a href="http://planete.sankore.org/xwiki/bin/view/Technologique/WebHome" target="_blank"><h5 style="text-align: center;">The technical space</h5></a>
</div>
<div class="clear">&nbsp;</div>
</div>
</body>
</html>

@ -1,54 +0,0 @@
.main {margin:0 auto; width:800px; padding-top:10px; }
.g320,.g480,.g640,.g960,.g80,.g240,.g400,.g560,.g720,.g880,.g960 {float:left; display: inline; padding-top: 10px;}
.g800 {float:left; display: inline; width:800px;}
.g200 {float:left; display: inline; width:190px; padding-top: 10px; padding-left: 10px;}
.g200left {float:left; display: inline; width:190px; padding-top: 10px; padding-left: 5px}
.g160 {width:150px; }
.g320 {width:310px;}
.g480 {width:470px;}
.g600 {width:600px;}
.g640 {width:630px;}
.g800 {width:790px;}
.g960 {width:950px;}
.g80 {width:70px;}
.g240 {width:230px;}
.g400 {width:390px;}
.g560 {width:550px;}
.g720 {width:710px;}
.g880 {width:870px;}
.ml80{margin-left:90px;}
.ml160{margin-left:170px;}
.ml240{margin-left:250px;}
.ml320{margin-left:330px;}
.ml400{margin-left:410px;}
.ml480{margin-left:490px;}
.ml560{margin-left:560px;}
.ml640{margin-left:650px;}
.ml720{margin-left:730px;}
.ml800{margin-left:810px;}
.ml880{margin-left:890px;}
.ml960{margin-left:970px;}
.inside{margin-left:0;}
p.grid{ padding-left:10px;}
.clear {clear:both;}
.clearfix, .main{ display:block;}
.clearfix:after, .main:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}

@ -1,29 +0,0 @@
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* Tables still need 'cellspacing="0"' in the markup. */
table { border-collapse: separate; border-spacing: 0; }
caption, th, td { text-align: left; font-weight: normal; }
table, td, th { vertical-align: middle; }
/* Remove possible quote marks (") from <q>, <blockquote>. */
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
blockquote, q { quotes: "" ""; }
/* Remove annoying border on linked images. */
a img { border: none; }

@ -1,94 +0,0 @@
body { font:75%/1.5em "lucida grande","lucida sans unicode", sans-serif;}
p { padding:0 0 1em 0;color:#111;}
p.first:first-letter{ float:left;font-family: Palatino,'Palatino Linotype',Georgia, sans-serif;font-size:3em;font-weight:700;line-height:1em;margin-bottom:-0.2em;padding:0.2em 0.1em 0 0; }
p img { float: left; margin: 0.3em 0.833em 0.833em 0; padding: 0; }
p img.right { float: right; margin: 0.3em 0 0.833em 0.833em; }
h1,h2{ line-height: normal; font-family: Helvetica, Verdana, Arial, sans-serif; font-weight:normal; color: #333; }
h3,h4,h5,h6 { font-family: Helvetica, Verdana, Arial, sans-serif; text-align: left; line-height: normal; font-weight: normal; color: #333; }
h1 { font-size: 2.2em; margin-bottom: 0.682em; }
h2 { font-size: 1.9em; margin-bottom: 0.79em; }
h3 { font-size: 1.7em; margin-bottom: 0.882em; }
h4 { font-size: 1.4em; margin-bottom: 1.071em; }
h5,h6 { font-size: 1.2em; margin-bottom: 1.154em; }
/* Color palete */
.water { color:#5582d1; }
.earth { color:#4e3e2c; }
.air { color:#f1fff7; }
.fire { color:#ff8a19; }
.wine { color:#4a040a; }
.beer { color:#F0C030; }
.caffe { color:#473523; }
.caffe-cream { color:#b68d3d; }
.espresso { color:#2c1901; }
.caramel{ color:#ab671f; }
.chocolate { color:#290200; }
.black-pepper { color:#444334; }
.pepper-lite { color:#8d8a72; }
.lipstick { color:#c20c0c; }
li ul,
li ol { margin:0 1.5em; }
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
dl { margin: 0 0 1.5em 0; }
dl dt { font-weight: bold; }
dl dd { margin-left: 1.5em; }
a { color:#035292; text-decoration:none; }
a:hover { text-decoration: underline; }
table { margin-bottom:1.5em; border-collapse: collapse; }
th { font-weight:bold; }
tr,th,td { margin:0; padding:0 1.5em 0 1em; height:18px; }
tfoot { font-style: italic; }
caption { text-align:center; font-family:Georgia, serif; }
abbr, acronym { border-bottom:1px dotted #000; }
address { margin-top:1.5em; font-style: italic; }
del {color:#000;}
blockquote { padding:1em 1em 1em 1.5em; font-family:baskerville,"palatino linotype",serif; }
blockquote > *:first-child:before { content:"\201C";font-size:2.5em;margin-left:-.62em;font-family:georgia,serif;padding-right:.2em;color:#aaa;line-height:0; }/* From Tripoli */
strong { ont-weight: bold; }
em, dfn { font-style: italic; }
dfn { font-weight: bold; }
pre, code { margin: 1.5em 0; white-space: pre; }
pre, code, tt { font: 1em monospace; line-height: 1.5; }
tt { display: block; margin: 1.5em 0; }
hr { margin-bottom:1.5em; }
/*other small things */
.tc { text-align:center; }
.tr { text-align:right; }
.tl { text-align:left; }
.b { font-weight:bold; }
.i { font-style:italic; }
.indent { text-indent:1.5em;}
.open { font-variant: small-caps; }
p.break { text-align:center;text-indent:0;line-height:0; }
p.zero{padding:0; margin:0}
p.one { padding:0 1em 1em 1em;color:#111;}
p img.right10 { float: right; margin:0.833em; }
.oldbook { font-family:"Book Antiqua","Warnock Pro","Goudy Old Style","Palatino",Georgia,serif; }
.note { font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; font-size:0.9em; margin:0.1em; color:#333; }
.mono { font-family:"Courier New", Courier, monospace; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

@ -1,72 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="CSS/grid.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="CSS/reset.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="CSS/typography.css" type="text/css" media="screen, projection">
<style>
body {
background-color:#fff;
}
.main {
background-color:#fff;
}
.clear {
height:10px;
}
</style>
</head>
<body>
<div class="main">
<div class="g800">
<img src="images/logo_open_sankore.png" style="width: 800px"/>
</div>
<div class="g800">
<h4>Bienvenue l'espace tutoriel du logiciel Open-Sankoré. Nous vous proposons une série de ressources en ligne pour vous aider à découvrir le logiciel et améliorer vos connaissances pédagogiques et techniques. Si vous avez des questions à nous poser ou désirez contribuer à notre projet, rendez-vous sur notre site <a href="http://open-sankore.org/" target="_blank">open-sankore.org</a></h4>
</div>
<div class="g200left">
<a href="http://www.youtube.com/user/OpenSankore" target="_blank"><img src="images/video.png" style="width: 188px; border: 1px solid #999"/></a>
<br/><br/><a href="http://www.youtube.com/user/OpenSankore" target="_blank"><h5 style="text-align: center;">Tutoriels video</h5></a>
</div>
<div class="g200">
<a href="http://planete.sankore.org/xwiki/bin/view/Pedagogique/Le+manuel+du+logiciel+FR+2.00" target="_blank"><img src="images/manuel.png" style="width: 188px; border: 1px solid #999"/></a>
<br/><br/><a href="http://planete.sankore.org/xwiki/bin/view/Pedagogique/Le+manuel+du+logiciel+FR+2.00" target="_blank">
<h5 style="text-align: center;">Le manuel d'utilisation</h5></a>
</div>
<div class="g200">
<a href="http://planete.sankore.org/xwiki/bin/view/Pedagogique/WebHome" target="_blank"><img src="images/pedago.png" style="width: 188px; border: 1px solid #999"/></a>
<br/><br/><a href="http://planete.sankore.org/xwiki/bin/view/Pedagogique/Tutoriels" target="_blank">
<h5 style="text-align: center;">L'espace pédagogique</h5></a>
</div>
<div class="g200">
<a href="http://planete.sankore.org/xwiki/bin/view/Technologique/WebHome" target="_blank"><img src="images/tech.png" style="width: 188px; border: 1px solid #999"/></a>
<br/><br/><a href="http://planete.sankore.org/xwiki/bin/view/Technologique/WebHome" target="_blank"><h5 style="text-align: center;">L'espace technique</h5></a>
</div>
<div class="clear">&nbsp;</div>
</div>
</body>
</html>

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1342</width>
<height>334</height>
<height>223</height>
</rect>
</property>
<property name="windowTitle">
@ -170,44 +170,6 @@
<addaction name="actionDesktop"/>
<addaction name="actionMenu"/>
</widget>
<widget class="QToolBar" name="tutorialToolBar">
<property name="contextMenuPolicy">
<enum>Qt::PreventContextMenu</enum>
</property>
<property name="windowTitle">
<string>Tutorial</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="movable">
<bool>false</bool>
</property>
<property name="allowedAreas">
<set>Qt::BottomToolBarArea|Qt::TopToolBarArea</set>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>32</height>
</size>
</property>
<property name="floatable">
<bool>false</bool>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>true</bool>
</attribute>
<addaction name="actionWebBack"/>
<addaction name="actionWebForward"/>
<addaction name="actionBoard"/>
<addaction name="actionWeb"/>
<addaction name="actionDocument"/>
<addaction name="actionMenu"/>
</widget>
<action name="actionStylus">
<property name="checkable">
<bool>true</bool>

@ -24,7 +24,7 @@
<item row="1" column="0">
<widget class="QTabWidget" name="mainTabWidget">
<property name="currentIndex">
<number>5</number>
<number>3</number>
</property>
<widget class="QWidget" name="displayTab">
<attribute name="title">
@ -609,97 +609,6 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="CommunityGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Planète Sankoré ID for exporting file</string>
</property>
<layout class="QGridLayout" name="gridLayout_18">
<item row="2" column="1">
<layout class="QGridLayout" name="gridLayout_20">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>User:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QWidget" name="widget_3" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="spacing">
<number>5</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="Username_textBox">
<property name="echoMode">
<enum>QLineEdit::Normal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Pass: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="Password_textEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<spacer name="CommunityLSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="PSCredentialsPersistenceCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Restore credentials on reboot </string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>

@ -1,132 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>documentPublishingDialog</class>
<widget class="QDialog" name="documentPublishingDialog">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>607</width>
<height>405</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="titleLabel">
<property name="text">
<string>Title</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="title">
<property name="maxLength">
<number>60</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>E-mail</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="email"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Author</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="author"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="decriptionLabel">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPlainTextEdit" name="description">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>168</height>
</size>
</property>
</widget>
</item>
<item row="4" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="attachPDF">
<property name="text">
<string>Attach Downloadable PDF Version</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="attachUBZ">
<property name="text">
<string>Attach Downloadable Uniboard File (UBZ)</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="videoWarning">
<property name="text">
<string>Warning: This documents contains video, which will not be displayed properly on the Web</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QDialogButtonBox" name="dialogButtons">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="Layer_1">
</g>
<g id="Layer_2">
<g>
<path fill="#9FC23B" d="M9.808,5.383L5.454,9.122H2.271c-0.563,0-1.023,0.459-1.023,1.022v4.902c0,0.562,0.46,1.022,1.023,1.022
h2.858l4.68,4.02c0.298,0.257,0.543,0.145,0.543-0.248V5.632C10.352,5.238,10.106,5.126,9.808,5.383z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5.6592" y1="-66.8374" x2="5.6592" y2="-51.856" gradientTransform="matrix(1 0 0 -1 0.1401 -46.6113)">
<stop offset="0" style="stop-color:#C8C8CB"/>
<stop offset="0.0241" style="stop-color:#CBCBCF"/>
<stop offset="0.1455" style="stop-color:#D6D6DB"/>
<stop offset="0.2577" style="stop-color:#D9D9DE"/>
<stop offset="1" style="stop-color:#E6E5E9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M9.808,5.383L5.454,9.122H2.271c-0.563,0-1.023,0.459-1.023,1.022v4.902
c0,0.562,0.46,1.022,1.023,1.022h2.858l4.68,4.02c0.298,0.257,0.543,0.145,0.543-0.248V5.632
C10.352,5.238,10.106,5.126,9.808,5.383z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="16.5405" y1="-59.1802" x2="22.687" y2="-59.1802" gradientTransform="matrix(1 0 0 -1 0.1401 -46.6113)">
<stop offset="0" style="stop-color:#C8C8CB"/>
<stop offset="0.0241" style="stop-color:#CBCBCF"/>
<stop offset="0.1455" style="stop-color:#D6D6DB"/>
<stop offset="0.2577" style="stop-color:#D9D9DE"/>
<stop offset="1" style="stop-color:#E6E5E9"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M18.72,2.449c-0.076-0.076-0.177-0.121-0.285-0.121c-0.124-0.008-0.208,0.04-0.284,0.116
l-1.139,1.127c-0.157,0.156-0.159,0.408-0.004,0.565c2.202,2.23,3.414,5.185,3.414,8.316c0,3.239-1.286,6.264-3.62,8.516
c-0.158,0.154-0.164,0.407-0.01,0.567l1.113,1.152c0.074,0.078,0.176,0.122,0.282,0.122c0.003,0,0.005,0,0.007,0
c0.104,0,0.205-0.04,0.278-0.112c2.81-2.709,4.355-6.349,4.355-10.245C22.828,8.684,21.369,5.13,18.72,2.449z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="13.7134" y1="-59.147" x2="18.6138" y2="-59.147" gradientTransform="matrix(1 0 0 -1 0.1401 -46.6113)">
<stop offset="0" style="stop-color:#C8C8CB"/>
<stop offset="0.0241" style="stop-color:#CBCBCF"/>
<stop offset="0.1455" style="stop-color:#D6D6DB"/>
<stop offset="0.2577" style="stop-color:#D9D9DE"/>
<stop offset="1" style="stop-color:#E6E5E9"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M15.821,5.311c-0.074-0.076-0.176-0.12-0.283-0.12c-0.09-0.004-0.208,0.04-0.284,0.116l-1.14,1.126
c-0.158,0.154-0.16,0.409-0.004,0.565c1.444,1.463,2.24,3.401,2.24,5.455c0,2.125-0.844,4.108-2.375,5.584
c-0.077,0.074-0.121,0.177-0.123,0.282c-0.003,0.106,0.039,0.209,0.112,0.285l1.112,1.152c0.073,0.078,0.174,0.12,0.281,0.124
c0.002,0,0.004,0,0.007,0c0.105,0,0.204-0.04,0.279-0.112c2.005-1.936,3.109-4.533,3.109-7.315
C18.755,9.76,17.712,7.225,15.821,5.311z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="1.457" y1="10.8066" x2="10.4771" y2="10.8066">
<stop offset="0" style="stop-color:#EBEBEC"/>
<stop offset="1" style="stop-color:#FFFFFF"/>
</linearGradient>
<path fill="url(#SVGID_4_)" d="M2.231,15.893V10.99c0-0.561,0.477-1.021,1.06-1.021h2.947l4.147-3.432l0.058-0.625
c0-0.393,0.205-0.64-0.395-0.383L5.532,9.269H2.518c-0.584,0-1.061,0.461-1.061,1.022v4.904c0,0.48,0.355,0.89,0.826,0.994
C2.252,16.093,2.231,15.997,2.231,15.893z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="13.8989" y1="6.3721" x2="16.4521" y2="6.3721">
<stop offset="0" style="stop-color:#EBEBEC"/>
<stop offset="1" style="stop-color:#FFFFFF"/>
</linearGradient>
<polygon fill="url(#SVGID_5_)" points="14.678,7.68 16.452,6.012 15.55,5.064 13.899,6.607 "/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="16.9121" y1="3.4658" x2="19.4644" y2="3.4658">
<stop offset="0" style="stop-color:#EBEBEC"/>
<stop offset="1" style="stop-color:#FFFFFF"/>
</linearGradient>
<polygon fill="url(#SVGID_6_)" points="17.69,4.773 19.464,3.106 18.562,2.158 16.912,3.703 "/>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="0.5869" y1="-60.4321" x2="2.4624" y2="-62.3076" gradientTransform="matrix(1 0 0 -1 0.1401 -46.6113)">
<stop offset="0" style="stop-color:#B9B7B8"/>
<stop offset="1" style="stop-color:#D9D9DE"/>
</linearGradient>
<path fill="url(#SVGID_7_)" d="M1.328,13.889v-0.59h-0.08v1.748c0,0.549,0.44,0.996,0.984,1.019v-1.167
C1.725,14.839,1.328,14.409,1.328,13.889z"/>
<path fill="#B7B7B7" d="M9.888,18.931L5.207,14.91H2.35c-0.041,0-0.078-0.008-0.118-0.012v1.167c0.014,0,0.024,0.004,0.039,0.004
h2.858l4.68,4.02c0.298,0.257,0.543,0.145,0.543-0.248v-0.859C10.255,19.107,10.084,19.1,9.888,18.931z"/>
<polyline fill="#B7B7B7" points="14.54,17.492 16.224,19.031 15.367,19.881 13.68,18.277 14.54,17.492 "/>
<polyline fill="#B7B7B7" points="17.369,20.428 19.052,21.967 18.196,22.817 16.51,21.216 17.369,20.428 "/>
<path fill="none" stroke="#848685" stroke-width="0.75" stroke-miterlimit="10" d="M9.808,5.383L5.454,9.122H2.271
c-0.563,0-1.023,0.459-1.023,1.022v4.902c0,0.562,0.46,1.022,1.023,1.022h2.858l4.68,4.02c0.298,0.257,0.543,0.145,0.543-0.248
V5.632C10.352,5.238,10.106,5.126,9.808,5.383z"/>
<path fill="none" stroke="#848685" stroke-width="0.75" stroke-miterlimit="10" d="M18.72,2.449
c-0.076-0.076-0.177-0.121-0.285-0.121c-0.124-0.008-0.208,0.04-0.284,0.116l-1.139,1.127c-0.157,0.156-0.159,0.408-0.004,0.565
c2.202,2.23,3.414,5.185,3.414,8.316c0,3.239-1.286,6.264-3.62,8.516c-0.158,0.154-0.164,0.407-0.01,0.567l1.113,1.152
c0.074,0.078,0.176,0.122,0.282,0.122c0.003,0,0.005,0,0.007,0c0.104,0,0.205-0.04,0.278-0.112
c2.81-2.709,4.355-6.349,4.355-10.245C22.828,8.684,21.369,5.13,18.72,2.449z"/>
<path fill="none" stroke="#848685" stroke-width="0.75" stroke-miterlimit="10" d="M15.821,5.311
c-0.074-0.076-0.176-0.12-0.283-0.12c-0.09-0.004-0.208,0.04-0.284,0.116l-1.14,1.126c-0.158,0.154-0.16,0.409-0.004,0.565
c1.444,1.463,2.24,3.401,2.24,5.455c0,2.125-0.844,4.108-2.375,5.584c-0.077,0.074-0.121,0.177-0.123,0.282
c-0.003,0.106,0.039,0.209,0.112,0.285l1.112,1.152c0.073,0.078,0.174,0.12,0.281,0.124c0.002,0,0.004,0,0.007,0
c0.105,0,0.204-0.04,0.279-0.112c2.005-1.936,3.109-4.533,3.109-7.315C18.755,9.76,17.712,7.225,15.821,5.311z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.7 KiB

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="Layer_1">
</g>
<g id="Layer_2">
<g>
<path opacity="0.8" fill="#EDEDED" d="M14.326,3.343c-2.708,2.294-3.856,6.059-4.636,7.986c-1.056,2.616-1.699,3.993-2.983,5.6
c-1.287,1.517-3.811,1.424-3.811,1.424v4.224c0,0,3.627,0.229,6.335-2.065c2.111-1.791,3.305-4.5,4.085-6.52h5.095V9.77h-3.35
c0.505-1.057,1.057-1.93,1.79-2.848c1.286-1.515,3.81-1.422,3.81-1.422V1.275C20.662,1.275,17.036,1.046,14.326,3.343z"/>
<path fill="#A3A2A2" d="M14.184,4.97c-2.02,2.295-3.398,6.057-4.178,7.986c-1.056,2.615-1.837,4.315-3.443,5.602
c-1.331,1.054-3.81,0.964-3.81,0.964v3.305c0,0,3.626,0.228,6.335-2.067c2.112-1.789,3.304-4.498,4.086-6.518h5.096v-4.223h-3.352
c0.505-1.058,1.056-1.929,1.791-2.847c1.286-1.514,3.81-1.424,3.81-1.424V2.445C20.519,2.445,16.616,2.216,14.184,4.97z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="2.5698" y1="12.1602" x2="20.3354" y2="12.1602">
<stop offset="0" style="stop-color:#C8C8CB"/>
<stop offset="0.0241" style="stop-color:#CBCBCF"/>
<stop offset="0.1455" style="stop-color:#D6D6DB"/>
<stop offset="0.2577" style="stop-color:#D9D9DE"/>
<stop offset="1" style="stop-color:#E6E5E9"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M14,4.97c-2.02,2.295-3.396,6.057-4.178,7.986c-1.055,2.615-1.835,4.315-3.442,5.602
c-1.378,0.964-3.81,0.918-3.81,0.918v2.386c0,0,3.765,0.368,6.335-2.065c1.927-1.836,2.845-4.5,3.626-6.518h5.554V9.973
l-4.268,0.779c0.321-1.192,1.193-3.074,2.02-3.994c1.882-2.064,4.499-1.928,4.499-1.928V2.445C20.335,2.445,16.388,2.216,14,4.97z
"/>
<path fill="none" stroke="#848685" stroke-width="0.75" stroke-linejoin="round" stroke-miterlimit="10" d="M14.184,3.593
c-2.708,2.295-3.857,6.059-4.637,7.986c-1.056,2.615-1.698,3.992-2.984,5.6c-1.285,1.515-3.81,1.425-3.81,1.425v4.223
c0,0,3.626,0.228,6.335-2.067c2.112-1.789,3.304-4.498,4.086-6.518h5.096v-4.223h-3.352c0.505-1.058,1.056-1.929,1.791-2.847
c1.286-1.514,3.81-1.424,3.81-1.424V1.525C20.519,1.525,16.893,1.298,14.184,3.593z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="Layer_1">
</g>
<g id="Layer_2">
<g>
<g>
<rect x="5.598" y="5.608" transform="matrix(0.9609 0.2769 -0.2769 0.9609 3.4789 -3.244)" fill="#DEDDDD" width="15.259" height="10.18"/>
<path fill="#CCCCCC" d="M20.64,12.147c-0.281-0.151-0.581-0.274-0.89-0.408c-0.37-0.159-0.757-0.385-1.17-0.483
c-0.29-0.069-0.604-0.093-0.938-0.217c-0.27-0.102-0.542-0.254-0.837-0.376c-0.576-0.235-1.17-0.47-1.757-0.696
c-0.306-0.116-0.637-0.196-0.903-0.33c-0.13-0.064-0.249-0.17-0.38-0.247c-0.678-0.4-1.468-0.687-2.325-0.979
c-0.312-0.108-0.708-0.357-0.995-0.357C10.281,8.05,10.073,8.371,9.93,8.581C9.762,8.826,9.633,9.113,9.562,9.293
C9.282,8.874,8.478,8.621,7.98,8.815C7.842,8.871,7.754,8.987,7.635,9.051C7.007,8.82,6.567,8.309,5.833,8.263
c-0.163,0.578-0.326,1.16-0.489,1.743c0.345,0.205,0.76,0.235,1.143,0.381c0.444,0.168,0.827,0.624,1.458,0.611
c0.018-0.031,0.015-0.109,0.046-0.113c-0.217-0.141-0.821-0.227-0.683-0.52c0.072-0.15,0.307-0.08,0.5-0.031
c0.595,0.151,1.315,0.35,1.83,0.497c0.096-0.363,0.632-0.11,0.993,0.012c1.262,0.427,2.492,0.783,3.891,1.106
c1.136,0.261,2.261,0.681,3.279,0.979c-0.123,0.13-0.245,0.342-0.413,0.419c-0.201,0.096-0.555,0.011-0.833-0.029
c-0.631-0.096-1.17-0.111-1.745-0.192c-0.225-0.032-0.451-0.047-0.646-0.056c-0.06-0.004-0.151-0.032-0.202,0.021
c-0.122,0.26,0.132,0.318,0.312,0.385c0.735,0.273,1.534,0.551,2.274,0.763c-0.014,0.339,0.429,0.444,0.783,0.565
c0.805,0.27,1.644,0.49,2.355,0.742L20.64,12.147z"/>
<path fill="#FFFFFF" d="M19.735,18.654L3.646,14.147L6.819,2.829l16.087,4.506L19.735,18.654z M4.98,13.396l14.005,3.927
l2.588-9.239L7.569,4.162L4.98,13.396z"/>
<rect x="4.62" y="4.605" transform="matrix(-0.9629 -0.2698 0.2698 -0.9629 22.9006 24.6079)" fill="none" stroke="#848685" stroke-width="0.75" stroke-miterlimit="10" width="17.043" height="12.249"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="28.1626" y1="-219.4263" x2="28.1626" y2="-209.5347" gradientTransform="matrix(0.9606 0.2779 0.2995 -1.0351 47.399 -220.3408)">
<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.4"/>
<stop offset="0.8587" style="stop-color:#FFFFFF;stop-opacity:0.6576"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0.7"/>
</linearGradient>
<path opacity="0.8" fill="url(#SVGID_1_)" d="M16.364,5.729L7.029,3.025L4.066,13.264l2.464,0.713
C8.191,9.364,12.098,6.222,16.364,5.729z"/>
</g>
<rect x="1.684" y="7.821" fill="#DEDDDD" width="15.732" height="11.498"/>
<path fill="#CCCCCC" d="M17.249,12.925c-0.311-0.073-0.632-0.111-0.966-0.159c-0.399-0.055-0.833-0.172-1.258-0.156
c-0.298,0.012-0.606,0.076-0.96,0.047c-0.288-0.024-0.59-0.101-0.907-0.138c-0.618-0.075-1.256-0.145-1.879-0.203
c-0.327-0.031-0.667-0.024-0.96-0.078c-0.14-0.027-0.282-0.099-0.433-0.138c-0.759-0.214-1.598-0.276-2.502-0.329
c-0.329-0.019-0.777-0.157-1.056-0.077c-0.156,0.044-0.27,0.42-0.352,0.666c-0.096,0.293-0.144,0.613-0.162,0.811
c-0.381-0.338-1.224-0.362-1.65-0.032c-0.119,0.095-0.172,0.234-0.271,0.327c-0.666-0.055-1.228-0.44-1.947-0.281
c0,0.625,0,1.245,0,1.867c0.39,0.11,0.797,0.026,1.205,0.062c0.473,0.044,0.962,0.392,1.569,0.2
c0.007-0.034-0.017-0.11,0.013-0.124c-0.248-0.078-0.852,0-0.798-0.325c0.028-0.171,0.273-0.166,0.474-0.171
c0.612-0.019,1.359-0.021,1.893-0.016c-0.004-0.384,0.581-0.288,0.961-0.265c1.331,0.073,2.611,0.087,4.043,0.016
c1.167-0.056,2.361,0.048,3.423,0.062c-0.082,0.163-0.145,0.405-0.284,0.527c-0.17,0.15-0.533,0.168-0.812,0.205
C13,15.303,12.476,15.441,11.9,15.517c-0.224,0.03-0.446,0.08-0.637,0.127c-0.058,0.012-0.153,0.007-0.188,0.074
c-0.046,0.293,0.215,0.281,0.406,0.298c0.779,0.062,1.623,0.119,2.394,0.126c0.08,0.337,0.535,0.318,0.908,0.339
c0.847,0.046,1.716,0.033,2.466,0.084V12.925L17.249,12.925z"/>
<path fill="#B2B3B3" d="M2.311,15.023c0,0.008,0,0.012,0,0.021c0.893,0.021,1.784,0.159,2.681,0.259
c0.432,0.046,0.865,0.036,1.294,0.08c0.841,0.084,1.667,0.159,2.478,0.3c0.396,0.067,0.798,0.178,1.184,0.22
c0.331,0.034,0.659,0.007,0.979,0.039c0.904,0.09,1.825,0.267,2.737,0.359c1.219,0.12,2.411,0.286,3.54,0.659
c0,0.563,0,1.128,0,1.695c-0.068,0.016-0.173-0.026-0.218,0.021c-5.196,0-9.845,0-15.043,0c0-1.221,0-2.436,0-3.653
C2.066,15.023,2.188,15.023,2.311,15.023z"/>
<path fill="#A3A2A2" d="M14.121,15.884c0.082,0.073,0.145,0.165,0.24,0.22c-0.279,0.375-0.836,0.679-0.674,1.315
c-0.15,0.247-0.667,0.259-0.637,0.606c0.206,0.084,0.489,0.08,0.646,0.222c-0.217,0.151-0.432,0.307-0.622,0.478h3.065
c0.327-0.2,0.688-0.372,1.078-0.515v-0.695c-0.18-0.062-0.325-0.163-0.42-0.34c0.105-0.071,0.269-0.062,0.42-0.066v-0.694
c-0.252-0.028-0.513-0.028-0.732-0.139c-0.214-0.545,0.381-0.88,0.644-1.233c-0.054-0.04-0.1-0.081-0.124-0.157
c-0.619-0.243-1.242-0.481-1.686-0.93c0.18-0.115,0.235-0.336,0.234-0.558c0.138,0.033,0.372,0.067,0.439-0.075
c-0.253-0.09-0.411-0.291-0.544-0.526c-0.117-0.021-0.19-0.081-0.324-0.138c-0.069-0.028-0.321-0.072-0.326-0.14
c-0.006-0.084,0.173-0.091,0.249-0.113c0.068-0.021,0.134-0.097,0.214-0.13c0.171-0.067,0.385-0.084,0.465-0.205
c-0.227-0.111-0.313-0.349-0.469-0.531c-0.097-0.118-0.231-0.208-0.339-0.323c-0.333-0.359-0.595-0.756-0.821-1.244
c-0.003-0.013-0.005-0.021-0.021-0.019c-0.135,0.077-0.113,0.203-0.122,0.324c-0.036,0.436-0.329,0.879-0.398,1.309
c0.214,0.08,0.379,0.011,0.496,0.161c-0.044,0.214-0.088,0.431-0.115,0.658c-0.232,0.26-0.409,0.567-0.598,0.863
c0.317,0.046,0.603,0.12,0.801,0.301c-0.169,0.163-0.261,0.396-0.398,0.589c-0.05,0.006-0.039-0.027-0.073,0.006
c-0.283,0.336-0.869,0.562-0.676,1.056c0.367-0.031,0.671-0.208,1.022-0.196c-0.415,0.271-0.884,0.493-1.231,0.825
C13.262,15.804,13.649,16.003,14.121,15.884z"/>
<path fill="#FFFFFF" d="M17.928,19.663H1.22V7.538h16.708V19.663L17.928,19.663z M2.302,18.549h14.544V8.656H2.302V18.549z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="7.0205" y1="-140.0913" x2="7.0205" y2="-130.2026" gradientTransform="matrix(1 0 0 -1 0.1401 -121.5469)">
<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.4"/>
<stop offset="0.8587" style="stop-color:#FFFFFF;stop-opacity:0.6576"/>
<stop offset="1" style="stop-color:#FFFFFF;stop-opacity:0.7"/>
</linearGradient>
<path opacity="0.8" fill="url(#SVGID_2_)" d="M12.019,8.656H2.302v9.889h2.562C5.18,14.005,8.06,10.197,12.019,8.656z"/>
<rect x="1.03" y="7.35" fill="none" stroke="#848685" stroke-width="0.75" stroke-miterlimit="10" width="17.066" height="12.561"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.9 KiB

@ -1,168 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="Layer_1">
</g>
<g id="Layer_2">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="273.0679" y1="-528.8062" x2="293.4702" y2="-528.8062" gradientTransform="matrix(0.4316 -0.9021 0.9021 0.4316 366.9186 496.0778)">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.4811" style="stop-color:#C7C8CA"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<circle fill="url(#SVGID_1_)" cx="12.161" cy="12.317" r="10.201"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="8.6484" y1="19.3447" x2="12.994" y2="1.8487">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.508" style="stop-color:#C7C8CA"/>
<stop offset="0.6057" style="stop-color:#C7C9CA"/>
<stop offset="0.7601" style="stop-color:#C9CACC"/>
<stop offset="0.7699" style="stop-color:#D0D1D3"/>
<stop offset="0.7963" style="stop-color:#DEDFE0"/>
<stop offset="0.829" style="stop-color:#E8E8E9"/>
<stop offset="0.8748" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M11.387,16.715c-0.47-0.202-1.232-0.539-1.569-0.965c-0.247-0.293-0.225-0.293-0.606-0.426
c-0.314-0.09-0.516-0.27-0.875-0.314c-0.269-0.023-1.346-0.291-1.278,0.09l-0.023-0.09c-0.134,0.426-0.336,0.785-0.561,1.188
c-0.156,0.293-0.111,0.382-0.023,0.696c0.157,0.583,0.225,0.628,0.696,0.875c1.345,0.739-0.158,2.893,0.964,3.521
c0.18,0.113,0.403,0.181,0.583,0.247c0.224-0.313,0.336-0.517,0.65-0.718c0.202-0.112,0.336-0.157,0.471-0.358
c0.179-0.226,0.112-0.449,0.224-0.673c0.157-0.315,0.583-0.225,0.83-0.448c0.314-0.292,0.336-0.675,0.471-1.01
c0.157-0.36,0.627-0.538,0.763-0.875C12.263,17.006,11.725,16.849,11.387,16.715z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="15.8818" y1="8.6055" x2="15.8818" y2="5.5281">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.3804" style="stop-color:#C7C8CA"/>
<stop offset="0.4911" style="stop-color:#C9CACC"/>
<stop offset="0.512" style="stop-color:#D0D1D3"/>
<stop offset="0.5679" style="stop-color:#DEDFE0"/>
<stop offset="0.6374" style="stop-color:#E8E8E9"/>
<stop offset="0.7345" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M15.738,8.079c0,0.225-0.268,0.358-0.155,0.562c0.224-0.271,0.381-0.404,0.74-0.45
c-0.09-0.269-0.382-0.447-0.449-0.718c-0.067-0.2,0-0.47-0.292-0.402l0.067,0.067c-0.337-0.067-0.18,0.357-0.112,0.515
C15.583,7.766,15.738,7.989,15.738,8.079z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="15.1758" y1="8.9072" x2="15.1758" y2="5.8291">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.3804" style="stop-color:#C7C8CA"/>
<stop offset="0.4911" style="stop-color:#C9CACC"/>
<stop offset="0.512" style="stop-color:#D0D1D3"/>
<stop offset="0.5679" style="stop-color:#DEDFE0"/>
<stop offset="0.6374" style="stop-color:#E8E8E9"/>
<stop offset="0.7345" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_4_)" d="M15.251,7.728c-0.085,0.189-0.191,0.318-0.229,0.531C15.413,8.455,15.36,7.983,15.251,7.728z"/>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="14.0439" y1="6.876" x2="14.0439" y2="3.7988">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.3804" style="stop-color:#C7C8CA"/>
<stop offset="0.4911" style="stop-color:#C9CACC"/>
<stop offset="0.512" style="stop-color:#D0D1D3"/>
<stop offset="0.5679" style="stop-color:#DEDFE0"/>
<stop offset="0.6374" style="stop-color:#E8E8E9"/>
<stop offset="0.7345" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_5_)" d="M13.944,5.59l0.045-0.066c-0.089,0.021-0.246,0.021-0.358,0.044
c-0.157,0.492,0.358,0.562,0.65,0.336C14.774,5.523,14.259,5.343,13.944,5.59z"/>
<path fill="#FFFFFF" d="M14.842,12.161c-0.042-0.022-0.045-0.022-0.083-0.043c-0.002,0.007-0.029,0.021-0.029,0.021
c0.062,0.018,0.104,0.042,0.13,0.072c0.002-0.002,0.003-0.005,0.005-0.005L14.842,12.161z"/>
<path fill="#FFFFFF" d="M17.133,3.332c-0.036-0.038-0.073-0.077-0.116-0.119C17.054,3.257,17.092,3.295,17.133,3.332z"/>
<path fill="#FFFFFF" d="M18.251,6.084c0.002-0.018,0.006-0.032,0.009-0.049c-0.025,0.001-0.051,0.004-0.076,0.004L18.251,6.084z"
/>
<path fill="#FFFFFF" d="M14.752,12.116c0.002,0.001,0.003,0.002,0.006,0.002C14.758,12.117,14.757,12.116,14.752,12.116z"/>
<path fill="#FFFFFF" d="M14.839,12.229c0.012,0,0.023,0,0.035,0c-0.004-0.006-0.008-0.013-0.014-0.018
C14.847,12.219,14.812,12.232,14.839,12.229z"/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="3.9849" y1="13.3643" x2="11.0251" y2="-2.2097">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.5185" style="stop-color:#C7C8CA"/>
<stop offset="0.9002" style="stop-color:#C9CACC"/>
<stop offset="0.9043" style="stop-color:#D0D1D3"/>
<stop offset="0.9153" style="stop-color:#DEDFE0"/>
<stop offset="0.9289" style="stop-color:#E8E8E9"/>
<stop offset="0.9479" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_6_)" d="M6.588,15.032l0.09,0.09c0.067-0.067-0.336-0.27-0.427-0.382c-0.179-0.27-0.022-0.472,0.023-0.831
c-0.202,0.025-0.403,0.114-0.628,0.114c0.067-0.136,0.426-0.539,0.292-0.695c-0.18-0.158-0.651,0.425-0.852,0.425
c-0.112-0.38-0.225-1.032,0.067-1.347c0.18-0.2,0.605-0.335,0.852-0.245c0.337,0.111,0.315,0.338,0.382,0.628
c0.292-0.313,0.156-0.809,0.336-1.146c0.112-0.223,0.403-0.246,0.426-0.515l-0.045,0.045c0.359-0.357,0.673-0.74,1.077-1.053
c0.337-0.271,0.807-0.54,1.032-0.898C8.921,9.18,8.653,9.199,8.899,8.843c0.225-0.359,0.785-0.113,0.853-0.45
c0.068-0.313-0.449-0.671-0.538-0.94C9.124,7.228,9.034,6.936,8.989,6.688C8.876,6.8,8.809,6.958,8.697,7.07
C8.519,6.755,8.652,6.621,8.271,6.688C8.046,6.712,7.823,6.869,7.755,7.092c-0.089,0.27,0.09,0.561,0,0.83
c-0.067,0.224-0.313,0.562-0.516,0.65C7.172,8.326,7.375,8.079,7.307,7.833c-0.381,0.021-0.493-0.181-0.785-0.36l0.09-0.044
c-0.135,0.09-0.337-0.224-0.494-0.314c0.269-0.359,0.65-0.627,0.942-0.963c0.224,0.425,0.583-0.606,0.763-0.786
C7.957,5.208,8.45,5.051,8.586,5.276c0.156,0.269-0.225,0.561-0.359,0.739c0.246,0,0.516,0.044,0.718,0.181
c0.201-0.157,0.47-0.405,0.583-0.651c-0.18-0.111-0.337-0.224-0.471-0.381c0.134-0.269,0.104-0.619-0.175-0.56
c0.045-0.028,0.087-0.06,0.129-0.091C8.497,4.355,8.316,4.692,8.429,4.064c0.044-0.293,0.112-0.471,0.359-0.74L8.72,3.302
C8.854,3.168,8.967,2.988,9.057,2.83c-0.023,0-0.089,0-0.112,0c0.023-0.097,0.001-0.179-0.053-0.245
C5.05,3.877,2.235,7.4,1.982,11.612c0.643-0.203,1.032,0.918,1.243,1.443c-0.067-0.244-0.112-0.514-0.224-0.738
c0.313,0.358,0.672,0.561,0.717,1.055c0.045,0.313-0.089,0.291,0.269,0.425c0.27,0.089,0.561,0.068,0.807,0.18
C5.288,14.157,6.051,15.145,6.588,15.032z"/>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="11.1875" y1="6.168" x2="12.4674" y2="-2.8603">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.3804" style="stop-color:#C7C8CA"/>
<stop offset="0.4911" style="stop-color:#C9CACC"/>
<stop offset="0.512" style="stop-color:#D0D1D3"/>
<stop offset="0.5679" style="stop-color:#DEDFE0"/>
<stop offset="0.6374" style="stop-color:#E8E8E9"/>
<stop offset="0.7345" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_7_)" d="M13.407,4.021c0.045-0.09,0.403-0.157,0.516-0.18c-0.022-0.359-0.179-0.74-0.068-1.055
c0.054-0.161,0.18-0.37,0.326-0.521c-0.172-0.035-0.345-0.065-0.521-0.092l-0.188,0.023l0.177-0.024
c-0.496-0.074-1.001-0.113-1.517-0.113c-0.682,0-1.348,0.067-1.992,0.195c-0.076,0.192-0.188,0.443-0.188,0.443l0.06-0.01
c-0.218,0.37-0.868,0.392-0.89,0.839c0.336,0.045,0.695-0.089,1.033-0.022c0.268,0.427,0.38,0.763,0.134,1.234
c0.157,0.18,0.358,0.022,0.538,0.045c-0.045,0.381-0.404,0.672-0.246,1.097c0.044,0.159,0.157,0.517,0.224,0.652
c0.135,0.202,0.203,0.156,0.449,0.245c0.246-0.47,0.202-1.074,0.718-1.344c0.336-0.157,0.739-0.18,1.032-0.36
c0.201-0.134,0.561-0.401,0.561-0.673C13.563,4.244,13.338,4.199,13.407,4.021z"/>
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="18.8745" y1="17.7041" x2="16.3146" y2="-1.3523">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.4865" style="stop-color:#C7C8CA"/>
<stop offset="0.7121" style="stop-color:#C9CACC"/>
<stop offset="0.7239" style="stop-color:#D0D1D3"/>
<stop offset="0.7555" style="stop-color:#DEDFE0"/>
<stop offset="0.7948" style="stop-color:#E8E8E9"/>
<stop offset="0.8498" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_8_)" d="M17.368,3.506c0.011,0.016,0.021,0.03,0.031,0.043C17.362,3.52,17.325,3.49,17.29,3.461
c-0.028-0.016-0.055-0.033-0.083-0.049c0.237,0.27,0.327,0.485,0.327,0.922c-0.134-0.046-0.247-0.09-0.359-0.157
c-0.134,0.471-0.201,0.831,0.045,1.278c-0.066,0.22-0.26,0.503-0.206,0.744c-0.127,0.255-0.261,0.664-0.199,0.915
c0.539-0.448,0.494,0.023,0.853,0.314C17.78,7.228,17.87,7.003,18.004,6.8c0.067-0.088,0.201-0.022,0.224-0.224
c0-0.156-0.203-0.18-0.224-0.291c-0.045-0.226,0.113-1.167,0.381-1.234c-0.042,0.32-0.066,0.661-0.126,0.984
c0.081-0.007,0.163-0.022,0.245-0.039c0,0.138-0.103,0.347,0.032,0.496c0.236,0.258,0.594-0.048,0.838,0.195
c-0.119,0.197-0.183,0.099-0.356,0.135c-0.192,0.04-0.214,0.127-0.291,0.332c-0.085-0.203-0.286-0.426-0.433-0.13
c-0.104,0.211,0.028,0.561-0.184,0.714c-0.18,0.128-0.66,0.179-0.798-0.02c-0.13-0.187-0.015-0.473-0.178-0.647
c-0.034,0.185-0.145,0.354-0.123,0.535c0.02,0.172,0.162,0.302,0.091,0.469c-0.146,0-0.33,0.011-0.439,0.1
c-0.089,0.072-0.091,0.211-0.229,0.263c-0.122,0.049-0.312-0.021-0.412,0.09c-0.049,0.055-0.058,0.256-0.087,0.333
c-0.124,0.015-0.278,0.029-0.39,0.076c0.051,0.271,0.442,0.353,0.417,0.667c-0.015,0.192-0.09,0.187-0.27,0.158
C15.5,9.73,15.284,9.719,15.092,9.68c-0.006,0.399,0.229,0.658,0.023,1.062c0.071,0.033,0.132-0.02,0.193,0.005
c0.047,0.021,0.086,0.079,0.117,0.093c0.122,0.047,0.217,0.072,0.359,0.049c0.15-0.026,0.212-0.069,0.292-0.183
c0.029-0.041-0.008-0.116,0.038-0.164c0.042-0.048,0.114-0.042,0.163-0.081c0.195-0.15,0.186-0.52,0.386-0.649
c0.033-0.021,0.249-0.015,0.332-0.044c0.118-0.045,0.18-0.029,0.265-0.116c0.067,0.255,0.214,0.462,0.407,0.649
c0.192,0.187,0.438,0.382,0.025,0.452c0.132,0.178,0.172,0.241,0.328,0.035c0.115-0.151,0.182-0.302,0.323-0.42
c-0.257-0.242-0.482-0.539-0.667-0.85c0.269-0.264,0.877,0.6,0.889,0.827c0.013,0.248-0.125,0.354,0.128,0.469
c0.344,0.158,0.222-0.241,0.233-0.491c0.207,0.114,0.413-0.094,0.603-0.023c0.097,0.034,0.114,0.15,0.179,0.22
c0.102,0.11,0.066,0.085,0.178,0.117c0.228,0.064,0.335,0.003,0.405,0.293c0.043,0.176,0.103,0.407,0.028,0.582
c-0.109,0.259-0.464,0.601-0.72,0.691c-0.264,0.094-0.504-0.123-0.741-0.223c-0.38-0.157-0.762-0.297-1.133-0.497
c-0.362-0.197-0.288-0.059-0.556,0.078c-0.285,0.146-0.567,0.366-0.871,0.466c-0.408,0.136-0.983,0.202-1.424,0.202
c0.103,0.166-0.21,0.463-0.302,0.628c-0.359,0.56-0.56,0.873-0.381,1.547c0.09,0.336,0.201,0.628,0.381,0.919
c0.09,0.135,0.157,0.338,0.314,0.427c0.201,0.157,0.179,0.067,0.449-0.022c0.29-0.089,0.784-0.156,1.099-0.066
c0.112,0.021,0.157,0.135,0.269,0.156c0.044,0.021,0.358,0.045,0.381,0.067c0,0,0,0,0.022,0c0.067,0.292-0.09,0.515-0.09,0.785
c-0.022,0.291,0.045,0.245,0.157,0.517c0.202,0.47,0.044,1.053-0.112,1.501c-0.179,0.516-0.045,0.874,0,1.413
c0.026,0.303,0.185,0.584,0.285,0.863c1.223-0.73,2.279-1.71,3.098-2.869c-0.138-0.342-0.243-0.681-0.086-0.955
c0.337-0.604,1.077-0.874,1.233-1.592c0.046-0.246,0.024-0.492,0.113-0.719c0.059-0.196,0.188-0.293,0.351-0.355
c0.163-0.723,0.249-1.474,0.249-2.244C22.305,8.527,20.325,5.287,17.368,3.506z M18.475,5.903c0.013,0.016,0.021,0.029,0.024,0.05
L18.475,5.903z"/>
<circle fill="none" stroke="#838585" stroke-miterlimit="10" cx="12.133" cy="12.227" r="10.38"/>
<radialGradient id="SVGID_9_" cx="12.7031" cy="11.0762" r="4.9285" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#FFFFFF;stop-opacity:0.5"/>
<stop offset="1" style="stop-color:#EFEFF0;stop-opacity:0"/>
</radialGradient>
<circle fill="url(#SVGID_9_)" cx="12.703" cy="11.076" r="4.928"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="Layer_1">
</g>
<g id="Layer_2">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="6.0464" y1="11.2217" x2="17.2651" y2="11.2217">
<stop offset="0" style="stop-color:#C8C8CB"/>
<stop offset="0.0241" style="stop-color:#CBCBCF"/>
<stop offset="0.1455" style="stop-color:#D6D6DB"/>
<stop offset="0.2577" style="stop-color:#D9D9DE"/>
<stop offset="1" style="stop-color:#E6E5E9"/>
</linearGradient>
<rect x="6.046" y="1.012" fill="url(#SVGID_1_)" width="11.219" height="20.42"/>
<path fill="#848685" d="M1.897,0.608v22.197h19.769V0.608H1.897z M5.358,21.376H3.327v-2.03h2.031V21.376z M5.358,17.915H3.327
v-2.033h2.031V17.915z M5.358,14.454H3.327v-2.032h2.031V14.454z M5.358,10.993H3.327V8.96h2.031V10.993z M5.358,7.532H3.327
V5.498h2.031V7.532z M5.358,4.069H3.327V2.034h2.031V4.069z M16.749,21.376H6.801v-8.954h9.948V21.376z M16.749,10.993H6.801
V2.034h9.948V10.993z M20.223,21.376h-2.031v-2.03h2.031V21.376z M20.223,17.915h-2.031v-2.033h2.031V17.915z M20.223,14.454
h-2.031v-2.032h2.031V14.454z M20.223,10.993h-2.031V8.96h2.031V10.993z M20.223,7.532h-2.031V5.498h2.031V7.532z M20.223,4.069
h-2.031V2.034h2.031V4.069z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="11.6348" y1="-55.4155" x2="11.6348" y2="-48.645" gradientTransform="matrix(1 0 0 -1 0.1401 -46.6113)">
<stop offset="0" style="stop-color:#F6F5F7;stop-opacity:0.3"/>
<stop offset="1" style="stop-color:#F6F5F7;stop-opacity:0.7"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M16.186,3.572c0.188,0,0.376,0.006,0.563,0.016V2.034H6.801v6.771
C8.746,5.666,12.222,3.572,16.186,3.572z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="11.6348" y1="-66.0249" x2="11.6348" y2="-59.2573" gradientTransform="matrix(1 0 0 -1 0.1401 -46.6113)">
<stop offset="0" style="stop-color:#F6F5F7;stop-opacity:0.3"/>
<stop offset="1" style="stop-color:#F6F5F7;stop-opacity:0.7"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M16.186,14.187c0.188,0,0.376,0.002,0.563,0.012v-1.552H6.801v6.768
C8.746,16.277,12.222,14.187,16.186,14.187z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="43.5px"
height="42px" viewBox="0 0 43.5 42" enable-background="new 0 0 43.5 42" xml:space="preserve">
<g id="Layer_1">
<g>
<polygon fill="#FEDBB8" points="13.961,35.194 3.228,39.065 7.028,28.349 9.419,25.986 16.538,33.188 "/>
<path fill="#F7AB8D" d="M29.881,5.562L29.881,5.562c3.443-3.402,4.943-4.111,5.964-3.079c0.826,0.836,3.428,3.468,4.255,4.304
c1.021,1.033-0.035,2.71-3.219,5.857l0,0L29.881,5.562z"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="35.5254" y1="-103.0986" x2="12.9276" y2="-102.126" gradientTransform="matrix(0.574 0.5807 -0.7662 0.7573 -73.1595 82.9721)">
<stop offset="0" style="stop-color:#F6CB59"/>
<stop offset="0.5178" style="stop-color:#EFEA59"/>
<stop offset="0.532" style="stop-color:#F1EC6C"/>
<stop offset="0.5607" style="stop-color:#F5F088"/>
<stop offset="0.5932" style="stop-color:#F8F39D"/>
<stop offset="0.6298" style="stop-color:#FBF5AE"/>
<stop offset="0.6724" style="stop-color:#FEF7BC"/>
<stop offset="0.7251" style="stop-color:#FFF9C5"/>
<stop offset="0.7987" style="stop-color:#FFFACA"/>
<stop offset="1" style="stop-color:#FFFBCC"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M14.505,35.048c0,0,1.091-1.469,0.202-2.42c-0.901-0.969-2.367-0.047-2.367-0.047
s0.776-1.717-0.08-2.582c-0.881-0.893-2.396-0.055-2.396-0.055s0.847-1.328,0.096-2.088c-0.763-0.772-1.844-0.476-2.578,0.25
L7.359,28L28.4,7.203l7.097,7.179L14.455,35.179L14.505,35.048z"/>
<rect x="18.271" y="3.63" transform="matrix(0.703 0.7112 -0.7112 0.703 18.0232 -8.2049)" fill="#FFFFFF" width="1.128" height="27.692"/>
<path fill="#ECD616" d="M32.919,11.917l-20.741,20.5c0,0,1.678-0.664,2.348,0.09c0.669,0.756,0.023,1.902,0.023,1.902
L35.158,14.04L32.919,11.917z"/>
<line fill="none" stroke="#DAB228" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="28.16" y1="11.837" x2="14.104" y2="25.731"/>
<line fill="none" stroke="#DAB228" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="30.535" y1="14.241" x2="16.479" y2="28.135"/>
<path fill="#E8BE9C" d="M12.46,32.478l-9.065,6.33l11.176-3.959c0,0,0.488-1.588,0.071-2.035
C13.894,32.009,12.46,32.478,12.46,32.478z"/>
<polygon fill="#FFF3EA" points="9.106,27.868 4.137,38.312 3.696,37.999 7.306,27.924 "/>
<polyline fill="none" stroke="#D3A76C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
6.888,28.565 3.085,39.282 13.819,35.411 "/>
<path fill="none" stroke="#BE942E" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
M14.31,35.04c0,0,1.09-1.469,0.202-2.422c-0.902-0.967-2.368-0.045-2.368-0.045s0.776-1.717-0.079-2.584
c-0.881-0.891-2.396-0.053-2.396-0.053s0.846-1.328,0.095-2.088C9,27.076,7.919,27.372,7.186,28.098l-0.022-0.106L28.204,7.195
l7.096,7.179L14.259,35.171L14.31,35.04z"/>
<path fill="#FDDBCF" d="M30.146,5.564l0.864,0.861c0.329-0.289,1.351-1.265,2.108-1.744c0.761-0.481,1.4-0.81,2.012-0.624
c0.859,0.264,2.844,2.077,4.223,3.216c0.221,0.181-0.541-0.715-0.353-0.538c0,0-3.06-3.487-3.854-4.137
c-0.795-0.649-2.911,0.938-3.674,1.616C30.708,4.892,30.146,5.564,30.146,5.564z"/>
<path fill="#EF9073" d="M39.828,7.605c-0.272,0.424-1.103,1.46-1.842,2.096c-0.68,0.582-1.251,0.626-1.694,0.417
c-0.355-0.167-1.75-1.202-2.48-1.747c-0.181-0.137-1.221-1.046-1.221-1.046l4.291,4.877l2.674-3.018L39.828,7.605z"/>
<path fill="none" stroke="#DD7652" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
M29.853,5.625L29.853,5.625c3.443-3.403,4.944-4.112,5.964-3.08c0.827,0.836,3.429,3.468,4.254,4.304
c1.021,1.032-0.033,2.709-3.217,5.857l0,0L29.853,5.625z"/>
<polygon fill="#666766" stroke="#4C4C4D" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
3.835,36.403 2.714,39.628 5.843,38.505 "/>
</g>
</g>
<g id="Layer_2">
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

@ -1,112 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g id="Layer_1">
</g>
<g id="Layer_2">
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="9.9834" y1="-219.9985" x2="2.5369" y2="-212.552" gradientTransform="matrix(1 0 0 -1 0.1401 -198.4941)">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.3804" style="stop-color:#C7C8CA"/>
<stop offset="0.4911" style="stop-color:#C9CACC"/>
<stop offset="0.512" style="stop-color:#D0D1D3"/>
<stop offset="0.5679" style="stop-color:#DEDFE0"/>
<stop offset="0.6374" style="stop-color:#E8E8E9"/>
<stop offset="0.7345" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M10.779,19.928c0,1.229-1.005,2.232-2.234,2.232h-4.29c-1.23,0-2.235-1.003-2.235-2.232v-4.29
c0-1.229,1.005-2.236,2.235-2.236h4.29c1.229,0,2.234,1.007,2.234,2.236V19.928z"/>
<path fill="#C6C6C5" d="M9.903,19.499c0,0.981-0.805,1.785-1.787,1.785H4.684c-0.983,0-1.788-0.804-1.788-1.785v-3.433
c0-0.985,0.805-1.789,1.788-1.789h3.433c0.982,0,1.787,0.804,1.787,1.789V19.499z"/>
</g>
<g>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="9.9829" y1="-208.3926" x2="2.5364" y2="-200.946" gradientTransform="matrix(1 0 0 -1 0.1401 -198.4941)">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.3804" style="stop-color:#C7C8CA"/>
<stop offset="0.4911" style="stop-color:#C9CACC"/>
<stop offset="0.512" style="stop-color:#D0D1D3"/>
<stop offset="0.5679" style="stop-color:#DEDFE0"/>
<stop offset="0.6374" style="stop-color:#E8E8E9"/>
<stop offset="0.7345" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M10.779,8.321c0,1.229-1.005,2.232-2.234,2.232h-4.29c-1.23,0-2.235-1.003-2.235-2.232v-4.29
c0-1.229,1.005-2.236,2.235-2.236h4.29c1.229,0,2.234,1.007,2.234,2.236V8.321z"/>
<path fill="#C6C6C5" d="M9.903,7.893c0,0.981-0.805,1.785-1.787,1.785H4.684c-0.983,0-1.788-0.804-1.788-1.785V4.46
c0-0.983,0.805-1.789,1.788-1.789h3.433c0.982,0,1.787,0.806,1.787,1.789V7.893z"/>
</g>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="21.2266" y1="-219.9995" x2="13.7793" y2="-212.5523" gradientTransform="matrix(1 0 0 -1 0.1401 -198.4941)">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.3804" style="stop-color:#C7C8CA"/>
<stop offset="0.4911" style="stop-color:#C9CACC"/>
<stop offset="0.512" style="stop-color:#D0D1D3"/>
<stop offset="0.5679" style="stop-color:#DEDFE0"/>
<stop offset="0.6374" style="stop-color:#E8E8E9"/>
<stop offset="0.7345" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M22.022,19.928c0,1.229-1.005,2.232-2.235,2.232h-4.291c-1.229,0-2.235-1.003-2.235-2.232v-4.29
c0-1.229,1.006-2.236,2.235-2.236h4.291c1.23,0,2.235,1.007,2.235,2.236V19.928z"/>
<path fill="#5DB7DF" d="M21.146,19.499c0,0.981-0.805,1.785-1.788,1.785h-3.433c-0.983,0-1.787-0.804-1.787-1.785v-3.433
c0-0.985,0.804-1.789,1.787-1.789h3.433c0.983,0,1.788,0.804,1.788,1.789V19.499z"/>
</g>
<g>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="21.2266" y1="-208.3931" x2="13.7793" y2="-200.9458" gradientTransform="matrix(1 0 0 -1 0.1401 -198.4941)">
<stop offset="0" style="stop-color:#77787B"/>
<stop offset="0.3804" style="stop-color:#C7C8CA"/>
<stop offset="0.4911" style="stop-color:#C9CACC"/>
<stop offset="0.512" style="stop-color:#D0D1D3"/>
<stop offset="0.5679" style="stop-color:#DEDFE0"/>
<stop offset="0.6374" style="stop-color:#E8E8E9"/>
<stop offset="0.7345" style="stop-color:#EDEEEF"/>
<stop offset="1" style="stop-color:#EFEFF0"/>
</linearGradient>
<path fill="url(#SVGID_4_)" d="M22.022,8.321c0,1.229-1.005,2.232-2.235,2.232h-4.291c-1.229,0-2.235-1.003-2.235-2.232v-4.29
c0-1.229,1.006-2.236,2.235-2.236h4.291c1.23,0,2.235,1.007,2.235,2.236V8.321z"/>
<path fill="#C6C6C5" d="M21.146,7.893c0,0.981-0.805,1.785-1.788,1.785h-3.433c-0.983,0-1.787-0.804-1.787-1.785V4.46
c0-0.983,0.804-1.789,1.787-1.789h3.433c0.983,0,1.788,0.806,1.788,1.789V7.893z"/>
</g>
<circle fill="#CFCECE" stroke="#848484" stroke-width="0.75" stroke-miterlimit="10" cx="6.347" cy="6.222" r="1.856"/>
<rect x="6.037" y="3.667" fill="#838585" stroke="#838585" stroke-width="0.75" stroke-linejoin="round" stroke-miterlimit="10" width="0.619" height="0.698"/>
<line fill="none" stroke="#838585" stroke-width="0.75" stroke-linecap="round" stroke-miterlimit="10" x1="6.347" y1="6.22" x2="7.164" y2="5.867"/>
<path fill="none" stroke="#838585" stroke-width="0.75" stroke-linecap="round" stroke-miterlimit="10" d="M8.553,17.782
c0-0.832-0.493-1.509-1.104-1.509c-0.609,0-1.103,0.677-1.103,1.509c0,0.833-0.495,1.506-1.105,1.506
c-0.608,0-1.103-0.673-1.103-1.506"/>
<path fill="none" stroke="#838585" stroke-width="0.75" stroke-miterlimit="10" d="M10.779,8.321c0,1.229-1.005,2.232-2.234,2.232
h-4.29c-1.23,0-2.235-1.003-2.235-2.232v-4.29c0-1.229,1.005-2.236,2.235-2.236h4.29c1.229,0,2.234,1.007,2.234,2.236V8.321z"/>
<path fill="none" stroke="#838585" stroke-width="0.75" stroke-miterlimit="10" d="M22.022,8.321c0,1.229-1.005,2.232-2.235,2.232
h-4.291c-1.229,0-2.235-1.003-2.235-2.232v-4.29c0-1.229,1.006-2.236,2.235-2.236h4.291c1.23,0,2.235,1.007,2.235,2.236V8.321z"/>
<path fill="none" stroke="#838585" stroke-width="0.75" stroke-miterlimit="10" d="M10.779,19.928
c0,1.229-1.005,2.232-2.234,2.232h-4.29c-1.23,0-2.235-1.003-2.235-2.232v-4.29c0-1.229,1.005-2.236,2.235-2.236h4.29
c1.229,0,2.234,1.007,2.234,2.236V19.928z"/>
<g>
<path fill="#C6C6C5" d="M21.146,19.499c0,0.981-0.805,1.785-1.788,1.785h-3.433c-0.983,0-1.787-0.804-1.787-1.785v-3.433
c0-0.985,0.804-1.789,1.787-1.789h3.433c0.983,0,1.788,0.804,1.788,1.789V19.499z"/>
<path fill="none" stroke="#838585" stroke-width="0.75" stroke-miterlimit="10" d="M22.022,19.928
c0,1.229-1.005,2.232-2.235,2.232h-4.291c-1.229,0-2.235-1.003-2.235-2.232v-4.29c0-1.229,1.006-2.236,2.235-2.236h4.291
c1.23,0,2.235,1.007,2.235,2.236V19.928z"/>
</g>
<line fill="none" stroke="#838585" stroke-width="0.75" stroke-linecap="round" stroke-miterlimit="10" x1="15.622" y1="16.765" x2="15.622" y2="18.569"/>
<line fill="none" stroke="#838585" stroke-width="0.75" stroke-linecap="round" stroke-miterlimit="10" x1="16.969" y1="17.452" x2="16.969" y2="18.569"/>
<line fill="none" stroke="#838585" stroke-width="0.75" stroke-linecap="round" stroke-miterlimit="10" x1="18.314" y1="16.765" x2="18.314" y2="18.569"/>
<line fill="none" stroke="#838585" stroke-width="0.75" stroke-linecap="round" stroke-miterlimit="10" x1="19.661" y1="17.452" x2="19.661" y2="18.569"/>
<rect x="16.071" y="4.19" fill="#CFCECE" stroke="#848484" stroke-width="0.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" width="3.216" height="3.888"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

@ -1,131 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
x="0px" y="0px" width="107px" height="107px" viewBox="-17.174 -24.39 107 107"
overflow="visible" enable-background="new -17.174 -24.39 107 107" xml:space="preserve">
<defs>
</defs>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="12.2129" y1="39.3477" x2="59.75" y2="39.3477">
<stop offset="0" style="stop-color:#898989"/>
<stop offset="0.0798" style="stop-color:#58585A"/>
<stop offset="0.4447" style="stop-color:#474749"/>
<stop offset="0.7853" style="stop-color:#3D3D3F"/>
<stop offset="0.8232" style="stop-color:#464648"/>
<stop offset="0.8857" style="stop-color:#5F5F61"/>
<stop offset="0.9646" style="stop-color:#87888A"/>
<stop offset="1" style="stop-color:#9B9C9E"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M59.45,37.001l-1.48-9.818l-44.251,1.82l-1.206,7.998c-0.195,0.645-0.3,1.307-0.3,1.981
c0,6.921,10.642,12.53,23.769,12.53s23.769-5.609,23.769-12.53C59.75,38.308,59.646,37.646,59.45,37.001z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="13.1631" y1="38.3486" x2="58.7988" y2="38.3486">
<stop offset="0" style="stop-color:#898989"/>
<stop offset="0.0859" style="stop-color:#676769"/>
<stop offset="0.268" style="stop-color:#616163"/>
<stop offset="0.4049" style="stop-color:#58585A"/>
<stop offset="0.908" style="stop-color:#676769"/>
<stop offset="0.9389" style="stop-color:#6D6D6F"/>
<stop offset="0.9815" style="stop-color:#7F7F80"/>
<stop offset="1" style="stop-color:#898989"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M58.512,36.071l-1.422-9.523l-42.48,1.766l-1.158,7.758c-0.188,0.625-0.288,1.268-0.288,1.922
c0,6.713,10.217,12.155,22.818,12.155s22.817-5.442,22.817-12.155C58.799,37.339,58.699,36.696,58.512,36.071z"/>
</g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="13.3369" y1="31.8486" x2="58.6104" y2="31.8486">
<stop offset="0" style="stop-color:#898989"/>
<stop offset="0.0859" style="stop-color:#3D3D3F"/>
<stop offset="0.39" style="stop-color:#434345"/>
<stop offset="0.8089" style="stop-color:#555557"/>
<stop offset="0.865" style="stop-color:#58585A"/>
<stop offset="1" style="stop-color:#58585A"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M13.337,31.536c2,0.104,6.124,4.434,12.807,6.387c6.149,1.796,12.109,2.05,17.251,0
c8.431-3.361,13.344-8.442,15.216-6.49l-1-7.102H14.455L13.337,31.536z"/>
<polygon fill="#4C4C4C" points="36.026,31.402 35.981,31.382 35.981,36.613 36.034,36.638 72.053,19.763 72.053,17.504
67.232,17.504 "/>
<polygon fill="#58585A" points="35.981,31.382 4.822,17.504 0,17.504 0,19.763 35.981,36.613 "/>
<g>
<polygon fill="#B0B2B3" points="36.034,0.628 0,17.504 36.034,34.38 72.053,17.504 "/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="0" y1="17.5039" x2="72.0527" y2="17.5039">
<stop offset="0" style="stop-color:#676769"/>
<stop offset="0.3361" style="stop-color:#6D6D6F"/>
<stop offset="0.799" style="stop-color:#7F7F80"/>
<stop offset="1" style="stop-color:#898989"/>
</linearGradient>
<polygon fill="url(#SVGID_4_)" points="36.034,0.628 0,17.504 36.034,34.38 72.053,17.504 "/>
</g>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="0" y1="25.5254" x2="72.0527" y2="25.5254">
<stop offset="0" style="stop-color:#58585A"/>
<stop offset="0.2484" style="stop-color:#5B5B5D"/>
<stop offset="0.4496" style="stop-color:#656567"/>
<stop offset="0.6342" style="stop-color:#767678"/>
<stop offset="0.8089" style="stop-color:#8D8E90"/>
<stop offset="0.9752" style="stop-color:#ABADAE"/>
<stop offset="1" style="stop-color:#B0B2B3"/>
</linearGradient>
<polygon fill="url(#SVGID_5_)" points="71.615,16.671 72.053,17.504 36.034,34.38 0,17.504 0.438,16.671 "/>
<g>
<polygon fill="#B0B2B3" points="36.034,0 0.438,16.671 36.034,33.341 71.615,16.671 "/>
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="0.4375" y1="16.6704" x2="71.6152" y2="16.6704">
<stop offset="0" style="stop-color:#3D3D3F"/>
<stop offset="0.1996" style="stop-color:#434345"/>
<stop offset="0.4751" style="stop-color:#555556"/>
<stop offset="0.7934" style="stop-color:#727273"/>
<stop offset="1" style="stop-color:#898989"/>
</linearGradient>
<polygon fill="url(#SVGID_6_)" points="36.034,0 0.438,16.671 36.034,33.341 71.615,16.671 "/>
</g>
<polyline fill="none" stroke="#F4CC4D" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
37.981,15.245 17.606,24.812 17.606,40.544 "/>
<g>
<path fill="#C2981E" d="M20.072,38.685H15.14l-2.854,15.502c0,0.743,2.381,2.803,5.32,2.803c2.938,0,5.32-2.06,5.32-2.803
L20.072,38.685z"/>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="16.2759" y1="47.8516" x2="20.8228" y2="47.5343">
<stop offset="0.5031" style="stop-color:#F4CC4D"/>
<stop offset="0.6585" style="stop-color:#EEC649"/>
<stop offset="0.8725" style="stop-color:#DCB43E"/>
<stop offset="1" style="stop-color:#CEA636"/>
</linearGradient>
<path fill="url(#SVGID_7_)" d="M20.072,38.685H15.14l-2.854,15.502c0,0.743,2.381,2.803,5.32,2.803c2.938,0,5.32-2.06,5.32-2.803
L20.072,38.685z"/>
</g>
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="18.2104" y1="44.4365" x2="20.937" y2="51.7485">
<stop offset="0" style="stop-color:#EAC049"/>
<stop offset="0.3765" style="stop-color:#E4BA45"/>
<stop offset="0.8952" style="stop-color:#D2AA39"/>
<stop offset="0.9877" style="stop-color:#CEA636"/>
</linearGradient>
<polygon fill="url(#SVGID_8_)" points="20.535,56.606 18.673,41.413 19.269,41.341 21.131,56.533 "/>
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="19.7891" y1="45.0312" x2="22.4774" y2="51.315">
<stop offset="0" style="stop-color:#CEA636"/>
<stop offset="0.416" style="stop-color:#CBA230"/>
<stop offset="0.9877" style="stop-color:#C2981E"/>
</linearGradient>
<polygon fill="url(#SVGID_9_)" points="22.019,55.55 19.634,40.843 20.226,40.747 22.61,55.454 "/>
<path fill="#B79537" d="M20.384,40.379c-0.584,0.987-1.588,1.745-2.814,1.745c-1.229,0-2.188-0.593-2.771-1.58l0.172-1.494
l5.169-0.275L20.384,40.379z"/>
<radialGradient id="SVGID_10_" cx="16.71" cy="36.7051" r="5.0908" gradientUnits="userSpaceOnUse">
<stop offset="0.5031" style="stop-color:#F4CC4D"/>
<stop offset="0.6585" style="stop-color:#EEC649"/>
<stop offset="0.8725" style="stop-color:#DCB43E"/>
<stop offset="1" style="stop-color:#CEA636"/>
</radialGradient>
<circle fill="url(#SVGID_10_)" cx="17.606" cy="38.685" r="2.923"/>
<g>
<path fill="#B79537" d="M17.606,56.989c-2.939,0-5.32-2.06-5.32-2.803v0.799c0,0.742,2.381,2.803,5.32,2.803
c2.938,0,5.32-2.061,5.32-2.803v-0.799C22.927,54.93,20.545,56.989,17.606,56.989z"/>
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="13.0371" y1="56.083" x2="22.2794" y2="55.6343">
<stop offset="0" style="stop-color:#F4CC4D"/>
<stop offset="0.2114" style="stop-color:#EEC647"/>
<stop offset="0.5031" style="stop-color:#DDB437"/>
<stop offset="0.8282" style="stop-color:#C2981E"/>
<stop offset="0.9877" style="stop-color:#D3A522"/>
</linearGradient>
<path fill="url(#SVGID_11_)" d="M17.606,56.989c-2.939,0-5.32-2.06-5.32-2.803v0.799c0,0.742,2.381,2.803,5.32,2.803
c2.938,0,5.32-2.061,5.32-2.803v-0.799C22.927,54.93,20.545,56.989,17.606,56.989z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.7 KiB

@ -339,32 +339,11 @@
<file>images/closeDisabled.svg</file>
<file>images/menuDisabled.svg</file>
<file>images/moveUpDisabled.svg</file>
<file>images/teacher_close.png</file>
<file>images/teacher_open.png</file>
<file>images/teacher_close_disabled.png</file>
<file>style.qss</file>
<file>images/teacher_open_disabled.png</file>
<file>images/libpalette/WebSearchCategory.svg</file>
<file>images/download_close.png</file>
<file>images/download_open.png</file>
<file>images/tab_mask.png</file>
<file>images/duration1.png</file>
<file>images/duration2.png</file>
<file>images/duration3.png</file>
<file>images/licenses/ccby.png</file>
<file>images/licenses/ccbync.png</file>
<file>images/licenses/ccbyncnd.png</file>
<file>images/licenses/ccbyncsa.png</file>
<file>images/licenses/ccbynd.png</file>
<file>images/licenses/ccbysa.png</file>
<file>images/teacherGuide/audio_24x24.svg</file>
<file>images/teacherGuide/image_24x24.svg</file>
<file>images/teacherGuide/link_24x24.svg</file>
<file>images/teacherGuide/movie_24x24.svg</file>
<file>images/teacherGuide/w3c_24x24.svg</file>
<file>images/teacherGuide/pencil.svg</file>
<file>images/duplicateDisabled.svg</file>
<file>images/teacherGuide/flash_24x24.svg</file>
<file>images/toque.svg</file>
</qresource>
</RCC>

@ -1215,13 +1215,17 @@ UBGraphicsGroupContainerItem *UBCFFSubsetAdaptor::UBCFFSubsetReader::parseIwbGro
pStrokesGroup->addToGroup(poly);
}
}
if (currentStroke->polygons().empty())
if (currentStroke->polygons().empty()){
delete currentStroke;
currentStroke = NULL;
}
if (pStrokesGroup->childItems().count())
mCurrentScene->addItem(pStrokesGroup);
else
else{
delete pStrokesGroup;
pStrokesGroup = NULL;
}
if (pStrokesGroup)
{

@ -51,10 +51,10 @@ QString UBExportCFF::exportExtention()
void UBExportCFF::persist(UBDocumentProxy* pDocument)
{
QString src = pDocument->persistencePath();
if (!pDocument)
return;
QString src = pDocument->persistencePath();
QString filename = askForFileName(pDocument, tr("Export as IWB File"));
@ -82,4 +82,4 @@ void UBExportCFF::persist(UBDocumentProxy* pDocument)
}
}
}

@ -179,11 +179,7 @@ UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString&
return NULL;
}
bool addTitlePage = false;
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() && !QFile(documentRootFolder+"/page000.svg").exists())
addTitlePage=true;
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup, "", false, addTitlePage);
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup, "", false, false);
UBApplication::showMessage(tr("Import successful."));
return newDocument;
}

@ -117,15 +117,6 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
// introduced in UB 4.4
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri, "updated-at", UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTimeUtc()));
// introduced in OpenSankore 1.40.00
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionTitle,proxy->metaData(UBSettings::sessionTitle).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionAuthors,proxy->metaData(UBSettings::sessionAuthors).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionObjectives,proxy->metaData(UBSettings::sessionObjectives).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionKeywords,proxy->metaData(UBSettings::sessionKeywords).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionGradeLevel,proxy->metaData(UBSettings::sessionGradeLevel).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionSubjects,proxy->metaData(UBSettings::sessionSubjects).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionType,proxy->metaData(UBSettings::sessionType).toString());
xmlWriter.writeTextElement(UBSettings::uniboardDocumentNamespaceUri,UBSettings::sessionLicence,proxy->metaData(UBSettings::sessionLicence).toString());
xmlWriter.writeEndElement(); //dc:Description
xmlWriter.writeEndElement(); //RDF
@ -226,47 +217,6 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath)
metadata.insert(UBSettings::documentUpdatedAt, xml.readElementText());
updatedAtFound = true;
}
else if (xml.name() == UBSettings::sessionTitle // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionTitle, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionAuthors // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionAuthors, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionObjectives // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionObjectives, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionKeywords // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionKeywords, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionGradeLevel // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionGradeLevel, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionSubjects // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionSubjects, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionType // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionType, xml.readElementText());
}
else if (xml.name() == UBSettings::sessionLicence // introduced in OpenSankore 1.40.00
&& xml.namespaceUri() == UBSettings::uniboardDocumentNamespaceUri)
{
metadata.insert(UBSettings::sessionLicence, xml.readElementText());
}
metadata.insert(UBSettings::documentVersion, docVersion);
}

@ -63,11 +63,6 @@
#include "core/UBPersistenceManager.h"
#include "core/UBApplication.h"
#include "gui/UBTeacherGuideWidget.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "interfaces/IDataStorage.h"
#include "document/UBDocumentContainer.h"
#include "pdf/PDFRenderer.h"
@ -92,8 +87,6 @@ const QString tStrokeGroup = "strokeGroup";
const QString tGroups = "groups";
const QString aId = "id";
QMap<QString,IDataStorage*> UBSvgSubsetAdaptor::additionalElementToStore;
QString UBSvgSubsetAdaptor::toSvgTransform(const QMatrix& matrix)
{
return QString("matrix(%1, %2, %3, %4, %5, %6)")
@ -228,17 +221,6 @@ void UBSvgSubsetAdaptor::setSceneUuid(UBDocumentProxy* proxy, const int pageInde
}
}
bool UBSvgSubsetAdaptor::addElementToBeStored(QString domName, IDataStorage *dataStorageClass)
{
if(domName.isEmpty() || additionalElementToStore.contains(domName)){
qWarning() << "Error adding the element that should persist";
return false;
}
additionalElementToStore.insert(domName,dataStorageClass);
return true;
}
QString UBSvgSubsetAdaptor::uniboardDocumentNamespaceUriFromVersion(int mFileVersion)
{
return mFileVersion >= 40200 ? UBSettings::uniboardDocumentNamespaceUri : sFormerUniboardDocumentNamespaceUri;
@ -323,54 +305,6 @@ UBGraphicsScene* UBSvgSubsetAdaptor::loadScene(UBDocumentProxy* proxy, const QBy
return reader.loadScene();
}
QString UBSvgSubsetAdaptor::readTeacherGuideNode(int sceneIndex)
{
QString result;
QString fileName = UBApplication::boardController->selectedDocument()->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sceneIndex);
QFile file(fileName);
file.open(QIODevice::ReadOnly);
QByteArray fileByteArray=file.readAll();
file.close();
QXmlStreamReader mXmlReader(fileByteArray);
while (!mXmlReader.atEnd())
{
mXmlReader.readNext();
if (mXmlReader.isStartElement())
{
if (mXmlReader.name() == "teacherBar" || mXmlReader.name() == "teacherGuide"){
result.clear();
result += "<teacherGuide version=\"" + mXmlReader.attributes().value("version").toString() + "\">";
result += "\n";
}
else if (mXmlReader.name() == "media" || mXmlReader.name() == "link" || mXmlReader.name() == "title" || mXmlReader.name() == "comment" || mXmlReader.name() == "action")
{
result += "<" + mXmlReader.name().toString() + " ";
foreach(QXmlStreamAttribute attribute, mXmlReader.attributes())
result += attribute.name().toString() + "=\"" + attribute.value().toString() + "\" ";
result += " />\n";
}
else
{
// NOOP
}
}
else if (mXmlReader.isEndElement() && (mXmlReader.name() == "teacherBar" || mXmlReader.name() == "teacherGuide")){
result += "</teacherGuide>";
}
}
if (mXmlReader.hasError())
{
qWarning() << "error parsing Sankore file " << mXmlReader.errorString();
}
return result;
}
UBSvgSubsetAdaptor::UBSvgSubsetReader::UBSvgSubsetReader(UBDocumentProxy* pProxy, const QByteArray& pXmlData)
: mXmlReader(pXmlData)
, mProxy(pProxy)
@ -1070,7 +1004,8 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::writeSvgElement()
bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
{
if (mScene->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()))
Q_UNUSED(pageIndex);
if (mScene->isModified())
{
//Creating dom structure to store information
@ -1108,7 +1043,6 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
qSort(items.begin(), items.end(), itemZIndexComp);
UBGraphicsStroke *openStroke = 0;
int nextStroke = 0;
bool groupHoldsInfo = false;
@ -1121,32 +1055,12 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
if(strokesGroupItem && strokesGroupItem->isVisible()){
// Add the polygons
//parsing number of polygons into one polygon
qDebug() << "parsing stroke number" << nextStroke++;
UBGraphicsPolygonItem *resultPoly = 0;
foreach(QGraphicsItem* item, strokesGroupItem->childItems()) {
foreach(QGraphicsItem* item, strokesGroupItem->childItems()){
UBGraphicsPolygonItem* poly = qgraphicsitem_cast<UBGraphicsPolygonItem*>(item);
if (!poly)
continue;
if (!resultPoly) {
resultPoly = poly;
continue;
if(NULL != poly){
polygonItemToSvgPolygon(poly, true);
items.removeOne(poly);
}
QPolygonF unitedPolygon = resultPoly->polygon().united(poly->polygon());
resultPoly->setPolygon(unitedPolygon);
items.removeOne(poly);
}
if (resultPoly) {
resultPoly->setZValue(strokesGroupItem->zValue());
//Claudio: the painter path simplification remove all the polygons overlap
QPainterPath painterPath;
painterPath.addPolygon(resultPoly->polygon());
painterPath = painterPath.simplified();
resultPoly->setPolygon(painterPath.toFillPolygon());
polygonItemToSvgPolygon(resultPoly, false);
items.removeOne(resultPoly);
}
}
@ -1347,29 +1261,6 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
openStroke = 0;
}
QMap<QString,IDataStorage*> elements = getAdditionalElementToStore();
QVector<tIDataStorage*> dataStorageItems;
if(elements.value("teacherGuide"))
dataStorageItems = elements.value("teacherGuide")->save(pageIndex);
foreach(tIDataStorage* eachItem, dataStorageItems){
if(eachItem->type == eElementType_START){
mXmlWriter.writeStartElement(eachItem->name);
foreach(QString key,eachItem->attributes.keys())
mXmlWriter.writeAttribute(key,eachItem->attributes.value(key));
}
else if (eachItem->type == eElementType_END)
mXmlWriter.writeEndElement();
else if (eachItem->type == eElementType_UNIQUE){
mXmlWriter.writeStartElement(eachItem->name);
foreach(QString key,eachItem->attributes.keys())
mXmlWriter.writeAttribute(key,eachItem->attributes.value(key));
mXmlWriter.writeEndElement();
}
else
qWarning() << "unknown type";
}
//writing group data
if (groupRoot.hasChildNodes()) {
mXmlWriter.writeStartElement(tGroups);
@ -1423,18 +1314,16 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistGroupToDom(QGraphicsItem *gro
QDomElement curGroupElement = groupDomDocument->createElement(tGroup);
curGroupElement.setAttribute(aId, uuid);
curParent->appendChild(curGroupElement);
foreach (QGraphicsItem *item, groupItem->childItems()) {
QUuid tmpUuid = UBGraphicsScene::getPersonalUuid(item);
if (!tmpUuid.isNull()) {
if (item->type() == UBGraphicsGroupContainerItem::Type && item->childItems().count())
persistGroupToDom(item, curParent, groupDomDocument);
}
else {
QDomElement curSubElement = groupDomDocument->createElement(tElement);
curSubElement.setAttribute(aId, tmpUuid);
curGroupElement.appendChild(curSubElement);
else {
QDomElement curSubElement = groupDomDocument->createElement(tElement);
curSubElement.setAttribute(aId, tmpUuid);
curGroupElement.appendChild(curSubElement);
}
}
}
}
@ -1553,7 +1442,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::polygonItemToSvgPolygon(UBGraphicsPo
QPolygonF polygon = polygonItem->polygon();
int pointsCount = polygon.size();
if (polygonItem && pointsCount > 0)
if (pointsCount > 0)
{
mXmlWriter.writeStartElement("polygon");
@ -2264,8 +2153,14 @@ void UBSvgSubsetAdaptor::UBSvgSubsetReader::graphicsItemFromSvg(QGraphicsItem* g
QStringRef ubZValue = mXmlReader.attributes().value(mNamespaceUri, "z-value");
if (!ubZValue.isNull())
UBGraphicsItem::assignZValue(gItem, ubZValue.toString().toFloat());
if (!ubZValue.isNull()){
// FIX
// In the firsts zvalue implemenations values outside the boudaries have been used.
// No boundaries specified on documentation but to small values are not correctly handled.
qreal zValue = ubZValue.toString().toFloat();
while(zValue < -999999) zValue /= 10.;
UBGraphicsItem::assignZValue(gItem, zValue);
}
UBItem* ubItem = dynamic_cast<UBItem*>(gItem);

@ -48,7 +48,6 @@ class UBGraphicsStroke;
class UBPersistenceManager;
class UBGraphicsTriangle;
class UBGraphicsCache;
class IDataStorage;
class UBGraphicsGroupContainerItem;
class UBGraphicsStrokesGroup;
@ -68,13 +67,9 @@ class UBSvgSubsetAdaptor
static QUuid sceneUuid(UBDocumentProxy* proxy, const int pageIndex);
static void setSceneUuid(UBDocumentProxy* proxy, const int pageIndex, QUuid pUuid);
static bool addElementToBeStored(QString domName,IDataStorage* dataStorageClass);
static void convertPDFObjectsToImages(UBDocumentProxy* proxy);
static void convertSvgImagesToImages(UBDocumentProxy* proxy);
static QMap<QString,IDataStorage*> getAdditionalElementToStore() { return additionalElementToStore;}
static const QString nsSvg;
static const QString nsXLink;
static const QString nsXHtml;
@ -101,10 +96,6 @@ class UBSvgSubsetAdaptor
static QString toSvgTransform(const QMatrix& matrix);
static QMatrix fromSvgTransform(const QString& transform);
static QMap<QString,IDataStorage*> additionalElementToStore;
class UBSvgSubsetReader
{

@ -31,10 +31,6 @@
#include "core/UBApplication.h"
#include "core/UBSettings.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "gui/UBTeacherGuideWidget.h"
#include "board/UBBoardController.h"
#include "board/UBBoardPaletteManager.h"
@ -104,20 +100,8 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex)
return pix;
}
void UBThumbnailAdaptor::updateDocumentToHandleZeroPage(UBDocumentProxy* proxy)
{
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){
QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", 0);
QFile file(fileName);
if(!file.exists()){
UBPersistenceManager::persistenceManager()->persistDocumentScene(proxy,new UBGraphicsScene(proxy),0);
}
}
}
void UBThumbnailAdaptor::load(UBDocumentProxy* proxy, QList<const QPixmap*>& list)
{
updateDocumentToHandleZeroPage(proxy);
generateMissingThumbnails(proxy);
foreach(const QPixmap* pm, list){
@ -135,7 +119,7 @@ void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* p
QFile thumbFile(fileName);
if (pScene->isModified() || overrideModified || !thumbFile.exists() || UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified())
if (pScene->isModified() || overrideModified || !thumbFile.exists())
{
qreal nominalWidth = pScene->nominalSize().width();
qreal nominalHeight = pScene->nominalSize().height();
@ -167,12 +151,6 @@ void UBThumbnailAdaptor::persistScene(UBDocumentProxy* proxy, UBGraphicsScene* p
pScene->render(&painter, imageRect, sceneRect, Qt::KeepAspectRatio);
if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()){
QPixmap toque(":images/toque.svg");
painter.setOpacity(0.6);
painter.drawPixmap(QPoint(width - toque.width(),0),toque);
}
pScene->setRenderingContext(UBGraphicsScene::Screen);
pScene->setRenderingQuality(UBItem::RenderingQualityNormal);

@ -44,7 +44,6 @@ public:
private:
static void generateMissingThumbnails(UBDocumentProxy* proxy);
static void updateDocumentToHandleZeroPage(UBDocumentProxy* proxy);
UBThumbnailAdaptor() {}
};

@ -1,61 +0,0 @@
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBWebPublisher.h"
#include "document/UBDocumentProxy.h"
#include "adaptors/publishing/UBDocumentPublisher.h"
#include "core/memcheck.h"
UBWebPublisher::UBWebPublisher(QObject *parent)
: UBExportAdaptor(parent)
{
// NOOP
}
UBWebPublisher::~UBWebPublisher()
{
// NOOP
}
QString UBWebPublisher::exportName()
{
return tr("Publish Document on Sankore Web");
}
void UBWebPublisher::persist(UBDocumentProxy* pDocumentProxy)
{
if (!pDocumentProxy)
return;
UBDocumentPublisher* publisher = new UBDocumentPublisher(pDocumentProxy, this); // the publisher will self delete when publication finishes
publisher->publish();
}

@ -1,51 +0,0 @@
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBWEBPUBLISHER_H_
#define UBWEBPUBLISHER_H_
#include <QtGui>
#include "UBExportAdaptor.h"
#include "frameworks/UBFileSystemUtils.h"
#include "ui_webPublishing.h"
class UBDocumentProxy;
class UBServerXMLHttpRequest;
class UBWebPublisher : public UBExportAdaptor
{
Q_OBJECT;
public:
UBWebPublisher(QObject *parent = 0);
virtual ~UBWebPublisher();
virtual QString exportName();
virtual void persist(UBDocumentProxy* pDocument);
};
#endif /* UBWEBPUBLISHER_H_ */

@ -12,7 +12,6 @@ HEADERS += src/adaptors/UBExportAdaptor.h\
src/adaptors/UBImportImage.h \
src/adaptors/UBIniFileParser.h \
src/adaptors/UBExportWeb.h \
src/adaptors/UBWebPublisher.h \
src/adaptors/UBImportCFF.h \
src/adaptors/UBExportCFF.h \
src/adaptors/UBCFFSubsetAdaptor.h
@ -35,7 +34,6 @@ SOURCES += src/adaptors/UBExportAdaptor.cpp\
src/adaptors/UBImportImage.cpp \
src/adaptors/UBIniFileParser.cpp \
src/adaptors/UBExportWeb.cpp \
src/adaptors/UBWebPublisher.cpp \
src/adaptors/UBImportCFF.cpp \
src/adaptors/UBExportCFF.cpp \
src/adaptors/UBCFFSubsetAdaptor.cpp \

@ -21,645 +21,9 @@
#include <QFileInfo>
#include "UBDocumentPublisher.h"
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBStringUtils.h"
#include "network/UBNetworkAccessManager.h"
#include "network/UBServerXMLHttpRequest.h"
#include "core/UBDocumentManager.h"
#include "core/UBApplication.h"
#include "core/UBPersistenceManager.h"
#include "core/UBApplicationController.h"
#include "board/UBBoardController.h"
#include "gui/UBMainWindow.h"
#include "document/UBDocumentProxy.h"
#include "document/UBDocumentContainer.h"
#include "domain/UBGraphicsWidgetItem.h"
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include "quazip.h"
#include "quazipfile.h"
THIRD_PARTY_WARNINGS_ENABLE
#include "adaptors/UBExportFullPDF.h"
#include "adaptors/UBExportDocument.h"
#include "adaptors/UBSvgSubsetAdaptor.h"
#include "UBSvgSubsetRasterizer.h"
#include "../../core/UBApplication.h"
#include "core/memcheck.h"
UBDocumentPublisher::UBDocumentPublisher(UBDocumentProxy* pDocument, QObject *parent)
: QObject(parent)
, mSourceDocument(pDocument)
, mUsername("")
, mPassword("")
, bLoginCookieSet(false)
{
init();
}
UBDocumentPublisher::~UBDocumentPublisher()
{
}
void UBDocumentPublisher::publish()
{
//check that the username and password are stored on preferences
UBSettings* settings = UBSettings::settings();
if(settings->communityUsername().isEmpty() || settings->communityPassword().isEmpty()){
UBApplication::showMessage(tr("Credentials has to not been filled out yet."));
qDebug() << "trying to connect to community without the required credentials";
return;
}
mUsername = settings->communityUsername();
mPassword = settings->communityPassword();
UBPublicationDlg dlg;
if(QDialog::Accepted == dlg.exec())
{
mDocInfos.title = dlg.title();
mDocInfos.description = dlg.description();
buildUbwFile();
UBApplication::showMessage(tr("Uploading Sankore File on Web."));
sendUbw(mUsername, mPassword);
}
}
void UBDocumentPublisher::buildUbwFile()
{
QDir d;
d.mkpath(UBFileSystemUtils::defaultTempDirPath());
QString tmpDir = UBFileSystemUtils::createTempDir();
if (UBFileSystemUtils::copyDir(mSourceDocument->persistencePath(), tmpDir))
{
QString documentName = mSourceDocument->name();
mPublishingPath = tmpDir;
mPublishingSize = mSourceDocument->pageCount();
rasterizeScenes();
upgradeDocumentForPublishing();
UBExportFullPDF pdfExporter;
pdfExporter.setVerbode(false);
pdfExporter.persistsDocument(mSourceDocument, mPublishingPath + "/" + documentName + ".pdf");
UBExportDocument ubzExporter;
ubzExporter.setVerbode(false);
ubzExporter.persistsDocument(mSourceDocument, mPublishingPath + "/" + documentName + ".ubz");
// remove all useless files
for (int pageIndex = 0; pageIndex < mPublishingSize; pageIndex++) {
QString filename = mPublishingPath + UBFileSystemUtils::digitFileFormat("/page%1.svg",pageIndex);
QFile::remove(filename);
}
UBFileSystemUtils::deleteDir(mPublishingPath + "/" + UBPersistenceManager::imageDirectory);
UBFileSystemUtils::deleteDir(mPublishingPath + "/" + UBPersistenceManager::objectDirectory);
UBFileSystemUtils::deleteDir(mPublishingPath + "/" + UBPersistenceManager::videoDirectory);
UBFileSystemUtils::deleteDir(mPublishingPath + "/" + UBPersistenceManager::audioDirectory);
mTmpZipFile = UBFileSystemUtils::defaultTempDirPath() + "/" + UBStringUtils::toCanonicalUuid(QUuid::createUuid()) + ".ubw~";
QuaZip zip(mTmpZipFile);
zip.setFileNameCodec("UTF-8");
if (!zip.open(QuaZip::mdCreate))
{
qWarning() << "Export failed. Cause: zip.open(): " << zip.getZipError() << "," << mTmpZipFile;
QApplication::restoreOverrideCursor();
return;
}
QuaZipFile outFile(&zip);
if (!UBFileSystemUtils::compressDirInZip(mPublishingPath, "", &outFile, true))
{
qWarning("Export failed. compressDirInZip failed ...");
zip.close();
UBApplication::showMessage(tr("Export failed."));
QApplication::restoreOverrideCursor();
return;
}
if (zip.getZipError() != 0)
{
qWarning("Export failed. Cause: zip.close(): %d", zip.getZipError());
zip.close();
UBApplication::showMessage(tr("Export failed."));
QApplication::restoreOverrideCursor();
return;
}
zip.close();
}
else
{
UBApplication::showMessage(tr("Export canceled ..."));
QApplication::restoreOverrideCursor();
}
}
void UBDocumentPublisher::rasterizeScenes()
{
for (int pageIndex = 0; pageIndex < mPublishingSize; pageIndex++)
{
UBApplication::showMessage(tr("Converting page %1/%2 ...").arg(UBDocumentContainer::pageFromSceneIndex(pageIndex)).arg(mPublishingSize), true);
UBDocumentProxy publishingDocument(mPublishingPath);
UBSvgSubsetRasterizer rasterizer(&publishingDocument, pageIndex);
QString filename = mPublishingPath + UBFileSystemUtils::digitFileFormat("/page%1.jpg",pageIndex);
rasterizer.rasterizeToFile(filename);
}
}
void UBDocumentPublisher::updateGoogleMapApiKey()
{
QDir widgestDir(mPublishingPath + "/" + UBPersistenceManager::widgetDirectory);
QString uniboardWebGoogleMapApiKey = UBSettings::settings()->uniboardWebGoogleMapApiKey->get().toString();
foreach(QFileInfo dirInfo, widgestDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot))
{
QString config = UBFileSystemUtils::readTextFile(dirInfo.absoluteFilePath() + "/config.xml").toLower();
if (config.contains("google") && config.contains("map"))
{
QDir widgetDir(dirInfo.absoluteFilePath());
foreach(QFileInfo fileInfo, widgetDir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot))
{
QFile file(fileInfo.absoluteFilePath());
if (file.open(QIODevice::ReadWrite))
{
QTextStream stream(&file);
QString content = stream.readAll();
if (content.contains("ABQIAAAA6vtVqAUu8kZ_eTz7c8kwSBT9UCAhw_xm0LNFHsWmQxTJAdp5lxSY_5r-lZriY_7sACaMnl80JcX6Og"))
{
content.replace("ABQIAAAA6vtVqAUu8kZ_eTz7c8kwSBT9UCAhw_xm0LNFHsWmQxTJAdp5lxSY_5r-lZriY_7sACaMnl80JcX6Og",
uniboardWebGoogleMapApiKey);
file.resize(0);
file.write(content.toUtf8());
}
file.close();
}
}
}
}
}
void UBDocumentPublisher::upgradeDocumentForPublishing()
{
for (int pageIndex = 0; pageIndex < mPublishingSize; pageIndex++)
{
UBDocumentProxy publishingDocument(mPublishingPath);
UBGraphicsScene *scene = UBSvgSubsetAdaptor::loadScene(&publishingDocument, pageIndex);
QList<UBGraphicsW3CWidgetItem*> widgets;
foreach(QGraphicsItem* item, scene->items()){
UBGraphicsW3CWidgetItem *widgetItem = dynamic_cast<UBGraphicsW3CWidgetItem*>(item);
if(widgetItem){
generateWidgetPropertyScript(widgetItem, UBDocumentContainer::pageFromSceneIndex(pageIndex));
widgets << widgetItem;
}
}
QString filename = mPublishingPath + UBFileSystemUtils::digitFileFormat("/page%1.json",pageIndex);
QFile jsonFile(filename);
if (jsonFile.open(QIODevice::WriteOnly | QIODevice::Truncate))
{
jsonFile.write("{\n");
jsonFile.write(QString(" \"scene\": {\n").toUtf8());
jsonFile.write(QString(" \"x\": %1,\n").arg(scene->normalizedSceneRect().x()).toUtf8());
jsonFile.write(QString(" \"y\": %1,\n").arg(scene->normalizedSceneRect().y()).toUtf8());
jsonFile.write(QString(" \"width\": %1,\n").arg(scene->normalizedSceneRect().width()).toUtf8());
jsonFile.write(QString(" \"height\": %1\n").arg(scene->normalizedSceneRect().height()).toUtf8());
jsonFile.write(QString(" },\n").toUtf8());
jsonFile.write(QString(" \"widgets\": [\n").toUtf8());
bool first = true;
foreach(UBGraphicsW3CWidgetItem* widget, widgets)
{
if (!first)
jsonFile.write(QString(" ,\n").toUtf8());
jsonFile.write(QString(" {\n").toUtf8());
jsonFile.write(QString(" \"uuid\": \"%1\",\n").arg(UBStringUtils::toCanonicalUuid(widget->uuid())).toUtf8());
jsonFile.write(QString(" \"id\": \"%1\",\n").arg(widget->metadatas().id).toUtf8());
jsonFile.write(QString(" \"name\": \"%1\",\n").arg(widget->metadatas().name).toUtf8());
jsonFile.write(QString(" \"description\": \"%1\",\n").arg(widget->metadatas().description).toUtf8());
jsonFile.write(QString(" \"author\": \"%1\",\n").arg(widget->metadatas().author).toUtf8());
jsonFile.write(QString(" \"authorEmail\": \"%1\",\n").arg(widget->metadatas().authorEmail).toUtf8());
jsonFile.write(QString(" \"authorHref\": \"%1\",\n").arg(widget->metadatas().authorHref).toUtf8());
jsonFile.write(QString(" \"version\": \"%1\",\n").arg(widget->metadatas().authorHref).toUtf8());
jsonFile.write(QString(" \"x\": %1,\n").arg(widget->sceneBoundingRect().x()).toUtf8());
jsonFile.write(QString(" \"y\": %1,\n").arg(widget->sceneBoundingRect().y()).toUtf8());
jsonFile.write(QString(" \"width\": %1,\n").arg(widget->sceneBoundingRect().width()).toUtf8());
jsonFile.write(QString(" \"height\": %1,\n").arg(widget->sceneBoundingRect().height()).toUtf8());
jsonFile.write(QString(" \"nominalWidth\": %1,\n").arg(widget->boundingRect().width()).toUtf8());
jsonFile.write(QString(" \"nominalHeight\": %1,\n").arg(widget->boundingRect().height()).toUtf8());
QString url = UBPersistenceManager::widgetDirectory + "/" + widget->uuid().toString() + ".wgt";
jsonFile.write(QString(" \"src\": \"%1\",\n").arg(url).toUtf8());
QString startFile = widget->mainHtmlFileName();
jsonFile.write(QString(" \"startFile\": \"%1\",\n").arg(startFile).toUtf8());
QMap<QString, QString> preferences = widget->UBGraphicsWidgetItem::preferences();
jsonFile.write(QString(" \"preferences\": {\n").toUtf8());
foreach(QString key, preferences.keys())
{
QString sep = ",";
if (key == preferences.keys().last())
sep = "";
jsonFile.write(QString(" \"%1\": \"%2\"%3\n")
.arg(key)
.arg(preferences.value(key))
.arg(sep)
.toUtf8());
}
jsonFile.write(QString(" },\n").toUtf8());
jsonFile.write(QString(" \"datastore\": {\n").toUtf8());
QMap<QString, QString> datastoreEntries = widget->datastoreEntries();
foreach(QString entry, datastoreEntries.keys())
{
QString sep = ",";
if (entry == datastoreEntries.keys().last())
sep = "";
jsonFile.write(QString(" \"%1\": \"%2\"%3\n")
.arg(entry)
.arg(datastoreEntries.value(entry))
.arg(sep)
.toUtf8());
}
jsonFile.write(QString(" }\n").toUtf8());
jsonFile.write(QString(" }\n").toUtf8());
first = false;
}
jsonFile.write(" ]\n");
jsonFile.write("}\n");
}
else
{
qWarning() << "Cannot open file" << filename << "for saving page state";
}
delete scene;
}
updateGoogleMapApiKey();
}
void UBDocumentPublisher::generateWidgetPropertyScript(UBGraphicsW3CWidgetItem *widgetItem, int pageNumber)
{
QMap<QString, QString> preferences = widgetItem->UBGraphicsWidgetItem::preferences();
QMap<QString, QString> datastoreEntries = widgetItem->datastoreEntries();
QString startFileName = widgetItem->mainHtmlFileName();
if (!startFileName.startsWith("http://"))
{
QString startFilePath = mPublishingPath + "/" + UBPersistenceManager::widgetDirectory + "/" + widgetItem->uuid().toString() + ".wgt/" + startFileName;
QFile startFile(startFilePath);
if (startFile.exists())
{
if (startFile.open(QIODevice::ReadWrite))
{
QTextStream stream(&startFile);
QStringList lines;
bool addedJs = false;
QString line;
do
{
line = stream.readLine();
if (!line.isNull())
{
lines << line;
if (!addedJs && line.contains("<head") && line.contains(">") ) // TODO UB 4.6, this is naive ... the HEAD tag may be on several lines
{
lines << "";
lines << " <script type=\"text/javascript\">";
lines << " var widget = {};";
lines << " widget.id = '" + widgetItem->metadatas().id + "';";
lines << " widget.name = '" + widgetItem->metadatas().name + "';";
lines << " widget.description = '" + widgetItem->metadatas().description + "';";
lines << " widget.author = '" + widgetItem->metadatas().author + "';";
lines << " widget.authorEmail = '" + widgetItem->metadatas().authorEmail + "';";
lines << " widget.authorHref = '" + widgetItem->metadatas().authorHref + "';";
lines << " widget.version = '" + widgetItem->metadatas().version + "';";
lines << " widget.uuid = '" + UBStringUtils::toCanonicalUuid(widgetItem->uuid()) + "';";
lines << " widget.width = " + QString("%1").arg(widgetItem->nominalSize().width()) + ";";
lines << " widget.height = " + QString("%1").arg(widgetItem->nominalSize().height()) + ";";
lines << " widget.openUrl = function(url) { window.open(url); }";
lines << " widget.preferences = new Array()";
foreach(QString pref, preferences.keys())
{
lines << " widget.preferences['" + pref + "'] = '" + preferences.value(pref) + "';";
}
lines << " widget.preferences.key = function(index) {";
lines << " var currentIndex = 0;";
lines << " for(key in widget.preferences){";
lines << " if (currentIndex == index){ return key;}";
lines << " currentIndex++;";
lines << " }";
lines << " return '';";
lines << " }";
lines << " widget.preferences.getItem = function(key) {";
lines << " return widget.preferences[key];";
lines << " }";
lines << " widget.preferences.setItem = function(key, value) {}";
lines << " widget.preferences.removeItem = function(key) {}";
lines << " widget.preferences.clear = function() {}";
lines << " var uniboard = {};";
lines << " uniboard.pageCount = " + QString("%1").arg(mPublishingSize) + ";";
lines << " uniboard.currentPageNumber = " + QString("%1").arg(pageNumber) + ";";
lines << " uniboard.uuid = '" + UBStringUtils::toCanonicalUuid(widgetItem->uuid()) + "'";
lines << " uniboard.lang = navigator.language;";
lines << " uniboard.locale = function() {return navigator.language}";
lines << " uniboard.messages = {}";
lines << " uniboard.messages.subscribeToTopic = function(topicName){}";
lines << " uniboard.messages.unsubscribeFromTopic = function(topicName){}";
lines << " uniboard.messages.sendMessage = function(topicName, message){}";
lines << " uniboard.datastore = {};";
lines << " uniboard.datastore.document = new Array();";
foreach(QString entry, datastoreEntries.keys())
{
lines << " uniboard.datastore.document['" + entry + "'] = '" + datastoreEntries.value(entry) + "';";
}
lines << " uniboard.datastore.document.key = function(index) {";
lines << " var currentIndex = 0;";
lines << " for(key in uniboard.datastore.document){";
lines << " if (currentIndex == index){ return key;}";
lines << " currentIndex++;";
lines << " }";
lines << " return '';";
lines << " }";
lines << " uniboard.datastore.document.getItem = function(key) {";
lines << " return uniboard.datastore.document[key];";
lines << " }";
lines << " uniboard.datastore.document.setItem = function(key, value) {}";
lines << " uniboard.datastore.document.removeItem = function(key) {}";
lines << " uniboard.datastore.document.clear = function() {}";
lines << " uniboard.setTool = function(tool){}";
lines << " uniboard.setPenColor = function(color){}";
lines << " uniboard.setMarkerColor = function(color){}";
lines << " uniboard.pageThumbnail = function(pageNumber){";
lines << " var nb;";
lines << " if (pageNumber < 10) return 'page00' + pageNumber + '.thumbnail.jpg';";
lines << " if (pageNumber < 100) return 'page0' + pageNumber + '.thumbnail.jpg';";
lines << " return 'page' + pageNumber + '.thumbnail.jpg;'";
lines << " }";
lines << " uniboard.zoom = function(factor, x, y){}";
lines << " uniboard.move = function(x, y){}";
lines << " uniboard.move = function(x, y){}";
lines << " uniboard.moveTo = function(x, y){}";
lines << " uniboard.drawLineTo = function(x, y, width){}";
lines << " uniboard.eraseLineTo = function(x, y, width){}";
lines << " uniboard.clear = function(){}";
lines << " uniboard.setBackground = function(dark, crossed){}";
lines << " uniboard.addObject = function(url, width, height, x, y, background){}";
lines << " uniboard.resize = function(width, height){window.resizeTo(width, height);}";
lines << " uniboard.showMessage = function(message){alert(message);}";
lines << " uniboard.centerOn = function(x, y){}";
lines << " uniboard.addText = function(text, x, y){}";
lines << " uniboard.setPreference = function(key, value){}";
lines << " uniboard.preference = function(key, defValue){";
lines << " var pref = widget.preferences[key];";
lines << " if (pref == undefined) ";
lines << " return defValue;";
lines << " else ";
lines << " return pref;";
lines << " }";
lines << " uniboard.preferenceKeys = function(){";
lines << " var keys = new Array();";
lines << " for(key in widget.preferences){";
lines << " keys.push(key);";
lines << " }";
lines << " return keys;";
lines << " }";
lines << " uniboard.datastore.document.key = function(index) {";
lines << " var currentIndex = 0;";
lines << " for(key in uniboard.datastore.document){";
lines << " if (currentIndex == index){ return key;}";
lines << " currentIndex++;";
lines << " }";
lines << " return '';";
lines << " }";
lines << " uniboard.datastore.document.getItem = function(key) {";
lines << " return uniboard.datastore.document[key];";
lines << " }";
lines << " uniboard.datastore.document.setItem = function(key, value) {}";
lines << " uniboard.datastore.document.removeItem = function(key) {}";
lines << " uniboard.datastore.document.clear = function() {}";
lines << " </script>";
lines << "";
addedJs = true;
}
}
}
while (!line.isNull());
startFile.resize(0);
startFile.write(lines.join("\n").toUtf8()); // TODO UB 4.x detect real html encoding
startFile.close();
}
}
}
else{
qWarning() << "Remote Widget start file, cannot inject widget preferences and datastore entries";
}
}
void UBDocumentPublisher::init()
{
mCrlf=0x0d;
mCrlf+=0x0a;
mDocInfos.title = "";
mDocInfos.description = "";
mpCookieJar = new QNetworkCookieJar();
mpNetworkMgr = new QNetworkAccessManager(this);
connect(mpNetworkMgr, SIGNAL(finished(QNetworkReply*)), this, SLOT(onFinished(QNetworkReply*)));
}
void UBDocumentPublisher::onFinished(QNetworkReply *reply)
{
QVariant cookieHeader = reply->rawHeader("Set-Cookie");
// First we concatenate all the Set-Cookie values (the packet can contains many of them)
QStringList qslCookie = cookieHeader.toString().split("\n");
QString qsCookieValue = qslCookie.at(0);
for (int i = 1; i < qslCookie.size(); i++) {
qsCookieValue += "; " +qslCookie.at(i);
}
// Now we isolate every cookie value
QStringList qslCookieVals = qsCookieValue.split("; ");
bool bTransferOk = false;
for(int j = 0; j < qslCookieVals.size(); j++)
{
qDebug() << j;
if(qslCookieVals.at(j).startsWith("assetStatus"))
{
QStringList qslAsset = qslCookieVals.at(j).split("=");
if(qslAsset.at(1) == "UPLOADED")
{
bTransferOk = true;
break;
}
}
}
if(bTransferOk)
{
UBApplication::showMessage(tr("Document uploaded correctly on the web."));
}
else
{
UBApplication::showMessage(tr("Failed to upload document on the web."));
}
reply->deleteLater();
}
void UBDocumentPublisher::sendUbw(QString username, QString password)
{
if (QFile::exists(mTmpZipFile))
{
QFile f(mTmpZipFile);
if (f.open(QIODevice::ReadOnly))
{
QFileInfo fi(f);
QByteArray ba = f.readAll();
QString boundary,data, multipartHeader;
QByteArray datatoSend;
boundary = "---WebKitFormBoundaryDKBTgA53MiyWrzLY";
multipartHeader = "multipart/form-data; boundary="+boundary;
data="--"+boundary+mCrlf;
data+="Content-Disposition: form-data; name=\"title\"" + mCrlf + mCrlf + mDocInfos.title + mCrlf;
data+="--"+boundary+mCrlf;
data+="Content-Disposition: form-data; name=\"description\"" + mCrlf + mCrlf + mDocInfos.description.remove("\n") + mCrlf;
data+="--"+boundary+mCrlf;
data+="Content-Disposition: form-data; name=\"file\"; filename=\""+ fi.fileName() +"\""+mCrlf;
data+="Content-Type: application/octet-stream"+mCrlf+mCrlf;
datatoSend=data.toAscii(); // convert data string to byte array for request
datatoSend += ba;
datatoSend += mCrlf;
datatoSend += QString("--%0--%1").arg(boundary).arg(mCrlf);
QNetworkRequest request(QUrl(QString(DOCPUBLICATION_URL).toAscii().constData()));
request.setHeader(QNetworkRequest::ContentTypeHeader, multipartHeader);
request.setHeader(QNetworkRequest::ContentLengthHeader,datatoSend.size());
QString b64Auth = getBase64Of(QString("%0:%1").arg(username).arg(password));
request.setRawHeader("Authorization", QString("Basic %0").arg(b64Auth).toAscii().constData());
request.setRawHeader("Host", "planete.sankore.org");
request.setRawHeader("Accept", "*/*");
request.setRawHeader("Accept-Language", "en-US,*");
mpCookieJar->setCookiesFromUrl(mCookies, QUrl(DOCPUBLICATION_URL));
mpNetworkMgr->setCookieJar(mpCookieJar);
// Send the file
mpNetworkMgr->post(request,datatoSend);
}
}
}
QString UBDocumentPublisher::getBase64Of(QString stringToEncode)
{
return stringToEncode.toAscii().toBase64();
}
// ---------------------------------------------------------
UBProxyLoginDlg::UBProxyLoginDlg(QWidget *parent, const char *name):QDialog(parent)
, mpLayout(NULL)
, mpUserLayout(NULL)

@ -27,10 +27,6 @@
#include <QtGui>
#include <QtNetwork>
#include "ui_webPublishing.h"
#define DOCPUBLICATION_URL "http://planete.sankore.org/xwiki/bin/view/CreateResources/UniboardUpload?xpage=plain&outputSyntax=plain"
typedef struct
{
QString title;
@ -85,58 +81,4 @@ private:
QTextEdit* mpDescription;
QDialogButtonBox* mpButtons;
};
class UBDocumentPublisher : public QObject
{
Q_OBJECT;
public:
explicit UBDocumentPublisher(UBDocumentProxy* sourceDocument, QObject *parent = 0);
virtual ~UBDocumentPublisher();
void publish();
signals:
void loginDone();
protected:
virtual void updateGoogleMapApiKey();
virtual void rasterizeScenes();
virtual void upgradeDocumentForPublishing();
virtual void generateWidgetPropertyScript(UBGraphicsW3CWidgetItem *widgetItem, int pageNumber);
private slots:
void onFinished(QNetworkReply* reply);
private:
UBDocumentProxy *mSourceDocument;
//UBDocumentProxy *mPublishingDocument;
QString mPublishingPath;
int mPublishingSize;
void init();
void sendUbw(QString username, QString password);
QString getBase64Of(QString stringToEncode);
QHBoxLayout* mpLayout;
QNetworkAccessManager* mpNetworkMgr;
QNetworkCookieJar* mpCookieJar;
QString mUsername;
QString mPassword;
QString mCrlf;
bool bLoginCookieSet;
void buildUbwFile();
QString mTmpZipFile;
QList<QNetworkCookie> mCookies;
sDocumentInfos mDocInfos;
};
#endif // UBDOCUMENTPUBLISHER_H

@ -48,8 +48,6 @@
#include "gui/UBKeyboardPalette.h"
#include "gui/UBMagnifer.h"
#include "gui/UBDockPaletteWidget.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "gui/UBTeacherGuideWidget.h"
#include "domain/UBGraphicsPixmapItem.h"
#include "domain/UBGraphicsItemUndoCommand.h"
@ -166,8 +164,6 @@ UBBoardController::~UBBoardController()
int UBBoardController::currentPage()
{
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool())
return mActiveSceneIndex;
return mActiveSceneIndex + 1;
}
@ -340,7 +336,6 @@ void UBBoardController::setupToolbar()
//-----------------------------------------------------------//
UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->boardToolBar, mMainWindow->actionBoard);
UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->tutorialToolBar, mMainWindow->actionBoard);
UBApplication::app()->decorateActionMenu(mMainWindow->actionMenu);
@ -348,7 +343,6 @@ void UBBoardController::setupToolbar()
mMainWindow->webToolBar->hide();
mMainWindow->documentToolBar->hide();
mMainWindow->tutorialToolBar->hide();
connectToolbar();
initToolbarTexts();
@ -1559,66 +1553,74 @@ void UBBoardController::moveSceneToIndex(int source, int target)
}
}
void UBBoardController::fitUniqIems(const QUndoCommand *parent, QSet<QGraphicsItem*> &itms)
{
if (parent->childCount()) {
for (int i = 0; i < parent->childCount(); i++) {
fitUniqIems(parent->child(i), itms);
}
}
// Undo command transaction macros. Process separatedly
if (parent->text() == UBSettings::undoCommandTransactionName) {
return;
}
const UBAbstractUndoCommand *abstractCmd = static_cast<const UBAbstractUndoCommand*>(parent);
if(abstractCmd->getType() != UBAbstractUndoCommand::undotype_GRAPHICITEM)
return;
const UBGraphicsItemUndoCommand *cmd = static_cast<const UBGraphicsItemUndoCommand*>(parent);
// go through all added and removed objects, for create list of unique objects
// grouped items will be deleted by groups, so we don't need do delete that items.
QSetIterator<QGraphicsItem*> itAdded(cmd->GetAddedList());
while (itAdded.hasNext())
{
QGraphicsItem* item = itAdded.next();
if( !itms.contains(item) && !(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type()))
itms.insert(item);
}
QSetIterator<QGraphicsItem*> itRemoved(cmd->GetRemovedList());
while (itRemoved.hasNext())
{
QGraphicsItem* item = itRemoved.next();
if( !itms.contains(item) && !(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type()))
itms.insert(item);
}
}
void UBBoardController::ClearUndoStack()
{
// The code has been removed because it leads to a strange error and because the final goal has never been
// reached on tests and sound a little bit strange.
// Strange error: item->scene() crashes the application because item doesn't implement scene() method. I'm
// not able to give all the steps to reproduce this error sistematically but is quite frequent (~ twice per utilisation hours)
// strange goal: if item is on the undocommand, the item->scene() is null and the item is not on the deleted scene item list then
// then it's deleted.
// QSet<QGraphicsItem*> uniqueItems;
// // go through all stack command
// for(int i = 0; i < UBApplication::undoStack->count(); i++)
// {
// UBAbstractUndoCommand *abstractCmd = (UBAbstractUndoCommand*)UBApplication::undoStack->command(i);
// if(abstractCmd->getType() != UBAbstractUndoCommand::undotype_GRAPHICITEM)
// continue;
// UBGraphicsItemUndoCommand *cmd = (UBGraphicsItemUndoCommand*)UBApplication::undoStack->command(i);
// // go through all added and removed objects, for create list of unique objects
// // grouped items will be deleted by groups, so we don't need do delete that items.
// QSetIterator<QGraphicsItem*> itAdded(cmd->GetAddedList());
// while (itAdded.hasNext())
// {
// QGraphicsItem* item = itAdded.next();
// if( !uniqueItems.contains(item) && !(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type()))
// uniqueItems.insert(item);
// }
// QSetIterator<QGraphicsItem*> itRemoved(cmd->GetRemovedList());
// while (itRemoved.hasNext())
// {
// QGraphicsItem* item = itRemoved.next();
// if( !uniqueItems.contains(item) && !(item->parentItem() && UBGraphicsGroupContainerItem::Type == item->parentItem()->type()))
// uniqueItems.insert(item);
// }
// }
// // go through all unique items, and check, ot on scene, or not.
// // if not on scene, than item can be deleted
// QSetIterator<QGraphicsItem*> itUniq(uniqueItems);
// while (itUniq.hasNext())
// {
// QGraphicsItem* item = itUniq.next();
// UBGraphicsScene *scene = NULL;
// if (item->scene()) {
// scene = dynamic_cast<UBGraphicsScene*>(item->scene());
// }
// if(!scene)
// {
// if (!mActiveScene->deleteItem(item))
// delete item;
// }
// }
QSet<QGraphicsItem*> uniqueItems;
// go through all stack command
for (int i = 0; i < UBApplication::undoStack->count(); i++) {
fitUniqIems(UBApplication::undoStack->command(i), uniqueItems);
}
// go through all unique items, and check, if they are on scene, or not.
// if not on scene, than item can be deleted
QSetIterator<QGraphicsItem*> itUniq(uniqueItems);
while (itUniq.hasNext())
{
QGraphicsItem* item = itUniq.next();
UBGraphicsScene *scene = NULL;
if (item->scene()) {
scene = dynamic_cast<UBGraphicsScene*>(item->scene());
}
if(!scene)
{
if (!mActiveScene->deleteItem(item)){
delete item;
item = 0;
}
}
}
// clear stack, and command list
UBApplication::undoStack->clear();
}
void UBBoardController::adjustDisplayViews()
@ -1765,10 +1767,7 @@ void UBBoardController::lastWindowClosed()
{
if (!mCleanupDone)
{
bool teacherGuideModified = false;
if(UBApplication::boardController->paletteManager()->teacherGuideDockWidget())
teacherGuideModified = UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified();
if (selectedDocument()->pageCount() == 1 && (!mActiveScene || mActiveScene->isEmpty()) && !teacherGuideModified)
if (selectedDocument()->pageCount() == 1 && (!mActiveScene || mActiveScene->isEmpty()))
{
UBPersistenceManager::persistenceManager()->deleteDocument(selectedDocument());
}
@ -1863,7 +1862,7 @@ void UBBoardController::persistCurrentScene()
if(UBPersistenceManager::persistenceManager()
&& selectedDocument() && mActiveScene && mActiveSceneIndex != mDeletingSceneIndex
&& (mActiveSceneIndex >= 0) && mActiveSceneIndex != mMovingSceneIndex
&& (mActiveScene->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified())))
&& (mActiveScene->isModified()))
{
UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex);
updatePage(mActiveSceneIndex);
@ -1957,7 +1956,7 @@ void UBBoardController::notifyCache(bool visible)
{
if(visible)
emit cacheEnabled();
mCacheWidgetIsEnabled = visible;
}

@ -160,6 +160,7 @@ class UBBoardController : public UBDocumentContainer
void notifyPageChanged();
void displayMetaData(QMap<QString, QString> metadatas);
void fitUniqIems(const QUndoCommand *parent, QSet<QGraphicsItem *> &itms);
void ClearUndoStack();
void setActiveDocumentScene(UBDocumentProxy* pDocumentProxy, int pSceneIndex = 0, bool forceReload = false);

@ -40,8 +40,6 @@
#include "gui/UBWebToolsPalette.h"
#include "gui/UBActionPalette.h"
#include "gui/UBFavoriteToolPalette.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "web/UBWebPage.h"
#include "web/UBWebController.h"
@ -92,7 +90,6 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
, mpPageNavigWidget(NULL)
, mpCachePropWidget(NULL)
, mpDownloadWidget(NULL)
, mpTeacherGuideWidget(NULL)
, mDownloadInProgress(false)
{
setupPalettes();
@ -143,12 +140,6 @@ void UBBoardPaletteManager::setupDockPaletteWidgets()
mLeftPalette->registerWidget(mpPageNavigWidget);
mLeftPalette->addTab(mpPageNavigWidget);
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() || UBSettings::settings()->teacherGuideLessonPagesActivated->get().toBool()){
mpTeacherGuideWidget = new UBDockTeacherGuideWidget();
mLeftPalette->registerWidget(mpTeacherGuideWidget);
mLeftPalette->addTab(mpTeacherGuideWidget);
}
mLeftPalette->connectSignals();
mLeftPalette->showTabWidget(0);
@ -186,14 +177,6 @@ void UBBoardPaletteManager::slot_changeMainMode(UBApplicationController::MainMod
changeMode(eUBDockPaletteWidget_BOARD);
}
break;
case UBApplicationController::Tutorial:
{
if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL)
mKeyboardPalette->hide();
}
break;
case UBApplicationController::Internet:
changeMode(eUBDockPaletteWidget_WEB);
break;
@ -335,10 +318,7 @@ void UBBoardPaletteManager::pagePaletteButtonReleased()
mPagePalette = 0;
QList<QAction*>pageActions;
pageActions << UBApplication::mainWindow->actionNewPage;
UBBoardController* boardController = UBApplication::boardController;
if(UBApplication::documentController->pageCanBeDuplicated(UBDocumentContainer::pageFromSceneIndex(boardController->activeSceneIndex()))){
pageActions << UBApplication::mainWindow->actionDuplicatePage;
}
pageActions << UBApplication::mainWindow->actionDuplicatePage;
pageActions << UBApplication::mainWindow->actionImportPage;
mPagePalette = new UBActionPalette(pageActions, Qt::Horizontal , mContainer);

@ -47,7 +47,6 @@ class UBServerXMLHttpRequest;
class UBKeyboardPalette;
class UBMainWindow;
class UBApplicationController;
class UBDockTeacherGuideWidget;
class UBBoardPaletteManager : public QObject
{
@ -71,8 +70,6 @@ class UBBoardPaletteManager : public QObject
void setCurrentWebToolsPalette(UBWebToolsPalette *palette) {mWebToolsCurrentPalette = palette;}
UBWebToolsPalette* mWebToolsCurrentPalette;
UBDockTeacherGuideWidget* teacherGuideDockWidget() { return mpTeacherGuideWidget;}
void processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode);
void changeMode(eUBDockPaletteWidgetMode newMode, bool isInit = false);
void startDownloads();
@ -142,7 +139,6 @@ class UBBoardPaletteManager : public QObject
/** The download widget */
UBDockDownloadWidget* mpDownloadWidget;
UBDockTeacherGuideWidget* mpTeacherGuideWidget;
bool mDownloadInProgress;

@ -47,7 +47,6 @@
#include "gui/UBResources.h"
#include "gui/UBMainWindow.h"
#include "gui/UBThumbnailWidget.h"
#include "gui/UBTeacherGuideWidgetsTools.h"
#include "board/UBBoardController.h"
#include "board/UBBoardPaletteManager.h"
@ -552,7 +551,7 @@ Here we determines cases when items should to get mouse press event at pressing
case UBGraphicsPixmapItem::Type:
case UBGraphicsTextItem::Type:
if (currentTool == UBStylusTool::Play)
return true;
return false;
if ((currentTool == UBStylusTool::Selector) && item->isSelected())
return true;
if ((currentTool == UBStylusTool::Selector) && item->parentItem() && item->parentItem()->isSelected())
@ -560,10 +559,6 @@ Here we determines cases when items should to get mouse press event at pressing
if (currentTool != UBStylusTool::Selector)
return false;
break;
case UBGraphicsItemType::StrokeItemType:
if (currentTool == UBStylusTool::Play)
return true;
break;
case UBGraphicsGroupContainerItem::Type:
// Groups shouldn't reacts on any presses and moves for Play tool.
if(currentTool == UBStylusTool::Play)
@ -1330,6 +1325,7 @@ void UBBoardView::mouseReleaseEvent (QMouseEvent *event)
movingItem = NULL;
bReleaseIsNeed = false;
}
if (mWidgetMoved)
{
mWidgetMoved = false;
@ -1417,6 +1413,7 @@ void UBBoardView::mouseReleaseEvent (QMouseEvent *event)
UBDrawingController::drawingController ()->setStylusTool (UBStylusTool::Selector);
textItem->setTextInteractionFlags(Qt::TextEditorInteraction);
textItem->setSelected (true);
textItem->setFocus();
}
@ -1565,9 +1562,7 @@ void UBBoardView::dropEvent (QDropEvent *event)
if (!event->source()
|| qobject_cast<UBThumbnailWidget *>(event->source())
|| qobject_cast<QWebView*>(event->source())
|| qobject_cast<UBTGMediaWidget*>(event->source())
|| qobject_cast<QListView *>(event->source())
|| qobject_cast<UBTGDraggableTreeItem*>(event->source())) {
|| qobject_cast<QListView *>(event->source())) {
mController->processMimeData (event->mimeData (), mapToScene (event->pos ()));
event->acceptProposedAction();
}

@ -66,7 +66,6 @@ signals:
void clickOnBoard();
void mouseReleased();
protected:
bool itemIsLocked(QGraphicsItem *item);

@ -59,6 +59,8 @@ const QString UBFeaturesController::webSearchPath = rootPath + "/Web search";
void UBFeaturesComputingThread::scanFS(const QUrl & currentPath, const QString & currVirtualPath, const QSet<QUrl> &pFavoriteSet)
{
// Q_ASSERT(QFileInfo(currentPath.toLocalFile()).exists());
if(QFileInfo(currentPath.toLocalFile()).exists())
return;
QFileInfoList fileInfoList = UBFileSystemUtils::allElementsInDirectory(currentPath.toLocalFile());

@ -112,6 +112,7 @@ struct itemLayerType
, Pointer
, Cache
, SelectedItem
, SelectionFrame
};
};
@ -156,7 +157,8 @@ struct UBGraphicsItemType
groupContainerType,
ToolWidgetItemType,
GraphicsWidgetItemType,
UserTypesCount // this line must be the last line in this enum because it is types counter.
UserTypesCount,
SelectionFrameType// this line must be the last line in this enum because it is types counter.
};
};

@ -345,12 +345,9 @@ int UBApplication::exec(const QString& pFileToImport)
mPreferencesController = new UBPreferencesController(mainWindow);
connect(mainWindow->actionPreferences, SIGNAL(triggered()), mPreferencesController, SLOT(show()));
connect(mainWindow->actionTutorial, SIGNAL(triggered()), applicationController, SLOT(showTutorial()));
connect(mainWindow->actionTutorial, SIGNAL(triggered()), this, SLOT(stopScript()));
connect(mainWindow->actionCheckUpdate, SIGNAL(triggered()), applicationController, SLOT(checkUpdateRequest()));
toolBarPositionChanged(UBSettings::settings()->appToolBarPositionedAtTop->get());
bool bUseMultiScreen = UBSettings::settings()->appUseMultiscreen->get().toBool();
@ -444,7 +441,6 @@ void UBApplication::toolBarPositionChanged(QVariant topOrBottom)
mainWindow->addToolBar(area, mainWindow->boardToolBar);
mainWindow->addToolBar(area, mainWindow->webToolBar);
mainWindow->addToolBar(area, mainWindow->documentToolBar);
mainWindow->addToolBar(area, mainWindow->tutorialToolBar);
webController->showTabAtTop(topOrBottom.toBool());
@ -457,7 +453,6 @@ void UBApplication::toolBarDisplayTextChanged(QVariant display)
mainWindow->boardToolBar->setToolButtonStyle(toolButtonStyle);
mainWindow->webToolBar->setToolButtonStyle(toolButtonStyle);
mainWindow->documentToolBar->setToolButtonStyle(toolButtonStyle);
mainWindow->tutorialToolBar->setToolButtonStyle(toolButtonStyle);
}
@ -539,7 +534,6 @@ void UBApplication::decorateActionMenu(QAction* action)
mainWindow->actionCheckUpdate->setEnabled(false);
menu->addSeparator();
menu->addAction(mainWindow->actionTutorial);
#ifndef Q_WS_X11 // No Podcast on Linux yet
menu->addAction(mainWindow->actionPodcast);

@ -47,7 +47,7 @@ class UBMainWindow;
class UBApplication : public QtSingleApplication
{
Q_OBJECT;
Q_OBJECT
public:

@ -51,8 +51,6 @@
#include "gui/UBScreenMirror.h"
#include "gui/UBMainWindow.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "gui/UBTeacherGuideWidget.h"
#include "domain/UBGraphicsPixmapItem.h"
@ -344,7 +342,6 @@ void UBApplicationController::showBoard()
{
mMainWindow->webToolBar->hide();
mMainWindow->documentToolBar->hide();
mMainWindow->tutorialToolBar->hide();
mMainWindow->boardToolBar->show();
if (mMainMode == Document)
@ -393,14 +390,12 @@ void UBApplicationController::showInternet()
if (UBSettings::settings()->webUseExternalBrowser->get().toBool())
{
showDesktop(true);
UBApplication::webController->show(UBWebController::WebBrowser);
// really no have emit mainModeChanged here ? potential problem with virtual keyboard ?
UBApplication::webController->show();
}
else
{
mMainWindow->boardToolBar->hide();
mMainWindow->documentToolBar->hide();
mMainWindow->tutorialToolBar->hide();
mMainWindow->webToolBar->show();
mMainMode = Internet;
@ -410,7 +405,7 @@ void UBApplicationController::showInternet()
mMainWindow->show();
mUninoteController->hideWindow();
UBApplication::webController->show(UBWebController::WebBrowser);
UBApplication::webController->show();
emit mainModeChanged(Internet);
}
@ -421,7 +416,6 @@ void UBApplicationController::showDocument()
{
mMainWindow->webToolBar->hide();
mMainWindow->boardToolBar->hide();
mMainWindow->tutorialToolBar->hide();
mMainWindow->documentToolBar->show();
mMainMode = Document;
@ -434,7 +428,7 @@ void UBApplicationController::showDocument()
if (UBApplication::boardController)
{
if (UBApplication::boardController->activeScene()->isModified() || (UBApplication::boardController->paletteManager()->teacherGuideDockWidget() && UBApplication::boardController->paletteManager()->teacherGuideDockWidget()->teacherGuideWidget()->isModified()))
if (UBApplication::boardController->activeScene()->isModified())
UBApplication::boardController->persistCurrentScene();
UBApplication::boardController->hide();
}
@ -477,42 +471,6 @@ void UBApplicationController::showDesktop(bool dontSwitchFrontProcess)
}
void UBApplicationController::showTutorial()
{
if (UBApplication::boardController)
{
UBApplication::boardController->persistCurrentScene();
UBApplication::boardController->hide();
}
if (UBSettings::settings()->webUseExternalBrowser->get().toBool())
{
showDesktop(true);
UBApplication::webController->show(UBWebController::Tutorial);
}
else{
mMainWindow->webToolBar->hide();
mMainWindow->boardToolBar->hide();
mMainWindow->documentToolBar->hide();
mMainWindow->tutorialToolBar->show();
mMainMode = Tutorial;
adaptToolBar();
mUninoteController->hideWindow();
UBApplication::webController->show(UBWebController::Tutorial);
mirroringEnabled(false);
emit mainModeChanged(mMainMode);
}
}
void UBApplicationController::checkUpdate()
{
// if(mHttp)
@ -590,10 +548,6 @@ void UBApplicationController::hideDesktop()
{
showDocument();
}
else if (mMainMode == Tutorial)
{
showTutorial();
}
mIsShowingDesktop = false;

@ -92,7 +92,7 @@ class UBApplicationController : public QObject
enum MainMode
{
Board = 0, Internet, Document, Tutorial, WebDocument
Board = 0, Internet, Document, WebDocument
};
MainMode displayMode()
@ -136,8 +136,6 @@ class UBApplicationController : public QObject
void actionCopy();
void actionPaste();
void showTutorial();
void checkUpdateRequest();
void checkUpdateAtLaunch();

@ -29,7 +29,6 @@
#include "adaptors/UBExportDocument.h"
#include "adaptors/UBExportWeb.h"
#include "adaptors/UBExportCFF.h"
#include "adaptors/UBWebPublisher.h"
#include "adaptors/UBImportDocument.h"
#include "adaptors/UBImportPDF.h"
#include "adaptors/UBImportImage.h"
@ -47,8 +46,6 @@
#include "UBSettings.h"
#include "UBPersistenceManager.h"
#include "../adaptors/UBExportWeb.h"
#include "core/memcheck.h"
UBDocumentManager* UBDocumentManager::sDocumentManager = 0;
@ -75,13 +72,9 @@ UBDocumentManager::UBDocumentManager(QObject *parent)
UBExportCFF* cffExporter = new UBExportCFF(this);
UBExportFullPDF* exportFullPdf = new UBExportFullPDF(this);
UBExportDocument* exportDocument = new UBExportDocument(this);
UBWebPublisher* webPublished = new UBWebPublisher(this);
mExportAdaptors.append(exportDocument);
mExportAdaptors.append(webPublished);
mExportAdaptors.append(exportFullPdf);
mExportAdaptors.append(cffExporter);
// UBExportWeb* exportWeb = new UBExportWeb(this);
// mExportAdaptors.append(exportWeb);
UBImportDocument* documentImport = new UBImportDocument(this);
mImportAdaptors.append(documentImport);
@ -149,7 +142,7 @@ UBDocumentProxy* UBDocumentManager::importFile(const QFile& pFile, const QString
UBDocumentBasedImportAdaptor* importAdaptor = (UBDocumentBasedImportAdaptor*)adaptor;
document = importAdaptor->importFile(pFile, pGroup);
}
else
{

@ -33,9 +33,6 @@
#include "core/UBSettings.h"
#include "core/UBSetting.h"
#include "gui/UBDockTeacherGuideWidget.h"
#include "gui/UBTeacherGuideWidget.h"
#include "document/UBDocumentProxy.h"
#include "adaptors/UBExportPDF.h"
@ -46,8 +43,6 @@
#include "board/UBBoardController.h"
#include "board/UBBoardPaletteManager.h"
#include "interfaces/IDataStorage.h"
#include "core/memcheck.h"
const QString UBPersistenceManager::imageDirectory = "images"; // added to UBPersistenceManager::mAllDirectories
@ -55,7 +50,6 @@ const QString UBPersistenceManager::objectDirectory = "objects"; // added to UBP
const QString UBPersistenceManager::widgetDirectory = "widgets"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::videoDirectory = "videos"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::audioDirectory = "audios"; // added to
const QString UBPersistenceManager::teacherGuideDirectory = "teacherGuideObjects";
UBPersistenceManager * UBPersistenceManager::sSingleton = 0;
@ -69,7 +63,6 @@ UBPersistenceManager::UBPersistenceManager(QObject *pParent)
mDocumentSubDirectories << widgetDirectory;
mDocumentSubDirectories << videoDirectory;
mDocumentSubDirectories << audioDirectory;
mDocumentSubDirectories << teacherGuideDirectory;
documentProxies = allDocumentProxies();
emit proxyListChanged();
@ -589,10 +582,6 @@ UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy,
return mSceneCache.value(proxy, sceneIndex);
else {
UBGraphicsScene* scene = UBSvgSubsetAdaptor::loadScene(proxy, sceneIndex);
if(!scene && UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){
createDocumentSceneAt(proxy,0);
scene = UBSvgSubsetAdaptor::loadScene(proxy, 0);
}
if (scene)
mSceneCache.insert(proxy, sceneIndex, scene);
@ -612,15 +601,10 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy,
QDir dir(pDocumentProxy->persistencePath());
dir.mkpath(pDocumentProxy->persistencePath());
UBBoardPaletteManager* paletteManager = UBApplication::boardController->paletteManager();
bool teacherGuideModified = false;
if(UBApplication::app()->boardController->currentPage() == pSceneIndex && paletteManager->teacherGuideDockWidget())
teacherGuideModified = paletteManager->teacherGuideDockWidget()->teacherGuideWidget()->isModified();
if (pDocumentProxy->isModified() || teacherGuideModified)
if (pDocumentProxy->isModified())
UBMetadataDcSubsetAdaptor::persist(pDocumentProxy);
if (pScene->isModified() || teacherGuideModified)
if (pScene->isModified())
{
UBSvgSubsetAdaptor::persistScene(pDocumentProxy, pScene, pSceneIndex);
@ -671,7 +655,6 @@ int UBPersistenceManager::sceneCount(const UBDocumentProxy* proxy)
int pageIndex = 0;
bool moreToProcess = true;
bool addedMissingZeroPage = false;
while (moreToProcess)
{
@ -680,27 +663,9 @@ int UBPersistenceManager::sceneCount(const UBDocumentProxy* proxy)
QFile file(fileName);
if (file.exists())
{
pageIndex++;
}
else
{
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool() && pageIndex == 0){
// the document has no zero file but doesn't means that it hasn't any file
// at all. Just importing a document without the first page using a configuartion
// that enables zero page.
pageIndex++;
addedMissingZeroPage = true;
}
else
moreToProcess = false;
}
}
if(pageIndex == 1 && addedMissingZeroPage){
// increment is done only to check if there are other pages than the missing zero page
// This situation means -> no pages on the document
return 0;
moreToProcess = false;
}
return pageIndex;
@ -761,7 +726,7 @@ bool UBPersistenceManager::addDirectoryContentToDocument(const QString& document
foreach(QString dir, mDocumentSubDirectories)
{
qDebug() << "copying " << documentRootFolder << "/" << dir << " to " << pDocument->persistencePath() << "/" + dir;
QDir srcDir(documentRootFolder + "/" + dir);
if (srcDir.exists())
if (!UBFileSystemUtils::copyDir(documentRootFolder + "/" + dir, pDocument->persistencePath() + "/" + dir))
@ -865,66 +830,8 @@ void UBPersistenceManager::purgeEmptyDocuments()
}
}
QString UBPersistenceManager::teacherGuideAbsoluteObjectPath(UBDocumentProxy* pDocumentProxy)
{
return pDocumentProxy->persistencePath() + "/" + teacherGuideDirectory;
}
QString UBPersistenceManager::addObjectToTeacherGuideDirectory(UBDocumentProxy* pDocumentProxy, QString pPath)
{
QString path = UBFileSystemUtils::removeLocalFilePrefix(pPath);
QFileInfo fi(path);
QString uuid = QUuid::createUuid();
if (!fi.exists() || !pDocumentProxy)
return "";
QString fileName = UBPersistenceManager::teacherGuideDirectory + "/" + uuid + "." + fi.suffix();
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath)){
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::teacherGuideDirectory);
QFile source(path);
source.copy(destPath);
}
return destPath;
}
QString UBPersistenceManager::addWidgetToTeacherGuideDirectory(UBDocumentProxy* pDocumentProxy, QString pPath)
{
QString path = UBFileSystemUtils::removeLocalFilePrefix(pPath);
QFileInfo fi(path);
Q_ASSERT(fi.isDir());
int lastIndex = path.lastIndexOf(".");
QString extension("");
if(lastIndex != -1)
extension = path.right(path.length() - lastIndex);
QString uuid = QUuid::createUuid();
if (!fi.exists() || !pDocumentProxy)
return "";
QString directoryName = UBPersistenceManager::teacherGuideDirectory + "/" + uuid + extension;
QString destPath = pDocumentProxy->persistencePath() + "/" + directoryName;
if (!QDir(destPath).exists()){
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::teacherGuideDirectory);
UBFileSystemUtils::copyDir(path,destPath);
}
return destPath;
}
bool UBPersistenceManager::addFileToDocument(UBDocumentProxy* pDocumentProxy,
QString path,
bool UBPersistenceManager::addFileToDocument(UBDocumentProxy* pDocumentProxy,
QString path,
const QString& subdir,
QUuid objectUuid,
QString& destinationPath,
@ -975,12 +882,12 @@ bool UBPersistenceManager::addFileToDocument(UBDocumentProxy* pDocumentProxy,
}
else
{
return false;
return false;
}
}
bool UBPersistenceManager::addGraphicsWidgteToDocument(UBDocumentProxy *pDocumentProxy,
QString path,
bool UBPersistenceManager::addGraphicsWidgteToDocument(UBDocumentProxy *pDocumentProxy,
QString path,
QUuid objectUuid,
QString& destinationPath)
{

@ -90,10 +90,6 @@ class UBPersistenceManager : public QObject
QString generateUniqueDocumentPath();
QString generateUniqueDocumentPath(const QString& baseFolder);
QString teacherGuideAbsoluteObjectPath(UBDocumentProxy* pDocumentProxy);
QString addObjectToTeacherGuideDirectory(UBDocumentProxy* proxy, QString pPath);
QString addWidgetToTeacherGuideDirectory(UBDocumentProxy* pDocumentProxy, QString pPath);
bool addDirectoryContentToDocument(const QString& documentRootFolder, UBDocumentProxy* pDocument);
virtual void upgradeDocumentIfNeeded(UBDocumentProxy* pDocumentProxy);

@ -57,10 +57,7 @@ UBPreferencesDialog::~UBPreferencesDialog()
void UBPreferencesDialog::closeEvent(QCloseEvent* e)
{
if(mPreferencesController->inputValuesConsistence())
e->accept();
else
e->ignore();
e->accept();
}
@ -132,8 +129,6 @@ void UBPreferencesController::wire()
connect(mPreferencesUI->useExternalBrowserCheckBox, SIGNAL(clicked(bool)), settings->webUseExternalBrowser, SLOT(setBool(bool)));
connect(mPreferencesUI->displayBrowserPageCheckBox, SIGNAL(clicked(bool)), settings->webShowPageImmediatelyOnMirroredScreen, SLOT(setBool(bool)));
connect(mPreferencesUI->swapControlAndDisplayScreensCheckBox, SIGNAL(clicked(bool)), settings->swapControlAndDisplayScreens, SLOT(setBool(bool)));
connect(mPreferencesUI->swapControlAndDisplayScreensCheckBox, SIGNAL(clicked(bool)), UBApplication::applicationController->displayManager(), SLOT(reinitScreens(bool)));
connect(mPreferencesUI->toolbarAtTopRadioButton, SIGNAL(clicked(bool)), this, SLOT(toolbarPositionChanged(bool)));
connect(mPreferencesUI->toolbarAtBottomRadioButton, SIGNAL(clicked(bool)), this, SLOT(toolbarPositionChanged(bool)));
@ -176,12 +171,6 @@ void UBPreferencesController::wire()
connect(mMarkerProperties->pressureSensitiveCheckBox, SIGNAL(clicked(bool)), settings, SLOT(setMarkerPressureSensitive(bool)));
connect(mMarkerProperties->opacitySlider, SIGNAL(valueChanged(int)), this, SLOT(opacitySliderChanged(int)));
//network
connect(mPreferencesUI->Username_textBox, SIGNAL(editingFinished()), this, SLOT(onCommunityUsernameChanged()));
connect(mPreferencesUI->Password_textEdit, SIGNAL(editingFinished()), this, SLOT(onCommunityPasswordChanged()));
connect(mPreferencesUI->PSCredentialsPersistenceCheckBox,SIGNAL(clicked()),this, SLOT(onCommunityPersistenceChanged()));
// about tab
connect(mPreferencesUI->checkSoftwareUpdateAtLaunchCheckBox, SIGNAL(clicked(bool)), settings->appEnableAutomaticSoftwareUpdates, SLOT(setBool(bool)));
}
@ -215,10 +204,6 @@ void UBPreferencesController::init()
mPreferencesUI->verticalChoice->setChecked(settings->appToolBarOrientationVertical->get().toBool());
mPreferencesUI->horizontalChoice->setChecked(!settings->appToolBarOrientationVertical->get().toBool());
mPreferencesUI->Username_textBox->setText(settings->communityUsername());
mPreferencesUI->Password_textEdit->setText(settings->communityPassword());
mPreferencesUI->swapControlAndDisplayScreensCheckBox->setChecked(settings->swapControlAndDisplayScreens->get().toBool());
// pen tab
mPenProperties->fineSlider->setValue(settings->boardPenFineWidth->get().toDouble() * sSliderRatio);
mPenProperties->mediumSlider->setValue(settings->boardPenMediumWidth->get().toDouble() * sSliderRatio);
@ -233,66 +218,6 @@ void UBPreferencesController::init()
mMarkerProperties->opacitySlider->setValue(settings->boardMarkerAlpha->get().toDouble() * 100);
//network
mPreferencesUI->PSCredentialsPersistenceCheckBox->setChecked(settings->getCommunityDataPersistence());
persistanceCheckboxUpdate();
}
void UBPreferencesController::onCommunityUsernameChanged()
{
UBSettings* settings = UBSettings::settings();
settings->setCommunityUsername(mPreferencesUI->Username_textBox->text());
persistanceCheckboxUpdate();
}
void UBPreferencesController::onCommunityPasswordChanged()
{
UBSettings* settings = UBSettings::settings();
settings->setCommunityPassword(mPreferencesUI->Password_textEdit->text());
persistanceCheckboxUpdate();
}
void UBPreferencesController::onCommunityPersistenceChanged()
{
UBSettings::settings()->setCommunityPersistence(mPreferencesUI->PSCredentialsPersistenceCheckBox->isChecked());
}
void UBPreferencesController::persistanceCheckboxUpdate()
{
bool checkBoxEnabled = mPreferencesUI->Username_textBox->text().length() || mPreferencesUI->Password_textEdit->text().length();
mPreferencesUI->PSCredentialsPersistenceCheckBox->setEnabled(checkBoxEnabled);
mPreferencesUI->PSCredentialsPersistenceCheckBox->setStyleSheet(checkBoxEnabled ? "color:black;" : "color:lightgray;");
}
bool UBPreferencesController::inputValuesConsistence()
{
QString backgroundStyle = "QWidget {background-color: white}";
mPreferencesUI->Username_textBox->setStyleSheet(backgroundStyle);
mPreferencesUI->Password_textEdit->setStyleSheet(backgroundStyle);
QString username = mPreferencesUI->Username_textBox->text();
QString password = mPreferencesUI->Password_textEdit->text();
bool isConsistent = true;
if (username.length() + password.length()){
backgroundStyle = "QWidget {background-color: magenta}";
if(username.isEmpty()){
isConsistent = false;
mPreferencesUI->mainTabWidget->setCurrentWidget(mPreferencesUI->networkTab);
mPreferencesUI->Username_textBox->setStyleSheet(backgroundStyle);
mPreferencesUI->Username_textBox->setFocus();
mPreferencesUI->Username_textBox->setCursorPosition(0);
}
else if(password.isEmpty()){
isConsistent = false;
mPreferencesUI->mainTabWidget->setCurrentWidget(mPreferencesUI->networkTab);
mPreferencesUI->Password_textEdit->setStyleSheet(backgroundStyle);
mPreferencesUI->Password_textEdit->setFocus();
mPreferencesUI->Password_textEdit->setCursorPosition(0);
}
}
return isConsistent;
}
void UBPreferencesController::close()
@ -304,9 +229,6 @@ void UBPreferencesController::close()
UBSettings::settings()->setProxyUsername(mPreferencesUI->proxyUsername->text());
UBSettings::settings()->setProxyPassword(mPreferencesUI->proxyPassword->text());
if (!inputValuesConsistence())
return;
mPreferencesWindow->accept();
}

@ -57,13 +57,12 @@ protected:
class UBPreferencesController : public QObject
{
Q_OBJECT;
Q_OBJECT
public:
UBPreferencesController(QWidget *parent);
virtual ~UBPreferencesController();
bool inputValuesConsistence();
public slots:
@ -89,9 +88,6 @@ class UBPreferencesController : public QObject
void toolbarPositionChanged(bool checked);
void toolbarOrientationVertical(bool checked);
void toolbarOrientationHorizontal(bool checked);
void onCommunityUsernameChanged();
void onCommunityPasswordChanged();
void onCommunityPersistenceChanged();
private slots:
void adjustScreens(int screen);
@ -100,7 +96,6 @@ class UBPreferencesController : public QObject
static qreal sSliderRatio;
static qreal sMinPenWidth;
static qreal sMaxPenWidth;
void persistanceCheckboxUpdate();
QDesktopWidget* mDesktop;
};

@ -51,14 +51,6 @@ QString UBSettings::documentSize = QString("Size");
QString UBSettings::documentIdentifer = QString("ID");
QString UBSettings::documentVersion = QString("Version");
QString UBSettings::documentUpdatedAt = QString("UpdatedAt");
QString UBSettings::sessionTitle = QString("sessionTitle");
QString UBSettings::sessionAuthors = QString("sessionAuthors");
QString UBSettings::sessionObjectives = QString("sessionObjectives");
QString UBSettings::sessionKeywords = QString("sessionKeywords");
QString UBSettings::sessionGradeLevel = QString("sessionGradeLevel");
QString UBSettings::sessionSubjects = QString("sessionSubjects");
QString UBSettings::sessionType = QString("sessionType");
QString UBSettings::sessionLicence = QString("sessionLicence");
QString UBSettings::documentDate = QString("date");
QString UBSettings::trashedDocumentGroupNamePrefix = QString("_Trash:");
@ -66,6 +58,7 @@ QString UBSettings::trashedDocumentGroupNamePrefix = QString("_Trash:");
QString UBSettings::uniboardDocumentNamespaceUri = "http://uniboard.mnemis.com/document";
QString UBSettings::uniboardApplicationNamespaceUri = "http://uniboard.mnemis.com/application";
QString UBSettings::undoCommandTransactionName = "UndoTransaction";
const int UBSettings::sDefaultFontPixelSize = 36;
const char *UBSettings::sDefaultFontFamily = "Arial";
@ -207,7 +200,7 @@ void UBSettings::ValidateKeyboardPaletteKeyBtnSize()
void UBSettings::init()
{
productWebUrl = new UBSetting(this, "App", "ProductWebAddress", "http://www.sankore.org");
productWebUrl = new UBSetting(this, "App", "ProductWebAddress", "http://www.oe-f.org");
softwareHomeUrl = productWebUrl->get().toString();
@ -405,8 +398,6 @@ void UBSettings::init()
angleTolerance = new UBSetting(this, "App", "AngleTolerance", 4);
historyLimit = new UBSetting(this, "Web", "HistoryLimit", 15);
teacherGuidePageZeroActivated = new UBSetting(this,"DockPalette","TeacherGuideActivatePageZero",true);
teacherGuideLessonPagesActivated = new UBSetting(this,"DockPalette","TeacherGuideActivateLessonPages",true);
libIconSize = new UBSetting(this, "Library", "LibIconSize", defaultLibraryIconSize);

@ -179,15 +179,6 @@ class UBSettings : public QObject
static QString documentVersion;
static QString documentUpdatedAt;
static QString sessionTitle;
static QString sessionAuthors;
static QString sessionObjectives;
static QString sessionKeywords;
static QString sessionGradeLevel;
static QString sessionSubjects;
static QString sessionType;
static QString sessionLicence;
static QString documentDate;
static QString trashedDocumentGroupNamePrefix;
@ -197,6 +188,8 @@ class UBSettings : public QObject
static QString uniboardDocumentNamespaceUri;
static QString uniboardApplicationNamespaceUri;
static QString undoCommandTransactionName;
static const int maxThumbnailWidth;
static const int defaultThumbnailWidth;
static const int defaultLibraryIconSize;
@ -367,8 +360,6 @@ class UBSettings : public QObject
UBSetting* angleTolerance;
UBSetting* historyLimit;
UBSetting* teacherGuidePageZeroActivated;
UBSetting* teacherGuideLessonPagesActivated;
UBSetting* libIconSize;

@ -1,90 +0,0 @@
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QPainter>
#include <QDebug>
#include "UBActionableWidget.h"
#include "core/memcheck.h"
UBActionableWidget::UBActionableWidget(QWidget *parent, const char *name):QWidget(parent)
, mShowActions(false)
{
setObjectName(name);
mActions.clear();
mCloseButtons.setIcon(QIcon(QPixmap(":images/close.svg")));
mCloseButtons.setGeometry(0, 0, 2*ACTIONSIZE, ACTIONSIZE);
mCloseButtons.setVisible(false);
connect(&mCloseButtons, SIGNAL(clicked()), this, SLOT(onCloseClicked()));
}
UBActionableWidget::~UBActionableWidget()
{
}
void UBActionableWidget::addAction(eAction act)
{
if(!mActions.contains(act)){
mActions << act;
}
}
void UBActionableWidget::removeAction(eAction act)
{
if(mActions.contains(act)){
mActions.remove(mActions.indexOf(act));
}
}
void UBActionableWidget::removeAllActions()
{
mActions.clear();
}
void UBActionableWidget::setActionsVisible(bool bVisible)
{
if(!mActions.empty() && mActions.contains(eAction_Close)){
mCloseButtons.setVisible(bVisible);
}
}
void UBActionableWidget::onCloseClicked()
{
emit close(this);
}
void UBActionableWidget::setActionsParent(QWidget *parent)
{
if(mActions.contains(eAction_Close)){
mCloseButtons.setParent(parent);
}
}
void UBActionableWidget::unsetActionsParent()
{
if(mActions.contains(eAction_Close)){
mCloseButtons.setParent(this);
}
}

@ -1,68 +0,0 @@
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBACTIONABLEWIDGET_H
#define UBACTIONABLEWIDGET_H
#include <QWidget>
#include <QPaintEvent>
#include <QToolButton>
#include <QPushButton>
#define ACTIONSIZE 16
typedef enum{
eAction_Close,
eAction_MoveUp,
eAction_MoveDown
}eAction;
class UBActionableWidget : public QWidget
{
Q_OBJECT
public:
UBActionableWidget(QWidget* parent=0, const char* name="UBActionableWidget");
~UBActionableWidget();
void addAction(eAction act);
void removeAction(eAction act);
void removeAllActions();
void setActionsVisible(bool bVisible);
signals:
void close(QWidget* w);
protected:
void setActionsParent(QWidget* parent);
void unsetActionsParent();
QVector<eAction> mActions;
QPushButton mCloseButtons;
private slots:
void onCloseClicked();
private:
bool mShowActions;
};
#endif // UBACTIONABLEWIDGET_H

@ -1,368 +0,0 @@
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#include "core/UBApplication.h"
#include "globals/UBGlobals.h"
#include "UBMediaWidget.h"
#include "core/memcheck.h"
/**
* \brief Constructor
* @param type as the media type
* @param parent as the parent widget
* @param name as the object name
*/
UBMediaWidget::UBMediaWidget(eMediaType type, QWidget *parent, const char *name):UBActionableWidget(parent, name)
, mpMediaObject(NULL)
, mpVideoWidget(NULL)
, mpAudioOutput(NULL)
, mpLayout(NULL)
, mpSeekerLayout(NULL)
, mpPlayStopButton(NULL)
, mpPauseButton(NULL)
, mpSlider(NULL)
, mAutoUpdate(false)
, mGeneratingThumbnail(false)
, mBorder(5)
, mpMediaContainer(NULL)
, mMediaLayout(NULL)
, mpCover(NULL)
{
SET_STYLE_SHEET();
addAction(eAction_Close);
mType = type;
mpLayout = new QVBoxLayout(this);
setLayout(mpLayout);
mpPlayStopButton = new UBMediaButton(this);
mpPlayStopButton->setPixmap(QPixmap(":images/play.svg"));
mpPauseButton = new UBMediaButton(this);
mpPauseButton->setPixmap(QPixmap(":images/pause.svg"));
mpPauseButton->setEnabled(false);
mpSlider = new QSlider(this);
mpSlider->setOrientation(Qt::Horizontal);
mpSlider->setMinimum(0);
mpSlider->setMaximum(0);
mpSeekerLayout = new QHBoxLayout();
mpSeekerLayout->addWidget(mpPlayStopButton, 0);
mpSeekerLayout->addWidget(mpPauseButton, 0);
mpSeekerLayout->addWidget(mpSlider, 1);
mpSeekerLayout->setContentsMargins(0, 0, 0, 0);
connect(mpPlayStopButton, SIGNAL(clicked()), this, SLOT(onPlayStopClicked()));
connect(mpPauseButton, SIGNAL(clicked()), this, SLOT(onPauseClicked()));
connect(mpSlider, SIGNAL(valueChanged(int)), this, SLOT(onSliderChanged(int)));
}
/**
* \brief Destructor
*/
UBMediaWidget::~UBMediaWidget()
{
unsetActionsParent();
DELETEPTR(mpMediaObject);
DELETEPTR(mpSlider);
DELETEPTR(mpPauseButton);
DELETEPTR(mpPlayStopButton);
DELETEPTR(mpAudioOutput);
DELETEPTR(mpVideoWidget);
DELETEPTR(mpCover);
DELETEPTR(mpMediaContainer);
DELETEPTR(mpSeekerLayout);
DELETEPTR(mpLayout);
}
/**
* \brief Set the media file
* @param filePath as the media file path
*/
void UBMediaWidget::setFile(const QString &filePath)
{
Q_ASSERT("" != filePath);
mFilePath = filePath;
mpMediaObject = new Phonon::MediaObject(this);
mpMediaObject->setTickInterval(TICK_INTERVAL);
connect(mpMediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(onStateChanged(Phonon::State,Phonon::State)));
connect(mpMediaObject, SIGNAL(totalTimeChanged(qint64)), this, SLOT(onTotalTimeChanged(qint64)));
connect(mpMediaObject, SIGNAL(tick(qint64)), this, SLOT(onTick(qint64)));
mpMediaObject->setCurrentSource(Phonon::MediaSource(filePath));
createMediaPlayer();
}
/**
* \brief Get the media type
* @returns the media type
*/
eMediaType UBMediaWidget::mediaType()
{
return mType;
}
void UBMediaWidget::showEvent(QShowEvent* event)
{
if(mType == eMediaType_Audio){
return;
}else{
if(!mpVideoWidget){
mpVideoWidget = new Phonon::VideoWidget(this);
mMediaLayout->addStretch(1);
mMediaLayout->addWidget(mpVideoWidget);
mMediaLayout->addStretch(1);
Phonon::createPath(mpMediaObject, mpVideoWidget);
adaptSizeToVideo();
mpMediaObject->play();
mpMediaObject->stop();
}
QWidget::showEvent(event);
}
}
void UBMediaWidget::hideEvent(QHideEvent* event)
{
if(mpMediaObject->state() == Phonon::PlayingState)
mpMediaObject->stop();
UBActionableWidget::hideEvent(event);
}
/**
* \brief Create the media player
*/
void UBMediaWidget::createMediaPlayer()
{
mpMediaContainer = new QWidget();
mpMediaContainer->setObjectName("UBMediaVideoContainer");
mMediaLayout = new QHBoxLayout();
mpMediaContainer->setLayout(mMediaLayout);
if(eMediaType_Video == mType){
mMediaLayout->setContentsMargins(10, 10, 10, 10);
if(isVisible()){
mpVideoWidget = new Phonon::VideoWidget(this);
mMediaLayout->addStretch(1);
mMediaLayout->addWidget(mpVideoWidget);
mMediaLayout->addStretch(1);
Phonon::createPath(mpMediaObject, mpVideoWidget);
adaptSizeToVideo();
}
mpAudioOutput = new Phonon::AudioOutput(Phonon::VideoCategory, this);
Phonon::createPath(mpMediaObject, mpAudioOutput);
}else if(eMediaType_Audio == mType){
mMediaLayout->setContentsMargins(10, 10, 10, 10);
mpCover = new QLabel(mpMediaContainer);
//mpMediaContainer->setStyleSheet(QString("background: none;"));
setAudioCover(":images/libpalette/soundIcon.svg");
mpCover->setScaledContents(true);
mMediaLayout->addStretch(1);
mMediaLayout->addWidget(mpCover);
mMediaLayout->addStretch(1);
mpAudioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
Phonon::createPath(mpMediaObject, mpAudioOutput);
}
mpLayout->addWidget(mpMediaContainer, 1);
mpLayout->addLayout(mpSeekerLayout, 0);
setActionsParent(mpMediaContainer);
}
/**
* \brief Adapt the widget size to the video in order to keep the good aspect ratio
*/
void UBMediaWidget::adaptSizeToVideo()
{
if(NULL != mpMediaContainer){
int origW = mpMediaContainer->width();
int origH = mpMediaContainer->height();
int newW = width();
float scaleFactor = (float)origW/(float)newW;
int newH = origH/scaleFactor;
resize(newW, height() + newH);
}
}
/**
* \brief Handle the media state change notification
* @param newState as the new state
* @param oldState as the old state
*/
void UBMediaWidget::onStateChanged(Phonon::State newState, Phonon::State oldState)
{
if(!mGeneratingThumbnail){
if(Phonon::LoadingState == oldState && Phonon::StoppedState == newState){
if(eMediaType_Video == mType){
// We do that here to generate the thumbnail of the video
mGeneratingThumbnail = true;
mpMediaObject->play();
mpMediaObject->pause();
mGeneratingThumbnail = false;
}
}else if(Phonon::PlayingState == oldState && Phonon::PausedState == newState){
mpPlayStopButton->setPixmap(QPixmap(":images/play.svg"));
mpPauseButton->setEnabled(false);
}else if((Phonon::PausedState == oldState && Phonon::PlayingState == newState) ||
(Phonon::StoppedState == oldState && Phonon::PlayingState == newState)){
mpPlayStopButton->setPixmap(QPixmap(":images/stop.svg"));
mpPauseButton->setEnabled(true);
}else if(Phonon::PlayingState == oldState && Phonon::StoppedState == newState){
mpPlayStopButton->setPixmap(QPixmap(":images/play.svg"));
mpPauseButton->setEnabled(false);
mpSlider->setValue(0);
}
}
// if(mType == eMediaType_Video)
// updateView(newState);
}
/**
* \brief Handles the total time change notification
* @param total as the new total time
*/
void UBMediaWidget::onTotalTimeChanged(qint64 total)
{
mpSlider->setMaximum(total);
}
/**
* \brief Handles the tick notification
* @param currentTime as the current time
*/
void UBMediaWidget::onTick(qint64 currentTime)
{
mAutoUpdate = true;
mpSlider->setValue((int)currentTime);
mAutoUpdate = false;
}
/**
* \brief Handles the seeker value change notification
* @param value as the new seeker value
*/
void UBMediaWidget::onSliderChanged(int value)
{
if(!mAutoUpdate){
mpMediaObject->seek(value);
}
}
/**
* \brief Toggle Play-Stop
*/
void UBMediaWidget::onPlayStopClicked()
{
switch(mpMediaObject->state()){
case Phonon::PlayingState:
mpMediaObject->stop();
break;
case Phonon::StoppedState:
case Phonon::PausedState:
mpMediaObject->play();
break;
default:
break;
}
}
/**
* \brief Pause the media
*/
void UBMediaWidget::onPauseClicked()
{
mpMediaObject->pause();
}
/**
* Get the border
* @returns the actual border
*/
int UBMediaWidget::border()
{
return mBorder;
}
/**
* \brief Handles the resize event
* @param ev as the resize event
*/
void UBMediaWidget::resizeEvent(QResizeEvent* ev)
{
Q_UNUSED(ev);
}
/**
* \brief Set the audio cover
* @param coverPath as the cover image file path
*/
void UBMediaWidget::setAudioCover(const QString &coverPath)
{
if(NULL != mpCover){
mpCover->setPixmap(QPixmap(coverPath));
}
}
// -----------------------------------------------------------------------------------------------------------
/**
* \brief Constructor
* @param parent as the parent widget
* @param name as the object name
*/
UBMediaButton::UBMediaButton(QWidget *parent, const char *name):QLabel(parent)
, mPressed(false)
{
setObjectName(name);
resize(UBMEDIABUTTON_SIZE, UBMEDIABUTTON_SIZE);
setStyleSheet(QString("padding:0px 0px 0px 0px; margin:0px 0px 0px 0px;"));
}
/**
* \brief Destructor
*/
UBMediaButton::~UBMediaButton()
{
}
/**
* \brief Handles the mouse press notification
* @param ev as the mouse press event
*/
void UBMediaButton::mousePressEvent(QMouseEvent* ev)
{
Q_UNUSED(ev);
mPressed = true;
}
/**
* \brief Handles the mouse release notification
* @param ev as the mouse release event
*/
void UBMediaButton::mouseReleaseEvent(QMouseEvent* ev)
{
Q_UNUSED(ev);
if(mPressed){
mPressed = false;
emit clicked();
}
}

@ -1,137 +0,0 @@
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBMEDIAWIDGET_H
#define UBMEDIAWIDGET_H
#include <QWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QSlider>
#include <QMouseEvent>
#include <QStackedWidget>
#include <phonon/MediaObject>
#include <phonon/VideoWidget>
#include <phonon/AudioOutput>
#include "UBActionableWidget.h"
#define UBMEDIABUTTON_SIZE 32
#define TICK_INTERVAL 1000
/**
* \brief The media type
*/
typedef enum{
eMediaType_Video,
eMediaType_Audio
}eMediaType;
class UBMediaButton : public QLabel
{
Q_OBJECT
public:
UBMediaButton(QWidget* parent=0, const char* name="UBMediaButton");
~UBMediaButton();
signals:
void clicked();
protected:
void mousePressEvent(QMouseEvent* ev);
void mouseReleaseEvent(QMouseEvent* ev);
private:
/** And indicator of the press event in progress */
bool mPressed;
};
class UBMediaWidget : public UBActionableWidget
{
Q_OBJECT
public:
UBMediaWidget(eMediaType type = eMediaType_Video, QWidget* parent=0, const char* name="UBMediaWidget");
~UBMediaWidget();
void setFile(const QString& filePath);
eMediaType mediaType();
int border();
void setAudioCover(const QString& coverPath);
void setUrl(const QString& url){mUrl = url;}
QString url(){return mUrl;}
protected:
void resizeEvent(QResizeEvent* ev);
void showEvent(QShowEvent* event);
void hideEvent(QHideEvent* event);
/** The current media file path */
QString mFilePath;
private slots:
void onPlayStopClicked();
void onPauseClicked();
void onStateChanged(Phonon::State newState, Phonon::State oldState);
void onTotalTimeChanged(qint64 total);
void onTick(qint64 currentTime);
void onSliderChanged(int value);
private:
void createMediaPlayer();
void adaptSizeToVideo();
/** The current media type */
eMediaType mType;
/** The media object */
Phonon::MediaObject* mpMediaObject;
/** The video renderer */
Phonon::VideoWidget* mpVideoWidget;
/** The audio renderer */
Phonon::AudioOutput* mpAudioOutput;
/** The principal layout of this widget */
QVBoxLayout* mpLayout;
/** The seeker layout */
QHBoxLayout* mpSeekerLayout;
/** The play-stop button */
UBMediaButton* mpPlayStopButton;
/** The pause button */
UBMediaButton* mpPauseButton;
/** The seeker slider */
QSlider* mpSlider;
/** An indicator of the seeker auto update in progress */
bool mAutoUpdate;
/** An indicator of the thumbnail generation in progress */
bool mGeneratingThumbnail;
/** The border */
int mBorder;
/** A widget that will contain the media */
QWidget* mpMediaContainer;
/** The media layout */
QHBoxLayout* mMediaLayout;
/** The audio cover */
QLabel* mpCover;
/** The media url */
QString mUrl;
};
#endif // UBMEDIAWIDGET_H

@ -1,8 +0,0 @@
HEADERS += \
src/customWidgets/UBMediaWidget.h \
src/customWidgets/UBActionableWidget.h
SOURCES += \
src/customWidgets/UBMediaWidget.cpp \
src/customWidgets/UBActionableWidget.cpp

@ -62,11 +62,6 @@ void UBDocumentContainer::duplicatePages(QList<int>& pageIndexes)
bool UBDocumentContainer::movePageToIndex(int source, int target)
{
if (source==0)
{
// Title page - cant be moved
return false;
}
UBPersistenceManager::persistenceManager()->moveSceneToIndex(mCurrentDocument, source, target);
deleteThumbPage(source);
insertThumbPage(target);
@ -120,22 +115,17 @@ void UBDocumentContainer::reloadThumbnails()
if (mCurrentDocument)
{
UBThumbnailAdaptor::load(mCurrentDocument, mDocumentThumbs);
qDebug() << "Reloading Thumbnails. new mDocumentThumbs size: " << mDocumentThumbs.size();
emit documentThumbnailsUpdated(this);
}
}
int UBDocumentContainer::pageFromSceneIndex(int sceneIndex)
{
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool())
return sceneIndex;
return sceneIndex+1;
}
int UBDocumentContainer::sceneIndexFromPage(int page)
{
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool())
return page;
return page-1;
}

@ -1082,7 +1082,7 @@ void UBDocumentController::moveSceneToIndex(UBDocumentProxy* proxy, int source,
{
proxy->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
UBMetadataDcSubsetAdaptor::persist(proxy);
mDocumentUI->thumbnailWidget->hightlightItem(target);
}
}
@ -1147,11 +1147,11 @@ void UBDocumentController::selectionChanged()
else if(pageSelected){
QList<QGraphicsItem*> selection = mDocumentUI->thumbnailWidget->selectedItems();
if(pageCount == 1)
mMainWindow->actionDuplicate->setEnabled(!trashSelected && pageCanBeDuplicated(UBDocumentContainer::pageFromSceneIndex(0)));
mMainWindow->actionDuplicate->setEnabled(!trashSelected);
else{
for(int i = 0; i < selection.count() && !firstSceneSelected; i += 1){
if(dynamic_cast<UBSceneThumbnailPixmap*>(selection.at(i))->sceneIndex() == 0){
mMainWindow->actionDuplicate->setEnabled(!trashSelected && pageCanBeDuplicated(UBDocumentContainer::pageFromSceneIndex(0)));
mMainWindow->actionDuplicate->setEnabled(!trashSelected);
firstSceneSelected = true;
}
}
@ -1630,32 +1630,6 @@ int UBDocumentController::getSelectedItemIndex()
else return -1;
}
bool UBDocumentController::pageCanBeMovedUp(int page)
{
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool())
return page >= 2;
else
return page >= 1;
}
bool UBDocumentController::pageCanBeMovedDown(int page)
{
if(UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool())
return page != 0 && page < selectedDocument()->pageCount() - 1;
else
return page < selectedDocument()->pageCount() - 1;
}
bool UBDocumentController::pageCanBeDuplicated(int page)
{
return page != 0;
}
bool UBDocumentController::pageCanBeDeleted(int page)
{
return page != 0;
}
void UBDocumentController::refreshDocumentThumbnailsView(UBDocumentContainer*)
{
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
@ -1668,9 +1642,9 @@ void UBDocumentController::refreshDocumentThumbnailsView(UBDocumentContainer*)
QStringList labels;
if (proxy)
if (proxy)
{
setDocument(proxy);
setDocument(proxy);
for (int i = 0; i < selectedDocument()->pageCount(); i++)
{
@ -1684,10 +1658,7 @@ void UBDocumentController::refreshDocumentThumbnailsView(UBDocumentContainer*)
items << pixmapItem;
int pageIndex = pageFromSceneIndex(i);
if(pageIndex)
labels << tr("Page %1").arg(pageIndex);
else
labels << tr("Title page");
labels << tr("Page %1").arg(pageIndex);
itemsPath.append(QUrl::fromLocalFile(proxy->persistencePath() + QString("/pages/%1").arg(UBDocumentContainer::pageFromSceneIndex(i))));
}

@ -59,10 +59,6 @@ class UBDocumentController : public UBDocumentContainer
void deletePages(QList<QGraphicsItem*> itemsToDelete);
int getSelectedItemIndex();
bool pageCanBeMovedUp(int page);
bool pageCanBeMovedDown(int page);
bool pageCanBeDuplicated(int page);
bool pageCanBeDeleted(int page);
QString documentTrashGroupName(){ return mDocumentTrashGroupName;}
QString defaultDocumentGroupName(){ return mDefaultDocumentGroupName;}

@ -57,16 +57,6 @@ void UBDocumentProxy::init()
setUuid(QUuid::createUuid());
setDefaultDocumentSize(UBSettings::settings()->pageSize->get().toSize());
//teacherGuide metadata
setMetaData(UBSettings::sessionTitle,"");
setMetaData(UBSettings::sessionAuthors,"");
setMetaData(UBSettings::sessionObjectives,"");
setMetaData(UBSettings::sessionKeywords,"");
setMetaData(UBSettings::sessionGradeLevel,"");
setMetaData(UBSettings::sessionSubjects,"");
setMetaData(UBSettings::sessionType,"");
setMetaData(UBSettings::sessionLicence,"");
}

@ -44,7 +44,7 @@ class UBAbstractUndoCommand : public QUndoCommand
undotype_GRAPHICSGROUPITEM = 6
};
virtual UndoType getType() { return undotype_UNKNOWN; }
virtual UndoType getType() const { return undotype_UNKNOWN; }
protected:
virtual void undo();

@ -1,55 +0,0 @@
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBDocumentUndoCommand.h"
#include "document/UBDocumentProxy.h"
#include "UBGraphicsScene.h"
#include "core/memcheck.h"
UBDocumentUndoCommand::UBDocumentUndoCommand(UBDocumentProxy* pDocument, const QList<UBGraphicsScene*>& pOldScenes,
const QList<UBGraphicsScene*>& pNewScenes, const int& pActiveSceneIndex)
: mDocument(pDocument)
, mUndoScenes(pOldScenes)
, mRedoScenes(pNewScenes)
, mActiveSceneIndex(pActiveSceneIndex)
{
// NOOP
}
UBDocumentUndoCommand::~UBDocumentUndoCommand()
{
// NOOP
}
void UBDocumentUndoCommand::undo()
{
// NOOP
}
void UBDocumentUndoCommand::redo()
{
// NOOP
}

@ -1,55 +0,0 @@
/*
* Copyright (C) 2010-2013 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)
*
* This file is part of Open-Sankoré.
*
* Open-Sankoré is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License,
* with a specific linking exception for the OpenSSL project's
* "OpenSSL" library (or with modified versions of it that use the
* same license as the "OpenSSL" library).
*
* Open-Sankoré is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Open-Sankoré. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBDOCUMENTUNDOCOMMAND_H_
#define UBDOCUMENTUNDOCOMMAND_H_
#include <QtGui>
#include "UBAbstractUndoCommand.h"
class UBDocumentProxy;
class UBGraphicsScene;
class UBDocumentUndoCommand: public UBAbstractUndoCommand
{
public:
UBDocumentUndoCommand(UBDocumentProxy* pDocument, const QList<UBGraphicsScene*>& pOldScenes,
const QList<UBGraphicsScene*>& pNewScenes, const int& pActiveSceneIndex);
virtual ~UBDocumentUndoCommand();
virtual UndoType getType() { return undotype_DOCUMENT; };
protected:
virtual void undo();
virtual void redo();
private:
UBDocumentProxy* mDocument;
QList<UBGraphicsScene*> mUndoScenes;
QList<UBGraphicsScene*> mRedoScenes;
int mActiveSceneIndex;
};
#endif /* UBDOCUMENTUNDOCOMMAND_H_ */

@ -222,7 +222,7 @@ void UBGraphicsItemUndoCommand::redo()
UBGraphicsPolygonItem *polygonItem = qgraphicsitem_cast<UBGraphicsPolygonItem*>(item);
if (polygonItem)
{
{
mScene->removeItem(polygonItem);
mScene->removeItemFromDeletion(polygonItem);
polygonItem->strokesGroup()->addToGroup(polygonItem);

@ -45,8 +45,8 @@ class UBGraphicsItemUndoCommand : public UBAbstractUndoCommand
virtual ~UBGraphicsItemUndoCommand();
QSet<QGraphicsItem*> GetAddedList() { return mAddedItems; }
QSet<QGraphicsItem*> GetRemovedList() { return mRemovedItems; }
QSet<QGraphicsItem*> GetAddedList() const { return mAddedItems; }
QSet<QGraphicsItem*> GetRemovedList() const { return mRemovedItems; }
virtual UndoType getType() { return undotype_GRAPHICITEM; }

@ -96,6 +96,7 @@ UBZLayerController::UBZLayerController(QGraphicsScene *scene) :
scopeMap.insert(itemLayerType::Cache, ItemLayerTypeData( 1001300.0, 1001400.0 ));
scopeMap.insert(itemLayerType::SelectedItem, ItemLayerTypeData( 1001000.0, 1001000.0 ));
scopeMap.insert(itemLayerType::SelectionFrame, ItemLayerTypeData( 1010000.0, 1010000.0 ));
}
qreal UBZLayerController::generateZLevel(itemLayerType::Enum key)
@ -1550,56 +1551,6 @@ UBGraphicsTextItem* UBGraphicsScene::addText(const QString& pString, const QPoin
, UBSettings::settings()->isItalicFont());
}
UBGraphicsTextItem* UBGraphicsScene::textForObjectName(const QString& pString, const QString& objectName)
{
UBGraphicsTextItem* textItem = 0;
bool found = false;
//looking for a previous such item text
for(int i=0; i < mFastAccessItems.count() && !found ; i += 1){
UBGraphicsTextItem* currentItem = dynamic_cast<UBGraphicsTextItem*>(mFastAccessItems.at(i));
if(currentItem && (currentItem->objectName() == objectName || currentItem->toPlainText() == pString)){
// The second condition is necessary because the object name isn't stored. On reopeining the file we
// need another rule than the objectName
textItem = currentItem;
found=true;
if(currentItem->objectName() != objectName)
textItem->setObjectName(objectName);
}
}
if(!textItem){
textItem = addTextWithFont(pString,QPointF(0,0) ,72,UBSettings::settings()->fontFamily(),true,false);
textItem->setObjectName(objectName);
textItem->setData(UBGraphicsItemData::ItemEditable,QVariant(false));
textItem->adjustSize();
textItem->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
textItem->setPlainText(pString);
}
else{
textItem->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
if (pString == textItem->toPlainText())
return textItem;
QTextCursor curCursor = textItem->textCursor();
QFont font = textItem->font();
QColor color = curCursor.charFormat().foreground().color();
textItem->setPlainText(pString);
textItem->clearFocus();
textItem->setFont(font);
QTextCharFormat format;
format.setForeground(QBrush(color));
curCursor.mergeCharFormat(format);
textItem->setTextCursor(curCursor);
textItem->contentsChanged();
}
textItem->clearFocus();
return textItem;
}
UBGraphicsTextItem* UBGraphicsScene::addTextWithFont(const QString& pString, const QPointF& pTopLeft
, int pointSize, const QString& fontFamily, bool bold, bool italic)
{
@ -2306,6 +2257,16 @@ void UBGraphicsScene::keyReleaseEvent(QKeyEvent * keyEvent)
QList<QGraphicsItem*> si = selectedItems();
if(keyEvent->matches(QKeySequence::SelectAll)){
QListIterator<QGraphicsItem*> itItems(this->mFastAccessItems);
while (itItems.hasNext())
itItems.next()->setSelected(true);
keyEvent->accept();
return;
}
if ((si.size() > 0) && (keyEvent->isAccepted()))
{
#ifdef Q_OS_MAC

@ -156,7 +156,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
UBGraphicsMediaItem* addAudio(const QUrl& pAudioFileUrl, bool shouldPlayAsap, const QPointF& pPos = QPointF(0, 0));
UBGraphicsSvgItem* addSvg(const QUrl& pSvgFileUrl, const QPointF& pPos = QPointF(0, 0), const QByteArray pData = QByteArray());
UBGraphicsTextItem* addText(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0));
UBGraphicsTextItem* textForObjectName(const QString& pString, const QString &objectName = "UBTGZeroPageSessionTitle");
UBGraphicsTextItem* addTextWithFont(const QString& pString, const QPointF& pTopLeft = QPointF(0, 0)
, int pointSize = -1, const QString& fontFamily = "", bool bold = false, bool italic = false);
@ -362,8 +361,8 @@ public slots:
void recolorAllItems();
virtual void drawItems (QPainter * painter, int numItems,
QGraphicsItem * items[], const QStyleOptionGraphicsItem options[], QWidget * widget = 0);
virtual void drawItems (QPainter * painter, int numItems,
QGraphicsItem * items[], const QStyleOptionGraphicsItem options[], QWidget * widget = 0);
QGraphicsItem* rootItem(QGraphicsItem* item) const;

@ -88,6 +88,8 @@ QVariant UBGraphicsTextItem::itemChange(GraphicsItemChange change, const QVarian
void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
setTextInteractionFlags(Qt::TextEditorInteraction);
// scene()->itemAt(pos) returns 0 if pos is not over text, but over text item, but mouse press comes.
// It is a cludge...
if (UBStylusTool::Play == UBDrawingController::drawingController()->stylusTool())
@ -144,7 +146,6 @@ void UBGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
if (mMultiClickState == 1)
{
// setTextInteractionFlags(Qt::TextEditorInteraction);
QGraphicsTextItem::mousePressEvent(event);
setFocus();
}
@ -213,9 +214,12 @@ void UBGraphicsTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
if (widget == UBApplication::boardController->controlView()->viewport() &&
!isSelected() && toPlainText().isEmpty())
{
QFontMetrics fm(font());
setTextWidth(fm.width(mTypeTextHereLabel));
painter->setFont(font());
painter->setPen(UBSettings::paletteColor);
painter->drawText(boundingRect(), Qt::AlignCenter, mTypeTextHereLabel);
setTextInteractionFlags(Qt::NoTextInteraction);
}
Delegate()->postpaint(painter, option, widget);
@ -246,10 +250,6 @@ void UBGraphicsTextItem::copyItemParameters(UBItem *copy) const
cp->setData(UBGraphicsItemData::ItemLayerType, this->data(UBGraphicsItemData::ItemLayerType));
cp->setData(UBGraphicsItemData::ItemLocked, this->data(UBGraphicsItemData::ItemLocked));
cp->setData(UBGraphicsItemData::ItemEditable, data(UBGraphicsItemData::ItemEditable).toBool());
// cp->setDefaultTextColor(this->defaultTextColor());
// cp->setFont(this->font());
// cp->setColorOnDarkBackground(this->colorOnDarkBackground());
// cp->setColorOnLightBackground(this->colorOnLightBackground());
cp->setTextWidth(this->textWidth());
cp->setTextHeight(this->textHeight());
@ -275,15 +275,9 @@ QPainterPath UBGraphicsTextItem::shape() const
void UBGraphicsTextItem::setTextWidth(qreal width)
{
QFontMetrics fm(font());
qreal strictMin = fm.height();
qreal strictMin = 155; // the size of the font customization panel
qreal newWidth = qMax(strictMin, width);
if (toPlainText().isEmpty())
{
qreal minWidth = fm.width(mTypeTextHereLabel);
newWidth = qMax(minWidth, newWidth);
}
QGraphicsTextItem::setTextWidth(newWidth);
}
@ -313,7 +307,7 @@ void UBGraphicsTextItem::contentsChanged()
if (toPlainText().isEmpty())
{
setTextWidth(textWidth());
resize(textWidth(),textHeight());
}
}
@ -356,3 +350,9 @@ void UBGraphicsTextItem::documentSizeChanged(const QSizeF & newSize)
{
resize(newSize.width(), newSize.height());
}
void UBGraphicsTextItem::setHtml(const QString &text)
{
QGraphicsTextItem::setHtml(text);
setTextInteractionFlags(Qt::NoTextInteraction);
}

@ -90,6 +90,7 @@ class UBGraphicsTextItem : public QGraphicsTextItem, public UBItem, public UBRes
virtual void clearSource(){;}
virtual void setUuid(const QUuid &pUuid);
void setHtml(const QString &text);
signals:
void textUndoCommandAdded(UBGraphicsTextItem *textItem);
@ -107,7 +108,6 @@ class UBGraphicsTextItem : public QGraphicsTextItem, public UBItem, public UBRes
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
private:
qreal mTextHeight;
int mMultiClickState;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save