From fc0e7683878ac10eb9a4675f61e6443a13ced946 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 21 Dec 2012 10:41:15 +0100 Subject: Implemented new shortcut key system. Fade in/out shortcut tooltips. Close pcpviewer on window close due to commit/nocommit/discard actions. --- client/widgets/widget.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'client/widgets/widget.h') diff --git a/client/widgets/widget.h b/client/widgets/widget.h index f2bf278..1af20af 100644 --- a/client/widgets/widget.h +++ b/client/widgets/widget.h @@ -33,6 +33,8 @@ #include #include #include +#include +#include "shortcuttooltip.h" #include "lua.h" @@ -130,6 +132,8 @@ public: virtual void setValues(); + bool eventFilter(QObject *obj, QEvent *event); + signals: void wasChanged(); @@ -143,9 +147,12 @@ public slots: void childWasChanged(); void runEventOnChange(bool deep = false); void runEventOnInit(bool deep = false); + virtual void shortcutActivated(); protected: - QWidget *widget; + void setWidget(QWidget *widget); + QWidget *getWidget(); + bool hideChildren; // Implement in subclasses to be able to block commits. @@ -180,7 +187,14 @@ protected: bool hasOnInitEvent; QString onInitEventScript; + QAction *shortcut_action; + QFrame *replwidget; + +private: + QWidget *widget; + bool important; + ShortcutTooltip *shortcut_label; }; /*** -- cgit v1.2.3