tutorial and webkit instance associated removed

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 63834823c4
commit 3cf0cc5e99
  1. 54
      resources/etc/Tutorial/tutorial_en/CSS/grid.css
  2. 29
      resources/etc/Tutorial/tutorial_en/CSS/reset.css
  3. 94
      resources/etc/Tutorial/tutorial_en/CSS/typography.css
  4. BIN
      resources/etc/Tutorial/tutorial_en/images/logo_open_sankore.png
  5. BIN
      resources/etc/Tutorial/tutorial_en/images/manuel.png
  6. BIN
      resources/etc/Tutorial/tutorial_en/images/pedago.png
  7. BIN
      resources/etc/Tutorial/tutorial_en/images/tech.png
  8. BIN
      resources/etc/Tutorial/tutorial_en/images/video.png
  9. 72
      resources/etc/Tutorial/tutorial_en/index.html
  10. 54
      resources/etc/Tutorial/tutorial_fr/CSS/grid.css
  11. 29
      resources/etc/Tutorial/tutorial_fr/CSS/reset.css
  12. 94
      resources/etc/Tutorial/tutorial_fr/CSS/typography.css
  13. BIN
      resources/etc/Tutorial/tutorial_fr/images/logo_open_sankore.png
  14. BIN
      resources/etc/Tutorial/tutorial_fr/images/manuel.png
  15. BIN
      resources/etc/Tutorial/tutorial_fr/images/pedago.png
  16. BIN
      resources/etc/Tutorial/tutorial_fr/images/tech.png
  17. BIN
      resources/etc/Tutorial/tutorial_fr/images/video.png
  18. 72
      resources/etc/Tutorial/tutorial_fr/index.html
  19. 40
      resources/forms/mainWindow.ui
  20. 2
      src/board/UBBoardController.cpp
  21. 8
      src/board/UBBoardPaletteManager.cpp
  22. 6
      src/core/UBApplication.cpp
  23. 48
      src/core/UBApplicationController.cpp
  24. 4
      src/core/UBApplicationController.h
  25. 34
      src/gui/UBWebToolsPalette.cpp
  26. 2
      src/gui/UBWebToolsPalette.h
  27. 254
      src/web/UBWebController.cpp
  28. 24
      src/web/UBWebController.h
  29. 41
      src/web/browser/WBBrowserWindow.cpp
  30. 3
      src/web/browser/WBBrowserWindow.h

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

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

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

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

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

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

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

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

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

@ -335,7 +335,6 @@ void UBBoardController::setupToolbar()
//-----------------------------------------------------------//
UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->boardToolBar, mMainWindow->actionBoard);
UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->tutorialToolBar, mMainWindow->actionBoard);
UBApplication::app()->decorateActionMenu(mMainWindow->actionMenu);
@ -343,7 +342,6 @@ void UBBoardController::setupToolbar()
mMainWindow->webToolBar->hide();
mMainWindow->documentToolBar->hide();
mMainWindow->tutorialToolBar->hide();
connectToolbar();
initToolbarTexts();

@ -177,14 +177,6 @@ void UBBoardPaletteManager::slot_changeMainMode(UBApplicationController::MainMod
changeMode(eUBDockPaletteWidget_BOARD);
}
break;
case UBApplicationController::Tutorial:
{
if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL)
mKeyboardPalette->hide();
}
break;
case UBApplicationController::Internet:
changeMode(eUBDockPaletteWidget_WEB);
break;

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

@ -342,7 +342,6 @@ void UBApplicationController::showBoard()
{
mMainWindow->webToolBar->hide();
mMainWindow->documentToolBar->hide();
mMainWindow->tutorialToolBar->hide();
mMainWindow->boardToolBar->show();
if (mMainMode == Document)
@ -391,14 +390,12 @@ void UBApplicationController::showInternet()
if (UBSettings::settings()->webUseExternalBrowser->get().toBool())
{
showDesktop(true);
UBApplication::webController->show(UBWebController::WebBrowser);
// really no have emit mainModeChanged here ? potential problem with virtual keyboard ?
UBApplication::webController->show();
}
else
{
mMainWindow->boardToolBar->hide();
mMainWindow->documentToolBar->hide();
mMainWindow->tutorialToolBar->hide();
mMainWindow->webToolBar->show();
mMainMode = Internet;
@ -408,7 +405,7 @@ void UBApplicationController::showInternet()
mMainWindow->show();
mUninoteController->hideWindow();
UBApplication::webController->show(UBWebController::WebBrowser);
UBApplication::webController->show();
emit mainModeChanged(Internet);
}
@ -419,7 +416,6 @@ void UBApplicationController::showDocument()
{
mMainWindow->webToolBar->hide();
mMainWindow->boardToolBar->hide();
mMainWindow->tutorialToolBar->hide();
mMainWindow->documentToolBar->show();
mMainMode = Document;
@ -475,42 +471,6 @@ void UBApplicationController::showDesktop(bool dontSwitchFrontProcess)
}
void UBApplicationController::showTutorial()
{
if (UBApplication::boardController)
{
UBApplication::boardController->persistCurrentScene();
UBApplication::boardController->hide();
}
if (UBSettings::settings()->webUseExternalBrowser->get().toBool())
{
showDesktop(true);
UBApplication::webController->show(UBWebController::Tutorial);
}
else{
mMainWindow->webToolBar->hide();
mMainWindow->boardToolBar->hide();
mMainWindow->documentToolBar->hide();
mMainWindow->tutorialToolBar->show();
mMainMode = Tutorial;
adaptToolBar();
mUninoteController->hideWindow();
UBApplication::webController->show(UBWebController::Tutorial);
mirroringEnabled(false);
emit mainModeChanged(mMainMode);
}
}
void UBApplicationController::checkUpdate()
{
// if(mHttp)
@ -588,10 +548,6 @@ void UBApplicationController::hideDesktop()
{
showDocument();
}
else if (mMainMode == Tutorial)
{
showTutorial();
}
mIsShowingDesktop = false;

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

@ -38,30 +38,22 @@
#include "core/memcheck.h"
UBWebToolsPalette::UBWebToolsPalette(QWidget *parent,bool tutorialMode=false)
UBWebToolsPalette::UBWebToolsPalette(QWidget *parent)
: UBActionPalette(Qt::TopRightCorner, parent)
{
QList<QAction*> actions;
if (tutorialMode){
actions << UBApplication::mainWindow->actionBoard;
}
else{
actions << UBApplication::mainWindow->actionWebTrapFlash;
//actions << UBApplication::mainWindow->actionWebTrap;
actions << UBApplication::mainWindow->actionWebCustomCapture;
actions << UBApplication::mainWindow->actionWebWindowCapture;
actions << UBApplication::mainWindow->actionWebOEmbed;
//actions << UBApplication::mainWindow->actionEduMedia;
actions << UBApplication::mainWindow->actionWebShowHideOnDisplay;
if (UBPlatformUtils::hasVirtualKeyboard())
{
actions << UBApplication::mainWindow->actionVirtualKeyboard;
}
}
actions << UBApplication::mainWindow->actionWebTrapFlash;
actions << UBApplication::mainWindow->actionWebCustomCapture;
actions << UBApplication::mainWindow->actionWebWindowCapture;
actions << UBApplication::mainWindow->actionWebOEmbed;
actions << UBApplication::mainWindow->actionWebShowHideOnDisplay;
if (UBPlatformUtils::hasVirtualKeyboard())
actions << UBApplication::mainWindow->actionVirtualKeyboard;
setActions(actions);
setButtonIconSize(QSize(42, 42));
adjustSizeAndPosition();

@ -32,7 +32,7 @@ class UBWebToolsPalette : public UBActionPalette
Q_OBJECT;
public:
UBWebToolsPalette(QWidget *parent,bool tutorialMode);
UBWebToolsPalette(QWidget *parent);
virtual ~UBWebToolsPalette();
};

@ -70,20 +70,6 @@ UBWebController::UBWebController(UBMainWindow* mainWindow)
, mToolsPalettePositionned(false)
, mDownloadViewIsVisible(false)
{
connect(mMainWindow->actionWebTools, SIGNAL(toggled(bool)), this, SLOT(toggleWebToolsPalette(bool)));
mStackedWidget = new QStackedWidget();
mStackedWidget->addWidget(new QWidget(mStackedWidget));
mStackedWidget->addWidget(new QWidget(mStackedWidget));
mMainWindow->addWebWidget(mStackedWidget);
for (int i = 0; i < TotalNumberOfWebInstances; i += 1){
mWebBrowserList[i] = 0;
mToolsPaletteList[i] = 0;
mToolsPalettePositionnedList[i] = false;
}
connect(&mOEmbedParser, SIGNAL(oembedParsed(QVector<sOEmbedContent>)), this, SLOT(onOEmbedParsed(QVector<sOEmbedContent>)));
// TODO : Comment the next line to continue the Youtube button bugfix
@ -94,9 +80,6 @@ UBWebController::UBWebController(UBMainWindow* mainWindow)
UBWebController::~UBWebController()
{
// NOOP
if (mStackedWidget) {
delete mStackedWidget;
}
}
void UBWebController::initialiazemOEmbedProviders()
@ -130,17 +113,15 @@ void UBWebController::webBrowserInstance()
}
else
{
mCurrentWebBrowser = &mWebBrowserList[WebBrowser];
mToolsCurrentPalette = &mToolsPaletteList[WebBrowser];
mToolsPalettePositionned = mToolsPalettePositionnedList[WebBrowser];
if (!(*mCurrentWebBrowser))
if (!mCurrentWebBrowser)
{
(*mCurrentWebBrowser) = new WBBrowserWindow(mMainWindow->centralWidget(), mMainWindow);
mCurrentWebBrowser = new WBBrowserWindow(mMainWindow->centralWidget(), mMainWindow);
connect((*mCurrentWebBrowser), SIGNAL(activeViewChange(QWidget*)), this, SLOT(setSourceWidget(QWidget*)));
mMainWindow->addWebWidget(mCurrentWebBrowser);
WBBrowserWindow::downloadManager()->setParent((*mCurrentWebBrowser), Qt::Tool);
connect(mCurrentWebBrowser, SIGNAL(activeViewChange(QWidget*)), this, SLOT(setSourceWidget(QWidget*)));
WBBrowserWindow::downloadManager()->setParent(mCurrentWebBrowser, Qt::Tool);
UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->webToolBar, mMainWindow->actionBoard, 32);
UBApplication::app()->decorateActionMenu(mMainWindow->actionMenu);
@ -149,28 +130,21 @@ void UBWebController::webBrowserInstance()
mMainWindow->actionBookmarks->setVisible(showAddBookmarkButtons);
mMainWindow->actionAddBookmark->setVisible(showAddBookmarkButtons);
mStackedWidget->setCurrentIndex(WebBrowser);
if (mStackedWidget->currentWidget()) {
mStackedWidget->removeWidget(mStackedWidget->currentWidget());
}
mStackedWidget->insertWidget(WebBrowser, (*mCurrentWebBrowser));
showTabAtTop(UBSettings::settings()->appToolBarPositionedAtTop->get().toBool());
adaptToolBar();
mTrapFlashController = new UBTrapFlashController((*mCurrentWebBrowser));
mTrapFlashController = new UBTrapFlashController(mCurrentWebBrowser);
connect((*mCurrentWebBrowser), SIGNAL(activeViewPageChanged()), this, SLOT(activePageChanged()));
connect(mCurrentWebBrowser, SIGNAL(activeViewPageChanged()), this, SLOT(activePageChanged()));
(*mCurrentWebBrowser)->loadUrl(currentUrl);
mCurrentWebBrowser->loadUrl(currentUrl);
(*mCurrentWebBrowser)->tabWidget()->tabBar()->show();
(*mCurrentWebBrowser)->tabWidget()->lineEdits()->show();
mCurrentWebBrowser->tabWidget()->tabBar()->show();
mCurrentWebBrowser->tabWidget()->lineEdits()->show();
}
mStackedWidget->setCurrentIndex(WebBrowser);
UBApplication::applicationController->setMirrorSourceWidget((*mCurrentWebBrowser)->paintWidget());
UBApplication::applicationController->setMirrorSourceWidget(mCurrentWebBrowser->paintWidget());
mMainWindow->switchToWebWidget();
setupPalettes();
@ -178,87 +152,16 @@ void UBWebController::webBrowserInstance()
bool mirroring = UBSettings::settings()->webShowPageImmediatelyOnMirroredScreen->get().toBool();
UBApplication::mainWindow->actionWebShowHideOnDisplay->setChecked(mirroring);
(*mToolsCurrentPalette)->show();
mToolsCurrentPalette->show();
}
if (mDownloadViewIsVisible)
WBBrowserWindow::downloadManager()->show();
}
void UBWebController::tutorialWebInstance()
void UBWebController::show()
{
QLocale locale = QLocale();
QString language = "_" + locale.name().left(2);
QString tutorialHtmlIndexFile = 0;
QString tutorialPath = "/etc/Tutorial/tutorial" + language + "/index.html";
#if defined(Q_WS_MAC)
tutorialHtmlIndexFile = QApplication::applicationDirPath()+ "/../Resources" + tutorialPath;
#else
tutorialHtmlIndexFile = QApplication::applicationDirPath() + tutorialPath;
#endif
QUrl currentUrl = QUrl::fromLocalFile(tutorialHtmlIndexFile);
if (UBSettings::settings()->webUseExternalBrowser->get().toBool())
{
QDesktopServices::openUrl(currentUrl);
}
else
{
mCurrentWebBrowser = &mWebBrowserList[Tutorial];
mToolsPalettePositionned = &mToolsPalettePositionnedList[Tutorial];
if (!(*mCurrentWebBrowser))
{
(*mCurrentWebBrowser) = new WBBrowserWindow(mMainWindow->centralWidget(), mMainWindow, true);
connect((*mCurrentWebBrowser), SIGNAL(activeViewChange(QWidget*)), this, SLOT(setSourceWidget(QWidget*)));
mStackedWidget->setCurrentIndex(Tutorial);
if (mStackedWidget->currentWidget()) {
mStackedWidget->removeWidget(mStackedWidget->currentWidget());
}
mStackedWidget->insertWidget(Tutorial, (*mCurrentWebBrowser));
adaptToolBar();
mTrapFlashController = new UBTrapFlashController((*mCurrentWebBrowser));
connect((*mCurrentWebBrowser), SIGNAL(activeViewPageChanged()), this, SLOT(activePageChanged()));
(*mCurrentWebBrowser)->loadUrl(currentUrl);
(*mCurrentWebBrowser)->tabWidget()->tabBar()->hide();
(*mCurrentWebBrowser)->tabWidget()->lineEdits()->hide();
}
else
(*mCurrentWebBrowser)->loadUrl(currentUrl);
mStackedWidget->setCurrentIndex(Tutorial);
UBApplication::applicationController->setMirrorSourceWidget((*mCurrentWebBrowser)->paintWidget());
mMainWindow->switchToWebWidget();
screenLayoutChanged();
bool mirroring = UBSettings::settings()->webShowPageImmediatelyOnMirroredScreen->get().toBool();
UBApplication::mainWindow->actionWebShowHideOnDisplay->setChecked(mirroring);
}
}
void UBWebController::show(WebInstance type)
{
switch(type)
{
case WebBrowser:
webBrowserInstance();
break;
case Tutorial:
tutorialWebInstance();
break;
default:
qCritical() << __FILE__ << " non supported web instance type " << QString::number(type) ;
break;
}
webBrowserInstance();
}
void UBWebController::setSourceWidget(QWidget* pWidget)
@ -277,16 +180,14 @@ void UBWebController::trapFlash()
void UBWebController::activePageChanged()
{
if (mCurrentWebBrowser && (*mCurrentWebBrowser)->currentTabWebView())
if (mCurrentWebBrowser && mCurrentWebBrowser->currentTabWebView())
{
if (mTrapFlashController && (*mCurrentWebBrowser)->currentTabWebView()->page())
{
mTrapFlashController->updateTrapFlashFromPage((*mCurrentWebBrowser)->currentTabWebView()->page()->currentFrame());
}
if (mTrapFlashController && mCurrentWebBrowser->currentTabWebView()->page())
mTrapFlashController->updateTrapFlashFromPage(mCurrentWebBrowser->currentTabWebView()->page()->currentFrame());
mMainWindow->actionWebTrap->setChecked(false);
QUrl latestUrl = (*mCurrentWebBrowser)->currentTabWebView()->url();
QUrl latestUrl = mCurrentWebBrowser->currentTabWebView()->url();
// TODO : Uncomment the next line to continue the youtube button bugfix
//UBApplication::mainWindow->actionWebOEmbed->setEnabled(hasEmbeddedContent());
@ -294,7 +195,7 @@ void UBWebController::activePageChanged()
UBApplication::mainWindow->actionWebOEmbed->setEnabled(isOEmbedable(latestUrl));
UBApplication::mainWindow->actionEduMedia->setEnabled(isEduMedia(latestUrl));
emit activeWebPageChanged((*mCurrentWebBrowser)->currentTabWebView());
emit activeWebPageChanged(mCurrentWebBrowser->currentTabWebView());
}
}
@ -302,7 +203,7 @@ bool UBWebController::hasEmbeddedContent()
{
bool bHasContent = false;
if(mCurrentWebBrowser){
QString html = (*mCurrentWebBrowser)->currentTabWebView()->webPage()->mainFrame()->toHtml();
QString html = mCurrentWebBrowser->currentTabWebView()->webPage()->mainFrame()->toHtml();
// search the presence of "+oembed"
QString query = "\\+oembed([^>]*)>";
@ -334,12 +235,11 @@ QPixmap UBWebController::captureCurrentPage()
QPixmap pix;
if (mCurrentWebBrowser
&& (*mCurrentWebBrowser)
&& (*mCurrentWebBrowser)->currentTabWebView()
&& (*mCurrentWebBrowser)->currentTabWebView()->page()
&& (*mCurrentWebBrowser)->currentTabWebView()->page()->mainFrame())
&& mCurrentWebBrowser->currentTabWebView()
&& mCurrentWebBrowser->currentTabWebView()->page()
&& mCurrentWebBrowser->currentTabWebView()->page()->mainFrame())
{
QWebFrame* frame = (*mCurrentWebBrowser)->currentTabWebView()->page()->mainFrame();
QWebFrame* frame = mCurrentWebBrowser->currentTabWebView()->page()->mainFrame();
QSize size = frame->contentsSize();
qDebug() << size;
@ -349,8 +249,8 @@ QPixmap UBWebController::captureCurrentPage()
QVariant width = frame->evaluateJavaScript("document.getElementsByTagName('body')[0].clientWidth");
QVariant height = frame->evaluateJavaScript("document.getElementsByTagName('body')[0].clientHeight");
QSize vieportSize = (*mCurrentWebBrowser)->currentTabWebView()->page()->viewportSize();
(*mCurrentWebBrowser)->currentTabWebView()->page()->setViewportSize(frame->contentsSize());
QSize vieportSize = mCurrentWebBrowser->currentTabWebView()->page()->viewportSize();
mCurrentWebBrowser->currentTabWebView()->page()->setViewportSize(frame->contentsSize());
pix = QPixmap(frame->geometry().width(), frame->geometry().height());
{
@ -374,7 +274,7 @@ QPixmap UBWebController::captureCurrentPage()
}
(*mCurrentWebBrowser)->currentTabWebView()->page()->setViewportSize(vieportSize);
mCurrentWebBrowser->currentTabWebView()->page()->setViewportSize(vieportSize);
}
return pix;
@ -383,10 +283,10 @@ QPixmap UBWebController::captureCurrentPage()
void UBWebController::setupPalettes()
{
if(!(*mToolsCurrentPalette))
if(!mToolsCurrentPalette)
{
(*mToolsCurrentPalette) = new UBWebToolsPalette(UBApplication::mainWindow, false);
UBApplication::boardController->paletteManager()->setCurrentWebToolsPalette(*mToolsCurrentPalette);
mToolsCurrentPalette = new UBWebToolsPalette(UBApplication::mainWindow);
UBApplication::boardController->paletteManager()->setCurrentWebToolsPalette(mToolsCurrentPalette);
#ifndef Q_WS_WIN
if (UBPlatformUtils::hasVirtualKeyboard() && UBApplication::boardController->paletteManager()->mKeyboardPalette)
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(closed()),
@ -402,15 +302,14 @@ void UBWebController::setupPalettes()
connect(mMainWindow->actionWebShowHideOnDisplay, SIGNAL(toggled(bool)), this, SLOT(toogleMirroring(bool)));
connect(mMainWindow->actionWebTrap, SIGNAL(toggled(bool)), this, SLOT(toggleWebTrap(bool)));
(*mToolsCurrentPalette)->hide();
(*mToolsCurrentPalette)->adjustSizeAndPosition();
mToolsCurrentPalette->hide();
mToolsCurrentPalette->adjustSizeAndPosition();
if (controlView()){
int left = controlView()->width() - 20 - (*mToolsCurrentPalette)->width();
int top = (controlView()->height() - (*mToolsCurrentPalette)->height()) / 2;
mToolsPalettePositionnedList[mStackedWidget->currentIndex()] = true;
(*mToolsCurrentPalette)->setCustomPosition(true);
(*mToolsCurrentPalette)->move(left, top);
int left = controlView()->width() - 20 - mToolsCurrentPalette->width();
int top = (controlView()->height() - mToolsCurrentPalette->height()) / 2;
mToolsCurrentPalette->setCustomPosition(true);
mToolsCurrentPalette->move(left, top);
}
mMainWindow->actionWebTools->trigger();
}
@ -419,17 +318,8 @@ void UBWebController::setupPalettes()
void UBWebController::toggleWebTrap(bool checked)
{
if (mCurrentWebBrowser
&& (*mCurrentWebBrowser)
&& (*mCurrentWebBrowser)->currentTabWebView())
{
(*mCurrentWebBrowser)->currentTabWebView()->setIsTrapping(checked);
}
}
void UBWebController::toggleWebToolsPalette(bool checked)
{
(*mToolsCurrentPalette)->setVisible(checked);
if (mCurrentWebBrowser && mCurrentWebBrowser->currentTabWebView())
mCurrentWebBrowser->currentTabWebView()->setIsTrapping(checked);
}
@ -438,28 +328,26 @@ void UBWebController::captureWindow()
QPixmap webPagePixmap = captureCurrentPage();
if (!webPagePixmap.isNull())
{
emit imageCaptured(webPagePixmap, true, (*mCurrentWebBrowser)->currentTabWebView()->url());
}
emit imageCaptured(webPagePixmap, true, mCurrentWebBrowser->currentTabWebView()->url());
}
void UBWebController::customCapture()
{
(*mToolsCurrentPalette)->setVisible(false);
mToolsCurrentPalette->setVisible(false);
qApp->processEvents();
UBCustomCaptureWindow customCaptureWindow((*mCurrentWebBrowser));
UBCustomCaptureWindow customCaptureWindow(mCurrentWebBrowser);
customCaptureWindow.show();
if (customCaptureWindow.execute(getScreenPixmap()) == QDialog::Accepted)
{
QPixmap selectedPixmap = customCaptureWindow.getSelectedPixmap();
emit imageCaptured(selectedPixmap, false, (*mCurrentWebBrowser)->currentTabWebView()->url());
emit imageCaptured(selectedPixmap, false, mCurrentWebBrowser->currentTabWebView()->url());
}
(*mToolsCurrentPalette)->setVisible(true);
mToolsCurrentPalette->setVisible(true);
}
@ -505,27 +393,27 @@ void UBWebController::adaptToolBar()
mMainWindow->actionWebReload->setVisible(highResolution);
mMainWindow->actionStopLoading->setVisible(highResolution);
if(mCurrentWebBrowser && (*mCurrentWebBrowser) )
(*mCurrentWebBrowser)->adaptToolBar(highResolution);
if(mCurrentWebBrowser )
mCurrentWebBrowser->adaptToolBar(highResolution);
}
void UBWebController::showTabAtTop(bool attop)
{
if (mCurrentWebBrowser && (*mCurrentWebBrowser))
(*mCurrentWebBrowser)->showTabAtTop(attop);
if (mCurrentWebBrowser)
mCurrentWebBrowser->showTabAtTop(attop);
}
void UBWebController::captureoEmbed()
{
if ( mCurrentWebBrowser && (*mCurrentWebBrowser) && (*mCurrentWebBrowser)->currentTabWebView()){
if ( mCurrentWebBrowser && mCurrentWebBrowser->currentTabWebView()){
// TODO : Uncomment the next lines to continue the youtube button bugfix
// getEmbeddableContent();
// And comment from here
QWebView* webView = (*mCurrentWebBrowser)->currentTabWebView();
QWebView* webView = mCurrentWebBrowser->currentTabWebView();
QUrl currentUrl = webView->url();
if (isOEmbedable(currentUrl))
@ -576,9 +464,9 @@ void UBWebController::getEmbeddableContent()
{
// Get the source code of the page
if(mCurrentWebBrowser){
QNetworkAccessManager* pNam = (*mCurrentWebBrowser)->currentTabWebView()->webPage()->networkAccessManager();
QNetworkAccessManager* pNam = mCurrentWebBrowser->currentTabWebView()->webPage()->networkAccessManager();
if(NULL != pNam){
QString html = (*mCurrentWebBrowser)->currentTabWebView()->webPage()->mainFrame()->toHtml();
QString html = mCurrentWebBrowser->currentTabWebView()->webPage()->mainFrame()->toHtml();
mOEmbedParser.setNetworkAccessManager(pNam);
// First, we have to check if there is some oembed content
@ -591,10 +479,9 @@ void UBWebController::getEmbeddableContent()
void UBWebController::captureEduMedia()
{
if (mCurrentWebBrowser && (*mCurrentWebBrowser)
&& (*mCurrentWebBrowser)->currentTabWebView())
if (mCurrentWebBrowser && mCurrentWebBrowser->currentTabWebView())
{
QWebView* webView = (*mCurrentWebBrowser)->currentTabWebView();
QWebView* webView = mCurrentWebBrowser->currentTabWebView();
QUrl currentUrl = webView->url();
if (isEduMedia(currentUrl))
@ -681,40 +568,31 @@ bool UBWebController::isEduMedia(const QUrl& pUrl)
void UBWebController::loadUrl(const QUrl& url)
{
bool webBrowserAlreadyInstanciated = dynamic_cast<WBBrowserWindow*>(mStackedWidget->widget(WebBrowser)) != NULL;
UBApplication::applicationController->showInternet();
if (UBSettings::settings()->webUseExternalBrowser->get().toBool())
{
QDesktopServices::openUrl(url);
}
else
{
if (!webBrowserAlreadyInstanciated) {
(*mCurrentWebBrowser)->loadUrl(url);
}
else {
(*mCurrentWebBrowser)->loadUrlInNewTab(url);
}
}
mCurrentWebBrowser->loadUrlInNewTab(url);
}
QWebView* UBWebController::createNewTab()
{
if (mCurrentWebBrowser && !(*mCurrentWebBrowser))
{
if (mCurrentWebBrowser)
UBApplication::applicationController->showInternet();
}
return (*mCurrentWebBrowser)->createNewTab();
return mCurrentWebBrowser->createNewTab();
}
void UBWebController::copy()
{
if (mCurrentWebBrowser && (*mCurrentWebBrowser) && (*mCurrentWebBrowser)->currentTabWebView())
if (mCurrentWebBrowser && mCurrentWebBrowser->currentTabWebView())
{
QWebView* webView = (*mCurrentWebBrowser)->currentTabWebView();
QWebView* webView = mCurrentWebBrowser->currentTabWebView();
QAction *act = webView->pageAction(QWebPage::Copy);
if(act)
act->trigger();
@ -724,9 +602,9 @@ void UBWebController::copy()
void UBWebController::paste()
{
if (mCurrentWebBrowser && (*mCurrentWebBrowser) && (*mCurrentWebBrowser)->currentTabWebView())
if (mCurrentWebBrowser && mCurrentWebBrowser->currentTabWebView())
{
QWebView* webView = (*mCurrentWebBrowser)->currentTabWebView();
QWebView* webView = mCurrentWebBrowser->currentTabWebView();
QAction *act = webView->pageAction(QWebPage::Paste);
if(act)
act->trigger();
@ -736,9 +614,9 @@ void UBWebController::paste()
void UBWebController::cut()
{
if (mCurrentWebBrowser && (*mCurrentWebBrowser) && (*mCurrentWebBrowser)->currentTabWebView())
if (mCurrentWebBrowser && mCurrentWebBrowser->currentTabWebView())
{
QWebView* webView = (*mCurrentWebBrowser)->currentTabWebView();
QWebView* webView = mCurrentWebBrowser->currentTabWebView();
QAction *act = webView->pageAction(QWebPage::Cut);
if(act)
act->trigger();

@ -58,18 +58,9 @@ class UBWebController : public QObject
QUrl currentPageUrl() const;
enum WebInstance
{
WebBrowser = 0, Tutorial, TotalNumberOfWebInstances
};
void show(WebInstance type = UBWebController::WebBrowser);
void show();
WBBrowserWindow* GetCurrentWebBrowser()
{
if( mCurrentWebBrowser != NULL ) return *mCurrentWebBrowser;
else return NULL;
};
WBBrowserWindow* GetCurrentWebBrowser(){return mCurrentWebBrowser;}
protected:
@ -81,7 +72,6 @@ class UBWebController : public QObject
void screenLayoutChanged();
void setSourceWidget(QWidget* pWidget);
void toggleWebToolsPalette(bool checked);
void captureWindow();
void customCapture();
void toogleMirroring(bool checked);
@ -106,25 +96,19 @@ class UBWebController : public QObject
private:
void initialiazemOEmbedProviders();
void tutorialWebInstance();
void webBrowserInstance();
void lookForEmbedContent(QString* pHtml, QString tag, QString attribute, QList<QUrl>* pList);
void checkForOEmbed(QString* pHtml);
QStackedWidget *mStackedWidget;
UBMainWindow *mMainWindow;
WBBrowserWindow* mWebBrowserList[TotalNumberOfWebInstances];
WBBrowserWindow** mCurrentWebBrowser;
WBBrowserWindow* mCurrentWebBrowser;
QWidget* mBrowserWidget;
UBTrapFlashController* mTrapFlashController;
UBWebToolsPalette** mToolsCurrentPalette;
UBWebToolsPalette* mToolsPaletteList[TotalNumberOfWebInstances];
UBWebToolsPalette* mToolsCurrentPalette;
bool mToolsPalettePositionned;
bool mToolsPalettePositionnedList[TotalNumberOfWebInstances];
bool mDownloadViewIsVisible;

@ -93,7 +93,7 @@ WBDownloadManager *WBBrowserWindow::sDownloadManager = 0;
WBHistoryManager *WBBrowserWindow::sHistoryManager = 0;
WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWindow, bool isViewerWebInstance)
WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWindow)
: QWidget(parent)
, mWebToolBar(0)
, mSearchToolBar(0)
@ -106,11 +106,8 @@ WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWi
defaultSettings->setAttribute(QWebSettings::PluginsEnabled, true);
setupMenu();
if(!isViewerWebInstance)
setupToolBar();
else{
setupToolBarForTutorial();
}
setupToolBar();
QVBoxLayout *layout = new QVBoxLayout;
layout->setSpacing(0);
@ -125,9 +122,8 @@ WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWi
connect(mTabWidget, SIGNAL(setCurrentTitle(const QString &)), this, SLOT(slotUpdateWindowTitle(const QString &)));
if (!isViewerWebInstance) {
connect(mTabWidget, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int)));
}
connect(mTabWidget, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int)));
connect(mTabWidget, SIGNAL(loadFinished(bool)), this, SIGNAL(activeViewPageChanged()));
@ -257,33 +253,6 @@ void WBBrowserWindow::setupToolBar()
mWebToolBar->show();
}
void WBBrowserWindow::setupToolBarForTutorial()
{
mWebToolBar = mUniboardMainWindow->tutorialToolBar;
mTabWidget->addWebAction(mUniboardMainWindow->actionWebBack, QWebPage::Back);
mTabWidget->addWebAction(mUniboardMainWindow->actionWebForward, QWebPage::Forward);
foreach (QWidget* menuWidget, mUniboardMainWindow->actionWebBack->associatedWidgets())
{
QToolButton *tb = qobject_cast<QToolButton*>(menuWidget);
if (tb && tb->menu())
tb->setMenu(NULL);
}
foreach (QWidget* menuWidget, mUniboardMainWindow->actionWebForward->associatedWidgets())
{
QToolButton *tb = qobject_cast<QToolButton*>(menuWidget);
if (tb && tb->menu())
tb->setMenu(NULL);
}
mWebToolBar->show();
}
void WBBrowserWindow::adaptToolBar(bool wideRes)
{

@ -88,7 +88,7 @@ class WBBrowserWindow : public QWidget
Q_OBJECT;
public:
WBBrowserWindow(QWidget *parent = 0, Ui::MainWindow* uniboardMainWindow = 0, bool isViewerWebInstance = false);
WBBrowserWindow(QWidget *parent = 0, Ui::MainWindow* uniboardMainWindow = 0);
~WBBrowserWindow();
QSize sizeHint() const;
@ -160,7 +160,6 @@ class WBBrowserWindow : public QWidget
void setupMenu();
void setupToolBar();
void setupToolBarForTutorial();
void updateStatusbarActionText(bool visible);
QToolBar *mWebToolBar;

Loading…
Cancel
Save