summaryrefslogtreecommitdiffstats
path: root/demos/embedded/anomaly
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-06-25 20:20:49 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-06-25 20:20:49 (GMT)
commitd48bcd8ef8ed0f0a2331e9d2fbae272d153422cf (patch)
tree563d5496f6863b5629f08ce6864cf7859dd8169f /demos/embedded/anomaly
parent8aafaa65a1d16f8b982279f5aceedf1e281ddb5a (diff)
downloadQt-d48bcd8ef8ed0f0a2331e9d2fbae272d153422cf.zip
Qt-d48bcd8ef8ed0f0a2331e9d2fbae272d153422cf.tar.gz
Qt-d48bcd8ef8ed0f0a2331e9d2fbae272d153422cf.tar.bz2
Showing the anomaly UI before setting the IAP.
This is achieved by using QTimer::singleShot after the QWebView object is shown with simple text page.
Diffstat (limited to 'demos/embedded/anomaly')
-rw-r--r--demos/embedded/anomaly/src/BrowserView.cpp16
-rw-r--r--demos/embedded/anomaly/src/BrowserView.h3
-rw-r--r--demos/embedded/anomaly/src/Main.cpp5
3 files changed, 18 insertions, 6 deletions
diff --git a/demos/embedded/anomaly/src/BrowserView.cpp b/demos/embedded/anomaly/src/BrowserView.cpp
index e81d834..4ef1920 100644
--- a/demos/embedded/anomaly/src/BrowserView.cpp
+++ b/demos/embedded/anomaly/src/BrowserView.cpp
@@ -32,6 +32,10 @@
#include "flickcharm.h"
#include "ZoomStrip.h"
+#if defined (Q_OS_SYMBIAN)
+#include "sym_iap_util.h"
+#endif
+
BrowserView::BrowserView(QWidget *parent)
: QWidget(parent)
, m_titleBar(0)
@@ -73,9 +77,12 @@ void BrowserView::initialize()
connect(m_webView, SIGNAL(loadFinished(bool)), SLOT(finish(bool)));
connect(m_webView, SIGNAL(urlChanged(QUrl)), SLOT(updateTitleBar()));
- m_webView->load(QUrl("http://news.bbc.co.uk/text_only.stm"));
+ m_webView->setHtml("Will try to load page soon!");
m_webView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_webView->setFocus();
+#ifdef Q_OS_SYMBIAN
+ QTimer::singleShot(0, this, SLOT(setDefaultIap()));
+#endif
}
void BrowserView::start()
@@ -146,6 +153,13 @@ void BrowserView::resizeEvent(QResizeEvent *event)
int zh = m_zoomStrip->sizeHint().height();
m_zoomStrip->move(width() - zw, (height() - zh) / 2);
}
+#ifdef Q_OS_SYMBIAN
+void BrowserView::setDefaultIap()
+{
+ qt_SetDefaultIap();
+ m_webView->load(QUrl("http://news.bbc.co.uk/text_only.stm"));
+}
+#endif
void BrowserView::navigate(const QUrl &url)
{
diff --git a/demos/embedded/anomaly/src/BrowserView.h b/demos/embedded/anomaly/src/BrowserView.h
index 36d3291..0dba14e 100644
--- a/demos/embedded/anomaly/src/BrowserView.h
+++ b/demos/embedded/anomaly/src/BrowserView.h
@@ -44,6 +44,9 @@ public slots:
void navigate(const QUrl &url);
void zoomIn();
void zoomOut();
+#ifdef Q_OS_SYMBIAN
+ void setDefaultIap();
+#endif
private slots:
void initialize();
diff --git a/demos/embedded/anomaly/src/Main.cpp b/demos/embedded/anomaly/src/Main.cpp
index 2be6143..d861857 100644
--- a/demos/embedded/anomaly/src/Main.cpp
+++ b/demos/embedded/anomaly/src/Main.cpp
@@ -27,10 +27,6 @@
#include "BrowserWindow.h"
-#if defined (Q_OS_SYMBIAN)
-#include "sym_iap_util.h"
-#endif
-
int main(int argc, char *argv[])
{
#if !defined(Q_WS_S60)
@@ -47,7 +43,6 @@ int main(int argc, char *argv[])
window.showFullScreen();
QWebSettings::globalSettings()->setObjectCacheCapacities(128*1024, 1024*1024, 1024*1024);
QWebSettings::globalSettings()->setMaximumPagesInCache(3);
- qt_SetDefaultIap();
#else
window.resize(360, 640);
window.show();