summaryrefslogtreecommitdiff
path: root/plugingui/knob.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-09-28 15:30:02 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-09-28 15:30:02 +0200
commit1c9341fbe0b27fd7457aecedf4d98fb6d02c236a (patch)
tree6adc93a550497dcaefd66a6910b786b5ebce7b89 /plugingui/knob.h
parent9f01114c286cc2a19683ff69efc0381fc9b4be90 (diff)
Use new style guide on already refactored files.
Diffstat (limited to 'plugingui/knob.h')
-rw-r--r--plugingui/knob.h51
1 files changed, 25 insertions, 26 deletions
diff --git a/plugingui/knob.h b/plugingui/knob.h
index da03710..a0a093f 100644
--- a/plugingui/knob.h
+++ b/plugingui/knob.h
@@ -36,45 +36,44 @@ namespace GUI {
class Knob : public Widget {
public:
- Knob(Widget *parent);
+ Knob(Widget *parent);
- bool catchMouse() override { return true; }
- bool isFocusable() override { return true; }
+ bool catchMouse() override { return true; }
+ bool isFocusable() override { return true; }
- void setValue(float value);
- float value();
+ void setValue(float value);
+ float value();
- Notifier<float> valueChangedNotifier; // (float newValue)
+ Notifier<float> valueChangedNotifier; // (float newValue)
protected:
- virtual void clicked() {}
+ virtual void clicked() {}
- // From Widget:
- virtual void repaintEvent(RepaintEvent *e) override;
- virtual void buttonEvent(ButtonEvent *e) override;
- virtual void mouseMoveEvent(MouseMoveEvent *e) override;
- virtual void scrollEvent(ScrollEvent *e) override;
- virtual void keyEvent(KeyEvent *e) override;
+ // From Widget:
+ virtual void repaintEvent(RepaintEvent *e) override;
+ virtual void buttonEvent(ButtonEvent *e) override;
+ virtual void mouseMoveEvent(MouseMoveEvent *e) override;
+ virtual void scrollEvent(ScrollEvent *e) override;
+ virtual void keyEvent(KeyEvent *e) override;
private:
- //! Sets the internal value and sends out the changed notification.
- void internalSetValue(float value);
+ //! Sets the internal value and sends out the changed notification.
+ void internalSetValue(float value);
- typedef enum {
- up,
- down
- } state_t;
+ typedef enum {
+ up,
+ down
+ } state_t;
- state_t state;
+ state_t state;
- float currentValue;
- float maximum;
- float minimum;
+ float currentValue;
+ float maximum;
+ float minimum;
- Image img_knob;
+ Image img_knob;
- int mouse_offset_x;
+ int mouse_offset_x;
};
} // GUI::
-