diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-04-21 23:47:31 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-04-21 23:47:31 +0200 |
commit | 22e3699db8ce3395495eecd90c4f3ad4d235b090 (patch) | |
tree | ca7e8a23335aacf8cf049362a99c84dbec5798a0 /src/webview.h | |
parent | Fixing (and updating) MainView code (diff) | |
download | rekonq-22e3699db8ce3395495eecd90c4f3ad4d235b090.tar.xz |
Merged quite all patches in Web{View,Page} class
...
Also updated rekonqui.rc
Diffstat (limited to 'src/webview.h')
-rw-r--r-- | src/webview.h | 45 |
1 files changed, 26 insertions, 19 deletions
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 <QWebView> @@ -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 |