Changeset 15 in flair-src for trunk/tools/FlairGCS/src/Scrollbar.h
- Timestamp:
- 04/08/16 15:40:57 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/Scrollbar.h
r10 r15 8 8 #include <qscrollbar.h> 9 9 10 class ScrollBar: public QScrollBar 11 { 12 Q_OBJECT 10 class ScrollBar : public QScrollBar { 11 Q_OBJECT 13 12 14 13 public: 15 16 17 ScrollBar(float minBase, float maxBase,18 Qt::Orientation o,QWidget *parent = NULL);14 ScrollBar(QWidget *parent = NULL); 15 ScrollBar(Qt::Orientation, QWidget *parent = NULL); 16 ScrollBar(float minBase, float maxBase, Qt::Orientation o, 17 QWidget *parent = NULL); 19 18 20 21 19 void setInverted(bool); 20 bool isInverted(void) const; 22 21 23 24 22 float minBaseValue(void) const; 23 float maxBaseValue(void) const; 25 24 26 27 25 float minSliderValue(void) const; 26 float maxSliderValue(void) const; 28 27 29 28 int extent(void) const; 30 29 31 30 Q_SIGNALS: 32 33 31 void sliderMoved(Qt::Orientation, float, float); 32 void valueChanged(Qt::Orientation, float, float); 34 33 35 34 public Q_SLOTS: 36 37 35 virtual void setBase(float min, float max); 36 virtual void moveSlider(float min, float max); 38 37 39 38 protected: 40 41 42 39 void sliderRange(int value, float &min, float &max) const; 40 int mapToTick(float) const; 41 float mapFromTick(int) const; 43 42 44 43 private Q_SLOTS: 45 46 44 void catchValueChanged(int value); 45 void catchSliderMoved(int value); 47 46 48 47 private: 49 48 void init(void); 50 49 51 52 53 54 50 bool d_inverted; 51 float d_minBase; 52 float d_maxBase; 53 int d_baseTicks; 55 54 }; 56 55
Note:
See TracChangeset
for help on using the changeset viewer.