summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-05-25 19:56:36 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-05-25 19:56:36 (GMT)
commitee9eff16cd7024bdbd889bab7612c63bcfe3cbe9 (patch)
treed71842bf0c48c7163b8e67f42126d7f4c72fd3e4 /Swift/QtUI/QtChatWindow.cpp
parent1934734a0a0ef46d5db2eeedfb380a269116e3b4 (diff)
downloadswift-contrib-ee9eff16cd7024bdbd889bab7612c63bcfe3cbe9.zip
swift-contrib-ee9eff16cd7024bdbd889bab7612c63bcfe3cbe9.tar.bz2
Support Ctrl-PgUp/PgDn for switch ing tabs
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 2f85571..544efd3 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -83,10 +83,18 @@ QtChatWindow::~QtChatWindow() {
void QtChatWindow::handleKeyPressEvent(QKeyEvent* event) {
int key = event->key();
Qt::KeyboardModifiers modifiers = event->modifiers();
- if (
- (key == Qt::Key_W && modifiers == Qt::ControlModifier)
- ) {
+ if (key == Qt::Key_W && modifiers == Qt::ControlModifier) {
close();
+ } else if (
+ (key == Qt::Key_PageUp && modifiers == Qt::ControlModifier)
+ || (key == Qt::Key_Left && modifiers == (Qt::ControlModifier & Qt::ShiftModifier))
+ ) {
+ emit requestPreviousTab();
+ } else if (
+ (key == Qt::Key_PageDown && modifiers == Qt::ControlModifier)
+ || (key == Qt::Key_Right && modifiers == (Qt::ControlModifier & Qt::ShiftModifier))
+ ) {
+ emit requestNextTab();
} else {
messageLog_->handleKeyPressEvent(event);
}