Qwt sliders and normalized logarithmic scale engines
I'm interested in Qwt and the logarithmic scale engine(s) to provide slider values for different min/max ranges.
Would it be possible to set up a Qwt slider using a log scale engine with the normalized value of 1.0f always being at 50% of the slider regardless of the minimum and maximum values being used?
Typical minimum/maximum values would be: 0.0f-4.0f, 1/64.0f-64.0f, -2-5.0f etc.
Why keeping 1.0f in the middle? once the sliders are used in a vertical layout the 1.0f value would align in a vertical line. This makes editing much easier and 1.0f is mostly the starting point for all of my parameters.
Is Qwt an option?
Thanks
Re: Qwt sliders and normalized logarithmic scale engines
Quote:
Would it be possible to set up a Qwt slider using a log scale engine with the normalized value of 1.0f always being at 50% of the slider regardless of the minimum and maximum values being used?
When 1.0 has to be the center of a logarithmic scale it always has to have a range like this: [ 1e-x, 1e+x ].
But I guess you don't want to have a logarithmic scale ( f.e a value of 0.0 can never be part of a logarithmic scale ), it is only similar in a sense that is more detailed for small values, than for large values.
Have a look at QwtTransform - probably you can implement your rule by deriving and overloading. The scaleengine example shows various implementations of transformations (it shows plot axis but the scales of sliders are built the same way ).
Uwe
Re: Qwt sliders and normalized logarithmic scale engines
Hi Uwe! You're right, I'm using the square root for negative values so it's more of a non-uniform scale then a fully logarithmic scale. Will take a look at QwtTransform and see what it can do. Thanks!