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/checkbox.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'client/widgets/checkbox.cc') diff --git a/client/widgets/checkbox.cc b/client/widgets/checkbox.cc index 7d81b1a..45f59c6 100644 --- a/client/widgets/checkbox.cc +++ b/client/widgets/checkbox.cc @@ -28,6 +28,8 @@ #include +#include "debug.h" + #include "common.h" #include "luawidget.h" @@ -35,7 +37,7 @@ CheckBox::CheckBox(QDomNode &node, MacroWindow *macrowindow) : Widget(node, macrowindow) { checkbox = new QCheckBox(); - widget = checkbox; + setWidget(checkbox); changedByUser = true; @@ -128,6 +130,12 @@ void CheckBox::setWdgValid(bool valid) checkbox->setPalette(palette); } +void CheckBox::shortcutActivated() +{ + setKeyboardFocus(); + checkbox->click();//setChecked(!checked()); +} + int chk_checked(lua_State *L) { wdg_userdata *wdgu; -- cgit v1.2.3