From 63b34dc6ccd32c9bc7c3d8c0137ff12530238bde Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 30 Oct 2008 01:50:51 +0100 Subject: reKonq initial commit. Yeah! --- src/webview.h | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 src/webview.h (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h new file mode 100644 index 00000000..73c9dafb --- /dev/null +++ b/src/webview.h @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the demonstration applications of the Qt Toolkit. +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License versions 2.0 or 3.0 as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information +** to ensure GNU General Public Licensing requirements will be met: +** http://www.fsf.org/licensing/licenses/info/GPLv2.html and +** http://www.gnu.org/copyleft/gpl.html. In addition, as a special +** exception, Nokia gives you certain additional rights. These rights +** are described in the Nokia Qt GPL Exception version 1.3, included in +** the file GPL_EXCEPTION.txt in this package. +** +** Qt for Windows(R) Licensees +** As a special exception, Nokia, as the sole copyright holder for Qt +** Designer, grants users of the Qt/Eclipse Integration plug-in the +** right for the Qt/Eclipse Integration to link to functionality +** provided by Qt Designer and its related libraries. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +#ifndef WEBVIEW_H +#define WEBVIEW_H + +#include + +QT_BEGIN_NAMESPACE +class QAuthenticator; +class QMouseEvent; +class QNetworkProxy; +class QNetworkReply; +class QSslError; +QT_END_NAMESPACE + +class BrowserMainWindow; +class WebPage : public QWebPage { + Q_OBJECT + +signals: + void loadingUrl(const QUrl &url); + +public: + WebPage(QObject *parent = 0); + BrowserMainWindow *mainWindow(); + +protected: + bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); + QWebPage *createWindow(QWebPage::WebWindowType type); +#if !defined(QT_NO_UITOOLS) + QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); +#endif + +private slots: + void handleUnsupportedContent(QNetworkReply *reply); + +private: + friend class WebView; + + // set the webview mousepressedevent + Qt::KeyboardModifiers m_keyboardModifiers; + Qt::MouseButtons m_pressedButtons; + bool m_openInNewTab; + QUrl m_loadingUrl; +}; + +class WebView : public QWebView { + Q_OBJECT + +public: + WebView(QWidget *parent = 0); + WebPage *webPage() const { return m_page; } + + void loadUrl(const QUrl &url); + QUrl url() const; + + QString lastStatusBarText() const; + inline int progress() const { return m_progress; } + +protected: + void mousePressEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + void contextMenuEvent(QContextMenuEvent *event); + void wheelEvent(QWheelEvent *event); + +private slots: + void setProgress(int progress); + void loadFinished(); + void setStatusBarText(const QString &string); + void downloadRequested(const QNetworkRequest &request); + void openLinkInNewTab(); + +private: + QString m_statusBarText; + QUrl m_initialUrl; + int m_progress; + WebPage *m_page; +}; + +#endif -- cgit v1.2.1 From 2147abb0c02358b512925191d3e545574ec80e08 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 1 Nov 2008 13:04:26 +0100 Subject: Localizing strings.. --- src/webview.h | 56 +++++++++++++++++++------------------------------------- 1 file changed, 19 insertions(+), 37 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 73c9dafb..ea955a71 100644 --- a/src/webview.h +++ b/src/webview.h @@ -1,44 +1,26 @@ -/**************************************************************************** -** -** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the demonstration applications of the Qt Toolkit. -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information -** to ensure GNU General Public Licensing requirements will be met: -** http://www.fsf.org/licensing/licenses/info/GPLv2.html and -** http://www.gnu.org/copyleft/gpl.html. In addition, as a special -** exception, Nokia gives you certain additional rights. These rights -** are described in the Nokia Qt GPL Exception version 1.3, included in -** the file GPL_EXCEPTION.txt in this package. -** -** Qt for Windows(R) Licensees -** As a special exception, Nokia, as the sole copyright holder for Qt -** Designer, grants users of the Qt/Eclipse Integration plug-in the -** right for the Qt/Eclipse Integration to link to functionality -** provided by Qt Designer and its related libraries. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ +/* ============================================================ + * + * This file is a part of the reKonq project + * + * Copyright (C) 2008 by Andrea Diamantini + * + * + * This program is free software; you can redistribute it + * and/or modify it under the terms of the GNU General + * Public License as published by the Free Software Foundation; + * either version 2, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * ============================================================ */ #ifndef WEBVIEW_H #define WEBVIEW_H -#include +#include QT_BEGIN_NAMESPACE class QAuthenticator; -- cgit v1.2.1 From 4a0acb308cfecde67af334f48a521c221c4aee1a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 7 Nov 2008 00:17:56 +0100 Subject: Setting right license --- src/webview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index ea955a71..14fbc8aa 100644 --- a/src/webview.h +++ b/src/webview.h @@ -2,6 +2,7 @@  *  * This file is a part of the reKonq project  * + * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved * Copyright (C) 2008 by Andrea Diamantini  * * -- cgit v1.2.1 From bc901b1e79acf8c49fb76c3aeabbf59a49fc8276 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 28 Nov 2008 10:58:12 +0100 Subject: Various adjustments. Nothing really important.Various adjustments. Nothing really important... --- src/webview.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 14fbc8aa..ccd44a6f 100644 --- a/src/webview.h +++ b/src/webview.h @@ -45,9 +45,9 @@ public: protected: bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); QWebPage *createWindow(QWebPage::WebWindowType type); -#if !defined(QT_NO_UITOOLS) - QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); -#endif +// #if !defined(QT_NO_UITOOLS) +// QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); +// #endif private slots: void handleUnsupportedContent(QNetworkReply *reply); -- cgit v1.2.1 From 15ecefe10101dd068c4e075fca23ba64519bedb1 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 2 Dec 2008 16:22:28 +0100 Subject: New Bookmarks menu, sharing bkmrs with Konqueror (And that's reKonq 1st feature!!) --- src/webview.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index ccd44a6f..f81544a0 100644 --- a/src/webview.h +++ b/src/webview.h @@ -32,7 +32,9 @@ class QSslError; QT_END_NAMESPACE class BrowserMainWindow; -class WebPage : public QWebPage { + +class WebPage : public QWebPage +{ Q_OBJECT signals: @@ -45,9 +47,6 @@ public: protected: bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); QWebPage *createWindow(QWebPage::WebWindowType type); -// #if !defined(QT_NO_UITOOLS) -// QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); -// #endif private slots: void handleUnsupportedContent(QNetworkReply *reply); @@ -62,7 +61,8 @@ private: QUrl m_loadingUrl; }; -class WebView : public QWebView { +class WebView : public QWebView +{ Q_OBJECT public: -- cgit v1.2.1 From b9f8ccd9099fa48406203ad5c5389266b3318d88 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 5 Dec 2008 00:27:23 +0100 Subject: QUrl --> KUrl! --- src/webview.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index f81544a0..b2e97efb 100644 --- a/src/webview.h +++ b/src/webview.h @@ -21,6 +21,8 @@ #ifndef WEBVIEW_H #define WEBVIEW_H +#include + #include QT_BEGIN_NAMESPACE @@ -33,12 +35,13 @@ QT_END_NAMESPACE class BrowserMainWindow; + class WebPage : public QWebPage { Q_OBJECT signals: - void loadingUrl(const QUrl &url); + void loadingUrl(const QUrl &url); // WARNING has to be QUrl!! public: WebPage(QObject *parent = 0); @@ -58,9 +61,12 @@ private: Qt::KeyboardModifiers m_keyboardModifiers; Qt::MouseButtons m_pressedButtons; bool m_openInNewTab; - QUrl m_loadingUrl; + KUrl m_loadingUrl; }; + +// --------------------------------------------------------------------------------------------------------------------------------------- + class WebView : public QWebView { Q_OBJECT @@ -69,8 +75,8 @@ public: WebView(QWidget *parent = 0); WebPage *webPage() const { return m_page; } - void loadUrl(const QUrl &url); - QUrl url() const; + void loadUrl(const KUrl &url); + KUrl url() const; QString lastStatusBarText() const; inline int progress() const { return m_progress; } @@ -90,7 +96,7 @@ private slots: private: QString m_statusBarText; - QUrl m_initialUrl; + KUrl m_initialUrl; int m_progress; WebPage *m_page; }; -- cgit v1.2.1 From c2b2f0157103c147d4c30a79658f3096e9b68bf1 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 11 Dec 2008 11:02:07 +0100 Subject: ctrl + click open new tab AND select --- src/webview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index b2e97efb..62d4f3a5 100644 --- a/src/webview.h +++ b/src/webview.h @@ -67,6 +67,7 @@ private: // --------------------------------------------------------------------------------------------------------------------------------------- + class WebView : public QWebView { Q_OBJECT -- cgit v1.2.1 From 72cf5c1727345cca277b36702a59c58b9be5ef58 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 11 Dec 2008 14:34:42 +0100 Subject: ( SHIFT + ) CTRL + TAB switching. Finally!! --- src/webview.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 62d4f3a5..ae5230ce 100644 --- a/src/webview.h +++ b/src/webview.h @@ -82,12 +82,23 @@ public: QString lastStatusBarText() const; inline int progress() const { return m_progress; } +signals: + // switching tabs + void ctrlTabPressed(); + void shiftCtrlTabPressed(); + protected: void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event); void contextMenuEvent(QContextMenuEvent *event); void wheelEvent(QWheelEvent *event); + /** + * FIlters (SHIFT + ) CTRL + TAB events and emit (shift)ctrlTabPressed() + * to make switch tab + */ + void keyPressEvent(QKeyEvent *event); + private slots: void setProgress(int progress); void loadFinished(); -- cgit v1.2.1 From 19e901a0ca9630b2003dd24ccfa6da54eb70bb09 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 14 Dec 2008 18:27:17 +0100 Subject: adjusted rekonq name commented out (hopefully, for now) resizeEvents and focusInEvents in urlbar & searchbar --- src/webview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index ae5230ce..aa8efb81 100644 --- a/src/webview.h +++ b/src/webview.h @@ -1,6 +1,6 @@ /* ============================================================  * - * This file is a part of the reKonq project + * This file is a part of the rekonq project  * * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved * Copyright (C) 2008 by Andrea Diamantini -- cgit v1.2.1 From c7048563b95f8d27b20aac0a0e1fbc5c4584c514 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 27 Dec 2008 12:54:30 +0100 Subject: BrowserMainWindow --> MainWindow --- src/webview.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index aa8efb81..6710aac4 100644 --- a/src/webview.h +++ b/src/webview.h @@ -33,7 +33,7 @@ class QNetworkReply; class QSslError; QT_END_NAMESPACE -class BrowserMainWindow; +class MainWindow; class WebPage : public QWebPage @@ -45,7 +45,7 @@ signals: public: WebPage(QObject *parent = 0); - BrowserMainWindow *mainWindow(); + MainWindow *mainWindow(); protected: bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); -- cgit v1.2.1 From 8213829a830cabc2d9b44a43bba00f1dae77adc5 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 14 Feb 2009 12:06:54 +0100 Subject: Preliminary flash support --- src/webview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 6710aac4..6892fbd4 100644 --- a/src/webview.h +++ b/src/webview.h @@ -50,6 +50,7 @@ public: protected: bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); QWebPage *createWindow(QWebPage::WebWindowType type); + QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); private slots: void handleUnsupportedContent(QNetworkReply *reply); -- cgit v1.2.1 From 75310e79287a8bdffb86cc1dfda1a0f069383cd6 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 20 Feb 2009 19:06:41 +0100 Subject: Last commit before branching "di brutto".. --- src/webview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 6892fbd4..b45edc17 100644 --- a/src/webview.h +++ b/src/webview.h @@ -50,7 +50,7 @@ public: protected: bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); QWebPage *createWindow(QWebPage::WebWindowType type); - 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); private slots: void handleUnsupportedContent(QNetworkReply *reply); -- cgit v1.2.1 From 0b8ee38c5326fa668906a3f66a959423d84f85d1 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 10 Mar 2009 23:05:09 +0100 Subject: Some fixes --- src/webview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index b45edc17..6892fbd4 100644 --- a/src/webview.h +++ b/src/webview.h @@ -50,7 +50,7 @@ public: protected: bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); QWebPage *createWindow(QWebPage::WebWindowType type); -// 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); private slots: void handleUnsupportedContent(QNetworkReply *reply); -- cgit v1.2.1 From b5044060c9263d223c99055b9bd6b93c9fb966c7 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 11 Mar 2009 00:55:47 +0100 Subject: Forwarding class declarations to speed up compilation.. --- src/webview.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 6892fbd4..b3d6ca1b 100644 --- a/src/webview.h +++ b/src/webview.h @@ -21,19 +21,21 @@ #ifndef WEBVIEW_H #define WEBVIEW_H +// KDE Includes #include -#include +// Qt Includes +#include + +// Forward Declarations +class MainWindow; -QT_BEGIN_NAMESPACE +class QWebFrame; class QAuthenticator; class QMouseEvent; class QNetworkProxy; class QNetworkReply; class QSslError; -QT_END_NAMESPACE - -class MainWindow; class WebPage : public QWebPage @@ -68,6 +70,9 @@ private: // --------------------------------------------------------------------------------------------------------------------------------------- +// Qt Includes +#include + class WebView : public QWebView { -- cgit v1.2.1 From a82439eec3599ac3d07516bee77713deb599299f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 12 Mar 2009 01:05:59 +0100 Subject: Added some warning --- src/webview.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index b3d6ca1b..f2e8d7dc 100644 --- a/src/webview.h +++ b/src/webview.h @@ -47,6 +47,8 @@ signals: public: WebPage(QObject *parent = 0); + ~WebPage(); + MainWindow *mainWindow(); protected: @@ -100,7 +102,7 @@ protected: void wheelEvent(QWheelEvent *event); /** - * FIlters (SHIFT + ) CTRL + TAB events and emit (shift)ctrlTabPressed() + * Filters (SHIFT + ) CTRL + TAB events and emit (shift)ctrlTabPressed() * to make switch tab */ void keyPressEvent(QKeyEvent *event); -- cgit v1.2.1 From 39409ac6a2880ad815d6096231d0fcdcfd2547f6 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 22 Mar 2009 10:21:09 +0100 Subject: Fixed Copyright intro --- src/webview.h | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index f2e8d7dc..a7832cef 100644 --- a/src/webview.h +++ b/src/webview.h @@ -1,22 +1,23 @@ /* ============================================================ - * - * This file is a part of the rekonq project - * - * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved - * Copyright (C) 2008 by Andrea Diamantini - * - * - * This program is free software; you can redistribute it - * and/or modify it under the terms of the GNU General - * Public License as published by the Free Software Foundation; - * either version 2, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * ============================================================ */ +* +* This file is a part of the rekonq project +* +* Copyright (C) 2007-2008 Trolltech ASA. All rights reserved +* Copyright (C) 2008 by Andrea Diamantini +* +* +* This program is free software; you can redistribute it +* and/or modify it under the terms of the GNU General +* Public License as published by the Free Software Foundation; +* either version 2, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* ============================================================ */ + #ifndef WEBVIEW_H #define WEBVIEW_H -- cgit v1.2.1 From a934072cf9695e46e793898102590322f43c0733 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 28 Mar 2009 15:53:26 +0100 Subject: astyle. First round.. --- src/webview.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index a7832cef..de2822b9 100644 --- a/src/webview.h +++ b/src/webview.h @@ -39,7 +39,7 @@ class QNetworkReply; class QSslError; -class WebPage : public QWebPage +class WebPage : public QWebPage { Q_OBJECT @@ -77,19 +77,25 @@ private: #include -class WebView : public QWebView +class WebView : public QWebView { Q_OBJECT public: WebView(QWidget *parent = 0); - WebPage *webPage() const { return m_page; } + WebPage *webPage() const + { + return m_page; + } void loadUrl(const KUrl &url); KUrl url() const; QString lastStatusBarText() const; - inline int progress() const { return m_progress; } + inline int progress() const + { + return m_progress; + } signals: // switching tabs @@ -102,9 +108,9 @@ protected: void contextMenuEvent(QContextMenuEvent *event); void wheelEvent(QWheelEvent *event); - /** + /** * Filters (SHIFT + ) CTRL + TAB events and emit (shift)ctrlTabPressed() - * to make switch tab + * to make switch tab */ void keyPressEvent(QKeyEvent *event); -- cgit v1.2.1 From 22e3699db8ce3395495eecd90c4f3ad4d235b090 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 21 Apr 2009 23:47:31 +0200 Subject: Merged quite all patches in Web{View,Page} class ... Also updated rekonqui.rc --- src/webview.h | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index de2822b9..4e51d5e0 100644 --- a/src/webview.h +++ b/src/webview.h @@ -30,6 +30,9 @@ // Forward Declarations class MainWindow; +class Application; + +class KActionCollection; class QWebFrame; class QAuthenticator; @@ -50,12 +53,16 @@ public: WebPage(QObject *parent = 0); ~WebPage(); - MainWindow *mainWindow(); - protected: - bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); + bool acceptNavigationRequest(QWebFrame *frame, + const QNetworkRequest &request, + NavigationType type); + QWebPage *createWindow(QWebPage::WebWindowType type); - 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); private slots: void handleUnsupportedContent(QNetworkReply *reply); @@ -71,7 +78,7 @@ private: }; -// --------------------------------------------------------------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------------------------------- // Qt Includes #include @@ -83,19 +90,15 @@ class WebView : public QWebView public: WebView(QWidget *parent = 0); - WebPage *webPage() const - { - return m_page; - } - + WebPage *webPage() const { return m_page; } + + KActionCollection* actionCollection() const { return m_webActionCollection; } + void loadUrl(const KUrl &url); KUrl url() const; - QString lastStatusBarText() const; - inline int progress() const - { - return m_progress; - } + QString lastStatusBarText() const { return m_statusBarText; } + int progress() const { return m_progress; } signals: // switching tabs @@ -115,17 +118,21 @@ protected: void keyPressEvent(QKeyEvent *event); private slots: - void setProgress(int progress); + void setProgress(int progress) { m_progress = progress; } void loadFinished(); - void setStatusBarText(const QString &string); + void setStatusBarText(const QString &string) { m_statusBarText = string; } void downloadRequested(const QNetworkRequest &request); void openLinkInNewTab(); private: + KActionCollection *m_webActionCollection; + void fillWebActions(); + + WebPage *m_page; + + int m_progress; QString m_statusBarText; KUrl m_initialUrl; - int m_progress; - WebPage *m_page; }; #endif -- cgit v1.2.1 From 7557af13f9f904cb9a6240d2101fb14e1ffdca99 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 22 Apr 2009 01:33:28 +0200 Subject: Fixing Copyrights --- src/webview.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 4e51d5e0..ab4d0a68 100644 --- a/src/webview.h +++ b/src/webview.h @@ -3,7 +3,8 @@ * This file is a part of the rekonq project * * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved -* Copyright (C) 2008 by Andrea Diamantini +* Copyright (C) 2008-2009 by Andrea Diamantini +* Copyright (C) 2009 rekonq team. Please, see AUTHORS file for details * * * This program is free software; you can redistribute it -- cgit v1.2.1 From 2399843ceb70b45b2c1a47b680e11ba1e623ef45 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 25 Apr 2009 23:55:14 +0200 Subject: Another importing step. Need to fix cookies' classes and then (I think) we are near the goal.. --- src/webview.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index ab4d0a68..64994f83 100644 --- a/src/webview.h +++ b/src/webview.h @@ -93,7 +93,7 @@ public: WebView(QWidget *parent = 0); WebPage *webPage() const { return m_page; } - KActionCollection* actionCollection() const { return m_webActionCollection; } + KActionCollection* webActions(); void loadUrl(const KUrl &url); KUrl url() const; @@ -126,8 +126,7 @@ private slots: void openLinkInNewTab(); private: - KActionCollection *m_webActionCollection; - void fillWebActions(); + static KActionCollection* s_webActionCollection; WebPage *m_page; -- cgit v1.2.1 From e657ef44ef1eef1f998101ab3dcce1a251d729fc Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 26 Apr 2009 01:45:38 +0200 Subject: Fixed copyright strings, per file, as decided --- src/webview.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 64994f83..2cebfb2d 100644 --- a/src/webview.h +++ b/src/webview.h @@ -3,8 +3,9 @@ * This file is a part of the rekonq project * * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved +* Copyright (C) 2008 Benjamin C. Meyer * Copyright (C) 2008-2009 by Andrea Diamantini -* Copyright (C) 2009 rekonq team. Please, see AUTHORS file for details +* Copyright (C) 2009 by Paweł Prażak * * * This program is free software; you can redistribute it -- cgit v1.2.1 From 2af233a6d06eb15034ab03c376e126031495df53 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 29 Apr 2009 01:24:56 +0200 Subject: Removed loadUrl method from WebView --- src/webview.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 2cebfb2d..0a46f1e5 100644 --- a/src/webview.h +++ b/src/webview.h @@ -92,13 +92,12 @@ class WebView : public QWebView public: WebView(QWidget *parent = 0); - WebPage *webPage() const { return m_page; } KActionCollection* webActions(); - - void loadUrl(const KUrl &url); - KUrl url() const; + // inline + WebPage *webPage() const { return m_page; } + KUrl url() const { return KUrl(QWebView::url()); } QString lastStatusBarText() const { return m_statusBarText; } int progress() const { return m_progress; } @@ -133,7 +132,6 @@ private: int m_progress; QString m_statusBarText; - KUrl m_initialUrl; }; #endif -- cgit v1.2.1 From 82862fbd150afae0101757d1d6081e0e6ddf7baa Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 29 Apr 2009 11:24:11 +0200 Subject: astyle --- src/webview.h | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 0a46f1e5..11f04571 100644 --- a/src/webview.h +++ b/src/webview.h @@ -56,14 +56,14 @@ public: ~WebPage(); protected: - bool acceptNavigationRequest(QWebFrame *frame, - const QNetworkRequest &request, + bool acceptNavigationRequest(QWebFrame *frame, + const QNetworkRequest &request, NavigationType type); - + QWebPage *createWindow(QWebPage::WebWindowType type); - QObject *createPlugin(const QString &classId, - const QUrl &url, - const QStringList ¶mNames, + QObject *createPlugin(const QString &classId, + const QUrl &url, + const QStringList ¶mNames, const QStringList ¶mValues); private slots: @@ -92,14 +92,26 @@ class WebView : public QWebView public: WebView(QWidget *parent = 0); - + KActionCollection* webActions(); // inline - WebPage *webPage() const { return m_page; } - KUrl url() const { return KUrl(QWebView::url()); } - QString lastStatusBarText() const { return m_statusBarText; } - int progress() const { return m_progress; } + WebPage *webPage() const + { + return m_page; + } + KUrl url() const + { + return KUrl(QWebView::url()); + } + QString lastStatusBarText() const + { + return m_statusBarText; + } + int progress() const + { + return m_progress; + } signals: // switching tabs @@ -119,17 +131,23 @@ protected: void keyPressEvent(QKeyEvent *event); private slots: - void setProgress(int progress) { m_progress = progress; } + void setProgress(int progress) + { + m_progress = progress; + } void loadFinished(); - void setStatusBarText(const QString &string) { m_statusBarText = string; } + void setStatusBarText(const QString &string) + { + m_statusBarText = string; + } void downloadRequested(const QNetworkRequest &request); void openLinkInNewTab(); private: static KActionCollection* s_webActionCollection; - + WebPage *m_page; - + int m_progress; QString m_statusBarText; }; -- cgit v1.2.1 From fa45fb2d3811f52040a39281ed3ad864c05cc8b9 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 4 May 2009 11:17:12 +0200 Subject: new (and simpler) createWindow implementation.. this solves (A-LA rekonq) also kde-apps preview screenshots --- src/webview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 11f04571..1d07beac 100644 --- a/src/webview.h +++ b/src/webview.h @@ -75,7 +75,6 @@ private: // set the webview mousepressedevent Qt::KeyboardModifiers m_keyboardModifiers; Qt::MouseButtons m_pressedButtons; - bool m_openInNewTab; KUrl m_loadingUrl; }; -- cgit v1.2.1 From 16020654a30506582610564801aee3403fdefe6f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 4 May 2009 11:52:12 +0200 Subject: inlines IN line...;) --- src/webview.h | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) (limited to 'src/webview.h') diff --git a/src/webview.h b/src/webview.h index 1d07beac..7ab7f994 100644 --- a/src/webview.h +++ b/src/webview.h @@ -95,22 +95,10 @@ public: KActionCollection* webActions(); // inline - WebPage *webPage() const - { - return m_page; - } - KUrl url() const - { - return KUrl(QWebView::url()); - } - QString lastStatusBarText() const - { - return m_statusBarText; - } - int progress() const - { - return m_progress; - } + WebPage *webPage() const { return m_page; } + KUrl url() const { return KUrl(QWebView::url()); } + QString lastStatusBarText() const { return m_statusBarText; } + int progress() const { return m_progress; } signals: // switching tabs @@ -130,15 +118,9 @@ protected: void keyPressEvent(QKeyEvent *event); private slots: - void setProgress(int progress) - { - m_progress = progress; - } + void setProgress(int progress) { m_progress = progress; } void loadFinished(); - void setStatusBarText(const QString &string) - { - m_statusBarText = string; - } + void setStatusBarText(const QString &string) { m_statusBarText = string; } void downloadRequested(const QNetworkRequest &request); void openLinkInNewTab(); -- cgit v1.2.1