Results 1 to 6 of 6

Thread: Animating a QwtPolarPlot

  1. #1
    Join Date
    Jan 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Animating a QwtPolarPlot

    Hello once again, I'm wondering how it would be possible to show an animation of a polar plot (QwtPolar) and it's curves rotating smoothly around the origin. I looked a little into the tools Qt provies for animation, but I'm not sure if I would need QPropertyAnimation, QVarientAnimation, or something else entirely. I have no code yet but I'm doing a little research to find out how it would be possible.

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

    Default Re: Animating a QwtPolarPlot

    You can use these animation classes, but a simple QTimer should do the job as well.

    Uwe

  3. #3
    Join Date
    Jan 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Animating a QwtPolarPlot

    If I would use the QPropertyAnimation, are there properties in QwtPolarCurve that contain the polar coordinate data? I looked in the QwtPolar main website and I see functions that return data, but not an actual property as far as I could recognize.

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

    Default Re: Animating a QwtPolarPlot

    A curve is not even a QObject - but all you need to do is to derive from QwtPolarPlot and add the APIs you need.

    Uwe

  5. #5
    Join Date
    Jan 2012
    Posts
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Animating a QwtPolarPlot

    I guess a timer would be enough, I just worry about the animation being smooth enough with a timer, are there any performance advantages to one of the animation classes instead?

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

    Default Re: Animating a QwtPolarPlot

    Isn't the animation stuff only about manipulating a timer interval for having something non linear ?

    Guess your code will add some points to a curve + replot for each step. This is the only thing that counts for the performance and doesn't depend on how a step is called.

    Uwe

Similar Threads

  1. Animating a QwtPolarPlot
    By bwnicewo in forum Qt Programming
    Replies: 0
    Last Post: 8th June 2012, 17:54
  2. Animating QSplashScreen
    By pssss in forum Qt Programming
    Replies: 3
    Last Post: 3rd September 2011, 11:39
  3. QwtPolarPlot radius scale
    By brutus35 in forum Qwt
    Replies: 2
    Last Post: 24th February 2011, 17:46
  4. animating a toolbar??!?
    By nupul in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2006, 08:27

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.