Results 1 to 3 of 3

Thread: Qwt sliders and normalized logarithmic scale engines

  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default 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
    Last edited by msundell; 19th July 2013 at 19:33.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,316
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt sliders and normalized logarithmic scale engines

    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

  3. #3
    Join Date
    Sep 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default 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!

Similar Threads

  1. QWT::Knob with the logarithmic scale
    By hack006 in forum Qwt
    Replies: 1
    Last Post: 2nd April 2011, 16:57
  2. logarithmic scales
    By sergio486 in forum Qwt
    Replies: 2
    Last Post: 22nd December 2010, 17:05
  3. Replies: 3
    Last Post: 22nd October 2010, 19:49
  4. logarithmic scale
    By Times in forum Qwt
    Replies: 2
    Last Post: 1st July 2008, 15:41
  5. Replies: 2
    Last Post: 14th March 2008, 12:38

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.