equal
deleted
inserted
replaced
66 QAbstractSliderPrivate(); |
66 QAbstractSliderPrivate(); |
67 ~QAbstractSliderPrivate(); |
67 ~QAbstractSliderPrivate(); |
68 |
68 |
69 void setSteps(int single, int page); |
69 void setSteps(int single, int page); |
70 |
70 |
71 int minimum, maximum, singleStep, pageStep, value, position, pressValue; |
71 int minimum, maximum, pageStep, value, position, pressValue; |
|
72 |
|
73 /** |
|
74 * Call effectiveSingleStep() when changing the slider value. |
|
75 */ |
|
76 int singleStep; |
|
77 |
72 float offset_accumulated; |
78 float offset_accumulated; |
73 uint tracking : 1; |
79 uint tracking : 1; |
74 uint blocktracking :1; |
80 uint blocktracking :1; |
75 uint pressed : 1; |
81 uint pressed : 1; |
76 uint invertedAppearance : 1; |
82 uint invertedAppearance : 1; |
81 int repeatActionTime; |
87 int repeatActionTime; |
82 QAbstractSlider::SliderAction repeatAction; |
88 QAbstractSlider::SliderAction repeatAction; |
83 |
89 |
84 #ifdef QT_KEYPAD_NAVIGATION |
90 #ifdef QT_KEYPAD_NAVIGATION |
85 int origValue; |
91 int origValue; |
|
92 |
|
93 /** |
|
94 */ |
|
95 bool isAutoRepeating; |
|
96 |
|
97 /** |
|
98 * When we're auto repeating, we multiply singleStep with this value to |
|
99 * get our effective step. |
|
100 */ |
|
101 qreal repeatMultiplier; |
|
102 |
|
103 /** |
|
104 * The time of when the first auto repeating key press event occurs. |
|
105 */ |
|
106 QTime firstRepeat; |
|
107 |
86 #endif |
108 #endif |
|
109 |
|
110 inline int effectiveSingleStep() const |
|
111 { |
|
112 return singleStep |
|
113 #ifdef QT_KEYPAD_NAVIGATION |
|
114 * repeatMultiplier |
|
115 #endif |
|
116 ; |
|
117 } |
87 |
118 |
88 inline int bound(int val) const { return qMax(minimum, qMin(maximum, val)); } |
119 inline int bound(int val) const { return qMax(minimum, qMin(maximum, val)); } |
89 inline int overflowSafeAdd(int add) const |
120 inline int overflowSafeAdd(int add) const |
90 { |
121 { |
91 int newValue = value + add; |
122 int newValue = value + add; |