From 2ac46095b581caf2783755f20b39c4f3f021e323 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 13 Aug 2013 12:02:18 +0200 Subject: [PATCH] added menu item that allows to reach the tutorial --- resources/forms/mainWindow.ui | 24 ++++++++++++------------ src/core/UBApplication.cpp | 2 ++ src/web/UBWebController.cpp | 7 +++++++ src/web/UBWebController.h | 4 +++- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/resources/forms/mainWindow.ui b/resources/forms/mainWindow.ui index 1d0d6f4b..6e4b8080 100644 --- a/resources/forms/mainWindow.ui +++ b/resources/forms/mainWindow.ui @@ -1537,18 +1537,6 @@ Import eduMedia simulation - - - - :/images/toolbar/tutorial.png:/images/toolbar/tutorial.png - - - Tutorial - - - Open the tutorial - - @@ -1620,6 +1608,18 @@ Remove the backgound + + + + :/images/toolbar/tutorial.png:/images/toolbar/tutorial.png + + + Open Tutorial + + + Open the tutorial web page + + diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index 05981231..6e1d7ee1 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -523,6 +523,8 @@ void UBApplication::decorateActionMenu(QAction* action) menu->addAction(mainWindow->actionHideApplication); menu->addAction(mainWindow->actionSleep); + menu->addSeparator(); + menu->addAction(mainWindow->actionOpenTutorial); menu->addSeparator(); menu->addAction(mainWindow->actionPreferences); menu->addAction(mainWindow->actionMultiScreen); diff --git a/src/web/UBWebController.cpp b/src/web/UBWebController.cpp index 4701ccea..572f93b1 100644 --- a/src/web/UBWebController.cpp +++ b/src/web/UBWebController.cpp @@ -74,6 +74,8 @@ UBWebController::UBWebController(UBMainWindow* mainWindow) // TODO : Comment the next line to continue the Youtube button bugfix initialiazemOEmbedProviders(); + + connect(mMainWindow->actionOpenTutorial,SIGNAL(triggered()),this, SLOT(onOpenTutorial())); } @@ -82,6 +84,11 @@ UBWebController::~UBWebController() // NOOP } +void UBWebController::onOpenTutorial() +{ + loadUrl(QUrl("http://tutorial.openboard.org")); +} + void UBWebController::initialiazemOEmbedProviders() { mOEmbedProviders << "5min.com"; diff --git a/src/web/UBWebController.h b/src/web/UBWebController.h index 1f9cbbed..43bd204c 100644 --- a/src/web/UBWebController.h +++ b/src/web/UBWebController.h @@ -40,7 +40,7 @@ class UBServerXMLHttpRequest; class UBWebController : public QObject { - Q_OBJECT; + Q_OBJECT public: UBWebController(UBMainWindow* mainWindow); @@ -125,6 +125,8 @@ class UBWebController : public QObject void toggleWebTrap(bool checked); void onOEmbedParsed(QVector contents); + void onOpenTutorial(); + signals: /**