Merge conflicts in UBFeaturesWidget resolved manualy

preferencesAboutTextFull
Ilia Ryabokon 12 years ago
commit b48ef4f695
  1. BIN
      JournalDesModifications.pdf
  2. BIN
      ReleaseNotes.pdf
  3. 2
      Sankore_3.1.pro
  4. BIN
      resources/etc/Tutorial/tutorial_en/CSS/._grid.css
  5. BIN
      resources/etc/Tutorial/tutorial_en/CSS/._reset.css
  6. BIN
      resources/etc/Tutorial/tutorial_en/CSS/._typography.css
  7. BIN
      resources/etc/Tutorial/tutorial_en/images/._logo_open_sankore.png
  8. BIN
      resources/etc/Tutorial/tutorial_en/images/._manuel.png
  9. BIN
      resources/etc/Tutorial/tutorial_en/images/._pedago.png
  10. BIN
      resources/etc/Tutorial/tutorial_en/images/._tech.png
  11. BIN
      resources/etc/Tutorial/tutorial_en/images/._video.png
  12. BIN
      resources/etc/Tutorial/tutorial_fr/CSS/._grid.css
  13. BIN
      resources/etc/Tutorial/tutorial_fr/CSS/._reset.css
  14. BIN
      resources/etc/Tutorial/tutorial_fr/CSS/._typography.css
  15. BIN
      resources/etc/Tutorial/tutorial_fr/images/._logo_open_sankore.png
  16. BIN
      resources/etc/Tutorial/tutorial_fr/images/._manuel.png
  17. BIN
      resources/etc/Tutorial/tutorial_fr/images/._pedago.png
  18. BIN
      resources/etc/Tutorial/tutorial_fr/images/._tech.png
  19. BIN
      resources/etc/Tutorial/tutorial_fr/images/._video.png
  20. 168
      resources/forms/preferences.ui
  21. 14
      resources/forms/youTubePublishingDialog.ui
  22. 2
      resources/library/applications/Notes.wgt/config.xml
  23. 318
      resources/library/applications/Notes.wgt/css/ubwidget.css
  24. 2
      resources/library/applications/Notes.wgt/js/jquery.ubwidget.js
  25. 44
      resources/library/applications/Notes.wgt/js/ubw-main.js
  26. 7
      resources/library/interactivities/Ass images.wgt/css/basic.css
  27. 23
      resources/library/interactivities/Ass sons.wgt/css/basic.css
  28. 7
      resources/library/interactivities/Cat images.wgt/css/basic.css
  29. 7
      resources/library/interactivities/Cat text.wgt/css/basic.css
  30. 27
      resources/library/interactivities/Choisir.wgt/css/basic.css
  31. 17
      resources/library/interactivities/Contraste.wgt/css/basic.css
  32. 7
      resources/library/interactivities/Etudier.wgt/css/basic.css
  33. 7
      resources/library/interactivities/Ordre images.wgt/css/basic.css
  34. 7
      resources/library/interactivities/Ordre lettres.wgt/css/basic.css
  35. 31
      resources/library/interactivities/Ordre lettres.wgt/js/script.js
  36. 36
      resources/library/interactivities/Ordre lettres.wgt/locales/fr/js/script.js
  37. 38
      resources/library/interactivities/Ordre lettres.wgt/locales/ru/js/script.js
  38. 7
      resources/library/interactivities/Ordre mots.wgt/styles/of_puppets.css
  39. 7
      resources/library/interactivities/Ordre phrase.wgt/styles/of_puppets.css
  40. 7
      resources/library/interactivities/Selectionner.wgt/css/basic.css
  41. 6
      resources/library/interactivities/Separe phrase.wgt/styles/app.css
  42. 1
      resources/library/interactivities/Separe phrase.wgt/styles/master.css
  43. 6
      resources/library/interactivities/Separe texte.wgt/styles/app.css
  44. 1
      resources/library/interactivities/Separe texte.wgt/styles/master.css
  45. 1
      resources/library/interactivities/Syllabes.wgt/styles/master.css
  46. 6
      resources/library/interactivities/Syllabes.wgt/styles/spl-word.css
  47. 6
      resources/library/search/Image Planete.wgs/index.html
  48. 3
      src/adaptors/UBSvgSubsetAdaptor.cpp
  49. 7
      src/adaptors/publishing/UBDocumentPublisher.cpp
  50. 54
      src/board/UBBoardController.cpp
  51. 31
      src/board/UBBoardPaletteManager.cpp
  52. 6
      src/board/UBBoardView.cpp
  53. 2
      src/core/UBApplication.cpp
  54. 13
      src/core/UBDownloadManager.cpp
  55. 28
      src/core/UBPreferencesController.cpp
  56. 2
      src/core/UBPreferencesController.h
  57. 34
      src/core/UBSettings.cpp
  58. 11
      src/core/UBSettings.h
  59. 5
      src/domain/UBGraphicsDelegateFrame.cpp
  60. 1
      src/domain/UBGraphicsDelegateFrame.h
  61. 1
      src/frameworks/UBFileSystemUtils.cpp
  62. 6
      src/frameworks/UBGeometryUtils.cpp
  63. 7
      src/frameworks/UBGeometryUtils.h
  64. 317
      src/gui/UBFeaturesWidget.cpp
  65. 10
      src/gui/UBToolWidget.cpp
  66. 54
      src/podcast/youtube/UBYouTubePublisher.cpp
  67. 2
      src/podcast/youtube/UBYouTubePublisher.h
  68. 2
      src/tools/UBAbstractDrawRuler.cpp
  69. 5
      src/tools/UBAbstractDrawRuler.h
  70. 37
      src/tools/UBGraphicsCompass.cpp
  71. 2
      src/tools/UBGraphicsCompass.h
  72. 2
      src/tools/UBGraphicsProtractor.h
  73. 238
      src/tools/UBGraphicsRuler.cpp
  74. 2
      src/tools/UBGraphicsRuler.h
  75. 22
      src/tools/UBGraphicsTriangle.cpp
  76. 4
      src/tools/UBGraphicsTriangle.h
  77. 12
      src/tools/UBToolsManager.cpp

Binary file not shown.

Binary file not shown.

@ -11,7 +11,7 @@ CONFIG += debug_and_release \
VERSION_MAJ = 2 VERSION_MAJ = 2
VERSION_MIN = 00 VERSION_MIN = 00
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 09 VERSION_PATCH = 10
VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}"
VERSION = $$replace(VERSION, "\\.r", "") VERSION = $$replace(VERSION, "\\.r", "")

@ -24,7 +24,7 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QTabWidget" name="mainTabWidget"> <widget class="QTabWidget" name="mainTabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>3</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="displayTab"> <widget class="QWidget" name="displayTab">
<attribute name="title"> <attribute name="title">
@ -608,19 +608,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QGroupBox" name="CommunityGroupBox"> <widget class="QGroupBox" name="CommunityGroupBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -630,7 +617,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="title"> <property name="title">
<string>Planète Sankoré ID</string> <string>Planète Sankoré ID for exporting file</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_18"> <layout class="QGridLayout" name="gridLayout_18">
<item row="2" column="1"> <item row="2" column="1">
@ -693,9 +680,38 @@
</property> </property>
</spacer> </spacer>
</item> </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> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="thirdPartyLicence"> <widget class="QWidget" name="thirdPartyLicence">
@ -736,11 +752,11 @@
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt; &lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt; &lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt; &lt;td style=&quot;border: none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;The licences are in English to respect the official and legal approved translation.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;The licences are in English to respect the official and legal approved translation.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
@ -772,12 +788,12 @@ p, li { white-space: pre-wrap; }
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt; &lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt; &lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt; &lt;td style=&quot;border: none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt;The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt;The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt;See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact &lt;/span&gt;&lt;a href=&quot;mailto:openssl-core@openssl.org&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;openssl-core@openssl.org&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt;See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact &lt;/span&gt;&lt;a href=&quot;mailto:openssl-core@openssl.org&quot;&gt;&lt;span style=&quot; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;openssl-core@openssl.org&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -794,11 +810,11 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt; &lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt; &lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt; &lt;td style=&quot;border: none;&quot;&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt;Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt; This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt; Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt; 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt; 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#1a1a1a;&quot;&gt; 3. This notice may not be removed or altered from any source distribution.&lt;/span&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt;Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt; This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.&lt;/span&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt; Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:&lt;/span&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt; 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.&lt;/span&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt; 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.&lt;/span&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot; font-size:9pt; color:#1a1a1a;&quot;&gt; 3. This notice may not be removed or altered from any source distribution.&lt;/span&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -815,11 +831,11 @@ p, li { white-space: pre-wrap; }
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt; &lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt; &lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt; &lt;td style=&quot;border: none;&quot;&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt; color:#000000;&quot;&gt;Xpdf is licensed under the GNU General Public License (GPL), version 2.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt; color:#000000;&quot;&gt;Xpdf is licensed under the GNU General Public License (GPL), version 2.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -836,11 +852,11 @@ p, li { white-space: pre-wrap; }
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt; &lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt; &lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt; &lt;td style=&quot;border: none;&quot;&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:9pt;&quot;&gt;GNU Library or Lesser General Public License (LGPL), zlib/libpng License&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:9pt;&quot;&gt;GNU Library or Lesser General Public License (LGPL), zlib/libpng License&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -1321,12 +1337,12 @@ DAMAGES.
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt; &lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt; &lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt; &lt;td style=&quot;border: none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;Open-Sankoré version 1.4 , Copyright (C) 2010-2012 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)&lt;br /&gt;&lt;br /&gt;Open-Sankoré est un logiciel libre : vous pouvez le redistribuer et/ou le modifier en respectant les termes de la Lesser GNU general Public Licence (GNU LGPL) telle que publiée par la Free Software Foundation en version 2 ou une version plus récente.&lt;br /&gt;Vous pouvez consulter et charger le code source du logiciel sur &lt;/span&gt;&lt;a href=&quot;https://github.com/Sankore&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;&amp;lt;https://github.com/Sankore&amp;gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;&lt;br /&gt;Open-Sankoré est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER.&lt;br /&gt;Veuillez consulter la licence Lesser GNU General Public Licence située dans l'onglet Licences ou consulter le site &lt;/span&gt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;&amp;lt;http://www.gnu.org/licenses/&amp;gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;.&lt;br /&gt;&lt;br /&gt;Open-Sankoré is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. You can find the source code of this software at &lt;/span&gt;&lt;a href=&quot;https://github.com/Sankore&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;&amp;lt;https://github.com/Sankore&amp;gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;&lt;br /&gt;Open-Sankoré is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Open-Sankoré version 1.4 , Copyright (C) 2010-2012 Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)&lt;br /&gt;&lt;br /&gt;Open-Sankoré est un logiciel libre : vous pouvez le redistribuer et/ou le modifier en respectant les termes de la Lesser GNU general Public Licence (GNU LGPL) telle que publiée par la Free Software Foundation en version 2 ou une version plus récente.&lt;br /&gt;Vous pouvez consulter et charger le code source du logiciel sur &lt;/span&gt;&lt;a href=&quot;https://github.com/Sankore&quot;&gt;&lt;span style=&quot; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;&amp;lt;https://github.com/Sankore&amp;gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;&lt;br /&gt;Open-Sankoré est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE, sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER.&lt;br /&gt;Veuillez consulter la licence Lesser GNU General Public Licence située dans l'onglet Licences ou consulter le site &lt;/span&gt;&lt;a href=&quot;http://www.gnu.org/licenses/&quot;&gt;&lt;span style=&quot; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;&amp;lt;http://www.gnu.org/licenses/&amp;gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;.&lt;br /&gt;&lt;br /&gt;Open-Sankoré is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. You can find the source code of this software at &lt;/span&gt;&lt;a href=&quot;https://github.com/Sankore&quot;&gt;&lt;span style=&quot; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;&amp;lt;https://github.com/Sankore&amp;gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;&lt;br /&gt;Open-Sankoré is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License below for more details.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;Contact : &lt;br /&gt;Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)&lt;br /&gt;Délégation Interministérielle à l'Education Numérique en Afrique&lt;br /&gt;20 Avenue Ségur Paris 75007&lt;br /&gt;Téléphone : 01 43 17 68 08&lt;br /&gt;email: &lt;/span&gt;&lt;a href=&quot;mailto:contact@sankore.org&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;contact@sankore.org&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;Contact : &lt;br /&gt;Groupement d'Intérêt Public pour l'Education Numérique en Afrique (GIP ENA)&lt;br /&gt;Délégation Interministérielle à l'Education Numérique en Afrique&lt;br /&gt;20 Avenue Ségur Paris 75007&lt;br /&gt;Téléphone : 01 43 17 68 08&lt;br /&gt;email: &lt;/span&gt;&lt;a href=&quot;mailto:contact@sankore.org&quot;&gt;&lt;span style=&quot; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;contact@sankore.org&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -1355,7 +1371,7 @@ p, li { white-space: pre-wrap; }
<rect> <rect>
<x>10</x> <x>10</x>
<y>30</y> <y>30</y>
<width>341</width> <width>551</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
@ -1381,52 +1397,52 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Crédits police scolaire Open-Sankoré : &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Crédits police scolaire Open-Sankoré : &lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;La police Andika Basic dispose d'une licence Open Font License &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;La police Andika Basic dispose d'une licence Open Font License &lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; © Sil international&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; © Sil international&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;amp;id=andika&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;amp;id=andika&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Licence OFL (traduction française non officielle) http://fontforge.sourceforge.net/OFL-Unofficial-fr.html&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Licence OFL (traduction française non officielle) http://fontforge.sourceforge.net/OFL-Unofficial-fr.html&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence OFL : &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence OFL : &lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;- Ecolier Court &lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- Ecolier Court &lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;- Ecolier Ligne Court&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- Ecolier Ligne Court&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; © Jean-Marie Douteau (douteau.ecolier@sfr.fr)&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; © Jean-Marie Douteau (douteau.ecolier@sfr.fr)&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence Creative Commons BY NC ND :&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Les polices Ecolier suivantes sont l'oeuvre de Jean-Marie Douteau et disposent d'une licence Creative Commons BY NC ND :&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;- Ecolier lignes pointillés&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- Ecolier lignes pointillés&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;- Écolier pointillés&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- Écolier pointillés&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;- Écolier CP&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- Écolier CP&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;- Écolier CP pointillés&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- Écolier CP pointillés&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; © Jean-Marie Douteau (douteau.ecolier@sfr.fr)&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; © Jean-Marie Douteau (douteau.ecolier@sfr.fr)&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source : http://douteau.ecolier.perso.sfr.fr/page_ecolier.htm&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Les polices Cursive sont l'oeuvre d'Antoine Fetet (antoine.fetet@laposte.net) à partir d'une police proposée par Jean-Claude Gineau&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Les polices Cursive sont l'oeuvre d'Antoine Fetet (antoine.fetet@laposte.net) à partir d'une police proposée par Jean-Claude Gineau&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source : http://lps13.free.fr/contenu/construire/Cursive_standard.zip et http://fr.fontriver.com/font/gino_school_script/&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source : http://lps13.free.fr/contenu/construire/Cursive_standard.zip et http://fr.fontriver.com/font/gino_school_script/&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;L'auteur en autorise l'utilisation dans le cadre du logiciel open-Sankoré pour un usage non commercial&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;L'auteur en autorise l'utilisation dans le cadre du logiciel open-Sankoré pour un usage non commercial&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Les polices Script (Ecole et CaseEcole) sont l'oeuvre d'Henri Rogelet&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Les polices Script (Ecole et CaseEcole) sont l'oeuvre d'Henri Rogelet&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source : http://pointecole.free.fr/polices/SCRIPTCO.zip&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source : http://pointecole.free.fr/polices/SCRIPTCO.zip&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source : http://pointecole.free.fr/polices/SCRIPTCA.zip&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source : http://pointecole.free.fr/polices/SCRIPTCA.zip&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; © Henri Rogelet &amp;lt;h.rogelet@free.fr&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; © Henri Rogelet &amp;lt;h.rogelet@free.fr&amp;gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Autorisation pour un usage non commercial&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Autorisation pour un usage non commercial&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source : http://pointecole.free.fr/polices.html&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source : http://pointecole.free.fr/polices.html&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;/p&gt; &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;La police phonétique, Alphonet est l'oeuvre d'Henri Rogelet&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;La police phonétique, Alphonet est l'oeuvre d'Henri Rogelet&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source : http://pointecole.free.fr/polices/ALPHONET.zip&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source : http://pointecole.free.fr/polices/ALPHONET.zip&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt; © Henri Rogelet &amp;lt;h.rogelet@free.fr&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; © Henri Rogelet &amp;lt;h.rogelet@free.fr&amp;gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Autorisation pour un usage non commercial&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Autorisation pour un usage non commercial&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:10pt;&quot;&gt;Source : http://pointecole.free.fr/polices.html&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Source : http://pointecole.free.fr/polices.html&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>

@ -123,7 +123,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1"> <item row="10" column="1">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -143,13 +143,23 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1"> <item row="11" column="1">
<widget class="QDialogButtonBox" name="dialogButtons"> <widget class="QDialogButtonBox" name="dialogButtons">
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1">
<widget class="QCheckBox" name="youtubeCredentialsPersistence">
<property name="text">
<string>Restore credentials on reboot</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>

@ -3,7 +3,7 @@
xmlns:ub="http://uniboard.mnemis.com/widgets" xmlns:ub="http://uniboard.mnemis.com/widgets"
id="http://uniboard.mnemis.com/widgets/notes" id="http://uniboard.mnemis.com/widgets/notes"
version="1.2" version="1.2"
width="302" width="320"
height="260" height="260"
ub:resizable="true"> ub:resizable="true">

@ -1,215 +1,219 @@
* { * {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
body{ body, html{
margin:0px; margin:0px;
height: 96%;
} }
.ubw-container{ .ubw-container{
text-overflow: ellipsis; min-width: 280px;
left:0px; min-height: 200px;
top:0px; width: 99%;
margin:0px; height: 100%;
/*background-color: #edf7c0;*/ text-overflow: ellipsis;
background-image: url(../images/back.png); left:0px;
overflow: hidden; top:0px;
border-right: 1px solid rgb(252, 252, 220); margin:0px;
border-left: 1px solid rgb(232, 232, 220); background-image: url(../images/back.png);
overflow: hidden;
border-right: 1px solid rgb(252, 252, 220);
border-left: 1px solid rgb(232, 232, 220);
} }
.ubw-body{ .ubw-body{
} }
.head{ .head{
border-top: 1px solid rgb(252, 252, 220); border-top: 1px solid rgb(252, 252, 220);
position: relative; position: relative;
background-color: transparent; background-color: transparent;
font-style: normal; font-style: normal;
color: #263141; color: #263141;
font-size: 119%; font-size: 119%;
width: auto; width: auto;
height: 20px; height: 20px;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-weight: normal; font-weight: normal;
outline: none; outline: none;
border-bottom: rgb(252, 252, 220); border-bottom: rgb(252, 252, 220);
} }
.stickytitle{ .stickytitle{
background-color: transparent; background-color: transparent;
min-width: 10px; min-width: 10px;
max-width: 70%; max-width: 70%;
width: 100%; width: 100%;
padding-top: 4px; padding-top: 4px;
height: 20px; height: 20px;
float: left; float: left;
z-index: 3; z-index: 3;
position: relative; position: relative;
overflow:hidden; overflow:hidden;
margin-left: 10px; margin-left: 10px;
margin-right: -2px; margin-right: -2px;
font-style: normal; font-style: normal;
color: #444444; color: #444444;
font-size: 88%; font-size: 88%;
border-style: none; border-style: none;
outline: none; outline: none;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
font-weight: normal; font-weight: normal;
text-align: left; text-align: left;
resize: none; resize: none;
} }
.textField{ .textField{
min-height: 50px; min-height: 50px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
height: auto; height: auto;
width: auto; width: auto;
margin: 5px; margin: 5px;
padding-right: 4%; padding-right: 4%;
background-position: 0; background-position: 0;
border-left-style: none; border-left-style: none;
border-bottom-style: none; border-bottom-style: none;
border-right-style: none; border-right-style: none;
border-top-style: none; border-top-style: none;
text-align: left; text-align: left;
list-style-type: none; list-style-type: none;
outline: none; outline: none;
word-wrap: break-word; word-wrap: break-word;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
color:#444444; color:#444444;
} }
.ubw-inspector{ .ubw-inspector{
position:absolute; position:absolute;
background-color:rgb(252, 252, 252); background-color:rgb(252, 252, 252);
border:1px solid #cccccc; border:1px solid #cccccc;
line-height:20px; line-height:20px;
font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif;
font-weight:normal; font-weight:normal;
font-size:20px; font-size:20px;
color:#333333; color:#333333;
} }
.ubw-inpubox{ .ubw-inpubox{
min-width:28px; min-width:28px;
min-height:37px; min-height:37px;
color:#333333; color:#333333;
background-image: url(../images/button_out.png); background-image: url(../images/button_out.png);
border-left:1px solid rgb(231, 231, 231); border-left:1px solid rgb(231, 231, 231);
border-right:1px solid rgb(231, 231, 231); border-right:1px solid rgb(231, 231, 231);
border-bottom:1px solid rgb(221, 221, 221); border-bottom:1px solid rgb(221, 221, 221);
border-top:1px solid rgb(241, 241, 241); border-top:1px solid rgb(241, 241, 241);
} }
/*BUTTONS*/ /*BUTTONS*/
.ubw-button-wrapper{ .ubw-button-wrapper{
float:left; float:left;
position:relative; position:relative;
/*border:solid 1px yellow;*/ /*border:solid 1px yellow;*/
margin-right:-7px; margin-right:-7px;
z-index:0; z-index:0;
font-family:Arial, Helvetica, sans-serif; font-family:Arial, Helvetica, sans-serif;
font-weight:normal; font-weight:normal;
font-size:30px; font-size:30px;
overflow:visible; overflow:visible;
} }
.ubw-button-canvas{ .ubw-button-canvas{
width:auto; width:auto;
float:left; float:left;
position:relative; position:relative;
overflow:visible; overflow:visible;
} }
table{ table{
line-height:90%; line-height:90%;
} }
.ubw-dropdown{ .ubw-dropdown{
margin: 0; margin: 0;
padding: 0; padding: 0;
font-size: 15px; font-size: 15px;
width:100px; width:100px;
list-style: none; list-style: none;
cursor:pointer; cursor:pointer;
float:none; float:none;
margin-left:3px; margin-left:3px;
} }
.ubw-dropdown li.out{ .ubw-dropdown li.out{
padding-left: 5px; padding-left: 5px;
color:#444444; color:#444444;
border-left:1px solid rgb(231, 231, 233); border-left:1px solid rgb(231, 231, 233);
border-right:1px solid rgb(231, 231, 233); border-right:1px solid rgb(231, 231, 233);
background-image: url(../images/button_out.gif); background-image: url(../images/button_out.gif);
} }
.ubw-dropdown li.over{ .ubw-dropdown li.over{
padding-left: 5px; padding-left: 5px;
color:#eeeeee; color:#eeeeee;
border-left:1px solid rgb(140, 140, 140); border-left:1px solid rgb(140, 140, 140);
border-right:1px solid rgb(140, 140, 140); border-right:1px solid rgb(140, 140, 140);
background-image: url(../images/button_out_dark.png); background-image: url(../images/button_out_dark.png);
} }
.ubw-dropdown li.ubw-dropdown-top-corners{ .ubw-dropdown li.ubw-dropdown-top-corners{
border-top:1px solid rgb(241, 241, 244); border-top:1px solid rgb(241, 241, 244);
} }
.ubw-dropdown li.ubw-dropdown-bottom-corners{ .ubw-dropdown li.ubw-dropdown-bottom-corners{
border-bottom:1px solid rgb(221, 221, 223); border-bottom:1px solid rgb(221, 221, 223);
} }
.ubw-button-body{ .ubw-button-body{
position:relative; position:relative;
float:left; float:left;
width:auto; width:auto;
height:auto; height:auto;
overflow:visible overflow:visible
text-align:center; text-align:center;
vertical-align:middle; vertical-align:middle;
cursor:pointer; cursor:pointer;
} }
.ubw-button-content{ .ubw-button-content{
margin:2px; margin:2px;
height:auto; height:auto;
width:auto; width:auto;
text-align:center; text-align:center;
overflow:visible; overflow:visible;
} }
.ubw-button-over{ .ubw-button-over{
color:#444444; color:#444444;
background-image: url(../images/button_out.gif); background-image: url(../images/button_out.gif);
border-left:1px solid rgb(221, 221, 221); border-left:1px solid rgb(221, 221, 221);
border-right:1px solid rgb(221, 221, 221); border-right:1px solid rgb(221, 221, 221);
border-bottom:1px solid rgb(211, 211, 211); border-bottom:1px solid rgb(211, 211, 211);
border-top:1px solid rgb(231, 231, 231); border-top:1px solid rgb(231, 231, 231);
} }
.ubw-button-out{ .ubw-button-out{
color:#555555; color:#555555;
background-image: url(../images/button_out.gif); background-image: url(../images/button_out.gif);
border-left:2px solid rgb(231, 231, 233); border-left:2px solid rgb(231, 231, 233);
border-right:2px solid rgb(231, 231, 233); border-right:2px solid rgb(231, 231, 233);
border-bottom:2px solid rgb(221, 221, 223); border-bottom:2px solid rgb(221, 221, 223);
border-top:2px solid rgb(241, 241, 244); border-top:2px solid rgb(241, 241, 244);
} }
span.colored{ span.colored{
color: #0080ff; color: #0080ff;
} }
@ -217,8 +221,8 @@ span.colored{
.menuElement{ .menuElement{
position: relative; position: relative;
float:right; float:right;
} }

@ -29,8 +29,6 @@
// Default options // Default options
jQuery.fn.ubwidget.defaults = { jQuery.fn.ubwidget.defaults = {
width:250,
height:300
}; };
// Shadows // Shadows

@ -16,8 +16,8 @@
function init(){ function init(){
var ubwidget = $("#ubwidget").ubwidget({ var ubwidget = $("#ubwidget").ubwidget({
width:360, // width:360,
height:240 // height:240
}); });
var checkMinimize = false; var checkMinimize = false;
@ -108,6 +108,7 @@ function init(){
minimize.click( minimize.click(
function(){ function(){
$('.ubw-container').css("min-height", "26px")
$('.ubw-container').animate({ $('.ubw-container').animate({
height:"26px" height:"26px"
},500); },500);
@ -127,7 +128,7 @@ function init(){
var lastHeight = String(minimizedHeight)+'px'; var lastHeight = String(minimizedHeight)+'px';
$('.ubw-container').animate({ $('.ubw-container').animate({
height: lastHeight height: lastHeight
},500); },500, function(){$('.ubw-container').css("min-height", "200px").css("height","")});
maximize.hide(); maximize.hide();
minimize.show(); minimize.show();
@ -190,8 +191,8 @@ function init(){
text = window.sankore.preference('noteText', text); text = window.sankore.preference('noteText', text);
currentFontSize = window.sankore.preference('fontSize', defaultFontSize); currentFontSize = window.sankore.preference('fontSize', defaultFontSize);
$('.ubw-container').css({ $('.ubw-container').css({
width:window.innerWidth - 2, // width:window.innerWidth - 2,
height:window.innerHeight - 20 // height:window.innerHeight - 20
}); });
if(checkMinimize){ if(checkMinimize){
@ -212,25 +213,24 @@ function init(){
winwidth = window.innerWidth; winwidth = window.innerWidth;
winheight = window.innerHeight; winheight = window.innerHeight;
if(winwidth <= 290) // if(winwidth <= 290)
{ // {
window.resizeTo(290,winheight); // window.resizeTo(290,winheight);
} // }
if(winheight <= 100) // if(winheight <= 100)
{ // {
window.resizeTo(winwidth,100); // window.resizeTo(winwidth,100);
} // }
if(winheight > 600) // if(winheight > 600)
{ // {
window.resizeTo(winwidth,600); // window.resizeTo(winwidth,600);
} // }
$('.ubw-container').width(winwidth-2); // $('.ubw-container').width(winwidth-2);
//
if(checkMinimize) if(checkMinimize)
minimizedHeight = winheight-40; minimizedHeight = winheight-40;
else
$('.ubw-container').height(winheight-40);
controlTextField(); controlTextField();
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
.without_radius{ .without_radius{
@ -280,7 +281,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -290,7 +291,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -407,7 +408,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -315,7 +316,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -325,7 +326,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -351,22 +352,6 @@ body{
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
} }
.style_select{
width: 120px;
/*font-family: "Lobster13Regular";*/
font-size: 24px;
float: right;
margin: 10px 20px 0 0;
border-radius: 10px;
background-image: url(../img/ar_down.png);
background-color: #d4aa79;
color: #8c5730;
background-position: 105px 11px;
background-repeat: no-repeat;
-webkit-appearance: menulist-text;
display: none;
}
.btl_pad{ .btl_pad{
background-image: url(../img/pad-top-left.png) !important; background-image: url(../img/pad-top-left.png) !important;
} }
@ -463,7 +448,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -256,7 +257,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -266,7 +267,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -388,7 +389,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -278,7 +279,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -288,7 +289,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -410,7 +411,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -18,6 +18,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -30,7 +31,7 @@ body{
border: none; border: none;
background-image: url(../images/greySquare.png); background-image: url(../images/greySquare.png);
font-weight: bold; font-weight: bold;
font-family: Verdana; font-family: sans-serif;
color: #00C6FF;; color: #00C6FF;;
cursor: pointer; cursor: pointer;
} }
@ -45,7 +46,7 @@ body{
float: left; float: left;
padding: 5px; padding: 5px;
margin: 2px; margin: 2px;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: large; font-size: large;
} }
@ -68,7 +69,7 @@ body{
margin: 2px auto; margin: 2px auto;
padding: 5px; padding: 5px;
float: left; float: left;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
} }
.qstDivDisplay{ .qstDivDisplay{
@ -76,7 +77,7 @@ body{
margin: 5px 5%; margin: 5px 5%;
padding: 5px; padding: 5px;
float: left; float: left;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
border: 2px solid #cccccc; border: 2px solid #cccccc;
-moz-border-radius: 5px; -moz-border-radius: 5px;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
@ -146,7 +147,7 @@ body{
width: 95%; width: 95%;
max-height: 100px; max-height: 100px;
overflow-x: hidden; overflow-x: hidden;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: small; font-size: small;
border: 3px solid #ccc; border: 3px solid #ccc;
border-radius: 5px; border-radius: 5px;
@ -162,7 +163,7 @@ body{
width: 95%; width: 95%;
max-height: 120px; max-height: 120px;
overflow-x: hidden; overflow-x: hidden;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
color: white; color: white;
border: 1px solid #DFDFDE; border: 1px solid #DFDFDE;
border-top-left-radius: 10px; border-top-left-radius: 10px;
@ -214,7 +215,7 @@ body{
.ansContent{ .ansContent{
padding: 1px 3px 3px 3px; padding: 1px 3px 3px 3px;
margin-left: 5px; margin-left: 5px;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: small; font-size: small;
width: 80%; width: 80%;
max-height: 60px; max-height: 60px;
@ -230,7 +231,7 @@ body{
.ansContentDisplay{ .ansContentDisplay{
padding: 1px 3px 3px 3px; padding: 1px 3px 3px 3px;
margin-left: 5px; margin-left: 5px;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: small; font-size: small;
font-weight: bold; font-weight: bold;
width: 80%; width: 80%;
@ -299,7 +300,7 @@ body{
color: #666666; color: #666666;
float: left; float: left;
font-size: small; font-size: small;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
margin: 3px 5px; margin: 3px 5px;
padding: 5px; padding: 5px;
} }
@ -347,7 +348,7 @@ body{
.textType{ .textType{
width: 160px; width: 160px;
font-size: small; font-size: small;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
color: #666; color: #666;
padding: 3px; padding: 3px;
margin-left: 20px; margin-left: 20px;
@ -471,7 +472,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -481,7 +482,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -603,7 +604,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -17,11 +18,9 @@ body{
border: none; border: none;
background-image: url(../images/greySquare.png); background-image: url(../images/greySquare.png);
font-weight: bold; font-weight: bold;
font-family: Verdana; font-family: sans-serif;
color: yellow; color: yellow;
cursor: pointer; cursor: pointer;
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
border-top-left-radius: 5px; border-top-left-radius: 5px;
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
} }
@ -101,7 +100,7 @@ body{
float: right; float: right;
width: 70%; width: 70%;
border: none; border: none;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
background-color: #ffc; background-color: #ffc;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
@ -116,7 +115,7 @@ body{
margin: 4px 5px; margin: 4px 5px;
border: none; border: none;
background-image: url(../images/greySquare2.png); background-image: url(../images/greySquare2.png);
font-family: Verdana; font-family: sans-serif;
color: yellow; color: yellow;
cursor: pointer; cursor: pointer;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
@ -137,7 +136,7 @@ body{
padding: 2px; padding: 2px;
float: left; float: left;
text-align: center; text-align: center;
font-family: Verdana,Arial,Helvetica,sans-serif; font-family: sans-serif;
font-weight: bold; font-weight: bold;
font-size:24px; font-size:24px;
word-wrap: break-word; word-wrap: break-word;
@ -265,7 +264,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -275,7 +274,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -413,7 +412,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -354,7 +355,7 @@ li>div{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -364,7 +365,7 @@ li>div{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -479,7 +480,7 @@ li>div{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -237,7 +238,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -247,7 +248,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -369,7 +370,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -298,7 +299,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -308,7 +309,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -430,7 +431,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -31,8 +31,8 @@ function start(){
$("div.inline label").html(sankoreLang.theme + tmpl) $("div.inline label").html(sankoreLang.theme + tmpl)
if(window.sankore){ if(window.sankore){
if(sankore.preference("associer_sound","")){ if(sankore.preference("ord_let","")){
var data = jQuery.parseJSON(sankore.preference("associer_sound","")); var data = jQuery.parseJSON(sankore.preference("ord_let",""));
importData(data); importData(data);
} }
else else
@ -263,15 +263,17 @@ function exportData(){
array_to_export.push(cont_obj); array_to_export.push(cont_obj);
}); });
} }
if(window.sankore) if(window.sankore){
sankore.setPreference("associer_sound", JSON.stringify(array_to_export)); sankore.setPreference("ord_let", JSON.stringify(array_to_export));
sankore.setPreference("ord_let_locale", "en");
}
if($("#wgt_display").hasClass("selected")){ if($("#wgt_display").hasClass("selected")){
if(window.sankore) if(window.sankore)
sankore.setPreference("associer_sound_state", "display"); sankore.setPreference("ord_let_state", "display");
} }
else{ else{
if(window.sankore) if(window.sankore)
sankore.setPreference("associer_sound_state", "edit"); sankore.setPreference("ord_let_state", "edit");
} }
} }
@ -308,8 +310,8 @@ function importData(data){
tmp_array.push(tmp_letter); tmp_array.push(tmp_letter);
} }
if(sankore.preference("associer_sound_state","")){ if(sankore.preference("ord_let_state","")){
if(sankore.preference("associer_sound_state","") == "edit") if(sankore.preference("ord_let_state","") == "edit")
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
} else } else
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
@ -366,11 +368,11 @@ function addContainer(){
$("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container); $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container);
var text = $("<div class='text_cont'>").appendTo(sub_container); var text = $("<div class='text_cont'>").appendTo(sub_container);
text.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).removeClass('gray'); return false;")
.attr("ondragover", "$(this).addClass('gray'); return false;")
.attr("ondrop", "$(this).removeClass('gray'); return onDropAudio(this,event);");
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
audio_block.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).removeClass('audio_gray'); return false;")
.attr("ondragover", "$(this).addClass('audio_gray'); return false;")
.attr("ondrop", "$(this).removeClass('audio_gray'); return onDropAudio(this,event);");
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", ""); var source = $("<source/>").attr("src", "");
@ -505,11 +507,10 @@ function onDropAudio(obj, event) {
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
if(tmp_type.substr(0, 5) == "audio"){ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $(obj).find(".audio_block");
$(obj).find("audio").remove(); $(obj).find("audio").remove();
audio_block.find(":first-child").removeClass("stop").addClass("play"); $(obj).find(":first-child").removeClass("stop").addClass("play");
var source = $("<source/>").attr("src", tmp); var source = $("<source/>").attr("src", tmp);
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo($(obj));
audio.append(source); audio.append(source);
} }
} }

@ -51,8 +51,8 @@ function start(){
$("div.inline label").html(sankoreLang.theme + tmpl) $("div.inline label").html(sankoreLang.theme + tmpl)
if(window.sankore){ if(window.sankore){
if(sankore.preference("associer_sound","")){ if(sankore.preference("ord_let","")){
var data = jQuery.parseJSON(sankore.preference("associer_sound","")); var data = jQuery.parseJSON(sankore.preference("ord_let",""));
importData(data); importData(data);
} }
else else
@ -272,7 +272,7 @@ function exportData(){
$(".cont").each(function(){ $(".cont").each(function(){
var cont_obj = new Object(); var cont_obj = new Object();
cont_obj.text = $(this).find(".audio_desc").text(); cont_obj.text = $(this).find(".audio_desc").text();
cont_obj.audio = $(this).find("source").attr("src").replace("../../",""); cont_obj.audio = $(this).find("source").attr("src");
cont_obj.answer = $(this).find(".audio_answer").text(); cont_obj.answer = $(this).find(".audio_answer").text();
cont_obj.cur_answer = ""; cont_obj.cur_answer = "";
array_to_export.push(cont_obj); array_to_export.push(cont_obj);
@ -281,22 +281,23 @@ function exportData(){
$(".cont").each(function(){ $(".cont").each(function(){
var cont_obj = new Object(); var cont_obj = new Object();
cont_obj.text = $(this).find(".audio_desc").text(); cont_obj.text = $(this).find(".audio_desc").text();
cont_obj.audio = $(this).find("source").attr("src").replace("../../",""); cont_obj.audio = $(this).find("source").attr("src");
cont_obj.answer = $(this).find("ul").next().val(); cont_obj.answer = $(this).find("ul").next().val();
cont_obj.cur_answer = getAnswer($(this).find("ul")); cont_obj.cur_answer = getAnswer($(this).find("ul"));
array_to_export.push(cont_obj); array_to_export.push(cont_obj);
}); });
} }
sankore.setPreference("associer_sound", JSON.stringify(array_to_export)); sankore.setPreference("ord_let", JSON.stringify(array_to_export));
sankore.setPreference("ord_let_locale", sankore.locale().substr(0,2));
if($("#wgt_display").hasClass("selected")) if($("#wgt_display").hasClass("selected"))
sankore.setPreference("associer_sound_state", "display"); sankore.setPreference("ord_let_state", "display");
else else
sankore.setPreference("associer_sound_state", "edit"); sankore.setPreference("ord_let_state", "edit");
} }
//import //import
function importData(data){ function importData(data){
var tmp_loc = sankore.preference("ord_let_locale","")
var tmp = 0; var tmp = 0;
for(var i in data){ for(var i in data){
var tmp_array = []; var tmp_array = [];
@ -309,7 +310,7 @@ function importData(data){
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", data[i].audio); var source = $("<source/>").attr("src",((tmp_loc != "en")?"":"../../") + data[i].audio);
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo(audio_block);
audio.append(source); audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block); $("<input type='hidden'/>").appendTo(audio_block);
@ -326,8 +327,8 @@ function importData(data){
tmp_array.push(tmp_letter); tmp_array.push(tmp_letter);
} }
if(sankore.preference("associer_sound_state","")){ if(sankore.preference("ord_let_state","")){
if(sankore.preference("associer_sound_state","") == "edit") if(sankore.preference("ord_let_state","") == "edit")
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
} else } else
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
@ -390,11 +391,11 @@ function addContainer(){
$("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container); $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container);
var text = $("<div class='text_cont'>").appendTo(sub_container); var text = $("<div class='text_cont'>").appendTo(sub_container);
text.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).removeClass('gray'); return false;")
.attr("ondragover", "$(this).addClass('gray'); return false;")
.attr("ondrop", "$(this).removeClass('gray'); return onDropAudio(this,event);");
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
audio_block.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).removeClass('audio_gray'); return false;")
.attr("ondragover", "$(this).addClass('audio_gray'); return false;")
.attr("ondrop", "$(this).removeClass('audio_gray'); return onDropAudio(this,event);");
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", ""); var source = $("<source/>").attr("src", "");
@ -528,11 +529,10 @@ function onDropAudio(obj, event) {
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
if(tmp_type.substr(0, 5) == "audio"){ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $(obj).find(".audio_block");
$(obj).find("audio").remove(); $(obj).find("audio").remove();
audio_block.find(":first-child").removeClass("stop").addClass("play"); $(obj).find(":first-child").removeClass("stop").addClass("play");
var source = $("<source/>").attr("src", "../../" + tmp); var source = $("<source/>").attr("src", "../../" + tmp);
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo($(obj));
audio.append(source); audio.append(source);
} }
} }

@ -31,8 +31,8 @@ function start(){
$("div.inline label").html(sankoreLang.theme + tmpl) $("div.inline label").html(sankoreLang.theme + tmpl)
if(window.sankore){ if(window.sankore){
if(sankore.preference("associer_sound","")){ if(sankore.preference("ord_let","")){
var data = jQuery.parseJSON(sankore.preference("associer_sound","")); var data = jQuery.parseJSON(sankore.preference("ord_let",""));
importData(data); importData(data);
} }
else else
@ -252,7 +252,7 @@ function exportData(){
$(".cont").each(function(){ $(".cont").each(function(){
var cont_obj = new Object(); var cont_obj = new Object();
cont_obj.text = $(this).find(".audio_desc").text(); cont_obj.text = $(this).find(".audio_desc").text();
cont_obj.audio = $(this).find("source").attr("src").replace("../../",""); cont_obj.audio = $(this).find("source").attr("src");
cont_obj.answer = $(this).find(".audio_answer").text(); cont_obj.answer = $(this).find(".audio_answer").text();
cont_obj.cur_answer = ""; cont_obj.cur_answer = "";
array_to_export.push(cont_obj); array_to_export.push(cont_obj);
@ -261,22 +261,23 @@ function exportData(){
$(".cont").each(function(){ $(".cont").each(function(){
var cont_obj = new Object(); var cont_obj = new Object();
cont_obj.text = $(this).find(".audio_desc").text(); cont_obj.text = $(this).find(".audio_desc").text();
cont_obj.audio = $(this).find("source").attr("src").replace("../../",""); cont_obj.audio = $(this).find("source").attr("src");
cont_obj.answer = $(this).find("ul").next().val(); cont_obj.answer = $(this).find("ul").next().val();
cont_obj.cur_answer = getAnswer($(this).find("ul")); cont_obj.cur_answer = getAnswer($(this).find("ul"));
array_to_export.push(cont_obj); array_to_export.push(cont_obj);
}); });
} }
sankore.setPreference("associer_sound", JSON.stringify(array_to_export)); sankore.setPreference("ord_let", JSON.stringify(array_to_export));
sankore.setPreference("ord_let_locale", sankore.locale().substr(0,2));
if($("#wgt_display").hasClass("selected")) if($("#wgt_display").hasClass("selected"))
sankore.setPreference("associer_sound_state", "display"); sankore.setPreference("ord_let_state", "display");
else else
sankore.setPreference("associer_sound_state", "edit"); sankore.setPreference("ord_let_state", "edit");
} }
//import //import
function importData(data){ function importData(data){
var tmp_loc = sankore.preference("ord_let_locale","")
var tmp = 0; var tmp = 0;
for(var i in data){ for(var i in data){
var tmp_array = []; var tmp_array = [];
@ -289,7 +290,7 @@ function importData(data){
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", data[i].audio); var source = $("<source/>").attr("src",((tmp_loc != "en")?"":"../../") + data[i].audio);
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo(audio_block);
audio.append(source); audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block); $("<input type='hidden'/>").appendTo(audio_block);
@ -306,8 +307,8 @@ function importData(data){
tmp_array.push(tmp_letter); tmp_array.push(tmp_letter);
} }
if(sankore.preference("associer_sound_state","")){ if(sankore.preference("ord_let_state","")){
if(sankore.preference("associer_sound_state","") == "edit") if(sankore.preference("ord_let_state","") == "edit")
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
} else } else
tmp_array = shuffle(tmp_array); tmp_array = shuffle(tmp_array);
@ -339,7 +340,7 @@ function showExample(){
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", "objects/exemple.mp3"); var source = $("<source/>").attr("src", "objects/example.mp3");
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo(audio_block);
audio.append(source); audio.append(source);
$("<input type='hidden'/>").appendTo(audio_block); $("<input type='hidden'/>").appendTo(audio_block);
@ -370,11 +371,11 @@ function addContainer(){
$("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container); $("<div class='number_cont'>"+ ($(".cont").size() + 1) +"</div>").appendTo(sub_container);
var text = $("<div class='text_cont'>").appendTo(sub_container); var text = $("<div class='text_cont'>").appendTo(sub_container);
text.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).removeClass('gray'); return false;")
.attr("ondragover", "$(this).addClass('gray'); return false;")
.attr("ondrop", "$(this).removeClass('gray'); return onDropAudio(this,event);");
var audio_block = $("<div class='audio_block'>").appendTo(text); var audio_block = $("<div class='audio_block'>").appendTo(text);
audio_block.attr("ondragenter", "return false;")
.attr("ondragleave", "$(this).removeClass('audio_gray'); return false;")
.attr("ondragover", "$(this).addClass('audio_gray'); return false;")
.attr("ondrop", "$(this).removeClass('audio_gray'); return onDropAudio(this,event);");
$("<div class='play'>").appendTo(audio_block); $("<div class='play'>").appendTo(audio_block);
$("<div class='replay'>").appendTo(audio_block); $("<div class='replay'>").appendTo(audio_block);
var source = $("<source/>").attr("src", ""); var source = $("<source/>").attr("src", "");
@ -508,11 +509,10 @@ function onDropAudio(obj, event) {
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
if(tmp_type.substr(0, 5) == "audio"){ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $(obj).find(".audio_block");
$(obj).find("audio").remove(); $(obj).find("audio").remove();
audio_block.find(":first-child").removeClass("stop").addClass("play"); $(obj).find(":first-child").removeClass("stop").addClass("play");
var source = $("<source/>").attr("src", "../../" + tmp); var source = $("<source/>").attr("src", "../../" + tmp);
var audio = $("<audio>").appendTo(audio_block); var audio = $("<audio>").appendTo($(obj));
audio.append(source); audio.append(source);
} }
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -140,7 +141,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -150,7 +151,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -272,7 +273,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -149,7 +150,7 @@ textarea{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -159,7 +160,7 @@ textarea{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -281,7 +282,7 @@ textarea{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{
@ -314,7 +315,7 @@ body{
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -324,7 +325,7 @@ body{
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -446,7 +447,7 @@ body{
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -109,7 +109,7 @@
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -119,7 +119,7 @@
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -241,7 +241,7 @@
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{

@ -110,7 +110,7 @@
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -120,7 +120,7 @@
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -242,7 +242,7 @@
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{

@ -5,6 +5,7 @@ html, body{
padding: 0; padding: 0;
border-radius: 35px; border-radius: 35px;
overflow: hidden; overflow: hidden;
font-family: sans-serif;
} }
body{ body{

@ -111,7 +111,7 @@
margin: 10px 10px 0 10px; margin: 10px 10px 0 10px;
padding: 0; padding: 0;
float: left; float: left;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
color: #7F613F; color: #7F613F;
text-shadow: #FFDCA9 0 1px 0; text-shadow: #FFDCA9 0 1px 0;
@ -121,7 +121,7 @@
cursor: pointer; cursor: pointer;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
float: right; float: right;
font-family: Arial,Helvetica,sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
line-height: 32px; line-height: 32px;
} }
@ -243,7 +243,7 @@
.inline{ .inline{
display: inline-block; display: inline-block;
font-family: "helvetica neue"; font-family: sans-serif;
font-size: 14px; font-size: 14px;
color: #666; color: #666;
} }

@ -69,7 +69,7 @@
var iHeight = $("<input type='hidden'/>"); var iHeight = $("<input type='hidden'/>");
var iWidth = $("<input type='hidden'/>"); var iWidth = $("<input type='hidden'/>");
var iTitle = $("<input type='hidden'/>"); var iTitle = $("<input type='hidden'/>");
var iThumbnailUrl = $("<input type='hidden'/>");
// We use titleNoFormatting so that no HTML tags are left in the // We use titleNoFormatting so that no HTML tags are left in the
// title // title
//title.innerHTML = result.title; //title.innerHTML = result.title;
@ -96,12 +96,14 @@
iHeight.attr("value", result.height); iHeight.attr("value", result.height);
iWidth.attr("value", result.width); iWidth.attr("value", result.width);
iTitle.attr("value",result.title); iTitle.attr("value",result.title);
iThumbnailUrl.attr("value",newImg.src);
//imgContainer.append($(title)); //imgContainer.append($(title));
imgContainer.append(iUrl); imgContainer.append(iUrl);
imgContainer.append(iContent); imgContainer.append(iContent);
imgContainer.append(iHeight); imgContainer.append(iHeight);
imgContainer.append(iWidth); imgContainer.append(iWidth);
imgContainer.append(iTitle); imgContainer.append(iTitle);
imgContainer.append(iThumbnailUrl);
// Put our title + image in the content // Put our title + image in the content
imgContainer.appendTo(contentDiv); imgContainer.appendTo(contentDiv);
@ -252,6 +254,8 @@
parent.find("input:hidden").eq(3).val() + parent.find("input:hidden").eq(3).val() +
"</value></data><data><key>Title</key><value>" + "</value></data><data><key>Title</key><value>" +
parent.find("input:hidden").eq(4).val() + parent.find("input:hidden").eq(4).val() +
"</value></data><data><key>thumbnailUrl</key><value>" +
parent.find("input:hidden").eq(5).val() +
"</value></data></metadata>"; "</value></data></metadata>";
return meta; return meta;
} }

@ -1002,9 +1002,6 @@ UBGraphicsGroupContainerItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::readGroup()
UBGraphicsGroupContainerItem *group = new UBGraphicsGroupContainerItem(); UBGraphicsGroupContainerItem *group = new UBGraphicsGroupContainerItem();
QMultiMap<QString, UBGraphicsPolygonItem *> strokesGroupsContainer; QMultiMap<QString, UBGraphicsPolygonItem *> strokesGroupsContainer;
QList<QGraphicsItem *> groupContainer; QList<QGraphicsItem *> groupContainer;
QString currentStrokeIdentifier;
QUuid groupUuid = QUuid(mXmlReader.attributes().value(aId).toString());
mXmlReader.readNext(); mXmlReader.readNext();
while (!mXmlReader.atEnd()) while (!mXmlReader.atEnd())

@ -62,7 +62,6 @@ UBDocumentPublisher::UBDocumentPublisher(UBDocumentProxy* pDocument, QObject *pa
, mPassword("") , mPassword("")
, bLoginCookieSet(false) , bLoginCookieSet(false)
{ {
//NOOP
init(); init();
} }
@ -109,7 +108,7 @@ void UBDocumentPublisher::buildUbwFile()
if (UBFileSystemUtils::copyDir(mSourceDocument->persistencePath(), tmpDir)) if (UBFileSystemUtils::copyDir(mSourceDocument->persistencePath(), tmpDir))
{ {
QUuid publishingUuid = QUuid::createUuid(); QString documentName = mSourceDocument->name();
mPublishingPath = tmpDir; mPublishingPath = tmpDir;
mPublishingSize = mSourceDocument->pageCount(); mPublishingSize = mSourceDocument->pageCount();
@ -120,11 +119,11 @@ void UBDocumentPublisher::buildUbwFile()
UBExportFullPDF pdfExporter; UBExportFullPDF pdfExporter;
pdfExporter.setVerbode(false); pdfExporter.setVerbode(false);
pdfExporter.persistsDocument(mSourceDocument, mPublishingPath + "/" + UBStringUtils::toCanonicalUuid(publishingUuid) + ".pdf"); pdfExporter.persistsDocument(mSourceDocument, mPublishingPath + "/" + documentName + ".pdf");
UBExportDocument ubzExporter; UBExportDocument ubzExporter;
ubzExporter.setVerbode(false); ubzExporter.setVerbode(false);
ubzExporter.persistsDocument(mSourceDocument, mPublishingPath + "/" + UBStringUtils::toCanonicalUuid(publishingUuid) + ".ubz"); ubzExporter.persistsDocument(mSourceDocument, mPublishingPath + "/" + documentName + ".ubz");
// remove all useless files // remove all useless files

@ -108,6 +108,11 @@ UBBoardController::UBBoardController(UBMainWindow* mainWindow)
mPenColorOnLightBackground = UBSettings::settings()->penColors(false).at(penColorIndex); mPenColorOnLightBackground = UBSettings::settings()->penColors(false).at(penColorIndex);
mMarkerColorOnDarkBackground = UBSettings::settings()->markerColors(true).at(markerColorIndex); mMarkerColorOnDarkBackground = UBSettings::settings()->markerColors(true).at(markerColorIndex);
mMarkerColorOnLightBackground = UBSettings::settings()->markerColors(false).at(markerColorIndex); mMarkerColorOnLightBackground = UBSettings::settings()->markerColors(false).at(markerColorIndex);
QDesktopWidget* desktop = UBApplication::desktop();
int dpiCommon = (desktop->physicalDpiX() + desktop->physicalDpiY()) / 2;
int sPixelsPerMillimeter = qRound(dpiCommon / UBGeometryUtils::inchSize);
UBSettings::settings()->crossSize = 10*sPixelsPerMillimeter;
} }
@ -996,30 +1001,30 @@ void UBBoardController::downloadURL(const QUrl& url, QString contentSourceUrl, c
|| contentType.startsWith("application/widget") || contentType.startsWith("application/widget")
|| contentType.startsWith("application/vnd.apple-widget"); || contentType.startsWith("application/vnd.apple-widget");
if (shouldLoadFileData) if (shouldLoadFileData)
{ {
QFile file(fileName); QFile file(fileName);
file.open(QIODevice::ReadOnly); file.open(QIODevice::ReadOnly);
downloadFinished(true, formedUrl, QUrl(), contentType, file.readAll(), pPos, pSize, isBackground, internalData); downloadFinished(true, formedUrl, QUrl(), contentType, file.readAll(), pPos, pSize, isBackground, internalData);
file.close(); file.close();
} }
else else
{ {
// media items should be copyed in separate thread // media items should be copyed in separate thread
sDownloadFileDesc desc; sDownloadFileDesc desc;
desc.modal = false; desc.modal = false;
desc.srcUrl = sUrl; desc.srcUrl = sUrl;
desc.originalSrcUrl = contentSourceUrl; desc.originalSrcUrl = contentSourceUrl;
desc.currentSize = 0; desc.currentSize = 0;
desc.name = QFileInfo(url.toString()).fileName(); desc.name = QFileInfo(url.toString()).fileName();
desc.totalSize = 0; // The total size will be retrieved during the download desc.totalSize = 0; // The total size will be retrieved during the download
desc.pos = pPos; desc.pos = pPos;
desc.size = pSize; desc.size = pSize;
desc.isBackground = isBackground; desc.isBackground = isBackground;
UBDownloadManager::downloadManager()->addFileToDownload(desc); UBDownloadManager::downloadManager()->addFileToDownload(desc);
} }
} }
else else
{ {
@ -2362,10 +2367,17 @@ void UBBoardController::togglePodcast(bool checked)
void UBBoardController::moveGraphicsWidgetToControlView(UBGraphicsWidgetItem* graphicsWidget) void UBBoardController::moveGraphicsWidgetToControlView(UBGraphicsWidgetItem* graphicsWidget)
{ {
mActiveScene->setURStackEnable(false); mActiveScene->setURStackEnable(false);
UBGraphicsItem *toolW3C = duplicateItem(dynamic_cast<UBItem *>(graphicsWidget));
UBGraphicsWidgetItem *copyedGraphicsWidget = NULL;
if (UBGraphicsWidgetItem::Type == toolW3C->type())
copyedGraphicsWidget = static_cast<UBGraphicsWidgetItem *>(toolW3C);
UBToolWidget *toolWidget = new UBToolWidget(copyedGraphicsWidget, mControlView);
graphicsWidget->remove(false); graphicsWidget->remove(false);
mActiveScene->addItemToDeletion(graphicsWidget); mActiveScene->addItemToDeletion(graphicsWidget);
UBToolWidget *toolWidget = new UBToolWidget(graphicsWidget, mControlView);
mActiveScene->setURStackEnable(true); mActiveScene->setURStackEnable(true);
QPoint controlViewPos = mControlView->mapFromScene(graphicsWidget->sceneBoundingRect().center()); QPoint controlViewPos = mControlView->mapFromScene(graphicsWidget->sceneBoundingRect().center());

@ -148,8 +148,8 @@ void UBBoardPaletteManager::setupDockPaletteWidgets()
// RIGHT palette widgets // RIGHT palette widgets
#ifndef USE_WEB_WIDGET #ifndef USE_WEB_WIDGET
mpFeaturesWidget = new UBFeaturesWidget(); mpFeaturesWidget = new UBFeaturesWidget();
mRightPalette->registerWidget(mpFeaturesWidget); mRightPalette->registerWidget(mpFeaturesWidget);
mRightPalette->addTab(mpFeaturesWidget); mRightPalette->addTab(mpFeaturesWidget);
#endif #endif
//Do not show deprecated lib widget to prevent collisions. Uncomment to return lib widget //Do not show deprecated lib widget to prevent collisions. Uncomment to return lib widget
@ -332,15 +332,15 @@ void UBBoardPaletteManager::pagePaletteButtonReleased()
{ {
if( mPageButtonPressedTime.msecsTo(QTime::currentTime()) > 900) if( mPageButtonPressedTime.msecsTo(QTime::currentTime()) > 900)
{ {
// The palette is reinstanciated because the duplication depends on the current scene // The palette is reinstanciated because the duplication depends on the current scene
delete(mPagePalette); delete(mPagePalette);
mPagePalette = 0; mPagePalette = 0;
QList<QAction*>pageActions; QList<QAction*>pageActions;
pageActions << UBApplication::mainWindow->actionNewPage; pageActions << UBApplication::mainWindow->actionNewPage;
UBBoardController* boardController = UBApplication::boardController; UBBoardController* boardController = UBApplication::boardController;
if(UBApplication::documentController->pageCanBeDuplicated(UBDocumentContainer::pageFromSceneIndex(boardController->activeSceneIndex()))){ if(UBApplication::documentController->pageCanBeDuplicated(UBDocumentContainer::pageFromSceneIndex(boardController->activeSceneIndex()))){
pageActions << UBApplication::mainWindow->actionDuplicatePage; pageActions << UBApplication::mainWindow->actionDuplicatePage;
} }
pageActions << UBApplication::mainWindow->actionImportPage; pageActions << UBApplication::mainWindow->actionImportPage;
mPagePalette = new UBActionPalette(pageActions, Qt::Horizontal , mContainer); mPagePalette = new UBActionPalette(pageActions, Qt::Horizontal , mContainer);
@ -351,9 +351,9 @@ void UBBoardPaletteManager::pagePaletteButtonReleased()
// As we recreate the pagePalette every time, we must reconnect the slots // As we recreate the pagePalette every time, we must reconnect the slots
connect(UBApplication::mainWindow->actionNewPage, SIGNAL(triggered()), mPagePalette, SLOT(close())); connect(UBApplication::mainWindow->actionNewPage, SIGNAL(triggered()), mPagePalette, SLOT(close()));
connect(UBApplication::mainWindow->actionDuplicatePage, SIGNAL(triggered()), mPagePalette, SLOT(close())); connect(UBApplication::mainWindow->actionDuplicatePage, SIGNAL(triggered()), mPagePalette, SLOT(close()));
connect(UBApplication::mainWindow->actionImportPage, SIGNAL(triggered()), mPagePalette, SLOT(close())); connect(UBApplication::mainWindow->actionImportPage, SIGNAL(triggered()), mPagePalette, SLOT(close()));
connect(mPagePalette, SIGNAL(closed()), this, SLOT(pagePaletteClosed())); connect(mPagePalette, SIGNAL(closed()), this, SLOT(pagePaletteClosed()));
togglePagePalette(true); togglePagePalette(true);
} }
@ -955,7 +955,7 @@ void UBBoardPaletteManager::changeStylusPaletteOrientation(QVariant var)
bool bVertical = var.toBool(); bool bVertical = var.toBool();
bool bVisible = mStylusPalette->isVisible(); bool bVisible = mStylusPalette->isVisible();
// Clean the old palette // Clean the old palette
if(NULL != mStylusPalette) if(NULL != mStylusPalette)
{ {
// TODO : check why this line creates a crash in the application. // TODO : check why this line creates a crash in the application.
@ -995,7 +995,6 @@ void UBBoardPaletteManager::startDownloads()
mDownloadInProgress = true; mDownloadInProgress = true;
mpDownloadWidget->setVisibleState(true); mpDownloadWidget->setVisibleState(true);
mRightPalette->addTab(mpDownloadWidget); mRightPalette->addTab(mpDownloadWidget);
mpDownloadWidget;
} }
} }

@ -866,6 +866,7 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
mMouseDownPos = event->pos (); mMouseDownPos = event->pos ();
movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint())); movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint()));
if (!movingItem) if (!movingItem)
emit clickOnBoard(); emit clickOnBoard();
@ -1099,6 +1100,11 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
if (currentTool == UBStylusTool::Selector) if (currentTool == UBStylusTool::Selector)
{ {
bool bReleaseIsNeed = true; bool bReleaseIsNeed = true;
if (movingItem != determineItemToPress(scene()->itemAt(this->mapToScene(event->posF().toPoint()))))
{
movingItem = NULL;
bReleaseIsNeed = false;
}
if (mWidgetMoved) if (mWidgetMoved)
{ {
mWidgetMoved = false; mWidgetMoved = false;

@ -476,6 +476,8 @@ void UBApplication::closing()
if (webController) if (webController)
webController->closing(); webController->closing();
UBSettings::settings()->closing();
UBSettings::settings()->appToolBarPositionedAtTop->set(mainWindow->toolBarArea(mainWindow->boardToolBar) == Qt::TopToolBarArea); UBSettings::settings()->appToolBarPositionedAtTop->set(mainWindow->toolBarArea(mainWindow->boardToolBar) == Qt::TopToolBarArea);
quit(); quit();

@ -33,19 +33,18 @@ UBAsyncLocalFileDownloader::UBAsyncLocalFileDownloader(sDownloadFileDesc desc, Q
UBAsyncLocalFileDownloader *UBAsyncLocalFileDownloader::download() UBAsyncLocalFileDownloader *UBAsyncLocalFileDownloader::download()
{ {
if (!QFile::exists(QUrl(mDesc.srcUrl).toLocalFile())) {
qDebug() << "file" << mDesc.srcUrl << "does not present in fs";
return this;
}
start(); start();
return this; return this;
} }
void UBAsyncLocalFileDownloader::run() void UBAsyncLocalFileDownloader::run()
{ {
if(mDesc.srcUrl.startsWith("file://"))
mDesc.srcUrl = QUrl(mDesc.srcUrl).toLocalFile();
else
mDesc.srcUrl = QUrl::fromLocalFile(mDesc.srcUrl).toLocalFile();
QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(mDesc.srcUrl); QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(mDesc.srcUrl);
int position=mimeType.indexOf(";"); int position=mimeType.indexOf(";");
@ -67,7 +66,7 @@ void UBAsyncLocalFileDownloader::run()
QString uuid = QUuid::createUuid(); QString uuid = QUuid::createUuid();
UBPersistenceManager::persistenceManager()->addFileToDocument(UBApplication::boardController->selectedDocument(), UBPersistenceManager::persistenceManager()->addFileToDocument(UBApplication::boardController->selectedDocument(),
QUrl(mDesc.srcUrl).toLocalFile(), mDesc.srcUrl,
destDirectory, destDirectory,
uuid, uuid,
mTo, mTo,

@ -67,8 +67,6 @@ UBPreferencesController::UBPreferencesController(QWidget *parent)
mPreferencesWindow = new UBPreferencesDialog(this,parent, Qt::Dialog); mPreferencesWindow = new UBPreferencesDialog(this,parent, Qt::Dialog);
mPreferencesUI = new Ui::preferencesDialog(); // deleted in mPreferencesUI = new Ui::preferencesDialog(); // deleted in
mPreferencesUI->setupUi(mPreferencesWindow); mPreferencesUI->setupUi(mPreferencesWindow);
connect(mPreferencesUI->Username_textBox, SIGNAL(editingFinished()), this, SLOT(onCommunityUsernameChanged()));
connect(mPreferencesUI->Password_textEdit, SIGNAL(editingFinished()), this, SLOT(onCommunityPasswordChanged()));
wire(); wire();
} }
@ -76,7 +74,7 @@ UBPreferencesController::UBPreferencesController(QWidget *parent)
UBPreferencesController::~UBPreferencesController() UBPreferencesController::~UBPreferencesController()
{ {
delete mPreferencesWindow; delete mPreferencesWindow;
delete mPreferencesUI; delete mPreferencesUI;
@ -161,6 +159,12 @@ void UBPreferencesController::wire()
connect(mMarkerProperties->pressureSensitiveCheckBox, SIGNAL(clicked(bool)), settings, SLOT(setMarkerPressureSensitive(bool))); connect(mMarkerProperties->pressureSensitiveCheckBox, SIGNAL(clicked(bool)), settings, SLOT(setMarkerPressureSensitive(bool)));
connect(mMarkerProperties->opacitySlider, SIGNAL(valueChanged(int)), this, SLOT(opacitySliderChanged(int))); 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 // about tab
connect(mPreferencesUI->checkSoftwareUpdateAtLaunchCheckBox, SIGNAL(clicked(bool)), settings->appEnableAutomaticSoftwareUpdates, SLOT(setBool(bool))); connect(mPreferencesUI->checkSoftwareUpdateAtLaunchCheckBox, SIGNAL(clicked(bool)), settings->appEnableAutomaticSoftwareUpdates, SLOT(setBool(bool)));
} }
@ -212,18 +216,36 @@ void UBPreferencesController::init()
mMarkerProperties->opacitySlider->setValue(settings->boardMarkerAlpha->get().toDouble() * 100); mMarkerProperties->opacitySlider->setValue(settings->boardMarkerAlpha->get().toDouble() * 100);
//network
mPreferencesUI->PSCredentialsPersistenceCheckBox->setChecked(settings->getCommunityDataPersistence());
persistanceCheckboxUpdate();
} }
void UBPreferencesController::onCommunityUsernameChanged() void UBPreferencesController::onCommunityUsernameChanged()
{ {
UBSettings* settings = UBSettings::settings(); UBSettings* settings = UBSettings::settings();
settings->setCommunityUsername(mPreferencesUI->Username_textBox->text()); settings->setCommunityUsername(mPreferencesUI->Username_textBox->text());
persistanceCheckboxUpdate();
} }
void UBPreferencesController::onCommunityPasswordChanged() void UBPreferencesController::onCommunityPasswordChanged()
{ {
UBSettings* settings = UBSettings::settings(); UBSettings* settings = UBSettings::settings();
settings->setCommunityPassword(mPreferencesUI->Password_textEdit->text()); 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;");
} }

@ -83,12 +83,14 @@ class UBPreferencesController : public QObject
void toolbarOrientationHorizontal(bool checked); void toolbarOrientationHorizontal(bool checked);
void onCommunityUsernameChanged(); void onCommunityUsernameChanged();
void onCommunityPasswordChanged(); void onCommunityPasswordChanged();
void onCommunityPersistenceChanged();
private: private:
static qreal sSliderRatio; static qreal sSliderRatio;
static qreal sMinPenWidth; static qreal sMinPenWidth;
static qreal sMaxPenWidth; static qreal sMaxPenWidth;
void persistanceCheckboxUpdate();
}; };

@ -350,6 +350,7 @@ void UBSettings::init()
podcastPublishToYoutube = new UBSetting(this, "Podcast", "PublishToYouTube", false); podcastPublishToYoutube = new UBSetting(this, "Podcast", "PublishToYouTube", false);
youTubeUserEMail = new UBSetting(this, "YouTube", "UserEMail", ""); youTubeUserEMail = new UBSetting(this, "YouTube", "UserEMail", "");
youTubeCredentialsPersistence = new UBSetting(this,"YouTube", "CredentialsPersistence",false);
uniboardWebEMail = new UBSetting(this, "UniboardWeb", "EMail", ""); uniboardWebEMail = new UBSetting(this, "UniboardWeb", "EMail", "");
uniboardWebAuthor = new UBSetting(this, "UniboardWeb", "Author", ""); uniboardWebAuthor = new UBSetting(this, "UniboardWeb", "Author", "");
@ -357,6 +358,7 @@ void UBSettings::init()
communityUser = new UBSetting(this, "Community", "Username", ""); communityUser = new UBSetting(this, "Community", "Username", "");
communityPsw = new UBSetting(this, "Community", "Password", ""); communityPsw = new UBSetting(this, "Community", "Password", "");
communityCredentialsPersistence = new UBSetting(this,"Community", "CredentialsPersistence",false);
QStringList uris = UBToolsManager::manager()->allToolIDs(); QStringList uris = UBToolsManager::manager()->allToolIDs();
@ -383,7 +385,7 @@ void UBSettings::init()
intranetPodcastPublishingUrl = new UBSetting(this, "IntranetPodcast", "PublishingUrl", ""); intranetPodcastPublishingUrl = new UBSetting(this, "IntranetPodcast", "PublishingUrl", "");
intranetPodcastAuthor = new UBSetting(this, "IntranetPodcast", "Author", ""); intranetPodcastAuthor = new UBSetting(this, "IntranetPodcast", "Author", "");
KeyboardLocale = new UBSetting(this, "Board", "StartupKeyboardLocale", 0); KeyboardLocale = new UBSetting(this, "Board", "StartupKeyboardLocale", 0);
swapControlAndDisplayScreens = new UBSetting(this, "App", "SwapControlAndDisplayScreens", false); swapControlAndDisplayScreens = new UBSetting(this, "App", "SwapControlAndDisplayScreens", false);
angleTolerance = new UBSetting(this, "App", "AngleTolerance", 4); angleTolerance = new UBSetting(this, "App", "AngleTolerance", 4);
@ -392,6 +394,8 @@ void UBSettings::init()
teacherGuideLessonPagesActivated = new UBSetting(this,"DockPalette","TeacherGuideActivateLessonPages",true); teacherGuideLessonPagesActivated = new UBSetting(this,"DockPalette","TeacherGuideActivateLessonPages",true);
libIconSize = new UBSetting(this, "Library", "LibIconSize", defaultLibraryIconSize); libIconSize = new UBSetting(this, "Library", "LibIconSize", defaultLibraryIconSize);
cleanNonPersistentSettings();
} }
@ -944,7 +948,7 @@ QString UBSettings::applicationImageLibraryDirectory()
{ {
QString defaultRelativePath = QString("./library/pictures"); QString defaultRelativePath = QString("./library/pictures");
QString configPath = value("Library/ImageDirectory", QVariant(defaultRelativePath)).toString(); QString configPath = value("Library/ImageDirectory", QVariant(defaultRelativePath)).toString();
if (configPath.startsWith(".")) { if (configPath.startsWith(".")) {
return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1); return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1);
@ -1180,12 +1184,17 @@ void UBSettings::setCommunityPassword(const QString &password)
communityPsw->set(QVariant(password)); communityPsw->set(QVariant(password));
} }
void UBSettings::setCommunityPersistence(const bool persistence)
{
communityCredentialsPersistence->set(QVariant(persistence));
}
int UBSettings::libraryIconSize(){ int UBSettings::libraryIconSize(){
return libIconSize->get().toInt(); return libIconSize->get().toInt();
} }
void UBSettings::setLibraryIconsize(const int& size){ void UBSettings::setLibraryIconsize(const int& size){
libIconSize->set(QVariant(size)); libIconSize->set(QVariant(size));
} }
bool UBSettings::checkDirectory(QString& dirPath) bool UBSettings::checkDirectory(QString& dirPath)
@ -1218,3 +1227,20 @@ QString UBSettings::replaceWildcard(QString& path)
return result; return result;
} }
void UBSettings::closing()
{
cleanNonPersistentSettings();
}
void UBSettings::cleanNonPersistentSettings()
{
if(!communityCredentialsPersistence->get().toBool()){
communityPsw->set(QVariant(""));
communityUser->set(QVariant(""));
}
if(!youTubeCredentialsPersistence->get().toBool()){
removePassword(youTubeUserEMail->get().toString());
youTubeUserEMail->set(QVariant(""));
}
}

@ -29,13 +29,14 @@ class UBSettings : public QObject
UBSettings(QObject *parent = 0); UBSettings(QObject *parent = 0);
virtual ~UBSettings(); virtual ~UBSettings();
void cleanNonPersistentSettings();
public: public:
QStringList* supportedKeyboardSizes; QStringList* supportedKeyboardSizes;
void InitKeyboardPaletteKeyBtnSizes(); void InitKeyboardPaletteKeyBtnSizes();
void ValidateKeyboardPaletteKeyBtnSize(); void ValidateKeyboardPaletteKeyBtnSize();
void closing();
int penWidthIndex(); int penWidthIndex();
@ -95,6 +96,8 @@ class UBSettings : public QObject
void setCommunityUsername(const QString& username); void setCommunityUsername(const QString& username);
QString communityPassword(); QString communityPassword();
void setCommunityPassword(const QString& password); void setCommunityPassword(const QString& password);
bool getCommunityDataPersistence(){return communityCredentialsPersistence->get().toBool();}
void setCommunityPersistence(const bool persistence);
int libraryIconSize(); int libraryIconSize();
void setLibraryIconsize(const int& size); void setLibraryIconsize(const int& size);
@ -115,9 +118,9 @@ class UBSettings : public QObject
static QString userInteractiveFavoritesDirectory(); static QString userInteractiveFavoritesDirectory();
static QString userPodcastRecordingDirectory(); static QString userPodcastRecordingDirectory();
QString userGipLibraryDirectory(); QString userGipLibraryDirectory();
//application directory //application directory
QString applicationShapeLibraryDirectory(); QString applicationShapeLibraryDirectory();
QString applicationImageLibraryDirectory(); QString applicationImageLibraryDirectory();
QString applicationApplicationsLibraryDirectory(); QString applicationApplicationsLibraryDirectory();
@ -302,6 +305,7 @@ class UBSettings : public QObject
UBSetting* podcastPublishToYoutube; UBSetting* podcastPublishToYoutube;
UBSetting* youTubeUserEMail; UBSetting* youTubeUserEMail;
UBSetting* youTubeCredentialsPersistence;
UBSetting* uniboardWebEMail; UBSetting* uniboardWebEMail;
UBSetting* uniboardWebAuthor; UBSetting* uniboardWebAuthor;
@ -337,6 +341,7 @@ class UBSettings : public QObject
UBSetting* communityUser; UBSetting* communityUser;
UBSetting* communityPsw; UBSetting* communityPsw;
UBSetting* communityCredentialsPersistence;
UBSetting* pageSize; UBSetting* pageSize;
UBSetting* pageDpi; UBSetting* pageDpi;

@ -382,11 +382,6 @@ QSizeF UBGraphicsDelegateFrame::resizeDelegate(qreal moveX, qreal moveY)
} }
void UBGraphicsDelegateFrame::scaleByPos(qreal scaleX, qreal scaleY)
{
}
void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{ {
if (None == mCurrentTool) if (None == mCurrentTool)

@ -40,7 +40,6 @@ class UBGraphicsDelegateFrame: public QGraphicsRectItem, public QObject
QPointF getFixedPointFromPos(); QPointF getFixedPointFromPos();
QSizeF getResizeVector(qreal moveX, qreal moveY); QSizeF getResizeVector(qreal moveX, qreal moveY);
QSizeF resizeDelegate(qreal moveX, qreal moveY); QSizeF resizeDelegate(qreal moveX, qreal moveY);
void scaleByPos(qreal scaleX, qreal scaleY);
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);

@ -397,7 +397,6 @@ QString UBFileSystemUtils::lastPathComponent(const QString& path)
QString UBFileSystemUtils::mimeTypeFromFileName(const QString& fileName) QString UBFileSystemUtils::mimeTypeFromFileName(const QString& fileName)
{ {
Q_ASSERT(fileName.length());
QString ext = extension(fileName); QString ext = extension(fileName);
if (ext == "xls" || ext == "xlsx") return "application/msexcel"; if (ext == "xls" || ext == "xlsx") return "application/msexcel";

@ -18,6 +18,12 @@
#include "core/memcheck.h" #include "core/memcheck.h"
const double PI = 4.0 * atan(1.0); const double PI = 4.0 * atan(1.0);
const int UBGeometryUtils::centimeterGraduationHeight = 15;
const int UBGeometryUtils::halfCentimeterGraduationHeight = 10;
const int UBGeometryUtils::millimeterGraduationHeight = 5;
const int UBGeometryUtils::millimetersPerCentimeter = 10;
const int UBGeometryUtils::millimetersPerHalfCentimeter = 5;
const float UBGeometryUtils::inchSize = 25.4f;
UBGeometryUtils::UBGeometryUtils() UBGeometryUtils::UBGeometryUtils()
{ {

@ -37,6 +37,13 @@ class UBGeometryUtils
static QPoint pointConstrainedInRect(QPoint point, QRect rect); static QPoint pointConstrainedInRect(QPoint point, QRect rect);
static void crashPointList(QVector<QPointF> &points); static void crashPointList(QVector<QPointF> &points);
const static int centimeterGraduationHeight;
const static int halfCentimeterGraduationHeight;
const static int millimeterGraduationHeight;
const static int millimetersPerCentimeter;
const static int millimetersPerHalfCentimeter;
const static float inchSize;
}; };
#endif /* UBGEOMETRYUTILS_H_ */ #endif /* UBGEOMETRYUTILS_H_ */

@ -241,34 +241,31 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
QString previewImageUrl = ":images/libpalette/notFound.png"; QString previewImageUrl = ":images/libpalette/notFound.png";
QString widgetsUrl = QUrl::fromEncoded(metadata["Url"].toAscii()).toString()/*metadata.value("Url", QString())*/; QString widgetsUrl = QUrl::fromEncoded(metadata["Url"].toAscii()).toString()/*metadata.value("Url", QString())*/;
QString widgetsThumbsUrl = QUrl::fromEncoded(metadata["thumbnailUrl"].toAscii()).toString(); QString widgetsThumbsUrl = QUrl::fromEncoded(metadata["thumbnailUrl"].toAscii()).toString();
bool isLocal = QFileInfo(widgetsUrl).exists(); QString strType = UBFileSystemUtils::mimeTypeFromFileName(widgetsUrl);
UBMimeType::Enum thumbType = UBFileSystemUtils::mimeTypeFromString(strType);
if (isLocal) { switch (static_cast<int>(thumbType)) {
QString strType = UBFileSystemUtils::mimeTypeFromFileName(widgetsUrl); case UBMimeType::Audio:
UBMimeType::Enum thumbType = UBFileSystemUtils::mimeTypeFromString(strType); previewImageUrl = ":images/libpalette/soundIcon.svg";
break;
switch (static_cast<int>(thumbType)) { case UBMimeType::Video:
case UBMimeType::Audio: previewImageUrl = ":images/libpalette/movieIcon.svg";
previewImageUrl = ":images/libpalette/soundIcon.svg"; break;
break;
case UBMimeType::Video: case UBMimeType::Flash:
previewImageUrl = ":images/libpalette/movieIcon.svg"; previewImageUrl = ":images/libpalette/FlashIcon.svg";
break; break;
case UBMimeType::Flash: case UBMimeType::RasterImage:
previewImageUrl = ":images/libpalette/FlashIcon.svg"; case UBMimeType::VectorImage:
break; previewImageUrl = widgetsUrl;
break;
case UBMimeType::RasterImage: }
case UBMimeType::VectorImage:
previewImageUrl = widgetsUrl;
break;
}
} else if (!widgetsThumbsUrl.isNull()) { if (!widgetsThumbsUrl.isNull()) {
previewImageUrl = ":/images/libpalette/loading.png"; previewImageUrl = ":/images/libpalette/loading.png";
if (!imageGatherer) if (!imageGatherer)
imageGatherer = new UBDownloadHttpFile(0, this); imageGatherer = new UBDownloadHttpFile(0, this);
@ -279,10 +276,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
imageGatherer->get(QUrl(widgetsThumbsUrl), QPoint(0,0), QSize(), false); imageGatherer->get(QUrl(widgetsThumbsUrl), QPoint(0,0), QSize(), false);
} }
QString tmp = QUrl::fromEncoded(metadata["Url"].toAscii()).toString(); UBFeature feature( "/root", QImage(previewImageUrl), QString(), widgetsUrl, FEATURE_ITEM );
qDebug() << tmp;
UBFeature feature( "/root", QImage(previewImageUrl), QString(), tmp/*metadata["Url"]*/, FEATURE_ITEM );
feature.setMetadata( metadata ); feature.setMetadata( metadata );
centralWidget->showElement(feature, UBFeaturesCentralWidget::FeaturePropertiesList); centralWidget->showElement(feature, UBFeaturesCentralWidget::FeaturePropertiesList);
@ -389,7 +383,7 @@ UBFeaturesListView::UBFeaturesListView( QWidget* parent, const char* name )
void UBFeaturesListView::dragEnterEvent( QDragEnterEvent *event ) void UBFeaturesListView::dragEnterEvent( QDragEnterEvent *event )
{ {
if ( event->mimeData()->hasUrls() || event->mimeData()->hasImage() ) if ( event->mimeData()->hasUrls() || event->mimeData()->hasImage() )
event->acceptProposedAction(); event->acceptProposedAction();
} }
void UBFeaturesListView::dragMoveEvent( QDragMoveEvent *event ) void UBFeaturesListView::dragMoveEvent( QDragMoveEvent *event )
@ -555,7 +549,7 @@ void UBFeaturesCentralWidget::setPropertiesThumbnail(const QPixmap &pix)
UBFeature UBFeaturesCentralWidget::getCurElementFromProperties() UBFeature UBFeaturesCentralWidget::getCurElementFromProperties()
{ {
return mFeatureProperties->getCurrentElement(); return mFeatureProperties->getCurrentElement();
} }
void UBFeaturesCentralWidget::showAdditionalData(AddWidget pWidgetType, AddWidgetState pState) void UBFeaturesCentralWidget::showAdditionalData(AddWidget pWidgetType, AddWidgetState pState)
@ -790,36 +784,36 @@ void UBFeaturesWebView::javaScriptWindowObjectCleared()
void UBFeaturesWebView::showElement(const UBFeature &elem) void UBFeaturesWebView::showElement(const UBFeature &elem)
{ {
QString qsWidgetName; QString qsWidgetName;
QString path = elem.getFullPath().toLocalFile(); QString path = elem.getFullPath().toLocalFile();
QString qsConfigPath = QString("%0/config.xml").arg(path); QString qsConfigPath = QString("%0/config.xml").arg(path);
if(QFile::exists(qsConfigPath)) if(QFile::exists(qsConfigPath))
{ {
QFile f(qsConfigPath); QFile f(qsConfigPath);
if(f.open(QIODevice::ReadOnly)) if(f.open(QIODevice::ReadOnly))
{ {
QDomDocument domDoc; QDomDocument domDoc;
domDoc.setContent(QString(f.readAll())); domDoc.setContent(QString(f.readAll()));
QDomElement root = domDoc.documentElement(); QDomElement root = domDoc.documentElement();
QDomNode node = root.firstChild(); QDomNode node = root.firstChild();
while(!node.isNull()) while(!node.isNull())
{ {
if(node.toElement().tagName() == "content") if(node.toElement().tagName() == "content")
{ {
QDomAttr srcAttr = node.toElement().attributeNode("src"); QDomAttr srcAttr = node.toElement().attributeNode("src");
qsWidgetName = srcAttr.value(); qsWidgetName = srcAttr.value();
break; break;
} }
node = node.nextSibling(); node = node.nextSibling();
} }
f.close(); f.close();
} }
} }
mpView->load(QUrl::fromLocalFile(QString("%0/%1").arg(path).arg(qsWidgetName))); mpView->load(QUrl::fromLocalFile(QString("%0/%1").arg(path).arg(qsWidgetName)));
} }
void UBFeaturesWebView::onLoadFinished(bool ok) void UBFeaturesWebView::onLoadFinished(bool ok)
@ -842,7 +836,7 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) :
, mpOrigPixmap(NULL) , mpOrigPixmap(NULL)
, mpElement(NULL) , mpElement(NULL)
{ {
setObjectName(name); setObjectName(name);
// Create the GUI // Create the GUI
mpLayout = new QVBoxLayout(this); mpLayout = new QVBoxLayout(this);
@ -877,7 +871,7 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) :
mpButtonLayout->addStretch(1); mpButtonLayout->addStretch(1);
mpObjInfoLabel = new QLabel(tr("Object informations")); mpObjInfoLabel = new QLabel(tr("Object informations"));
mpObjInfoLabel->setStyleSheet(QString("color: #888888; font-size : 18px; font-weight:bold;")); mpObjInfoLabel->setStyleSheet(QString("color: #888888; font-size : 18px; font-weight:bold;"));
mpLayout->addWidget(mpObjInfoLabel, 0); mpLayout->addWidget(mpObjInfoLabel, 0);
@ -891,23 +885,23 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) :
mpLayout->addWidget(mpObjInfos, 1); mpLayout->addWidget(mpObjInfos, 1);
mpLayout->setMargin(0); mpLayout->setMargin(0);
connect( mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage()) ); connect( mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage()) );
connect( mpSetAsBackgroundButton, SIGNAL( clicked() ), this, SLOT( onSetAsBackground() ) ); connect( mpSetAsBackgroundButton, SIGNAL( clicked() ), this, SLOT( onSetAsBackground() ) );
connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) ); connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) );
} }
UBFeatureProperties::~UBFeatureProperties() UBFeatureProperties::~UBFeatureProperties()
{ {
if ( mpOrigPixmap ) if ( mpOrigPixmap )
{ {
delete mpOrigPixmap; delete mpOrigPixmap;
mpOrigPixmap = NULL; mpOrigPixmap = NULL;
} }
if ( mpElement ) if ( mpElement )
{ {
delete mpElement; delete mpElement;
mpElement = NULL; mpElement = NULL;
} }
if ( mpThumbnail ) if ( mpThumbnail )
{ {
delete mpThumbnail; delete mpThumbnail;
@ -997,42 +991,42 @@ void UBFeatureProperties::adaptSize()
void UBFeatureProperties::showElement(const UBFeature &elem) void UBFeatureProperties::showElement(const UBFeature &elem)
{ {
if ( mpOrigPixmap ) if ( mpOrigPixmap )
{ {
delete mpOrigPixmap; delete mpOrigPixmap;
mpOrigPixmap = NULL; mpOrigPixmap = NULL;
} }
if ( mpElement ) if ( mpElement )
{ {
delete mpElement; delete mpElement;
mpElement = NULL; mpElement = NULL;
} }
mpElement = new UBFeature(elem); mpElement = new UBFeature(elem);
mpOrigPixmap = new QPixmap(QPixmap::fromImage(elem.getThumbnail())); mpOrigPixmap = new QPixmap(QPixmap::fromImage(elem.getThumbnail()));
mpThumbnail->setPixmap(QPixmap::fromImage(elem.getThumbnail()).scaledToWidth(THUMBNAIL_WIDTH)); mpThumbnail->setPixmap(QPixmap::fromImage(elem.getThumbnail()).scaledToWidth(THUMBNAIL_WIDTH));
populateMetadata(); populateMetadata();
if ( UBApplication::isFromWeb( elem.getFullPath().toString() ) ) if ( UBApplication::isFromWeb( elem.getFullPath().toString() ) )
{ {
mpAddToLibButton->show(); mpAddToLibButton->show();
if( elem.getMetadata()["Type"].toLower().contains("image") ) if( elem.getMetadata()["Type"].toLower().contains("image") )
{ {
mpSetAsBackgroundButton->show(); mpSetAsBackgroundButton->show();
} }
else else
{ {
mpSetAsBackgroundButton->hide(); mpSetAsBackgroundButton->hide();
} }
} }
else else
{ {
mpAddToLibButton->hide(); mpAddToLibButton->hide();
if (UBFileSystemUtils::mimeTypeFromFileName( elem.getFullPath().toLocalFile() ).contains("image")) if (UBFileSystemUtils::mimeTypeFromFileName( elem.getFullPath().toLocalFile() ).contains("image"))
{ {
mpSetAsBackgroundButton->show(); mpSetAsBackgroundButton->show();
} }
else else
{ {
mpSetAsBackgroundButton->hide(); mpSetAsBackgroundButton->hide();
} }
} }
@ -1042,7 +1036,7 @@ void UBFeatureProperties::populateMetadata()
{ {
if(NULL != mpObjInfos){ if(NULL != mpObjInfos){
mpObjInfos->clear(); mpObjInfos->clear();
QMap<QString, QString> metas = mpElement->getMetadata(); QMap<QString, QString> metas = mpElement->getMetadata();
QList<QString> lKeys = metas.keys(); QList<QString> lKeys = metas.keys();
QList<QString> lValues = metas.values(); QList<QString> lValues = metas.values();
@ -1111,7 +1105,7 @@ UBFeatureItemButton::~UBFeatureItemButton()
QVariant UBFeaturesModel::data(const QModelIndex &index, int role) const QVariant UBFeaturesModel::data(const QModelIndex &index, int role) const
{ {
if (!index.isValid()) if (!index.isValid())
return QVariant(); return QVariant();
if (role == Qt::DisplayRole) { if (role == Qt::DisplayRole) {
@ -1122,21 +1116,21 @@ QVariant UBFeaturesModel::data(const QModelIndex &index, int role) const
return QIcon( QPixmap::fromImage(featuresList->at(index.row()).getThumbnail())); return QIcon( QPixmap::fromImage(featuresList->at(index.row()).getThumbnail()));
} else if (role == Qt::UserRole) { } else if (role == Qt::UserRole) {
return featuresList->at(index.row()).getVirtualPath(); return featuresList->at(index.row()).getVirtualPath();
} else if (role == Qt::UserRole + 1) { } else if (role == Qt::UserRole + 1) {
//return featuresList->at(index.row()).getType(); //return featuresList->at(index.row()).getType();
UBFeature f = featuresList->at(index.row()); UBFeature f = featuresList->at(index.row());
return QVariant::fromValue( f ); return QVariant::fromValue( f );
} }
return QVariant(); return QVariant();
} }
QMimeData* UBFeaturesModel::mimeData(const QModelIndexList &indexes) const QMimeData* UBFeaturesModel::mimeData(const QModelIndexList &indexes) const
{ {
UBFeaturesMimeData *mimeData = new UBFeaturesMimeData(); UBFeaturesMimeData *mimeData = new UBFeaturesMimeData();
QList <QUrl> urlList; QList <QUrl> urlList;
QList <UBFeature> featuresList; QList <UBFeature> featuresList;
QByteArray typeData; QByteArray typeData;
@ -1152,8 +1146,8 @@ QMimeData* UBFeaturesModel::mimeData(const QModelIndexList &indexes) const
typeData += UBFeaturesController::featureTypeSplitter(); typeData += UBFeaturesController::featureTypeSplitter();
} }
typeData += QString::number(element.getType()).toAscii(); typeData += QString::number(element.getType()).toAscii();
} }
} }
mimeData->setUrls(urlList); mimeData->setUrls(urlList);
mimeData->setFeatures(featuresList); mimeData->setFeatures(featuresList);
@ -1175,11 +1169,11 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act
dataFromSameModel = true; dataFromSameModel = true;
if ((!mimeData->hasUrls() && !mimeData->hasImage()) ) if ((!mimeData->hasUrls() && !mimeData->hasImage()) )
return false; return false;
if ( action == Qt::IgnoreAction ) if ( action == Qt::IgnoreAction )
return true; return true;
if ( column > 0 ) if ( column > 0 )
return false; return false;
UBFeature parentFeature; UBFeature parentFeature;
if (!parent.isValid()) { if (!parent.isValid()) {
@ -1209,39 +1203,39 @@ bool UBFeaturesModel::dropMimeData(const QMimeData *mimeData, Qt::DropAction act
} }
return true; return true;
} }
void UBFeaturesModel::addItem( const UBFeature &item ) void UBFeaturesModel::addItem( const UBFeature &item )
{ {
beginInsertRows( QModelIndex(), featuresList->size(), featuresList->size() ); beginInsertRows( QModelIndex(), featuresList->size(), featuresList->size() );
featuresList->append( item ); featuresList->append( item );
endInsertRows(); endInsertRows();
} }
void UBFeaturesModel::deleteFavoriteItem( const QString &path ) void UBFeaturesModel::deleteFavoriteItem( const QString &path )
{ {
for ( int i = 0; i < featuresList->size(); ++i ) for ( int i = 0; i < featuresList->size(); ++i )
{ {
if ( !QString::compare( featuresList->at(i).getFullPath().toString(), path, Qt::CaseInsensitive ) && if ( !QString::compare( featuresList->at(i).getFullPath().toString(), path, Qt::CaseInsensitive ) &&
!QString::compare( featuresList->at(i).getVirtualPath(), "/root/favorites", Qt::CaseInsensitive ) ) !QString::compare( featuresList->at(i).getVirtualPath(), "/root/favorites", Qt::CaseInsensitive ) )
{ {
removeRow( i, QModelIndex() ); removeRow( i, QModelIndex() );
return; return;
} }
} }
} }
void UBFeaturesModel::deleteItem( const QString &path ) void UBFeaturesModel::deleteItem( const QString &path )
{ {
for ( int i = 0; i < featuresList->size(); ++i ) for ( int i = 0; i < featuresList->size(); ++i )
{ {
if ( !QString::compare( featuresList->at(i).getFullPath().toString(), path, Qt::CaseInsensitive ) ) if ( !QString::compare( featuresList->at(i).getFullPath().toString(), path, Qt::CaseInsensitive ) )
{ {
removeRow( i, QModelIndex() ); removeRow( i, QModelIndex() );
return; return;
} }
} }
} }
void UBFeaturesModel::deleteItem(const UBFeature &feature) void UBFeaturesModel::deleteItem(const UBFeature &feature)
@ -1256,28 +1250,28 @@ void UBFeaturesModel::deleteItem(const UBFeature &feature)
bool UBFeaturesModel::removeRows( int row, int count, const QModelIndex & parent ) bool UBFeaturesModel::removeRows( int row, int count, const QModelIndex & parent )
{ {
if ( row < 0 ) if ( row < 0 )
return false; return false;
if ( row + count > featuresList->size() ) if ( row + count > featuresList->size() )
return false; return false;
beginRemoveRows( parent, row, row + count - 1 ); beginRemoveRows( parent, row, row + count - 1 );
//featuresList->remove( row, count ); //featuresList->remove( row, count );
featuresList->erase( featuresList->begin() + row, featuresList->begin() + row + count ); featuresList->erase( featuresList->begin() + row, featuresList->begin() + row + count );
endRemoveRows(); endRemoveRows();
return true; return true;
} }
bool UBFeaturesModel::removeRow( int row, const QModelIndex & parent ) bool UBFeaturesModel::removeRow( int row, const QModelIndex & parent )
{ {
if ( row < 0 ) if ( row < 0 )
return false; return false;
if ( row >= featuresList->size() ) if ( row >= featuresList->size() )
return false; return false;
beginRemoveRows( parent, row, row ); beginRemoveRows( parent, row, row );
//featuresList->remove( row ); //featuresList->remove( row );
featuresList->erase( featuresList->begin() + row ); featuresList->erase( featuresList->begin() + row );
endRemoveRows(); endRemoveRows();
return true; return true;
} }
void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destination void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destination
@ -1359,9 +1353,9 @@ void UBFeaturesModel::moveData(const UBFeature &source, const UBFeature &destina
Qt::ItemFlags UBFeaturesModel::flags( const QModelIndex &index ) const Qt::ItemFlags UBFeaturesModel::flags( const QModelIndex &index ) const
{ {
Qt::ItemFlags resultFlags = QAbstractItemModel::flags(index); Qt::ItemFlags resultFlags = QAbstractItemModel::flags(index);
if ( index.isValid() ) if ( index.isValid() )
{ {
UBFeature item = index.data( Qt::UserRole + 1 ).value<UBFeature>(); UBFeature item = index.data( Qt::UserRole + 1 ).value<UBFeature>();
if ( item.getType() == FEATURE_INTERACTIVE if ( item.getType() == FEATURE_INTERACTIVE
|| item.getType() == FEATURE_ITEM || item.getType() == FEATURE_ITEM
|| item.getType() == FEATURE_AUDIO || item.getType() == FEATURE_AUDIO
@ -1383,7 +1377,7 @@ Qt::ItemFlags UBFeaturesModel::flags( const QModelIndex &index ) const
QStringList UBFeaturesModel::mimeTypes() const QStringList UBFeaturesModel::mimeTypes() const
{ {
QStringList types; QStringList types;
types << "text/uri-list" << "image/png" << "image/tiff" << "image/gif" << "image/jpeg"; types << "text/uri-list" << "image/png" << "image/tiff" << "image/gif" << "image/jpeg";
return types; return types;
} }
@ -1398,17 +1392,17 @@ int UBFeaturesModel::rowCount(const QModelIndex &parent) const
bool UBFeaturesProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex & sourceParent )const bool UBFeaturesProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex & sourceParent )const
{ {
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
QString path = index.data( Qt::UserRole ).toString(); QString path = index.data( Qt::UserRole ).toString();
return filterRegExp().exactMatch(path); return filterRegExp().exactMatch(path);
} }
bool UBFeaturesSearchProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex & sourceParent )const bool UBFeaturesSearchProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex & sourceParent )const
{ {
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
/*QString name = sourceModel()->data(index, Qt::DisplayRole).toString(); /*QString name = sourceModel()->data(index, Qt::DisplayRole).toString();
eUBLibElementType type = (eUBLibElementType)sourceModel()->data(index, Qt::UserRole + 1).toInt();*/ eUBLibElementType type = (eUBLibElementType)sourceModel()->data(index, Qt::UserRole + 1).toInt();*/
UBFeature feature = sourceModel()->data(index, Qt::UserRole + 1).value<UBFeature>(); UBFeature feature = sourceModel()->data(index, Qt::UserRole + 1).value<UBFeature>();
bool isFile = feature.getType() == FEATURE_INTERACTIVE bool isFile = feature.getType() == FEATURE_INTERACTIVE
@ -1425,10 +1419,11 @@ bool UBFeaturesSearchProxyModel::filterAcceptsRow( int sourceRow, const QModelIn
bool UBFeaturesPathProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex & sourceParent )const bool UBFeaturesPathProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex & sourceParent )const
{ {
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
UBFeature feature = sourceModel()->data(index, Qt::UserRole + 1).value<UBFeature>(); UBFeature feature = sourceModel()->data(index, Qt::UserRole + 1).value<UBFeature>();
return feature.isFolder() && path.startsWith( feature.getFullVirtualPath()) ; return feature.isFolder() && path.startsWith( feature.getFullVirtualPath()) ;
} }
QString UBFeaturesItemDelegate::displayText ( const QVariant & value, const QLocale & locale ) const QString UBFeaturesItemDelegate::displayText ( const QVariant & value, const QLocale & locale ) const
@ -1437,18 +1432,18 @@ QString UBFeaturesItemDelegate::displayText ( const QVariant & value, const QLoc
QString text = value.toString(); QString text = value.toString();
text = text.replace(".wgt", ""); text = text.replace(".wgt", "");
if (listView) if (listView)
{ {
const QFontMetrics fm = listView->fontMetrics(); const QFontMetrics fm = listView->fontMetrics();
const QSize iSize = listView->gridSize(); const QSize iSize = listView->gridSize();
return elidedText( fm, iSize.width(), Qt::ElideRight, text ); return elidedText( fm, iSize.width(), Qt::ElideRight, text );
} }
return text; return text;
} }
UBFeaturesPathItemDelegate::UBFeaturesPathItemDelegate(QObject *parent) : QStyledItemDelegate(parent) UBFeaturesPathItemDelegate::UBFeaturesPathItemDelegate(QObject *parent) : QStyledItemDelegate(parent)
{ {
arrowPixmap = new QPixmap(":images/navig_arrow.png"); arrowPixmap = new QPixmap(":images/navig_arrow.png");
} }
QString UBFeaturesPathItemDelegate::displayText ( const QVariant & value, const QLocale & locale ) const QString UBFeaturesPathItemDelegate::displayText ( const QVariant & value, const QLocale & locale ) const
@ -1461,20 +1456,20 @@ QString UBFeaturesPathItemDelegate::displayText ( const QVariant & value, const
void UBFeaturesPathItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const void UBFeaturesPathItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{ {
UBFeature feature = index.data( Qt::UserRole + 1 ).value<UBFeature>(); UBFeature feature = index.data( Qt::UserRole + 1 ).value<UBFeature>();
QRect rect = option.rect; QRect rect = option.rect;
if ( !feature.getFullPath().isEmpty() ) if ( !feature.getFullPath().isEmpty() )
{ {
painter->drawPixmap( rect.left() - 10, rect.center().y() - 5, *arrowPixmap ); painter->drawPixmap( rect.left() - 10, rect.center().y() - 5, *arrowPixmap );
} }
painter->drawImage( rect.left() + 5, rect.center().y() - 5, feature.getThumbnail().scaledToHeight( 30, Qt::SmoothTransformation ) ); painter->drawImage( rect.left() + 5, rect.center().y() - 5, feature.getThumbnail().scaledToHeight( 30, Qt::SmoothTransformation ) );
} }
UBFeaturesPathItemDelegate::~UBFeaturesPathItemDelegate() UBFeaturesPathItemDelegate::~UBFeaturesPathItemDelegate()
{ {
if ( arrowPixmap ) if ( arrowPixmap )
{ {
delete arrowPixmap; delete arrowPixmap;
arrowPixmap = NULL; arrowPixmap = NULL;
} }
} }

@ -34,11 +34,12 @@ QPixmap* UBToolWidget::sUnpinPixmap = 0;
UBToolWidget::UBToolWidget(const QUrl& pUrl, QWidget *pParent) UBToolWidget::UBToolWidget(const QUrl& pUrl, QWidget *pParent)
: QWidget(pParent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) : QWidget(pParent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint)
, mWebView(0)
, mToolWidget(0)
, mShouldMoveWidget(false) , mShouldMoveWidget(false)
, mContentMargin(0) , mContentMargin(0)
, mFrameWidth(0) , mFrameWidth(0)
, mWebView(0)
, mToolWidget(0)
{ {
int widgetType = UBGraphicsWidgetItem::widgetType(pUrl); int widgetType = UBGraphicsWidgetItem::widgetType(pUrl);
if (widgetType == UBWidgetType::Apple) if (widgetType == UBWidgetType::Apple)
@ -53,11 +54,12 @@ UBToolWidget::UBToolWidget(const QUrl& pUrl, QWidget *pParent)
UBToolWidget::UBToolWidget(UBGraphicsWidgetItem *pWidget, QWidget *pParent) UBToolWidget::UBToolWidget(UBGraphicsWidgetItem *pWidget, QWidget *pParent)
: QWidget(pParent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) : QWidget(pParent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint)
, mWebView(0)
, mToolWidget(pWidget)
, mShouldMoveWidget(false) , mShouldMoveWidget(false)
, mContentMargin(0) , mContentMargin(0)
, mFrameWidth(0) , mFrameWidth(0)
, mWebView(0)
, mToolWidget(pWidget)
{ {
initialize(); initialize();
javaScriptWindowObjectCleared(); javaScriptWindowObjectCleared();

@ -94,16 +94,16 @@ void UBYouTubePublisher::postClientLoginRequest(const QString& userName, const Q
QUrl url("https://www.google.com/youtube/accounts/ClientLogin"); QUrl url("https://www.google.com/youtube/accounts/ClientLogin");
mAuthRequest = new UBServerXMLHttpRequest(UBNetworkAccessManager::defaultAccessManager() mAuthRequest = new UBServerXMLHttpRequest(UBNetworkAccessManager::defaultAccessManager()
, "application/x-www-form-urlencoded"); // destroyed in postClientLoginResponse , "application/x-www-form-urlencoded"); // destroyed in postClientLoginResponse
connect(mAuthRequest, SIGNAL(finished(bool, const QByteArray&)), this, SLOT(postClientLoginResponse(bool, const QByteArray&))); connect(mAuthRequest, SIGNAL(finished(bool, const QByteArray&)), this, SLOT(postClientLoginResponse(bool, const QByteArray&)));
mAuthRequest->addHeader("X-GData-Key", sYouTubeDeveloperKey); mAuthRequest->addHeader("X-GData-Key", sYouTubeDeveloperKey);
QString payload = QString("Email=%1&Passwd=%2&service=youtube&source=%3") QString payload = QString("Email=%1&Passwd=%2&service=youtube&source=%3")
.arg(userName) .arg(userName)
.arg(password) .arg(password)
.arg(tr("OpenSankore")); .arg(tr("OpenSankore"));
mAuthRequest->post(url, payload.toUtf8()); mAuthRequest->post(url, payload.toUtf8());
@ -125,8 +125,8 @@ void UBYouTubePublisher::postClientLoginResponse(bool success, const QByteArray&
{ {
if(line.startsWith("Auth=")) if(line.startsWith("Auth="))
{ {
mAuthToken = line.replace("Auth=", ""); mAuthToken = line.replace("Auth=", "");
break; break;
} }
} }
} }
@ -137,7 +137,7 @@ void UBYouTubePublisher::postClientLoginResponse(bool success, const QByteArray&
if(mAuthToken.length() == 0) if(mAuthToken.length() == 0)
{ {
UBApplication::showMessage(tr("YouTube authentication failed.")); UBApplication::showMessage(tr("YouTube authentication failed."));
// success = false; // success = false;
deleteLater(); deleteLater();
} }
else else
@ -188,7 +188,7 @@ void UBYouTubePublisher::postVideoUploadRequest()
QString contentType = QString("multipart/related; boundary=\"%1\"").arg(boundary); QString contentType = QString("multipart/related; boundary=\"%1\"").arg(boundary);
mUploadRequest = new UBServerXMLHttpRequest(UBNetworkAccessManager::defaultAccessManager() mUploadRequest = new UBServerXMLHttpRequest(UBNetworkAccessManager::defaultAccessManager()
, contentType); // destroyed in postVideoUploadResponse , contentType); // destroyed in postVideoUploadResponse
mUploadRequest->setVerbose(true); mUploadRequest->setVerbose(true);
connect(mUploadRequest, SIGNAL(progress(qint64, qint64)), this, SLOT(progress(qint64, qint64))); connect(mUploadRequest, SIGNAL(progress(qint64, qint64)), this, SLOT(progress(qint64, qint64)));
@ -206,15 +206,15 @@ void UBYouTubePublisher::postVideoUploadRequest()
QByteArray payload; QByteArray payload;
payload.append(QString("\n--" + boundary + "\n").toUtf8()) payload.append(QString("\n--" + boundary + "\n").toUtf8())
.append(QString("Content-Type: application/atom+xml; charset=UTF-8\n\n").toUtf8()) .append(QString("Content-Type: application/atom+xml; charset=UTF-8\n\n").toUtf8())
.append(youtubeMetadata().toUtf8()); .append(youtubeMetadata().toUtf8());
payload.append(QString("\n--" + boundary + "\n").toUtf8()); payload.append(QString("\n--" + boundary + "\n").toUtf8());
QString videoMimeType = UBFileSystemUtils::mimeTypeFromFileName(mVideoFilePath); QString videoMimeType = UBFileSystemUtils::mimeTypeFromFileName(mVideoFilePath);
payload.append((QString("Content-Type: %1\n").arg(videoMimeType)).toUtf8()) payload.append((QString("Content-Type: %1\n").arg(videoMimeType)).toUtf8())
.append(QString("Content-Transfer-Encoding: binary\n\n").toUtf8()); .append(QString("Content-Transfer-Encoding: binary\n\n").toUtf8());
payload.append(videoFile.readAll()); payload.append(videoFile.readAll());
@ -335,23 +335,45 @@ UBYouTubePublishingDialog::UBYouTubePublishingDialog(const QString& videoFilePat
connect(email, SIGNAL(textChanged(const QString&)), this, SLOT(updateUIState(const QString&))); connect(email, SIGNAL(textChanged(const QString&)), this, SLOT(updateUIState(const QString&)));
connect(password, SIGNAL(textChanged(const QString&)), this, SLOT(updateUIState(const QString&))); connect(password, SIGNAL(textChanged(const QString&)), this, SLOT(updateUIState(const QString&)));
connect(youtubeCredentialsPersistence,SIGNAL(clicked()), this, SLOT(updateCredentialPersistenceState()));
dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(false); dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(false);
dialogButtons->button(QDialogButtonBox::Ok)->setText(tr("Upload")); dialogButtons->button(QDialogButtonBox::Ok)->setText(tr("Upload"));
UBSettings* settings = UBSettings::settings();
email->setText(settings->youTubeUserEMail->get().toString());
password->setText(settings->password(email->text()));
youtubeCredentialsPersistence->setChecked(UBSettings::settings()->youTubeCredentialsPersistence->get().toBool());
updatePersistanceEnableState();
}
void UBYouTubePublishingDialog::updateCredentialPersistenceState()
{
UBSettings::settings()->youTubeCredentialsPersistence->set(QVariant(youtubeCredentialsPersistence->checkState()));
}
void UBYouTubePublishingDialog::updatePersistanceEnableState()
{
bool enabled = email->text().length() || password->text().length();
youtubeCredentialsPersistence->setEnabled(enabled);
youtubeCredentialsPersistence->setStyleSheet(enabled ? "color:black;" : "color : lightgrey;");
} }
void UBYouTubePublishingDialog::updateUIState(const QString& string) void UBYouTubePublishingDialog::updateUIState(const QString& string)
{ {
Q_UNUSED(string); Q_UNUSED(string);
bool ok = title->text().length() > 0 bool ok = title->text().length() > 0
&& description->toPlainText().length() > 0 && description->toPlainText().length() > 0
&& keywords->text().length() > 0 && keywords->text().length() > 0
&& email->text().length() > 0 && email->text().length() > 0
&& password->text().length() > 0; && password->text().length() > 0;
dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(ok); dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(ok);
updatePersistanceEnableState();
} }

@ -78,9 +78,11 @@ class UBYouTubePublishingDialog : public QDialog, public Ui::YouTubePublishingDi
private: private:
QMap<QString, QString> categories(); QMap<QString, QString> categories();
void updatePersistanceEnableState();
private slots: private slots:
void updateUIState(const QString& = QString("")); void updateUIState(const QString& = QString(""));
void updateCredentialPersistenceState();
}; };

@ -47,7 +47,7 @@ UBAbstractDrawRuler::UBAbstractDrawRuler()
//we actually need to evaluate pixels per millimeter //we actually need to evaluate pixels per millimeter
QDesktopWidget* desktop = UBApplication::desktop(); QDesktopWidget* desktop = UBApplication::desktop();
int dpiCommon = (desktop->physicalDpiX() + desktop->physicalDpiY()) / 2; int dpiCommon = (desktop->physicalDpiX() + desktop->physicalDpiY()) / 2;
sPixelsPerMillimeter = qRound(dpiCommon / 25.4f);//because 1inch = 25.4 mm sPixelsPerMillimeter = qRound(dpiCommon / UBGeometryUtils::inchSize);
} }

@ -16,6 +16,8 @@
#define UB_ABSTRACTDRAWRULER_H_ #define UB_ABSTRACTDRAWRULER_H_
#include <QtGui> #include <QtGui>
#include "frameworks/UBGeometryUtils.h"
class UBGraphicsScene; class UBGraphicsScene;
class QGraphicsSvgItem; class QGraphicsSvgItem;
@ -45,7 +47,8 @@ protected:
virtual void rotateAroundCenter(qreal angle) = 0; virtual void rotateAroundCenter(qreal angle) = 0;
virtual QPointF rotationCenter() const = 0; virtual QPointF rotationCenter() const = 0;
virtual QRectF closeButtonRect() const = 0; virtual QRectF closeButtonRect() const = 0;
virtual void paintGraduations(QPainter *painter) = 0;
bool mShowButtons; bool mShowButtons;
QGraphicsSvgItem* mCloseSvgItem; QGraphicsSvgItem* mCloseSvgItem;

@ -51,6 +51,11 @@ UBGraphicsCompass::UBGraphicsCompass()
, mDrewCenterCross(false) , mDrewCenterCross(false)
{ {
setRect(sDefaultRect); setRect(sDefaultRect);
//TODO claudio: remove code duplication
QDesktopWidget* desktop = UBApplication::desktop();
int dpiCommon = (desktop->physicalDpiX() + desktop->physicalDpiY()) / 2;
mPixelsPerMillimeter = qRound(dpiCommon / 25.4f);
setFlag(QGraphicsItem::ItemIsMovable, true); setFlag(QGraphicsItem::ItemIsMovable, true);
setFlag(QGraphicsItem::ItemIsSelectable, true); setFlag(QGraphicsItem::ItemIsSelectable, true);
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
@ -68,7 +73,7 @@ UBGraphicsCompass::UBGraphicsCompass()
updateResizeCursor(); updateResizeCursor();
updateDrawCursor(); updateDrawCursor();
unsetCursor(); unsetCursor();
setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::CppTool)); //Necessary to set if we want z value to be assigned correctly setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::CppTool)); //Necessary to set if we want z value to be assigned correctly
setFlag(QGraphicsItem::ItemIsSelectable, false); setFlag(QGraphicsItem::ItemIsSelectable, false);
@ -179,9 +184,9 @@ QVariant UBGraphicsCompass::itemChange(GraphicsItemChange change, const QVariant
void UBGraphicsCompass::mousePressEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsCompass::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ {
if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector && if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector &&
UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play) UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play)
return; return;
if (resizeButtonRect().contains(event->pos())) if (resizeButtonRect().contains(event->pos()))
{ {
@ -216,9 +221,9 @@ void UBGraphicsCompass::mousePressEvent(QGraphicsSceneMouseEvent *event)
void UBGraphicsCompass::mouseMoveEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsCompass::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{ {
if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector && if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector &&
UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play) UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play)
return; return;
if (!mResizing && !mRotating && !mDrawing) if (!mResizing && !mRotating && !mDrawing)
{ {
@ -261,9 +266,9 @@ void UBGraphicsCompass::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void UBGraphicsCompass::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsCompass::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{ {
if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector && if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector &&
UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play) UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play)
return; return;
if (mResizing) if (mResizing)
{ {
@ -302,9 +307,9 @@ void UBGraphicsCompass::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void UBGraphicsCompass::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsCompass::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{ {
if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector && if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector &&
UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play) UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play)
return; return;
mOuterCursor = cursor(); mOuterCursor = cursor();
mShowButtons = shape().contains(event->pos()); mShowButtons = shape().contains(event->pos());
@ -332,9 +337,9 @@ void UBGraphicsCompass::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
void UBGraphicsCompass::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsCompass::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector && if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector &&
UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play) UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play)
return; return;
mShowButtons = false; mShowButtons = false;
mCloseSvgItem->setVisible(mShowButtons); mCloseSvgItem->setVisible(mShowButtons);
@ -346,9 +351,9 @@ void UBGraphicsCompass::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
void UBGraphicsCompass::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsCompass::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{ {
if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector && if (UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Selector &&
UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play) UBDrawingController::drawingController ()->stylusTool() != UBStylusTool::Play)
return; return;
mShowButtons = shape().contains(event->pos()); mShowButtons = shape().contains(event->pos());
mCloseSvgItem->setVisible(mShowButtons); mCloseSvgItem->setVisible(mShowButtons);
@ -399,7 +404,7 @@ void UBGraphicsCompass::paintAngleDisplay(QPainter *painter)
void UBGraphicsCompass::paintRadiusDisplay(QPainter *painter) void UBGraphicsCompass::paintRadiusDisplay(QPainter *painter)
{ {
qreal radiusInCentimeters = rect().width() / (sPixelsPerMillimeter * 10); qreal radiusInCentimeters = rect().width() / (mPixelsPerMillimeter * 10);
QString format = rect().width() >= sDisplayRadiusUnitMinLength ? "%1 cm" : "%1"; QString format = rect().width() >= sDisplayRadiusUnitMinLength ? "%1 cm" : "%1";
QString radiusText = QString(format).arg(radiusInCentimeters, 0, 'f', 1); QString radiusText = QString(format).arg(radiusInCentimeters, 0, 'f', 1);
@ -557,10 +562,10 @@ void UBGraphicsCompass::paintCenterCross()
QPointF needleCrossCenter = mapToScene(needlePosition()); QPointF needleCrossCenter = mapToScene(needlePosition());
scene()->moveTo(QPointF(needleCrossCenter.x() - 5, needleCrossCenter.y())); scene()->moveTo(QPointF(needleCrossCenter.x() - 5, needleCrossCenter.y()));
scene()->drawLineTo(QPointF(needleCrossCenter.x() + 5, needleCrossCenter.y()), 1, scene()->drawLineTo(QPointF(needleCrossCenter.x() + 5, needleCrossCenter.y()), 1,
UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line); UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line);
scene()->moveTo(QPointF(needleCrossCenter.x(), needleCrossCenter.y() - 5)); scene()->moveTo(QPointF(needleCrossCenter.x(), needleCrossCenter.y() - 5));
scene()->drawLineTo(QPointF(needleCrossCenter.x(), needleCrossCenter.y() + 5), 1, scene()->drawLineTo(QPointF(needleCrossCenter.x(), needleCrossCenter.y() + 5), 1,
UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line); UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Line);
} }
QPointF UBGraphicsCompass::needlePosition() const QPointF UBGraphicsCompass::needlePosition() const

@ -113,6 +113,7 @@ class UBGraphicsCompass: public QObject, public QGraphicsRectItem, public UBItem
QGraphicsSvgItem* mResizeSvgItem; QGraphicsSvgItem* mResizeSvgItem;
qreal mAntiScaleRatio; qreal mAntiScaleRatio;
bool mDrewCenterCross; bool mDrewCenterCross;
int mPixelsPerMillimeter;
// Constants // Constants
static const QRect sDefaultRect; static const QRect sDefaultRect;
@ -130,7 +131,6 @@ class UBGraphicsCompass: public QObject, public QGraphicsRectItem, public UBItem
static const QColor sDarkBackgroundEdgeFillColor; static const QColor sDarkBackgroundEdgeFillColor;
static const QColor sDarkBackgroundMiddleFillColor; static const QColor sDarkBackgroundMiddleFillColor;
static const QColor sDarkBackgroundDrawColor; static const QColor sDarkBackgroundDrawColor;
static const int sPixelsPerMillimeter = 5;
static const int sDisplayRadiusOnPencilArmMinLength = 300; static const int sDisplayRadiusOnPencilArmMinLength = 300;
static const int sDisplayRadiusUnitMinLength = 250; static const int sDisplayRadiusUnitMinLength = 250;
}; };

@ -62,10 +62,10 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse
virtual void hoverMoveEvent (QGraphicsSceneHoverEvent *event); virtual void hoverMoveEvent (QGraphicsSceneHoverEvent *event);
virtual QPainterPath shape() const; virtual QPainterPath shape() const;
QRectF boundingRect() const; QRectF boundingRect() const;
void paintGraduations(QPainter *painter);
private: private:
// Helpers // Helpers
void paintGraduations (QPainter *painter);
void paintButtons (QPainter *painter); void paintButtons (QPainter *painter);
void paintAngleMarker (QPainter *painter); void paintAngleMarker (QPainter *painter);
Tool toolFromPos (QPointF pos); Tool toolFromPos (QPointF pos);

@ -29,12 +29,12 @@ const QRect UBGraphicsRuler::sDefaultRect = QRect(0, 0, 800, 96);
UBGraphicsRuler::UBGraphicsRuler() UBGraphicsRuler::UBGraphicsRuler()
: QGraphicsRectItem() : QGraphicsRectItem()
, mResizing(false) , mResizing(false)
, mRotating(false) , mRotating(false)
{ {
setRect(sDefaultRect); setRect(sDefaultRect);
mResizeSvgItem = new QGraphicsSvgItem(":/images/resizeRuler.svg", this); mResizeSvgItem = new QGraphicsSvgItem(":/images/resizeRuler.svg", this);
mResizeSvgItem->setVisible(false); mResizeSvgItem->setVisible(false);
mResizeSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); mResizeSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control));
@ -42,7 +42,7 @@ UBGraphicsRuler::UBGraphicsRuler()
mRotateSvgItem->setVisible(false); mRotateSvgItem->setVisible(false);
mRotateSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); mRotateSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control));
create(*this); create(*this);
setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::CppTool)); //Necessary to set if we want z value to be assigned correctly setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::CppTool)); //Necessary to set if we want z value to be assigned correctly
@ -98,9 +98,9 @@ void UBGraphicsRuler::paint(QPainter *painter, const QStyleOptionGraphicsItem *s
Q_UNUSED(styleOption); Q_UNUSED(styleOption);
Q_UNUSED(widget); Q_UNUSED(widget);
UBAbstractDrawRuler::paint(); UBAbstractDrawRuler::paint();
QTransform antiScaleTransform2; QTransform antiScaleTransform2;
qreal ratio = mAntiScaleRatio > 1.0 ? mAntiScaleRatio : 1.0; qreal ratio = mAntiScaleRatio > 1.0 ? mAntiScaleRatio : 1.0;
antiScaleTransform2.scale(ratio, 1.0); antiScaleTransform2.scale(ratio, 1.0);
@ -158,36 +158,30 @@ void UBGraphicsRuler::fillBackground(QPainter *painter)
void UBGraphicsRuler::paintGraduations(QPainter *painter) void UBGraphicsRuler::paintGraduations(QPainter *painter)
{ {
const int centimeterGraduationHeight = 15;
const int halfCentimeterGraduationHeight = 10;
const int millimeterGraduationHeight = 5;
const int millimetersPerCentimeter = 10;
const int millimetersPerHalfCentimeter = 5;
painter->save(); painter->save();
painter->setFont(font()); painter->setFont(font());
QFontMetricsF fontMetrics(painter->font()); QFontMetricsF fontMetrics(painter->font());
for (int millimeters = 0; millimeters < (rect().width() - sLeftEdgeMargin - sRoundingRadius) / sPixelsPerMillimeter; millimeters++) for (int millimeters = 0; millimeters < (rect().width() - sLeftEdgeMargin - sRoundingRadius) / sPixelsPerMillimeter; millimeters++)
{ {
int graduationX = rotationCenter().x() + sPixelsPerMillimeter * millimeters; int graduationX = rotationCenter().x() + sPixelsPerMillimeter * millimeters;
int graduationHeight = (0 == millimeters % millimetersPerCentimeter) ? int graduationHeight = (0 == millimeters % UBGeometryUtils::millimetersPerCentimeter) ?
centimeterGraduationHeight : UBGeometryUtils::centimeterGraduationHeight :
((0 == millimeters % millimetersPerHalfCentimeter) ? ((0 == millimeters % UBGeometryUtils::millimetersPerHalfCentimeter) ?
halfCentimeterGraduationHeight : millimeterGraduationHeight); UBGeometryUtils::halfCentimeterGraduationHeight : UBGeometryUtils::millimeterGraduationHeight);
painter->drawLine(QLine(graduationX, rotationCenter().y(), graduationX, rotationCenter().y() + graduationHeight)); painter->drawLine(QLine(graduationX, rotationCenter().y(), graduationX, rotationCenter().y() + graduationHeight));
painter->drawLine(QLine(graduationX, rotationCenter().y() + rect().height(), graduationX, rotationCenter().y() + rect().height() - graduationHeight)); painter->drawLine(QLine(graduationX, rotationCenter().y() + rect().height(), graduationX, rotationCenter().y() + rect().height() - graduationHeight));
if (0 == millimeters % millimetersPerCentimeter) if (0 == millimeters % UBGeometryUtils::millimetersPerCentimeter)
{ {
QString text = QString("%1").arg((int)(millimeters / millimetersPerCentimeter)); QString text = QString("%1").arg((int)(millimeters / UBGeometryUtils::millimetersPerCentimeter));
if (graduationX + fontMetrics.width(text) / 2 < rect().right()) if (graduationX + fontMetrics.width(text) / 2 < rect().right())
{ {
qreal textWidth = fontMetrics.width(text); qreal textWidth = fontMetrics.width(text);
qreal textHeight = fontMetrics.tightBoundingRect(text).height() + 5; qreal textHeight = fontMetrics.tightBoundingRect(text).height() + 5;
painter->drawText( painter->drawText(
QRectF(graduationX - textWidth / 2, rect().top() + 5 + centimeterGraduationHeight, textWidth, textHeight), QRectF(graduationX - textWidth / 2, rect().top() + 5 + UBGeometryUtils::centimeterGraduationHeight, textWidth, textHeight),
Qt::AlignVCenter, text); Qt::AlignVCenter, text);
painter->drawText( painter->drawText(
QRectF(graduationX - textWidth / 2, rect().bottom() - 5 - centimeterGraduationHeight - textHeight, textWidth, textHeight), QRectF(graduationX - textWidth / 2, rect().bottom() - 5 - UBGeometryUtils::centimeterGraduationHeight - textHeight, textWidth, textHeight),
Qt::AlignVCenter, text); Qt::AlignVCenter, text);
} }
} }
@ -275,28 +269,28 @@ QRectF UBGraphicsRuler::rotateButtonRect() const
void UBGraphicsRuler::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsRuler::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{ {
UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool (); UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool ();
if (currentTool == UBStylusTool::Selector || currentTool == UBStylusTool::Play) if (currentTool == UBStylusTool::Selector || currentTool == UBStylusTool::Play)
{ {
mCloseSvgItem->setVisible(mShowButtons); mCloseSvgItem->setVisible(mShowButtons);
mResizeSvgItem->setVisible(mShowButtons); mResizeSvgItem->setVisible(mShowButtons);
mRotateSvgItem->setVisible(mShowButtons); mRotateSvgItem->setVisible(mShowButtons);
if (resizeButtonRect().contains(event->pos())) if (resizeButtonRect().contains(event->pos()))
setCursor(resizeCursor()); setCursor(resizeCursor());
else if (closeButtonRect().contains(event->pos())) else if (closeButtonRect().contains(event->pos()))
setCursor(closeCursor()); setCursor(closeCursor());
else if (rotateButtonRect().contains(event->pos())) else if (rotateButtonRect().contains(event->pos()))
setCursor(rotateCursor()); setCursor(rotateCursor());
else else
setCursor(moveCursor()); setCursor(moveCursor());
event->accept(); event->accept();
} }
else if (UBDrawingController::drawingController()->isDrawingTool()) else if (UBDrawingController::drawingController()->isDrawingTool())
{ {
event->accept(); event->accept();
} }
} }
void UBGraphicsRuler::mousePressEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsRuler::mousePressEvent(QGraphicsSceneMouseEvent *event)
@ -315,7 +309,7 @@ void UBGraphicsRuler::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ {
mResizeSvgItem->setVisible(false); mResizeSvgItem->setVisible(false);
mRotateSvgItem->setVisible(false); mRotateSvgItem->setVisible(false);
QGraphicsItem::mousePressEvent(event); QGraphicsItem::mousePressEvent(event);
} }
mResizeSvgItem->setVisible(mShowButtons && mResizing); mResizeSvgItem->setVisible(mShowButtons && mResizing);
mRotateSvgItem->setVisible(mShowButtons && mRotating); mRotateSvgItem->setVisible(mShowButtons && mRotating);
@ -326,20 +320,20 @@ void UBGraphicsRuler::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{ {
if (!mResizing && !mRotating) if (!mResizing && !mRotating)
{ {
QGraphicsItem::mouseMoveEvent(event); QGraphicsItem::mouseMoveEvent(event);
} }
else else
{ {
if (mResizing) if (mResizing)
{ {
QPointF delta = event->pos() - event->lastPos(); QPointF delta = event->pos() - event->lastPos();
if (rect().width() + delta.x() < sMinLength) if (rect().width() + delta.x() < sMinLength)
delta.setX(sMinLength - rect().width()); delta.setX(sMinLength - rect().width());
if (rect().width() + delta.x() > sMaxLength) if (rect().width() + delta.x() > sMaxLength)
delta.setX(sMaxLength - rect().width()); delta.setX(sMaxLength - rect().width());
setRect(QRectF(rect().topLeft(), QSizeF(rect().width() + delta.x(), rect().height()))); setRect(QRectF(rect().topLeft(), QSizeF(rect().width() + delta.x(), rect().height())));
} }
else else
{ {
@ -368,13 +362,13 @@ void UBGraphicsRuler::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
} }
else if (closeButtonRect().contains(event->pos())) else if (closeButtonRect().contains(event->pos()))
{ {
hide(); hide();
emit hidden(); emit hidden();
event->accept(); event->accept();
} }
else else
{ {
QGraphicsItem::mouseReleaseEvent(event); QGraphicsItem::mouseReleaseEvent(event);
} }
if (scene()) if (scene())
@ -383,41 +377,41 @@ void UBGraphicsRuler::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void UBGraphicsRuler::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsRuler::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{ {
UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool (); UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController ()->stylusTool ();
if (currentTool == UBStylusTool::Selector || if (currentTool == UBStylusTool::Selector ||
currentTool == UBStylusTool::Play) currentTool == UBStylusTool::Play)
{ {
mCloseSvgItem->setParentItem(this); mCloseSvgItem->setParentItem(this);
mResizeSvgItem->setParentItem(this); mResizeSvgItem->setParentItem(this);
mRotateSvgItem->setParentItem(this); mRotateSvgItem->setParentItem(this);
mShowButtons = true; mShowButtons = true;
mCloseSvgItem->setVisible(mShowButtons); mCloseSvgItem->setVisible(mShowButtons);
mResizeSvgItem->setVisible(mShowButtons); mResizeSvgItem->setVisible(mShowButtons);
mRotateSvgItem->setVisible(mShowButtons); mRotateSvgItem->setVisible(mShowButtons);
if (event->pos().x() >= resizeButtonRect().left()) if (event->pos().x() >= resizeButtonRect().left())
{ {
setCursor(resizeCursor()); setCursor(resizeCursor());
} }
else else
{ {
if (closeButtonRect().contains(event->pos())) if (closeButtonRect().contains(event->pos()))
setCursor(closeCursor()); setCursor(closeCursor());
else if (rotateButtonRect().contains(event->pos())) else if (rotateButtonRect().contains(event->pos()))
setCursor(rotateCursor()); setCursor(rotateCursor());
else else
setCursor(moveCursor()); setCursor(moveCursor());
} }
event->accept(); event->accept();
update(); update();
} }
else if (UBDrawingController::drawingController()->isDrawingTool()) else if (UBDrawingController::drawingController()->isDrawingTool())
{ {
setCursor(drawRulerLineCursor()); setCursor(drawRulerLineCursor());
UBDrawingController::drawingController()->mActiveRuler = this; UBDrawingController::drawingController()->mActiveRuler = this;
event->accept(); event->accept();
} }
} }
void UBGraphicsRuler::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsRuler::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
@ -427,7 +421,7 @@ void UBGraphicsRuler::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
mCloseSvgItem->setVisible(mShowButtons); mCloseSvgItem->setVisible(mShowButtons);
mResizeSvgItem->setVisible(mShowButtons); mResizeSvgItem->setVisible(mShowButtons);
mRotateSvgItem->setVisible(mShowButtons); mRotateSvgItem->setVisible(mShowButtons);
UBDrawingController::drawingController()->mActiveRuler = NULL; UBDrawingController::drawingController()->mActiveRuler = NULL;
event->accept(); event->accept();
update(); update();
} }
@ -441,28 +435,28 @@ UBGraphicsScene* UBGraphicsRuler::scene() const
void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width)
{ {
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
qreal y; qreal y;
if (itemPos.y() > rect().y() + rect().height() / 2) if (itemPos.y() > rect().y() + rect().height() / 2)
{ {
drawLineDirection = 0; drawLineDirection = 0;
y = rect().y() + rect().height() + width / 2; y = rect().y() + rect().height() + width / 2;
} }
else else
{ {
drawLineDirection = 1; drawLineDirection = 1;
y = rect().y() - width /2; y = rect().y() - width /2;
} }
if (itemPos.x() < rect().x() + sLeftEdgeMargin) if (itemPos.x() < rect().x() + sLeftEdgeMargin)
itemPos.setX(rect().x() + sLeftEdgeMargin); itemPos.setX(rect().x() + sLeftEdgeMargin);
if (itemPos.x() > rect().x() + rect().width() - sLeftEdgeMargin) if (itemPos.x() > rect().x() + rect().width() - sLeftEdgeMargin)
itemPos.setX(rect().x() + rect().width() - sLeftEdgeMargin); itemPos.setX(rect().x() + rect().width() - sLeftEdgeMargin);
itemPos.setY(y); itemPos.setY(y);
itemPos = mapToScene(itemPos); itemPos = mapToScene(itemPos);
scene()->moveTo(itemPos); scene()->moveTo(itemPos);
scene()->drawLineTo(itemPos, width, true); scene()->drawLineTo(itemPos, width, true);
@ -470,26 +464,26 @@ void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width)
void UBGraphicsRuler::DrawLine(const QPointF& scenePos, qreal width) void UBGraphicsRuler::DrawLine(const QPointF& scenePos, qreal width)
{ {
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
qreal y; qreal y;
if (drawLineDirection == 0) if (drawLineDirection == 0)
{ {
y = rect().y() + rect().height() + width / 2; y = rect().y() + rect().height() + width / 2;
} }
else else
{ {
y = rect().y() - width /2; y = rect().y() - width /2;
} }
if (itemPos.x() < rect().x() + sLeftEdgeMargin) if (itemPos.x() < rect().x() + sLeftEdgeMargin)
itemPos.setX(rect().x() + sLeftEdgeMargin); itemPos.setX(rect().x() + sLeftEdgeMargin);
if (itemPos.x() > rect().x() + rect().width() - sLeftEdgeMargin) if (itemPos.x() > rect().x() + rect().width() - sLeftEdgeMargin)
itemPos.setX(rect().x() + rect().width() - sLeftEdgeMargin); itemPos.setX(rect().x() + rect().width() - sLeftEdgeMargin);
itemPos.setY(y); itemPos.setY(y);
itemPos = mapToScene(itemPos); itemPos = mapToScene(itemPos);
// We have to use "pointed" line for marker tool // We have to use "pointed" line for marker tool
scene()->drawLineTo(itemPos, width, UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker); scene()->drawLineTo(itemPos, width, UBDrawingController::drawingController()->stylusTool() != UBStylusTool::Marker);
} }

@ -59,6 +59,7 @@ class UBGraphicsRuler : public UBAbstractDrawRuler, public QGraphicsRectItem, pu
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event); virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event); virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
void paintGraduations(QPainter *painter);
private: private:
@ -68,7 +69,6 @@ class UBGraphicsRuler : public UBAbstractDrawRuler, public QGraphicsRectItem, pu
// Helpers // Helpers
void fillBackground(QPainter *painter); void fillBackground(QPainter *painter);
void paintGraduations(QPainter *painter);
void paintRotationCenter(QPainter *painter); void paintRotationCenter(QPainter *painter);
virtual void rotateAroundCenter(qreal angle); virtual void rotateAroundCenter(qreal angle);

@ -297,12 +297,6 @@ QPainterPath UBGraphicsTriangle::shape() const
void UBGraphicsTriangle::paintGraduations(QPainter *painter) void UBGraphicsTriangle::paintGraduations(QPainter *painter)
{ {
const int centimeterGraduationHeight = 15;
const int halfCentimeterGraduationHeight = 10;
const int millimeterGraduationHeight = 5;
const int millimetersPerCentimeter = 10;
const int millimetersPerHalfCentimeter = 5;
qreal kx = (mOrientation == TopLeft || mOrientation == BottomLeft) ? 1 : -1; qreal kx = (mOrientation == TopLeft || mOrientation == BottomLeft) ? 1 : -1;
qreal ky = (mOrientation == BottomLeft || mOrientation == BottomRight) ? 1 : -1; qreal ky = (mOrientation == BottomLeft || mOrientation == BottomRight) ? 1 : -1;
@ -312,10 +306,10 @@ void UBGraphicsTriangle::paintGraduations(QPainter *painter)
for (int millimeters = 0; millimeters < (rect().width() - sLeftEdgeMargin - sRoundingRadius) / sPixelsPerMillimeter; millimeters++) for (int millimeters = 0; millimeters < (rect().width() - sLeftEdgeMargin - sRoundingRadius) / sPixelsPerMillimeter; millimeters++)
{ {
int graduationX = rotationCenter().x() + kx * sPixelsPerMillimeter * millimeters; int graduationX = rotationCenter().x() + kx * sPixelsPerMillimeter * millimeters;
int graduationHeight = (0 == millimeters % millimetersPerCentimeter) ? int graduationHeight = (0 == millimeters % UBGeometryUtils::millimetersPerCentimeter) ?
centimeterGraduationHeight : UBGeometryUtils::centimeterGraduationHeight :
((0 == millimeters % millimetersPerHalfCentimeter) ? ((0 == millimeters % UBGeometryUtils::millimetersPerHalfCentimeter) ?
halfCentimeterGraduationHeight : millimeterGraduationHeight); UBGeometryUtils::halfCentimeterGraduationHeight : UBGeometryUtils::millimeterGraduationHeight);
// Check that grad. line inside triangle // Check that grad. line inside triangle
qreal dx = (kx > 0) ? rect().width() - graduationX : graduationX - rect().x(); qreal dx = (kx > 0) ? rect().width() - graduationX : graduationX - rect().x();
@ -332,15 +326,15 @@ void UBGraphicsTriangle::paintGraduations(QPainter *painter)
} }
painter->drawLine(QLine(graduationX, rotationCenter().y(), graduationX, rotationCenter().y() - ky * graduationHeight)); painter->drawLine(QLine(graduationX, rotationCenter().y(), graduationX, rotationCenter().y() - ky * graduationHeight));
if (0 == millimeters % millimetersPerCentimeter) if (0 == millimeters % UBGeometryUtils::millimetersPerCentimeter)
{ {
QString text = QString("%1").arg((int)(millimeters / millimetersPerCentimeter)); QString text = QString("%1").arg((int)(millimeters / UBGeometryUtils::millimetersPerCentimeter));
int textXRight = graduationX + fontMetrics.width(text) / 2; int textXRight = graduationX + fontMetrics.width(text) / 2;
qreal textWidth = fontMetrics.width(text); qreal textWidth = fontMetrics.width(text);
qreal textHeight = fontMetrics.tightBoundingRect(text).height() + 5; qreal textHeight = fontMetrics.tightBoundingRect(text).height() + 5;
int textY = (ky > 0) ? rotationCenter().y() - 5 - centimeterGraduationHeight - textHeight int textY = (ky > 0) ? rotationCenter().y() - 5 - UBGeometryUtils::centimeterGraduationHeight - textHeight
: rotationCenter().y() + 5 + centimeterGraduationHeight; : rotationCenter().y() + 5 + UBGeometryUtils::centimeterGraduationHeight;
bool bText = false; bool bText = false;
switch(mOrientation) switch(mOrientation)

@ -118,6 +118,7 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event); virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event); virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
void paintGraduations(QPainter *painter);
private: private:
@ -143,9 +144,6 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
static const QRect sDefaultRect; static const QRect sDefaultRect;
static const UBGraphicsTriangleOrientation sDefaultOrientation; static const UBGraphicsTriangleOrientation sDefaultOrientation;
void paintGraduations(QPainter *painter);
UBGraphicsTriangleOrientation mOrientation; UBGraphicsTriangleOrientation mOrientation;
QPointF A1, B1, C1, A2, B2, C2; // coordinates of points in ext and int triangles QPointF A1, B1, C1, A2, B2, C2; // coordinates of points in ext and int triangles

@ -91,12 +91,12 @@ UBToolsManager::UBToolsManager(QObject *parent)
mDescriptors << cache; mDescriptors << cache;
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
aristo.id = "uniboardTool://uniboard.mnemis.com/aristo"; // aristo.id = "uniboardTool://uniboard.mnemis.com/aristo";
aristo.icon = QPixmap(":/images/toolPalette/aristoTool.png"); // aristo.icon = QPixmap(":/images/toolPalette/aristoTool.png");
aristo.label = tr("Aristo"); // aristo.label = tr("Aristo");
aristo.version = "1.0"; // aristo.version = "1.0";
mToolsIcon.insert(aristo.id, ":/images/toolPalette/aristoTool.png"); // mToolsIcon.insert(aristo.id, ":/images/toolPalette/aristoTool.png");
mDescriptors << aristo; // mDescriptors << aristo;
} }
UBToolsManager::~UBToolsManager() UBToolsManager::~UBToolsManager()

Loading…
Cancel
Save