m_widget->setPos(-p + m_overShoot);
}
- void cancelLeftMouseButtonPress(const QPoint & /*globalPressPos*/) {
- }
-
void sendEvent(QGraphicsItem *i, QEvent *e) {
m_ignoreEvents = true;
scene()->sendEvent(i, e);
/* TODO: Configurable text size ?? */
webview->settings()->setFontSize(QWebSettings::MinimumFontSize, 22);
+ webview->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
connect(webview, SIGNAL(loadFinished(bool)), SLOT(loadFinished(bool)));
connect(webview, SIGNAL(loadStarted()), SLOT(loadStarted()));
+ connect(webview->page(), SIGNAL(linkClicked(const QUrl &)), SLOT(showLink(const QUrl &)));
webview->setHtml(entry->content);
setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
}
-void ContentWindow::seeOriginal() {
+void ContentWindow::showLink(const QUrl &url) {
/* Attempt to launch external browser */
- if(!QDesktopServices::openUrl(entry->link))
- webview->setUrl(entry->link); /* Failed... Show inline */
+ if(!QDesktopServices::openUrl(url))
+ webview->setUrl(url); /* Failed... Show inline */
+}
+
+void ContentWindow::seeOriginal() {
+ showLink(entry->link);
}
void ContentWindow::closeEvent(QCloseEvent *event) {