diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-18 21:00:48 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-11-18 21:00:48 +0100 |
commit | c1973bc4d4ec9d8d18a690359a2d649905e35264 (patch) | |
tree | 045c4d5afc28422319c4e20322fbafe97fefd280 /plugingui/checkbox.cc | |
parent | f11a61a36fa5e21b0c6c2362af2952a3f87408a0 (diff) |
Refactored Slider. Expanded all event variable names (all was 'e' before). Changed all uievent enums to enum classes.
Diffstat (limited to 'plugingui/checkbox.cc')
-rw-r--r-- | plugingui/checkbox.cc | 14 |
1 files changed, 7 insertions, 7 deletions
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); |