summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qabstractslider_p.h
diff options
context:
space:
mode:
authorDerick Hawcroft <derick.hawcroft@nokia.com>2009-11-23 03:36:20 (GMT)
committerDerick Hawcroft <derick.hawcroft@nokia.com>2009-11-23 03:36:20 (GMT)
commit0cadaf8932355d1fc9cc560d405a3915aeac7d5a (patch)
treef654169a39839dc43a703716fa40fb8d4a63d513 /src/gui/widgets/qabstractslider_p.h
parent0186faea383f3f8223bffd1844e5a47ca22770a5 (diff)
parentc74a5ae953899b9109ef56b2057b094152616480 (diff)
downloadQt-0cadaf8932355d1fc9cc560d405a3915aeac7d5a.zip
Qt-0cadaf8932355d1fc9cc560d405a3915aeac7d5a.tar.gz
Qt-0cadaf8932355d1fc9cc560d405a3915aeac7d5a.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/widgets/qabstractslider_p.h')
-rw-r--r--src/gui/widgets/qabstractslider_p.h33
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
{