1 /* This file is part of Dilay
2  * Copyright © 2015-2018 Alexander Bau
3  * Use and redistribute under the terms of the GNU General Public License
4  */
5 #ifndef DILAY_DOUBLE_SLIDER
6 #define DILAY_DOUBLE_SLIDER
7 
8 #include <QSlider>
9 #include "macro.hpp"
10 
11 class ViewDoubleSlider : public QSlider
12 {
13   Q_OBJECT
14 public:
15   DECLARE_BIG2 (ViewDoubleSlider, unsigned short, unsigned short)
16 
17   double doubleValue () const;
18   double doubleSingleStep () const;
19 
20   void setDoubleValue (double);
21   void setDoubleRange (double, double);
22   void setDoubleSingleStep (double);
23   void setDoublePageStep (double);
24 
25   int intValue () const;
26   int intSingleStep () const;
27 
28   void setIntValue (int);
29   void setIntRange (int, int);
30   void setIntSingleStep (int);
31   void setIntPageStep (int);
32 
33 signals:
34   void doubleValueChanged (double);
35 
36 private:
37   int value () const;
38   int singleStep () const;
39 
40   void setValue (int);
41   void setRange (int, int);
42   void setSingleStep (int);
43   void setPageStep (int);
44 
45   IMPLEMENTATION
46 };
47 
48 #endif
49