diff options
Diffstat (limited to 'Swift/QtUI/QtTabbable.h')
-rw-r--r-- | Swift/QtUI/QtTabbable.h | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/Swift/QtUI/QtTabbable.h b/Swift/QtUI/QtTabbable.h index 0b67b19..63c60f4 100644 --- a/Swift/QtUI/QtTabbable.h +++ b/Swift/QtUI/QtTabbable.h @@ -1,40 +1,42 @@ /* - * Copyright (c) 2010 Kevin Smith - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2014-2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ #pragma once -#include <QKeyEvent> -#include <QWidget> +#include <string> +#include <QWidget> namespace Swift { - class QtTabbable : public QWidget { - Q_OBJECT - public: - enum AlertType {NoActivity, WaitingActivity, ImpendingActivity}; - ~QtTabbable(); - bool isWidgetSelected(); - virtual AlertType getWidgetAlertState() {return NoActivity;} - virtual int getCount() {return 0;} - protected: - QtTabbable() : QWidget() {} - void keyPressEvent(QKeyEvent* event); + class QtTabbable : public QWidget { + Q_OBJECT + public: + enum AlertType {NoActivity, WaitingActivity, ImpendingActivity}; + virtual ~QtTabbable(); + + bool isWidgetSelected(); + virtual AlertType getWidgetAlertState() {return NoActivity;} + virtual size_t getCount() {return 0;} + virtual std::string getID() const = 0; + virtual void setEmphasiseFocus(bool /*emphasise*/) {} - protected slots: - void handleKeyPressEvent(QKeyEvent* event); + protected: + QtTabbable(); + virtual bool event(QEvent* event); + virtual void closeEvent(QCloseEvent* event); - signals: - void titleUpdated(); - void countUpdated(); - void windowClosing(); - void windowOpening(); - void wantsToActivate(); - void requestPreviousTab(); - void requestNextTab(); - void requestActiveTab(); - void requestFlash(); - }; + signals: + void titleUpdated(); + void countUpdated(); + void windowClosing(); + void windowOpening(); + void wantsToActivate(); + void requestPreviousTab(); + void requestNextTab(); + void requestActiveTab(); + void requestFlash(); + }; } |