diff options
Diffstat (limited to 'src/gui/widgets/qabstractslider_p.h')
-rw-r--r-- | src/gui/widgets/qabstractslider_p.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/gui/widgets/qabstractslider_p.h b/src/gui/widgets/qabstractslider_p.h index 9324d44..6591981 100644 --- a/src/gui/widgets/qabstractslider_p.h +++ b/src/gui/widgets/qabstractslider_p.h @@ -68,7 +68,13 @@ public: void setSteps(int single, int page); - int minimum, maximum, singleStep, pageStep, value, position, pressValue; + int minimum, maximum, pageStep, value, position, pressValue; + + /** + * Call effectiveSingleStep() when changing the slider value. + */ + int singleStep; + float offset_accumulated; uint tracking : 1; uint blocktracking :1; @@ -83,8 +89,33 @@ public: #ifdef QT_KEYPAD_NAVIGATION int origValue; + + /** + */ + bool isAutoRepeating; + + /** + * When we're auto repeating, we multiply singleStep with this value to + * get our effective step. + */ + qreal repeatMultiplier; + + /** + * The time of when the first auto repeating key press event occurs. + */ + QTime firstRepeat; + #endif + inline int effectiveSingleStep() const + { + return singleStep +#ifdef QT_KEYPAD_NAVIGATION + * repeatMultiplier +#endif + ; + } + inline int bound(int val) const { return qMax(minimum, qMin(maximum, val)); } inline int overflowSafeAdd(int add) const { |