From 837dba6a6a22c15cee48f717f8283aa2318f40ed Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 2 Dec 2011 15:27:46 +0100 Subject: [PATCH] tutorial changes --- resources/forms/mainWindow.ui | 2 ++ src/web/browser/WBBrowserWindow.cpp | 38 ++++++++++++++++++++++++++++- src/web/browser/WBBrowserWindow.h | 1 + 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/resources/forms/mainWindow.ui b/resources/forms/mainWindow.ui index 30b42e4a..f7f395fa 100644 --- a/resources/forms/mainWindow.ui +++ b/resources/forms/mainWindow.ui @@ -203,6 +203,8 @@ true + + diff --git a/src/web/browser/WBBrowserWindow.cpp b/src/web/browser/WBBrowserWindow.cpp index 39dd61e0..e18779e0 100644 --- a/src/web/browser/WBBrowserWindow.cpp +++ b/src/web/browser/WBBrowserWindow.cpp @@ -96,8 +96,11 @@ WBBrowserWindow::WBBrowserWindow(QWidget *parent, Ui::MainWindow* uniboardMainWi defaultSettings->setAttribute(QWebSettings::PluginsEnabled, true); setupMenu(); - if(!isViewerWebInstance) +// if(!isViewerWebInstance) setupToolBar(); +// else{ +// setupToolBarForTutorial(); +// } QVBoxLayout *layout = new QVBoxLayout; layout->setSpacing(0); @@ -215,6 +218,39 @@ void WBBrowserWindow::setupToolBar() mWebToolBar->show(); } +void WBBrowserWindow::setupToolBarForTutorial() +{ + mWebToolBar = mUniboardMainWindow->tutorialToolBar; + + mTabWidget->addWebAction(mUniboardMainWindow->actionWebBack, QWebPage::Back); + mTabWidget->addWebAction(mUniboardMainWindow->actionWebForward, QWebPage::Forward); +// mTabWidget->addWebAction(mUniboardMainWindow->actionWebReload, QWebPage::Reload); +// mTabWidget->addWebAction(mUniboardMainWindow->actionStopLoading, QWebPage::Stop); + +// mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mTabWidget->lineEditStack()); + +// mSearchToolBar = new WBToolbarSearch(mWebToolBar); + +// mSearchAction = mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mSearchToolBar); + +// connect(mSearchToolBar, SIGNAL(search(const QUrl&)), SLOT(loadUrl(const QUrl&))); + +// mChaseWidget = new WBChaseWidget(this); +// mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mChaseWidget); + +// mWebToolBar->insertSeparator(mUniboardMainWindow->actionWebBigger); + +// connect(mUniboardMainWindow->actionHome, SIGNAL(triggered()), this , SLOT(slotHome())); + +// connect(mUniboardMainWindow->actionBookmarks, SIGNAL(triggered()), this , SLOT(bookmarks())); +// connect(mUniboardMainWindow->actionAddBookmark, SIGNAL(triggered()), this , SLOT(addBookmark())); +// connect(mUniboardMainWindow->actionWebBigger, SIGNAL(triggered()), this , SLOT(slotViewZoomIn())); +// connect(mUniboardMainWindow->actionWebSmaller, SIGNAL(triggered()), this , SLOT(slotViewZoomOut())); + + mWebToolBar->show(); +} + + void WBBrowserWindow::adaptToolBar(bool wideRes) { diff --git a/src/web/browser/WBBrowserWindow.h b/src/web/browser/WBBrowserWindow.h index fa7d6b6f..0cca883a 100644 --- a/src/web/browser/WBBrowserWindow.h +++ b/src/web/browser/WBBrowserWindow.h @@ -147,6 +147,7 @@ class WBBrowserWindow : public QWidget void setupMenu(); void setupToolBar(); + void setupToolBarForTutorial(); void updateStatusbarActionText(bool visible); QToolBar *mWebToolBar;