Results 1 to 19 of 19

Thread: QwtPlotCurve draw it's full contents without using current zoom information

Threaded View

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

    Default Re: QwtPlotCurve draw it's full contents without using current zoom information

    Using the characteristics of the data is the job of the application code - QwtPlotCurve doesn't know about them.

    I recommend to derive from QwtSeriesData<QPointF> ( or one of its derived classed ), where you return only points from the current zoom interval: check the pure virtual methods.

    To know the current scale interval do:

    Qt Code:
    1. connect( plot->axisWidget( QwtPlot::xBottom ), SIGNAL( scaleDivChanged() ), this, updateCurrentZoom() );
    To copy to clipboard, switch view to plain text mode 

    and something like this:

    Qt Code:
    1. void YourWhatever::updateCurrentZoom()
    2. {
    3. const QwtScaleDiv scaleDiv = plot->axisScaleDiv( QwtPlot::xBottom );
    4. updateCurrentZoom( scaleDiv->interval() );
    5. }
    To copy to clipboard, switch view to plain text mode 

    Uwe

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

    Dmitri (19th August 2011)

Similar Threads

  1. Replies: 3
    Last Post: 26th July 2011, 19:11
  2. Replies: 1
    Last Post: 1st June 2011, 07:39
  3. Replies: 1
    Last Post: 6th May 2010, 07:25
  4. Replies: 2
    Last Post: 7th July 2009, 07:44
  5. Replies: 2
    Last Post: 14th April 2008, 11:03

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