Results 1 to 4 of 4

Thread: scale in QwtSlider and QwtPlot

Threaded View

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

    Default Re: scale in QwtSlider and QwtPlot

    The boundaries of a scale and the position of all ticks are defined by a QwtScaleDiv object. Tick labels are painted for major ticks.
    A scale division can be assigned manually from application code or can be aligned/calculated by a QwtScaleEngine from its boundaries and a step size. A scale engine implements 2 algorithms:


    • aligning the boundaries
      see QwtScaleEngine::autoScale()
    • finding the ticks
      see QwtScaleEngine::divideScale()


    Each type of scale engine offers parameters that have an impact on its algorithm.

    In case of a slider calculating the scale div manually ( QwtAbstractScale::setScale( const QwtScaleDiv & ) ) might be an option, but in case of plot axes the application code often doesn't know about the scales - f.e. when your plot offers any type of navigation ( zooming, panning ... ) - and you need to have an algo for calculating boundaries and ticks.

    In case of QwtSlider most relevant methods can be found in its base class QwtAbstractScale.

    HTH,
    Uwe

  2. The following user says thank you to Uwe for this useful post:

    mastupristi (19th October 2014)

Similar Threads

  1. How to hide part of a QwtPlot scale?
    By Momergil in forum Qwt
    Replies: 2
    Last Post: 6th February 2013, 19:41
  2. Align QwtSlider and QwtPlot
    By justoit in forum Qwt
    Replies: 4
    Last Post: 4th May 2011, 11:41
  3. Replies: 2
    Last Post: 30th December 2010, 17:32
  4. QwtScale and QwtPlot scale inconsistency.
    By umituzun84 in forum Qwt
    Replies: 5
    Last Post: 18th June 2010, 11:25
  5. QwtPlotItem inverting qwtPlot scale
    By jmsbc in forum Qwt
    Replies: 1
    Last Post: 25th August 2009, 14:09

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
  •  
Qt is a trademark of The Qt Company.