From 57f4d38841c40cad3c206abdd16eebaed753aa1c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 18 Mar 2018 18:18:57 +0100 Subject: Update all fiels to adhere to style-guide --- src/zoomslider.h | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) (limited to 'src/zoomslider.h') diff --git a/src/zoomslider.h b/src/zoomslider.h index 60b6772..a42e48d 100644 --- a/src/zoomslider.h +++ b/src/zoomslider.h @@ -24,50 +24,45 @@ * along with DrumGizmo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __DRUMGIZMO_ZOOMSLIDER_H__ -#define __DRUMGIZMO_ZOOMSLIDER_H__ +#pragma once #include #include -class ZoomSlider : public QSlider { -Q_OBJECT +class ZoomSlider + : public QSlider +{ + Q_OBJECT public: - ZoomSlider(Qt::Orientation orientation); + ZoomSlider(Qt::Orientation orientation); - /** - * Range of the slider. 'from' may be lesser than 'to' which will invert the - * slider. - */ - void setRange(float from, float to); + //! Range of the slider. 'from' may be lesser than 'to' which will invert the + //! slider. + void setRange(float from, float to); - /** - * Set the distance between emitting of valueChanged signals. - * Example: from:=0, to:=1 and width:=0.5 will emit valueChanged signals on - * 0.0, 0.5 and 1.0 (ie. the slider will have 3 actual values) - * NOTE: If 'width' is greater than the span of [from; to] only the 'from' - * and 'to' values can be selected on the slider. - */ - void setTickWidth(float width); - - void setValue(float value); + //! Set the distance between emitting of valueChanged signals. + //! Example: from:=0, to:=1 and width:=0.5 will emit valueChanged signals on + //! 0.0, 0.5 and 1.0 (ie. the slider will have 3 actual values) + //! NOTE: If 'width' is greater than the span of [from; to] only the 'from' + //! and 'to' values can be selected on the slider. + void setTickWidth(float width); + + void setValue(float value); signals: - void valueChanged(float value); + void valueChanged(float value); private slots: - void sliderValueChanged(int value); + void sliderValueChanged(int value); protected: - void paintEvent(QPaintEvent *ev); + void paintEvent(QPaintEvent* ev); private: - float fromSlider(int value); + float fromSlider(int value); - bool inverted; - float from; - float to; - float tick_width; + bool inverted; + float from; + float to; + float tick_width; }; - -#endif/*__DRUMGIZMO_ZOOMSLIDER_H__*/ -- cgit v1.2.3