equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the demos of the Qt Toolkit. |
7 ** This file is part of the demos of the Qt Toolkit. |
8 ** |
8 ** |
46 #include <QtWebKit> |
46 #include <QtWebKit> |
47 |
47 |
48 #include "ControlStrip.h" |
48 #include "ControlStrip.h" |
49 #include "TitleBar.h" |
49 #include "TitleBar.h" |
50 #include "flickcharm.h" |
50 #include "flickcharm.h" |
|
51 #include "webview.h" |
51 #include "ZoomStrip.h" |
52 #include "ZoomStrip.h" |
52 |
53 |
53 #if defined (Q_OS_SYMBIAN) |
54 #if defined (Q_OS_SYMBIAN) |
54 #include "sym_iap_util.h" |
55 #include "sym_iap_util.h" |
55 #endif |
56 #endif |
60 , m_webView(0) |
61 , m_webView(0) |
61 , m_progress(0) |
62 , m_progress(0) |
62 , m_currentZoom(100) |
63 , m_currentZoom(100) |
63 { |
64 { |
64 m_titleBar = new TitleBar(this); |
65 m_titleBar = new TitleBar(this); |
65 m_webView = new QWebView(this); |
66 m_webView = new WebView(this); |
66 m_zoomStrip = new ZoomStrip(this); |
67 m_zoomStrip = new ZoomStrip(this); |
67 m_controlStrip = new ControlStrip(this); |
68 m_controlStrip = new ControlStrip(this); |
68 |
69 |
69 m_zoomLevels << 30 << 50 << 67 << 80 << 90; |
70 m_zoomLevels << 30 << 50 << 67 << 80 << 90; |
70 m_zoomLevels << 100; |
71 m_zoomLevels << 100; |
93 connect(m_webView, SIGNAL(loadStarted()), SLOT(start())); |
94 connect(m_webView, SIGNAL(loadStarted()), SLOT(start())); |
94 connect(m_webView, SIGNAL(loadProgress(int)), SLOT(setProgress(int))); |
95 connect(m_webView, SIGNAL(loadProgress(int)), SLOT(setProgress(int))); |
95 connect(m_webView, SIGNAL(loadFinished(bool)), SLOT(finish(bool))); |
96 connect(m_webView, SIGNAL(loadFinished(bool)), SLOT(finish(bool))); |
96 connect(m_webView, SIGNAL(urlChanged(QUrl)), SLOT(updateTitleBar())); |
97 connect(m_webView, SIGNAL(urlChanged(QUrl)), SLOT(updateTitleBar())); |
97 |
98 |
98 m_webView->setHtml("Will try to load page soon!"); |
99 m_webView->setHtml("about:blank"); |
99 m_webView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
100 m_webView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
100 m_webView->setFocus(); |
101 m_webView->setFocus(); |
101 #ifdef Q_OS_SYMBIAN |
102 #ifdef Q_OS_SYMBIAN |
102 QTimer::singleShot(0, this, SLOT(setDefaultIap())); |
103 QTimer::singleShot(0, this, SLOT(setDefaultIap())); |
103 #endif |
104 #endif |