From c1973bc4d4ec9d8d18a690359a2d649905e35264 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 18 Nov 2015 21:00:48 +0100 Subject: Refactored Slider. Expanded all event variable names (all was 'e' before). Changed all uievent enums to enum classes. --- plugingui/checkbox.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugingui/checkbox.cc') diff --git a/plugingui/checkbox.cc b/plugingui/checkbox.cc index b9468d3..0d37127 100644 --- a/plugingui/checkbox.cc +++ b/plugingui/checkbox.cc @@ -32,7 +32,7 @@ namespace GUI { -CheckBox::CheckBox(Widget *parent) +CheckBox::CheckBox(Widget* parent) : Widget(parent) , bg_on(":switch_back_on.png") , bg_off(":switch_back_off.png") @@ -42,9 +42,9 @@ CheckBox::CheckBox(Widget *parent) { } -void CheckBox::buttonEvent(ButtonEvent *e) +void CheckBox::buttonEvent(ButtonEvent* buttonEvent) { - if(e->direction == ButtonEvent::Up || e->doubleclick) + if((buttonEvent->direction == Direction::up) || buttonEvent->doubleClick) { middle = false; internalSetChecked(!state); @@ -63,11 +63,11 @@ void CheckBox::setText(std::string text) repaintEvent(nullptr); } -void CheckBox::keyEvent(KeyEvent *e) +void CheckBox::keyEvent(KeyEvent* keyEvent) { - if(e->keycode == KeyEvent::KeyCharacter && e->text == " ") + if(keyEvent->keycode == Key::character && keyEvent->text == " ") { - if(e->direction == KeyEvent::Up) + if(keyEvent->direction == Direction::up) { middle = false; internalSetChecked(!state); @@ -81,7 +81,7 @@ void CheckBox::keyEvent(KeyEvent *e) } } -void CheckBox::repaintEvent(RepaintEvent *e) +void CheckBox::repaintEvent(RepaintEvent* repaintEvent) { Painter p(*this); -- cgit v1.2.3