Results 1 to 6 of 6

Thread: What is the best case for panner

  1. #1
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    6

    Default What is the best case for panner

    Hello.

    How can I improve performance in next case:
    I have big amount of plots ( f.e. near 25 ) and at each plot may be 1-4 curves with 103859 points...
    I tried to develop some kind of panner but there is show bad results, there is really slow down. I have next situation now... I get all points for all curve and then with help of setAxisScale(...) show some part of all interval, but there is hard to replot all graphics when I want drag plot f.e. right , there is too slow doown. Then I think to use QwtPlotPanner, but when I look to source code I see that QwtPlotPanner do replot() and setAxisScale() too, so I thinhk it will be bad too.

    So can U give me some advise?

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

    Default Re: What is the best case for panner

    QwtPlotPanner grabs the content of the plot canvas to a QPixmap and moves this pixmap while panning.
    A replot is only done once, when you stop panning - what is way faster than your implementation doing replots while you are panning.

    Uwe

  3. #3
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    6

    Default Re: What is the best case for panner

    Can I do that there is not be white space when I drag plot with help of QwtPlot?

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

    Default Re: What is the best case for panner

    The short answer is no.

    The other ( also short ) one is: then you would need to generate a pixmap that contains all neighbored areas ( 9 times as large ) instead of simply grabbing the content of the canvas. I never tried it myself but it might be possible by overloading QwtPanner::grab() and maybe some other methods.

    Uwe

  5. #5
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    6

    Default Re: What is the best case for panner

    Quote Originally Posted by Uwe View Post
    The short answer is no.

    The other ( also short ) one is: then you would need to generate a pixmap that contains all neighbored areas ( 9 times as large ) instead of simply grabbing the content of the canvas. I never tried it myself but it might be possible by overloading QwtPanner::grab() and maybe some other methods.

    Uwe
    What do U mean when U told "neigghboard areas"?

    And I also want to ask is it some way to cache all points of graphic and show only needfull interval? Or I always for update graphic need to do replot?

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

    Default Re: What is the best case for panner

    Quote Originally Posted by carhun View Post
    What do U mean when U told "neigghboard areas"?
    The maximum of the distance you can pan depends on width and height of the canvas ( than the mouse has left the canvas ).
    So when your canvas has a size of 800x600 pixels you could render an image with a size of 2400x1800 pixels, where the initial content of the canvas is in the center.

    And I also want to ask is it some way to cache all points of graphic ...
    Thinking twice about this question you will answer yourself ...

    Uwe

Similar Threads

  1. how to use QStateMachine in such case
    By Michael_Levin in forum Qt Programming
    Replies: 0
    Last Post: 9th May 2012, 14:48
  2. convert upper-case to lower-case
    By RENOLD in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2012, 07:30
  3. QKeyEvent - lower case vs upper case keys?
    By ArkKup in forum Qt Programming
    Replies: 3
    Last Post: 9th January 2012, 15:58
  4. Panner Zoomer Scroll synchronization
    By umituzun84 in forum Qwt
    Replies: 2
    Last Post: 23rd July 2010, 00:11
  5. How to debug with dbg in this case?
    By vql in forum Newbie
    Replies: 25
    Last Post: 2nd April 2007, 16:52

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.