From c2cf251dfe808e1a4e336dbf1cddc645d63c2e2f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 26 Jul 2009 18:51:13 +0200 Subject: A lot of fixes here: - CTRL + click browsing - mouse wheel gestures - cleaning a bit web* classes This has been possible restoring some code from rekonq 0.1 web classes implementation. --- src/webpage.h | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) (limited to 'src/webpage.h') diff --git a/src/webpage.h b/src/webpage.h index cdfb8f00..6a74c7bf 100644 --- a/src/webpage.h +++ b/src/webpage.h @@ -50,21 +50,42 @@ public slots: protected: WebPage *createWindow(WebWindowType type); virtual WebPage *newWindow(WebWindowType type); - - QString chooseFile(QWebFrame *frame, const QString &suggestedFile); - void javaScriptAlert(QWebFrame *frame, const QString &msg); - bool javaScriptConfirm(QWebFrame *frame, const QString &msg); - bool javaScriptPrompt(QWebFrame *frame, const QString &msg, const QString &defaultValue, QString *result); + virtual bool acceptNavigationRequest(QWebFrame *frame, + const QNetworkRequest &request, + NavigationType type); + + QString chooseFile(QWebFrame *frame, + const QString &suggestedFile); + + void javaScriptAlert(QWebFrame *frame, + const QString &msg); + + bool javaScriptConfirm(QWebFrame *frame, + const QString &msg); + + bool javaScriptPrompt(QWebFrame *frame, + const QString &msg, + const QString &defaultValue, QString *result); + + QObject *createPlugin(const QString &classId, + const QUrl &url, + const QStringList ¶mNames, + const QStringList ¶mValues); - QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); - -protected Q_SLOTS: + +protected Q_SLOTS: virtual void slotHandleUnsupportedContent(QNetworkReply *reply); virtual void slotDownloadRequested(const QNetworkRequest &request); private: + friend class WebView; + void viewErrorPage(QNetworkReply *); + + // keyboard/mouse modifiers + Qt::KeyboardModifiers m_keyboardModifiers; + Qt::MouseButtons m_pressedButtons; }; #endif -- cgit v1.2.1