summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-03-17 15:00:02 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-04-10 15:12:53 (GMT)
commit6a2e6d58233cbf40b34f962f2b2f9b1589969e13 (patch)
treeb0a62c32adc64fda30fc024f38acfb2a6da6351e /Swift/QtUI/QtChatTabsShortcutOnlySubstitute.h
parentb4e3ecf40ee5fda0ba46f714bd24a6d9f3a4cb5e (diff)
downloadswift-6a2e6d58233cbf40b34f962f2b2f9b1589969e13.zip
swift-6a2e6d58233cbf40b34f962f2b2f9b1589969e13.tar.bz2
Fix keyboard shortcuts for --no-tabs mode
This commit enables the following shortcuts for --no-tabs mode: - CTRL + Tab or CTRL/CMD + PageDown to switch to the next chat window - CTRL + Shift + Tab or CTRL/CMD + PageUp to switch to the previous chat window - CTRL/CMD + W to close the current chat window - ALT + A to switch to the next chat window with active messages Test-Information: Verified that the new shortcuts work as expected and verified that standard mode and netbook mode still work as usual. Change-Id: I3831b6c02f5d664cc8b21d7571e20aed00de89b4
Diffstat (limited to 'Swift/QtUI/QtChatTabsShortcutOnlySubstitute.h')
-rw-r--r--Swift/QtUI/QtChatTabsShortcutOnlySubstitute.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatTabsShortcutOnlySubstitute.h b/Swift/QtUI/QtChatTabsShortcutOnlySubstitute.h
new file mode 100644
index 0000000..069bb0b
--- /dev/null
+++ b/Swift/QtUI/QtChatTabsShortcutOnlySubstitute.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2015 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#pragma once
+
+#include <QWidget>
+#include <QList>
+
+#include <Swift/QtUI/QtChatTabsBase.h>
+
+class QShortcut;
+
+namespace Swift {
+
+class QtChatTabsShortcutOnlySubstitute : public QWidget, public QtChatTabsBase {
+ Q_OBJECT
+
+ public:
+ QtChatTabsShortcutOnlySubstitute();
+ virtual ~QtChatTabsShortcutOnlySubstitute();
+
+ virtual void addTab(QtTabbable* tab);
+
+ private slots:
+ void handleCloseTabShortcut();
+ void handleRequestedNextTab();
+ void handleRequestedActiveTab();
+ void handleRequestedPreviousTab();
+
+ private:
+ QList<QtTabbable*> tabbableWindows() const;
+
+ private:
+ QList<QShortcut*> shortcuts_;
+};
+
+}