MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / valueString

Method valueString

src/interface/QAnimatedSlider.cpp:68–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68QString 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
86QEasingCurve QAnimatedSlider::easingCurve() const
87{

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected