| 66 | } |
| 67 | |
| 68 | QString QAnimatedSlider::valueString(int overrideValue) const |
| 69 | { |
| 70 | if(!customValueStrings.empty() && overrideValue >= 0 && overrideValue < customValueStrings.size()) { |
| 71 | return customValueStrings.at(overrideValue); |
| 72 | } |
| 73 | |
| 74 | int value = overrideValue == -1 ? valueA() : overrideValue; |
| 75 | |
| 76 | bool handleAsInt = !this->property("handleAsInt").canConvert(QMetaType::Bool) && this->property("handleAsInt").toBool(); |
| 77 | int divisor = 1; |
| 78 | if(this->property("divisor").canConvert(QMetaType::Int)) |
| 79 | { |
| 80 | divisor = this->property("divisor").toInt(); |
| 81 | } |
| 82 | |
| 83 | return QString::number((handleAsInt ? (int)(value / divisor) : (double)value / divisor)) + this->property("unit").toString(); |
| 84 | } |
| 85 | |
| 86 | QEasingCurve QAnimatedSlider::easingCurve() const |
| 87 | { |