summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-04 12:36:08 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-04 12:36:08 +0200
commit0879e9b8526783505ffc63a74c588fd1abb015c6 (patch)
treea680780cfddea40c4cf1cc11195d26a107fb1736 /src/mainwindow.cpp
parentView image action (diff)
downloadrekonq-0879e9b8526783505ffc63a74c588fd1abb015c6.tar.xz
General (shift +) ctrl tab switch management.
This let tab switch work also when webview is not focused :)
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b7996a3a..60c4a05e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -193,6 +193,10 @@ void MainWindow::postLaunch()
connect(m_view, SIGNAL(setCurrentTitle(const QString &)), this, SLOT(slotUpdateWindowTitle(const QString &)));
connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *)));
+ // (shift +) ctrl + tab switching
+ connect(this, SIGNAL(ctrlTabPressed()), m_view, SLOT(nextTab()));
+ connect(this, SIGNAL(shiftCtrlTabPressed()), m_view, SLOT(previousTab()));
+
// update toolbar actions signals
connect(m_view, SIGNAL(tabsChanged()), this, SLOT(slotUpdateActions()));
connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(slotUpdateActions()));
@@ -872,6 +876,18 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
return;
}
+ if ((event->modifiers() == Qt::ControlModifier) && (event->key() == Qt::Key_Tab))
+ {
+ emit ctrlTabPressed();
+ return;
+ }
+
+ if ((event->modifiers() == Qt::ControlModifier + Qt::ShiftModifier) && (event->key() == Qt::Key_Backtab))
+ {
+ emit shiftCtrlTabPressed();
+ return;
+ }
+
KMainWindow::keyPressEvent(event);
}