From 6cf7ab65f009f07cdc0ded9ec377665c124a84ac Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 8 Jan 2009 02:35:46 +0100 Subject: Created mainview! Other minor adjs.. --- src/mainview.h | 178 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 src/mainview.h (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h new file mode 100644 index 00000000..3ffeef32 --- /dev/null +++ b/src/mainview.h @@ -0,0 +1,178 @@ +/* ============================================================ + * + * 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 TABWIDGET_H +#define TABWIDGET_H + +// KDE Includes +#include + +// Qt Includes +#include + +class WebView; +/** + * A proxy object that connects a single browser action + * to one child webpage action at a time. + * + * Example usage: used to keep the main window stop action in sync with + * the current tabs webview's stop action. + */ +class WebActionMapper : public QObject +{ + Q_OBJECT + +public: + WebActionMapper(KAction *root, QWebPage::WebAction webAction, QObject *parent); + QWebPage::WebAction webAction() const; + void addChild(KAction *action); + void updateCurrent(QWebPage *currentParent); + +private slots: + void rootTriggered(); + void childChanged(); + void rootDestroyed(); + void currentDestroyed(); + +private: + QWebPage *m_currentParent; + KAction *m_root; + QWebPage::WebAction m_webAction; +}; + + +// ---------------------------------------------------------------------------------------------------------------------------- + +// Local Includes +#include "tabbar.h" + +// KDE Includes +#include +#include +#include + +// Qt Includes +#include + +QT_BEGIN_NAMESPACE +class QCompleter; +class QMenu; +class QStackedWidget; +QT_END_NAMESPACE + +/** + * TabWidget that contains WebViews and a stack widget of associated line edits. + * + * Connects up the current tab's signals to this class's signal and uses WebActionMapper + * to proxy the actions. + */ +class MainView : public KTabWidget +{ + Q_OBJECT + +public: + MainView(QWidget *parent = 0); + ~MainView(); + + +signals: + // tab widget signals + void loadPage(const QString &url); + void tabsChanged(); + void lastTabClosed(); + + // current tab signals + void setCurrentTitle(const QString &url); + void showStatusBarMessage(const QString &message); + void linkHovered(const QString &link); + void loadProgress(int progress); + void geometryChangeRequested(const QRect &geometry); + void menuBarVisibilityChangeRequested(bool visible); + void statusBarVisibilityChangeRequested(bool visible); + void toolBarVisibilityChangeRequested(bool visible); + void printRequested(QWebFrame *frame); + +public: + void clear(); + void addWebAction(KAction *action, QWebPage::WebAction webAction); + + KAction *newTabAction() const; + KAction *closeTabAction() const; + KAction *recentlyClosedTabsAction() const; + KAction *nextTabAction() const; + KAction *previousTabAction() const; + + QWidget *lineEditStack() const; + QLineEdit *currentLineEdit() const; + WebView *currentWebView() const; + WebView *webView(int index) const; + QLineEdit *lineEdit(int index) const; + int webViewIndex(WebView *webView) const; + +protected: + void mouseDoubleClickEvent(QMouseEvent *event); + void contextMenuEvent(QContextMenuEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + + +public slots: + void loadUrlInCurrentTab(const KUrl &url); + WebView *newTab(bool makeCurrent = true); + void cloneTab(int index = -1); + void closeTab(int index = -1); + void closeOtherTabs(int index); + void reloadTab(int index = -1); + void reloadAllTabs(); + void nextTab(); + void previousTab(); + +private slots: + void currentChanged(int index); + void aboutToShowRecentTabsMenu(); + void aboutToShowRecentTriggeredAction(QAction *action); // need QAction! + void webViewLoadStarted(); + void webViewIconChanged(); + void webViewTitleChanged(const QString &title); + void webViewUrlChanged(const QUrl &url); + void lineEditReturnPressed(); + void windowCloseRequested(); + void moveTab(int fromIndex, int toIndex); + +private: + KAction *m_recentlyClosedTabsAction; + KAction *m_newTabAction; + KAction *m_closeTabAction; + KAction *m_nextTabAction; + KAction *m_previousTabAction; + + KMenu *m_recentlyClosedTabsMenu; + static const int m_recentlyClosedTabsSize = 10; + QList m_recentlyClosedTabs; + QList m_webActionList; + + QCompleter *m_lineEditCompleter; + QStackedWidget *m_lineEdits; + TabBar *m_tabBar; +}; + +#endif // TABWIDGET_H + -- cgit v1.2.1 From a14af0874d4ceac743727af1665ea1d5f15839d9 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 9 Jan 2009 02:44:50 +0100 Subject: removed LoadPage method to semplify API Now we have just loadUrl slot to run pages.. --- src/mainview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 3ffeef32..0458611d 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -96,7 +96,7 @@ public: signals: // tab widget signals - void loadPage(const QString &url); + void loadUrlPage(const KUrl &url); void tabsChanged(); void lastTabClosed(); -- cgit v1.2.1 From 5391120be8cfd3a5d752ac8c7b66bf17b690f303 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 9 Jan 2009 12:10:19 +0100 Subject: BIG change!! Removed use of proxy webactionmapper to manage web actions.. --- src/mainview.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 0458611d..135bad13 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -23,11 +23,10 @@ #ifndef TABWIDGET_H #define TABWIDGET_H -// KDE Includes -#include - // Qt Includes #include +// KDE Includes +#include class WebView; /** @@ -75,7 +74,6 @@ private: QT_BEGIN_NAMESPACE class QCompleter; -class QMenu; class QStackedWidget; QT_END_NAMESPACE @@ -145,6 +143,17 @@ public slots: void nextTab(); void previousTab(); + // WEB slot actions + void slotWebReload(); + void slotWebBack(); + void slotWebForward(); + void slotWebUndo(); + void slotWebRedo(); + void slotWebCut(); + void slotWebCopy(); + void slotWebPaste(); + void slotWebSelectAll(); + private slots: void currentChanged(int index); void aboutToShowRecentTabsMenu(); -- cgit v1.2.1 From 910f1cc073f95f2928cb29d87561f71a27513872 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 9 Jan 2009 12:26:38 +0100 Subject: Removed WebActionMapper class! Now we are really starting to have adjam web browser.. --- src/mainview.h | 44 +++----------------------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 135bad13..9fdc24bd 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -2,7 +2,6 @@  *  * This file is a part of the rekonq project  * - * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved * Copyright (C) 2008 by Andrea Diamantini  * * @@ -23,54 +22,19 @@ #ifndef TABWIDGET_H #define TABWIDGET_H -// Qt Includes -#include -// KDE Includes -#include - -class WebView; -/** - * A proxy object that connects a single browser action - * to one child webpage action at a time. - * - * Example usage: used to keep the main window stop action in sync with - * the current tabs webview's stop action. - */ -class WebActionMapper : public QObject -{ - Q_OBJECT - -public: - WebActionMapper(KAction *root, QWebPage::WebAction webAction, QObject *parent); - QWebPage::WebAction webAction() const; - void addChild(KAction *action); - void updateCurrent(QWebPage *currentParent); - -private slots: - void rootTriggered(); - void childChanged(); - void rootDestroyed(); - void currentDestroyed(); - -private: - QWebPage *m_currentParent; - KAction *m_root; - QWebPage::WebAction m_webAction; -}; - - -// ---------------------------------------------------------------------------------------------------------------------------- - // Local Includes #include "tabbar.h" +#include "webview.h" // KDE Includes #include #include #include +#include // Qt Includes #include +#include QT_BEGIN_NAMESPACE class QCompleter; @@ -111,7 +75,6 @@ signals: public: void clear(); - void addWebAction(KAction *action, QWebPage::WebAction webAction); KAction *newTabAction() const; KAction *closeTabAction() const; @@ -176,7 +139,6 @@ private: KMenu *m_recentlyClosedTabsMenu; static const int m_recentlyClosedTabsSize = 10; QList m_recentlyClosedTabs; - QList m_webActionList; QCompleter *m_lineEditCompleter; QStackedWidget *m_lineEdits; -- cgit v1.2.1 From 886bdb99cd998c045e111a2d7e6f77e29d30b784 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 9 Jan 2009 16:37:41 +0100 Subject: Every action is now in ActionCollection!! Fully adopted xmlgui && mainview concepts.. --- src/mainview.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 9fdc24bd..fa5c805f 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -76,11 +76,7 @@ signals: public: void clear(); - KAction *newTabAction() const; - KAction *closeTabAction() const; KAction *recentlyClosedTabsAction() const; - KAction *nextTabAction() const; - KAction *previousTabAction() const; QWidget *lineEditStack() const; QLineEdit *currentLineEdit() const; @@ -131,10 +127,6 @@ private slots: private: KAction *m_recentlyClosedTabsAction; - KAction *m_newTabAction; - KAction *m_closeTabAction; - KAction *m_nextTabAction; - KAction *m_previousTabAction; KMenu *m_recentlyClosedTabsMenu; static const int m_recentlyClosedTabsSize = 10; -- cgit v1.2.1 From 8b0c34007ddf70de767b036a21d978befb9654d4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 12 Jan 2009 01:10:49 +0100 Subject: Fixed unconnected STOP web action --- src/mainview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index fa5c805f..1bb0bf6e 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -104,6 +104,7 @@ public slots: // WEB slot actions void slotWebReload(); + void slotWebStop(); void slotWebBack(); void slotWebForward(); void slotWebUndo(); -- cgit v1.2.1 From 1024f77ad03ef3d30d8be6aa61542a057a100868 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 28 Jan 2009 00:59:08 +0100 Subject: Removed unuseful "Select All" action. If someone needs it, I can try to implement it one day.. --- src/mainview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 1bb0bf6e..1f443a37 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -112,7 +112,6 @@ public slots: void slotWebCut(); void slotWebCopy(); void slotWebPaste(); - void slotWebSelectAll(); private slots: void currentChanged(int index); -- 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/mainview.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 1f443a37..05a9bb16 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -22,24 +22,24 @@ #ifndef TABWIDGET_H #define TABWIDGET_H -// Local Includes -#include "tabbar.h" -#include "webview.h" // KDE Includes -#include -#include #include -#include -// Qt Includes -#include -#include -QT_BEGIN_NAMESPACE +// Forward Declarations +class WebView; +class TabBar; + +class KUrl; +class KAction; +class KMenu; + +class QWebFrame; class QCompleter; class QStackedWidget; -QT_END_NAMESPACE +class QLineEdit; +class QUrl; /** * TabWidget that contains WebViews and a stack widget of associated line edits. -- cgit v1.2.1 From 5a8bb470bc30bf6a360661a87af783fd30588f5f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 21 Mar 2009 12:12:36 +0100 Subject: Always Show Tab Bar. Or not... --- src/mainview.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 05a9bb16..94b93c37 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -22,11 +22,9 @@ #ifndef TABWIDGET_H #define TABWIDGET_H - // KDE Includes #include - // Forward Declarations class WebView; class TabBar; @@ -41,12 +39,15 @@ class QStackedWidget; class QLineEdit; class QUrl; + /** * TabWidget that contains WebViews and a stack widget of associated line edits. * * Connects up the current tab's signals to this class's signal and uses WebActionMapper * to proxy the actions. + * */ + class MainView : public KTabWidget { Q_OBJECT @@ -126,6 +127,14 @@ private slots: void moveTab(int fromIndex, int toIndex); private: + + /** + * show and hide TabBar if user doesn't choose + * "Always Show TabBar" option + * + */ + void viewTabBar(); + KAction *m_recentlyClosedTabsAction; KMenu *m_recentlyClosedTabsMenu; @@ -137,5 +146,5 @@ private: TabBar *m_tabBar; }; -#endif // TABWIDGET_H +#endif -- 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/mainview.h | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 94b93c37..6ad623fe 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -1,21 +1,22 @@ /* ============================================================ - * - * 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. - * - * ============================================================ */ +* +* 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. +* +* ============================================================ */ + -- cgit v1.2.1 From 48b25611c94d380b40948a3de0bfab5678668e1d Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 25 Mar 2009 00:47:24 +0100 Subject: Huge update. Fixed quite all of the settings troubles.. From now on, we (mainly) go on WebView bugfixing.. --- src/mainview.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 6ad623fe..78fe2a2c 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -87,6 +87,13 @@ public: QLineEdit *lineEdit(int index) const; int webViewIndex(WebView *webView) const; + /** + * show and hide TabBar if user doesn't choose + * "Always Show TabBar" option + * + */ + void showTabBar(); + protected: void mouseDoubleClickEvent(QMouseEvent *event); void contextMenuEvent(QContextMenuEvent *event); @@ -129,13 +136,6 @@ private slots: private: - /** - * show and hide TabBar if user doesn't choose - * "Always Show TabBar" option - * - */ - void viewTabBar(); - KAction *m_recentlyClosedTabsAction; KMenu *m_recentlyClosedTabsMenu; -- 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/mainview.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 78fe2a2c..4e2d8b6e 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -87,8 +87,8 @@ public: QLineEdit *lineEdit(int index) const; int webViewIndex(WebView *webView) const; - /** - * show and hide TabBar if user doesn't choose + /** + * show and hide TabBar if user doesn't choose * "Always Show TabBar" option * */ -- cgit v1.2.1 From 0b151ba388d46c4112b4e861d45f0d8229c8a599 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 29 Mar 2009 08:04:31 +0200 Subject: API change (rename). In MainView, newTab --> newWebView --- src/mainview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 4e2d8b6e..56808c02 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -102,7 +102,7 @@ protected: public slots: void loadUrlInCurrentTab(const KUrl &url); - WebView *newTab(bool makeCurrent = true); + WebView *newWebView(bool makeCurrent = true); void cloneTab(int index = -1); void closeTab(int index = -1); void closeOtherTabs(int index); -- cgit v1.2.1 From efe551a8a25bd3e7f6f443710b9944f95921ae58 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 2 Apr 2009 21:32:37 +0200 Subject: Fixing mainview description --- src/mainview.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 56808c02..8652a6e5 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -42,10 +42,8 @@ class QUrl; /** - * TabWidget that contains WebViews and a stack widget of associated line edits. - * - * Connects up the current tab's signals to this class's signal and uses WebActionMapper - * to proxy the actions. + * This class represent rekonq Main View. It contains all WebViews and a stack widget + * of associated line edits. * */ @@ -148,4 +146,3 @@ private: }; #endif - -- cgit v1.2.1 From 87e45bf866e51193b8dad830ade347e06b8d497c Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 5 Apr 2009 16:59:46 +0200 Subject: Modified loading icon displaying, from KDE icon to loading one.. --- src/mainview.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 8652a6e5..f7e1bbb9 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -143,6 +143,8 @@ private: QCompleter *m_lineEditCompleter; QStackedWidget *m_lineEdits; TabBar *m_tabBar; + + QString loadingGitPath; }; #endif -- cgit v1.2.1 From e1781ecb6ce807cf4afd991d16c55b1d9b5f8e58 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 5 Apr 2009 17:16:28 +0200 Subject: Compiles just with 4.5.. --- src/mainview.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index f7e1bbb9..7ed750a6 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -29,6 +29,7 @@ // Forward Declarations class WebView; class TabBar; +class MainWindow; class KUrl; class KAction; @@ -52,7 +53,7 @@ class MainView : public KTabWidget Q_OBJECT public: - MainView(QWidget *parent = 0); + MainView(KMainWindow *parent); ~MainView(); @@ -145,6 +146,9 @@ private: TabBar *m_tabBar; QString loadingGitPath; + + // the MainWindow pointer + MainWindow *m_parent; }; #endif -- cgit v1.2.1 From 51a5174d280aedf3508c7f4339345370545906d8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 5 Apr 2009 17:30:51 +0200 Subject: tab bar refactoring --- src/mainview.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 7ed750a6..f7e1bbb9 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -29,7 +29,6 @@ // Forward Declarations class WebView; class TabBar; -class MainWindow; class KUrl; class KAction; @@ -53,7 +52,7 @@ class MainView : public KTabWidget Q_OBJECT public: - MainView(KMainWindow *parent); + MainView(QWidget *parent = 0); ~MainView(); @@ -146,9 +145,6 @@ private: TabBar *m_tabBar; QString loadingGitPath; - - // the MainWindow pointer - MainWindow *m_parent; }; #endif -- cgit v1.2.1 From 4de5fd991b2a797e8644c581db6fe41cc4791735 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 9 Apr 2009 18:46:46 +0200 Subject: Removed unuseful lasttabclosed signal in mainview. This becamed unuseful because of choose to do nothing if just 1 tab opened. --- src/mainview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index f7e1bbb9..41543b65 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -60,7 +60,6 @@ signals: // tab widget signals void loadUrlPage(const KUrl &url); void tabsChanged(); - void lastTabClosed(); // current tab signals void setCurrentTitle(const QString &url); -- cgit v1.2.1 From 6d37e632d445b51f5321b4138dcd1fce0cae30f9 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 10 Apr 2009 18:57:01 +0200 Subject: Fixed webview API Removed some unuseful comments --- src/mainview.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 41543b65..96417d4f 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -100,11 +100,11 @@ protected: public slots: void loadUrlInCurrentTab(const KUrl &url); WebView *newWebView(bool makeCurrent = true); - void cloneTab(int index = -1); - void closeTab(int index = -1); - void closeOtherTabs(int index); - void reloadTab(int index = -1); - void reloadAllTabs(); + void slotCloneTab(int index = -1); + void slotCloseTab(int index = -1); + void slotCloseOtherTabs(int index); + void slotReloadTab(int index = -1); + void slotReloadAllTabs(); void nextTab(); void previousTab(); @@ -120,7 +120,7 @@ public slots: void slotWebPaste(); private slots: - void currentChanged(int index); + void slotCurrentChanged(int index); void aboutToShowRecentTabsMenu(); void aboutToShowRecentTriggeredAction(QAction *action); // need QAction! void webViewLoadStarted(); @@ -129,7 +129,7 @@ private slots: void webViewUrlChanged(const QUrl &url); void lineEditReturnPressed(); void windowCloseRequested(); - void moveTab(int fromIndex, int toIndex); + void slotMoveTab(int fromIndex, int toIndex); private: -- cgit v1.2.1 From 7e0bc7dab417bd01acd50a9a95f324e5b8e1d79a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 10 Apr 2009 19:11:54 +0200 Subject: new tab has to have focusgit st --- src/mainview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 96417d4f..4203e272 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -99,7 +99,7 @@ protected: public slots: void loadUrlInCurrentTab(const KUrl &url); - WebView *newWebView(bool makeCurrent = true); + WebView *newWebView(); void slotCloneTab(int index = -1); void slotCloseTab(int index = -1); void slotCloseOtherTabs(int index); -- cgit v1.2.1 From ebc27b8734167c9aad4900d9baffd426556d1376 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 10 Apr 2009 19:38:30 +0200 Subject: Fixed tab moving, thanks to Qt 4.5 magic.. --- src/mainview.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 4203e272..9085aa46 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -129,10 +129,9 @@ private slots: void webViewUrlChanged(const QUrl &url); void lineEditReturnPressed(); void windowCloseRequested(); - void slotMoveTab(int fromIndex, int toIndex); -private: +private: KAction *m_recentlyClosedTabsAction; KMenu *m_recentlyClosedTabsMenu; -- cgit v1.2.1 From 3f6b179bb3004ee6d5df4e5039e90b7e5c53a8de Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 11 Apr 2009 19:10:28 +0200 Subject: Fixed lineEdits tabs movements (each site, its url..) --- src/mainview.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 9085aa46..617d81db 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -132,6 +132,8 @@ private slots: private: + void moveTab(int fromIndex, int toIndex); + KAction *m_recentlyClosedTabsAction; KMenu *m_recentlyClosedTabsMenu; -- cgit v1.2.1 From 841389f9389a04231920fe7a7b07358fa454b7ff Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 11 Apr 2009 19:18:15 +0200 Subject: Added some functions comment --- src/mainview.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 617d81db..6514c026 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -98,8 +98,12 @@ protected: public slots: - void loadUrlInCurrentTab(const KUrl &url); + /** + * Core browser slot. This create a new tab with a WebView inside + * for browsing. + */ WebView *newWebView(); + void loadUrlInCurrentTab(const KUrl &url); void slotCloneTab(int index = -1); void slotCloseTab(int index = -1); void slotCloseOtherTabs(int index); @@ -132,6 +136,9 @@ private slots: private: + /** + * this functions move tab informations "from index to index" + */ void moveTab(int fromIndex, int toIndex); KAction *m_recentlyClosedTabsAction; -- cgit v1.2.1 From 08380e9276505735f618a2a48de8d5de4807997f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 11 Apr 2009 19:32:21 +0200 Subject: Removed MainView events.. --- src/mainview.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 6514c026..cd71ca2c 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -91,11 +91,6 @@ public: */ void showTabBar(); -protected: - void mouseDoubleClickEvent(QMouseEvent *event); - void contextMenuEvent(QContextMenuEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - public slots: /** -- cgit v1.2.1 From 6e40be23ae449bf5f4f5dc3babf936e9efe07594 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 11 Apr 2009 20:02:50 +0200 Subject: animated loading. Imported following (a bit) Arora code.. --- src/mainview.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 6514c026..77d1d050 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -39,6 +39,7 @@ class QCompleter; class QStackedWidget; class QLineEdit; class QUrl; +class QLabel; /** @@ -141,6 +142,16 @@ private: */ void moveTab(int fromIndex, int toIndex); + /** + * This function creates (if not exists) and returns a QLabel + * with a loading QMovie. + * + * @param index the tab index where inserting the animated label + * + * @return animated label's pointer + */ + QLabel *animatedLoading(int index); + KAction *m_recentlyClosedTabsAction; KMenu *m_recentlyClosedTabsMenu; @@ -151,7 +162,7 @@ private: QStackedWidget *m_lineEdits; TabBar *m_tabBar; - QString loadingGitPath; + QString m_loadingGitPath; }; #endif -- cgit v1.2.1 From 686956e394c4a42ec097f281b3a36844b24471ee Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 11 Apr 2009 20:03:43 +0200 Subject: pedantic --- src/mainview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 77d1d050..995b4f2d 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -145,6 +145,7 @@ private: /** * This function creates (if not exists) and returns a QLabel * with a loading QMovie. + * Inspired from Arora's code. * * @param index the tab index where inserting the animated label * -- cgit v1.2.1 From 3607d40755d804d9dc9e755cabf17e12dc388e6a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 11 Apr 2009 20:10:32 +0200 Subject: pedantic --- src/mainview.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 147096d9..6a5d5f80 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -97,6 +97,8 @@ public slots: /** * Core browser slot. This create a new tab with a WebView inside * for browsing. + * + * @return a pointer to the new WebView */ WebView *newWebView(); void loadUrlInCurrentTab(const KUrl &url); -- cgit v1.2.1 From 61fa871b449995081eb11ed7ba9e6ee5efe7545f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 18 Apr 2009 03:24:06 +0200 Subject: pedantic --- src/mainview.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 6a5d5f80..5b3623cb 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -135,7 +135,11 @@ private slots: private: /** - * this functions move tab informations "from index to index" + * This functions move tab informations "from index to index" + * + * @param fromIndex the index from which we move + * + * @param toIndex the index to wchich we move */ void moveTab(int fromIndex, int toIndex); -- 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/mainview.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 5b3623cb..b3aa1f4b 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -2,7 +2,8 @@ * * This file is a part of the rekonq project * -* 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/mainview.h | 74 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 31 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index b3aa1f4b..bcefa165 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -24,23 +24,27 @@ #ifndef TABWIDGET_H #define TABWIDGET_H +// Local Includes +#include "webview.h" + // KDE Includes #include // Forward Declarations -class WebView; -class TabBar; +class QLineEdit; +class QUrl; +class QWebFrame; +class QLabel; -class KUrl; class KAction; +class KCompletion; class KMenu; +class KUrl; -class QWebFrame; -class QCompleter; -class QStackedWidget; -class QLineEdit; -class QUrl; -class QLabel; +class HistoryCompletionModel; +class StackedUrlBar; +class TabBar; +class UrlBar; /** @@ -62,12 +66,14 @@ signals: // tab widget signals void loadUrlPage(const KUrl &url); void tabsChanged(); + void lastTabClosed(); // current tab signals void setCurrentTitle(const QString &url); void showStatusBarMessage(const QString &message); void linkHovered(const QString &link); void loadProgress(int progress); + void geometryChangeRequested(const QRect &geometry); void menuBarVisibilityChangeRequested(bool visible); void statusBarVisibilityChangeRequested(bool visible); @@ -75,24 +81,27 @@ signals: void printRequested(QWebFrame *frame); public: - void clear(); - - KAction *recentlyClosedTabsAction() const; - - QWidget *lineEditStack() const; - QLineEdit *currentLineEdit() const; - WebView *currentWebView() const; +// void setupTabButtons(); + + UrlBar *urlBar(int index) const; + UrlBar *currentUrlBar() const { return urlBar(-1); } WebView *webView(int index) const; - QLineEdit *lineEdit(int index) const; - int webViewIndex(WebView *webView) const; - + QList tabs(); // ? + + // inlines + TabBar *tabBar() const { return m_tabBar; } + StackedUrlBar *urlBarStack() const { return m_urlBars; } + WebView *currentWebView() const { return webView(currentIndex()); } + int webViewIndex(WebView *webView) const { return indexOf(webView); } + KAction *recentlyClosedTabsAction() const { return m_recentlyClosedTabsAction; } + /** * show and hide TabBar if user doesn't choose * "Always Show TabBar" option * */ void showTabBar(); - + void clear(); public slots: /** @@ -101,8 +110,8 @@ public slots: * * @return a pointer to the new WebView */ - WebView *newWebView(); - void loadUrlInCurrentTab(const KUrl &url); + WebView *newWebView(bool makeCurrent = true); + void loadUrlInCurrentTab(const KUrl &url); // DEPRECATED void slotCloneTab(int index = -1); void slotCloseTab(int index = -1); void slotCloseOtherTabs(int index); @@ -126,43 +135,46 @@ private slots: void slotCurrentChanged(int index); void aboutToShowRecentTabsMenu(); void aboutToShowRecentTriggeredAction(QAction *action); // need QAction! + void webViewLoadStarted(); + void webViewLoadProgress(int progress); + void webViewLoadFinished(bool ok); void webViewIconChanged(); void webViewTitleChanged(const QString &title); void webViewUrlChanged(const QUrl &url); - void lineEditReturnPressed(); - void windowCloseRequested(); + void windowCloseRequested(); -private: /** * This functions move tab informations "from index to index" * * @param fromIndex the index from which we move * - * @param toIndex the index to wchich we move + * @param toIndex the index to which we move */ void moveTab(int fromIndex, int toIndex); +private: + /** * This function creates (if not exists) and returns a QLabel * with a loading QMovie. - * Inspired from Arora's code. + * Imported from Arora's code. * * @param index the tab index where inserting the animated label + * @param addMovie creates or not a loading movie * * @return animated label's pointer */ - QLabel *animatedLoading(int index); + QLabel *animatedLoading(int index, bool addMovie); + static const int m_recentlyClosedTabsSize = 10; KAction *m_recentlyClosedTabsAction; KMenu *m_recentlyClosedTabsMenu; - static const int m_recentlyClosedTabsSize = 10; QList m_recentlyClosedTabs; - QCompleter *m_lineEditCompleter; - QStackedWidget *m_lineEdits; + StackedUrlBar *m_urlBars; TabBar *m_tabBar; QString m_loadingGitPath; -- 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/mainview.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index bcefa165..81865ca6 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -2,8 +2,8 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2008-2009 by Andrea Diamantini -* Copyright (C) 2009 rekonq team. Please, see AUTHORS file for details +* Copyright (C) 2008 by Andrea Diamantini +* Copyright (C) 2009 by Paweł Prażak * * * This program is free software; you can redistribute it -- cgit v1.2.1 From 3ebb8cca124d70c5565656b26060892de551a880 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 26 Apr 2009 12:31:32 +0200 Subject: Removed KDE VERSION check. tabbar needs some love.. --- src/mainview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 81865ca6..facd865f 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -111,7 +111,7 @@ public slots: * @return a pointer to the new WebView */ WebView *newWebView(bool makeCurrent = true); - void loadUrlInCurrentTab(const KUrl &url); // DEPRECATED + void loadUrlInCurrentTab(const KUrl &url); void slotCloneTab(int index = -1); void slotCloseTab(int index = -1); void slotCloseOtherTabs(int index); -- cgit v1.2.1 From fdbd70a77a8c294e0a578073c738f3bc4dfa6ab5 Mon Sep 17 00:00:00 2001 From: Alexandr Domrachev Date: Mon, 27 Apr 2009 17:05:43 +0000 Subject: Some changes ported for merge to mainline (bookmarks & links handling related) Added author: me :) Bookmark owner: openFolderinTabs implemented Links handling ported from Pawel branch Issue #1 fixed --- src/mainview.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index facd865f..35f887fd 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -26,6 +26,7 @@ // Local Includes #include "webview.h" +#include "application.h" // KDE Includes #include @@ -48,7 +49,7 @@ class UrlBar; /** - * This class represent rekonq Main View. It contains all WebViews and a stack widget + * This class represent rekonq Main View. It contains all WebViews and a stack widget * of associated line edits. * */ @@ -64,7 +65,6 @@ public: signals: // tab widget signals - void loadUrlPage(const KUrl &url); void tabsChanged(); void lastTabClosed(); @@ -73,7 +73,7 @@ signals: void showStatusBarMessage(const QString &message); void linkHovered(const QString &link); void loadProgress(int progress); - + void geometryChangeRequested(const QRect &geometry); void menuBarVisibilityChangeRequested(bool visible); void statusBarVisibilityChangeRequested(bool visible); @@ -82,19 +82,19 @@ signals: public: // void setupTabButtons(); - + UrlBar *urlBar(int index) const; UrlBar *currentUrlBar() const { return urlBar(-1); } WebView *webView(int index) const; QList tabs(); // ? - + // inlines TabBar *tabBar() const { return m_tabBar; } StackedUrlBar *urlBarStack() const { return m_urlBars; } WebView *currentWebView() const { return webView(currentIndex()); } int webViewIndex(WebView *webView) const { return indexOf(webView); } KAction *recentlyClosedTabsAction() const { return m_recentlyClosedTabsAction; } - + /** * show and hide TabBar if user doesn't choose * "Always Show TabBar" option @@ -111,7 +111,6 @@ public slots: * @return a pointer to the new WebView */ WebView *newWebView(bool makeCurrent = true); - void loadUrlInCurrentTab(const KUrl &url); void slotCloneTab(int index = -1); void slotCloseTab(int index = -1); void slotCloseOtherTabs(int index); @@ -119,6 +118,7 @@ public slots: void slotReloadAllTabs(); void nextTab(); void previousTab(); + void openUrl(const KUrl& url, Rekonq::OpenType type=Rekonq::Current); // WEB slot actions void slotWebReload(); @@ -132,6 +132,7 @@ public slots: void slotWebPaste(); private slots: + KDE_DEPRECATED void loadUrlInCurrentTab(const KUrl &url); void slotCurrentChanged(int index); void aboutToShowRecentTabsMenu(); void aboutToShowRecentTriggeredAction(QAction *action); // need QAction! @@ -146,7 +147,7 @@ private slots: void windowCloseRequested(); /** - * This functions move tab informations "from index to index" + * This functions move tab informations "from index to index" * * @param fromIndex the index from which we move * @@ -157,12 +158,12 @@ private slots: private: /** - * This function creates (if not exists) and returns a QLabel + * This function creates (if not exists) and returns a QLabel * with a loading QMovie. - * Imported from Arora's code. + * Imported from Arora's code. * * @param index the tab index where inserting the animated label - * @param addMovie creates or not a loading movie + * @param addMovie creates or not a loading movie * * @return animated label's pointer */ -- cgit v1.2.1 From 61172b031c59d7f78447d224963b1333ce1d92bd Mon Sep 17 00:00:00 2001 From: Alexandr Domrachev Date: Mon, 27 Apr 2009 18:05:39 +0000 Subject: Open new tab on TabBar double click --- src/mainview.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 35f887fd..77976551 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -103,6 +103,9 @@ public: void showTabBar(); void clear(); +protected: + virtual void mouseDoubleClickEvent(QMouseEvent *event); + public slots: /** * Core browser slot. This create a new tab with a WebView inside -- cgit v1.2.1 From 2382db2c27728214cb9645fee3ef49222ca8dcd5 Mon Sep 17 00:00:00 2001 From: Alexandr Domrachev Date: Mon, 27 Apr 2009 18:42:51 +0000 Subject: TabBar context menu fix ported --- src/mainview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 77976551..97b9fbad 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -105,6 +105,7 @@ public: protected: virtual void mouseDoubleClickEvent(QMouseEvent *event); + virtual void contextMenuEvent(QContextMenuEvent *event); public slots: /** -- cgit v1.2.1 From 32da13f039241349c894f5c13cc1954c16c2e783 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 28 Apr 2009 03:19:14 +0200 Subject: Revert "Some changes ported for merge to mainline (bookmarks & links handling related)" links hadling problem This reverts commit fdbd70a77a8c294e0a578073c738f3bc4dfa6ab5. --- src/mainview.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 97b9fbad..5493d6ab 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -26,7 +26,6 @@ // Local Includes #include "webview.h" -#include "application.h" // KDE Includes #include @@ -49,7 +48,7 @@ class UrlBar; /** - * This class represent rekonq Main View. It contains all WebViews and a stack widget + * This class represent rekonq Main View. It contains all WebViews and a stack widget * of associated line edits. * */ @@ -65,6 +64,7 @@ public: signals: // tab widget signals + void loadUrlPage(const KUrl &url); void tabsChanged(); void lastTabClosed(); @@ -73,7 +73,7 @@ signals: void showStatusBarMessage(const QString &message); void linkHovered(const QString &link); void loadProgress(int progress); - + void geometryChangeRequested(const QRect &geometry); void menuBarVisibilityChangeRequested(bool visible); void statusBarVisibilityChangeRequested(bool visible); @@ -82,19 +82,19 @@ signals: public: // void setupTabButtons(); - + UrlBar *urlBar(int index) const; UrlBar *currentUrlBar() const { return urlBar(-1); } WebView *webView(int index) const; QList tabs(); // ? - + // inlines TabBar *tabBar() const { return m_tabBar; } StackedUrlBar *urlBarStack() const { return m_urlBars; } WebView *currentWebView() const { return webView(currentIndex()); } int webViewIndex(WebView *webView) const { return indexOf(webView); } KAction *recentlyClosedTabsAction() const { return m_recentlyClosedTabsAction; } - + /** * show and hide TabBar if user doesn't choose * "Always Show TabBar" option @@ -115,6 +115,7 @@ public slots: * @return a pointer to the new WebView */ WebView *newWebView(bool makeCurrent = true); + void loadUrlInCurrentTab(const KUrl &url); void slotCloneTab(int index = -1); void slotCloseTab(int index = -1); void slotCloseOtherTabs(int index); @@ -122,7 +123,6 @@ public slots: void slotReloadAllTabs(); void nextTab(); void previousTab(); - void openUrl(const KUrl& url, Rekonq::OpenType type=Rekonq::Current); // WEB slot actions void slotWebReload(); @@ -136,7 +136,6 @@ public slots: void slotWebPaste(); private slots: - KDE_DEPRECATED void loadUrlInCurrentTab(const KUrl &url); void slotCurrentChanged(int index); void aboutToShowRecentTabsMenu(); void aboutToShowRecentTriggeredAction(QAction *action); // need QAction! @@ -151,7 +150,7 @@ private slots: void windowCloseRequested(); /** - * This functions move tab informations "from index to index" + * This functions move tab informations "from index to index" * * @param fromIndex the index from which we move * @@ -162,12 +161,12 @@ private slots: private: /** - * This function creates (if not exists) and returns a QLabel + * This function creates (if not exists) and returns a QLabel * with a loading QMovie. - * Imported from Arora's code. + * Imported from Arora's code. * * @param index the tab index where inserting the animated label - * @param addMovie creates or not a loading movie + * @param addMovie creates or not a loading movie * * @return animated label's pointer */ -- cgit v1.2.1 From b71a1e3f03808450ad9b4474b2098e637e99e14e Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 28 Apr 2009 19:07:47 +0200 Subject: Faster Mainview load --- src/mainview.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 5493d6ab..529b441d 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -158,6 +158,8 @@ private slots: */ void moveTab(int fromIndex, int toIndex); + void postLaunch(); + private: /** -- cgit v1.2.1 From 4c3f484e1f697d93877db5425fb6ac6e6cab40a2 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 28 Apr 2009 19:15:42 +0200 Subject: Removed Qt4.4 compatibility slots --- src/mainview.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 529b441d..b48023ed 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -103,9 +103,6 @@ public: void showTabBar(); void clear(); -protected: - virtual void mouseDoubleClickEvent(QMouseEvent *event); - virtual void contextMenuEvent(QContextMenuEvent *event); public slots: /** -- cgit v1.2.1 From b60da9d6300097f31d163e86e2d689e9b2bc7cb6 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 29 Apr 2009 00:52:52 +0200 Subject: Removed unused MainView loadUrlPage signal --- src/mainview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index b48023ed..c6f26a66 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -64,7 +64,6 @@ public: signals: // tab widget signals - void loadUrlPage(const KUrl &url); void tabsChanged(); void lastTabClosed(); -- cgit v1.2.1 From 5fb7d909e87be4ea5a07b7a29271c96b7db4a9b3 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 29 Apr 2009 01:41:58 +0200 Subject: Fixed loading Url methods. Now in all rekonq code we have just a loadUrl method in mainview (doing the dirty job) and one in mainwindow, provided for convenience. Every class needing loading an url has a openUrl signal. Hope this should go well.. --- src/mainview.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index c6f26a66..89cb3553 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -111,7 +111,13 @@ public slots: * @return a pointer to the new WebView */ WebView *newWebView(bool makeCurrent = true); - void loadUrlInCurrentTab(const KUrl &url); + + /** + * Core browser slot. Load an url in a webview + * + * @param url The url to load + */ + void loadUrl(const KUrl &url); void slotCloneTab(int index = -1); void slotCloseTab(int index = -1); void slotCloseOtherTabs(int index); -- 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/mainview.h | 52 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 17 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 89cb3553..64c25fc0 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -48,7 +48,7 @@ class UrlBar; /** - * This class represent rekonq Main View. It contains all WebViews and a stack widget + * This class represent rekonq Main View. It contains all WebViews and a stack widget * of associated line edits. * */ @@ -72,7 +72,7 @@ signals: void showStatusBarMessage(const QString &message); void linkHovered(const QString &link); void loadProgress(int progress); - + void geometryChangeRequested(const QRect &geometry); void menuBarVisibilityChangeRequested(bool visible); void statusBarVisibilityChangeRequested(bool visible); @@ -81,19 +81,37 @@ signals: public: // void setupTabButtons(); - + UrlBar *urlBar(int index) const; - UrlBar *currentUrlBar() const { return urlBar(-1); } + UrlBar *currentUrlBar() const + { + return urlBar(-1); + } WebView *webView(int index) const; QList tabs(); // ? - + // inlines - TabBar *tabBar() const { return m_tabBar; } - StackedUrlBar *urlBarStack() const { return m_urlBars; } - WebView *currentWebView() const { return webView(currentIndex()); } - int webViewIndex(WebView *webView) const { return indexOf(webView); } - KAction *recentlyClosedTabsAction() const { return m_recentlyClosedTabsAction; } - + TabBar *tabBar() const + { + return m_tabBar; + } + StackedUrlBar *urlBarStack() const + { + return m_urlBars; + } + WebView *currentWebView() const + { + return webView(currentIndex()); + } + int webViewIndex(WebView *webView) const + { + return indexOf(webView); + } + KAction *recentlyClosedTabsAction() const + { + return m_recentlyClosedTabsAction; + } + /** * show and hide TabBar if user doesn't choose * "Always Show TabBar" option @@ -113,8 +131,8 @@ public slots: WebView *newWebView(bool makeCurrent = true); /** - * Core browser slot. Load an url in a webview - * + * Core browser slot. Load an url in a webview + * * @param url The url to load */ void loadUrl(const KUrl &url); @@ -152,7 +170,7 @@ private slots: void windowCloseRequested(); /** - * This functions move tab informations "from index to index" + * This functions move tab informations "from index to index" * * @param fromIndex the index from which we move * @@ -165,12 +183,12 @@ private slots: private: /** - * This function creates (if not exists) and returns a QLabel + * This function creates (if not exists) and returns a QLabel * with a loading QMovie. - * Imported from Arora's code. + * Imported from Arora's code. * * @param index the tab index where inserting the animated label - * @param addMovie creates or not a loading movie + * @param addMovie creates or not a loading movie * * @return animated label's pointer */ -- cgit v1.2.1 From 070aabd69a693acefb8fbd152c467bace3600a67 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 1 May 2009 01:58:29 +0200 Subject: mouseDoubleClickEvent return, as decided with Avaddon --- src/mainview.h | 69 +++++++++++++++++++++++----------------------------------- 1 file changed, 27 insertions(+), 42 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 64c25fc0..ca233872 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -61,6 +61,28 @@ public: MainView(QWidget *parent = 0); ~MainView(); +public: + + UrlBar *urlBar(int index) const; + UrlBar *currentUrlBar() const { return urlBar(-1); } + WebView *webView(int index) const; + QList tabs(); // ? + + // inlines + TabBar *tabBar() const { return m_tabBar; } + StackedUrlBar *urlBarStack() const { return m_urlBars; } + WebView *currentWebView() const { return webView(currentIndex()); } + int webViewIndex(WebView *webView) const { return indexOf(webView); } + KAction *recentlyClosedTabsAction() const { return m_recentlyClosedTabsAction; } + + /** + * show and hide TabBar if user doesn't choose + * "Always Show TabBar" option + * + */ + void showTabBar(); + void clear(); + signals: // tab widget signals @@ -79,48 +101,6 @@ signals: void toolBarVisibilityChangeRequested(bool visible); void printRequested(QWebFrame *frame); -public: -// void setupTabButtons(); - - UrlBar *urlBar(int index) const; - UrlBar *currentUrlBar() const - { - return urlBar(-1); - } - WebView *webView(int index) const; - QList tabs(); // ? - - // inlines - TabBar *tabBar() const - { - return m_tabBar; - } - StackedUrlBar *urlBarStack() const - { - return m_urlBars; - } - WebView *currentWebView() const - { - return webView(currentIndex()); - } - int webViewIndex(WebView *webView) const - { - return indexOf(webView); - } - KAction *recentlyClosedTabsAction() const - { - return m_recentlyClosedTabsAction; - } - - /** - * show and hide TabBar if user doesn't choose - * "Always Show TabBar" option - * - */ - void showTabBar(); - void clear(); - - public slots: /** * Core browser slot. This create a new tab with a WebView inside @@ -180,6 +160,11 @@ private slots: void postLaunch(); +protected: + + virtual void mouseDoubleClickEvent(QMouseEvent *event); + + private: /** -- cgit v1.2.1 From ca88e015f36d8f729e612e9a70c1b0ed65f0731d Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 1 May 2009 02:53:23 +0200 Subject: Open tabs in brackground. Step 1 --- src/mainview.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index ca233872..faa43be9 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -74,6 +74,7 @@ public: WebView *currentWebView() const { return webView(currentIndex()); } int webViewIndex(WebView *webView) const { return indexOf(webView); } KAction *recentlyClosedTabsAction() const { return m_recentlyClosedTabsAction; } + void setMakeTabCurrent( bool b) { makeTabCurrent = b; } /** * show and hide TabBar if user doesn't choose @@ -189,6 +190,8 @@ private: TabBar *m_tabBar; QString m_loadingGitPath; + + bool makeTabCurrent; }; #endif -- cgit v1.2.1 From 55816b45e681f10c9b45675dba65575d01d9efe3 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 1 May 2009 03:20:42 +0200 Subject: Managing user tab open settings. Step 2 --- src/mainview.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index faa43be9..75242fef 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -26,6 +26,7 @@ // Local Includes #include "webview.h" +#include "application.h" // KDE Includes #include @@ -109,7 +110,7 @@ public slots: * * @return a pointer to the new WebView */ - WebView *newWebView(bool makeCurrent = true); + WebView *newWebView(Rekonq::OpenType type = Rekonq::Default); /** * Core browser slot. Load an url in a webview -- cgit v1.2.1 From 0d324ed688eda0e1f172353d33ca33731b8f6764 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 2 May 2009 02:32:34 +0200 Subject: Open Back/Forward tabs fixed --- src/mainview.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainview.h') diff --git a/src/mainview.h b/src/mainview.h index 75242fef..372902dd 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -75,7 +75,7 @@ public: WebView *currentWebView() const { return webView(currentIndex()); } int webViewIndex(WebView *webView) const { return indexOf(webView); } KAction *recentlyClosedTabsAction() const { return m_recentlyClosedTabsAction; } - void setMakeTabCurrent( bool b) { makeTabCurrent = b; } + void setMakeBackTab(bool b) { m_makeBackTab = b; } /** * show and hide TabBar if user doesn't choose @@ -192,7 +192,7 @@ private: QString m_loadingGitPath; - bool makeTabCurrent; + bool m_makeBackTab; }; #endif -- cgit v1.2.1