diff options
author | Tobias Markmann <tm@ayena.de> | 2013-10-24 12:56:39 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-10-26 17:17:50 (GMT) |
commit | d0966f59c32eb613c214af936f70866254e23d9b (patch) | |
tree | 64b63d09cb2b54fd943c4e7b2d237fb55e3745d0 /Swift/QtUI/QtTabbable.h | |
parent | 9720dedc1a2622a98e078b486886668b6e04ea0a (diff) | |
download | swift-d0966f59c32eb613c214af936f70866254e23d9b.zip swift-d0966f59c32eb613c214af936f70866254e23d9b.tar.bz2 |
Fix shortcut handling in QtTabbable.
Tested under Gnome 2.32, OS X 10.8 and Win 8.1.
Change-Id: If7d41c2254e53ad0d9b745e27dc1db77d64cec50
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/QtUI/QtTabbable.h')
-rw-r--r-- | Swift/QtUI/QtTabbable.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Swift/QtUI/QtTabbable.h b/Swift/QtUI/QtTabbable.h index 0b67b19..fc131ca 100644 --- a/Swift/QtUI/QtTabbable.h +++ b/Swift/QtUI/QtTabbable.h @@ -6,8 +6,9 @@ #pragma once -#include <QKeyEvent> #include <QWidget> +#include <QShortcut> +#include <QList> namespace Swift { @@ -15,16 +16,13 @@ namespace Swift { Q_OBJECT public: enum AlertType {NoActivity, WaitingActivity, ImpendingActivity}; - ~QtTabbable(); + virtual ~QtTabbable(); bool isWidgetSelected(); virtual AlertType getWidgetAlertState() {return NoActivity;} virtual int getCount() {return 0;} protected: - QtTabbable() : QWidget() {} - void keyPressEvent(QKeyEvent* event); - - protected slots: - void handleKeyPressEvent(QKeyEvent* event); + QtTabbable(); + bool event(QEvent* event); signals: void titleUpdated(); @@ -36,5 +34,8 @@ namespace Swift { void requestNextTab(); void requestActiveTab(); void requestFlash(); + + private: + QList<QShortcut*> shortcuts; }; } |