summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-05-01 01:58:29 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-05-01 01:58:29 +0200
commit070aabd69a693acefb8fbd152c467bace3600a67 (patch)
treeb925c5c23db500e2b3deca37e801681670db640b /src
parenti18n plural bugs. Courtesy patch of Kristol Baf (diff)
downloadrekonq-070aabd69a693acefb8fbd152c467bace3600a67.tar.xz
mouseDoubleClickEvent return, as decided with Avaddon
Diffstat (limited to 'src')
-rw-r--r--src/mainview.cpp10
-rw-r--r--src/mainview.h69
2 files changed, 37 insertions, 42 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index bb016872..d6b86452 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -694,3 +694,13 @@ QLabel *MainView::animatedLoading(int index, bool addMovie)
return label;
}
+
+void MainView::mouseDoubleClickEvent(QMouseEvent *event)
+{
+ if (!childAt(event->pos()))
+ {
+ newWebView(true);
+ return;
+ }
+ KTabWidget::mouseDoubleClickEvent(event);
+} \ No newline at end of file
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<WebView *> 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<WebView *> 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:
/**