16 */ |
16 */ |
17 |
17 |
18 #include <QGraphicsScene> |
18 #include <QGraphicsScene> |
19 #include <QGraphicsProxyWidget> |
19 #include <QGraphicsProxyWidget> |
20 #include <QGraphicsLinearLayout> |
20 #include <QGraphicsLinearLayout> |
|
21 #include <QWebFrame> |
21 |
22 |
22 #include "HelpDocumentLoader.h" |
23 #include "HelpDocumentLoader.h" |
23 #include "HelpCommon.h" |
24 #include "HelpCommon.h" |
24 #include "BrowserWrapper.h" |
25 #include "BrowserWrapper.h" |
|
26 |
|
27 #ifdef Q_OS_SYMBIAN |
|
28 #include <wrtcontroller.h> |
|
29 #endif |
25 |
30 |
26 BrowserWrapper::BrowserWrapper() |
31 BrowserWrapper::BrowserWrapper() |
27 { |
32 { |
28 } |
33 } |
29 |
34 |
31 { |
36 { |
32 } |
37 } |
33 |
38 |
34 void BrowserWrapper::init() |
39 void BrowserWrapper::init() |
35 { |
40 { |
|
41 #ifdef Q_OS_SYMBIAN |
|
42 WRT::WrtController* wrtController = new WRT::WrtController(this, WRT::GraphicsWebView); |
|
43 mWebView = wrtController->graphicsWebView(); |
|
44 #else |
36 mWebView = new QGraphicsWebView(); |
45 mWebView = new QGraphicsWebView(); |
37 mWebView->setZoomFactor(1.5); |
46 #endif |
38 mWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); |
47 mWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); |
|
48 mWebView->page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff); |
|
49 mWebView->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); |
39 mWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); |
50 mWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); |
40 mWebView->settings()->setAttribute(QWebSettings::JavascriptEnabled, true); |
51 mWebView->settings()->setAttribute(QWebSettings::JavascriptEnabled, true); |
41 mWebView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); |
52 mWebView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); |
42 mWebView->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true); |
53 mWebView->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true); |
43 connect(mWebView, SIGNAL(linkClicked(const QUrl&)), this, SIGNAL(linkClicked(const QUrl&))); |
54 connect(mWebView, SIGNAL(linkClicked(const QUrl&)), this, SIGNAL(linkClicked(const QUrl&))); |