Results 1 to 3 of 3

Thread: change 'scale map' of QwtPolarGrid number!

  1. #1
    Join Date
    Mar 2016
    Posts
    19
    Thanks
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Question change 'scale map' of QwtPolarGrid number!

    Hi
    I need change 'scale map' of QwtPolarGrid as follow picture:
    GridRotate.jpg
    How do this work and Where must change? may be in source?
    please answer me...
    thanks.

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

    Default Re: change 'scale map' of QwtPolarGrid number!

    See http://qwtpolar.sourceforge.net/clas...3ecb63ea67aa81 and http://qwtpolar.sourceforge.net/clas...ce0865a71220cb

    In your case it would be:

    Qt Code:
    1. plot->setAzimuthOrigin( M_PI_2 );
    2. plot->setScale( QwtPolar::Azimuth, 2 * M_PI, 0.0, 0.5 * M_PI_2 );
    To copy to clipboard, switch view to plain text mode 
    In SVN trunk the spectrogram example offers buttons for mirroring and rotating ( in steps of 15° ) the azimuth scale:

    Qt Code:
    1. void Plot::rotate()
    2. {
    3. const double interval = 15.0; // degrees
    4.  
    5. double origin = azimuthOrigin() / M_PI * 180.0;
    6. origin = qRound( origin / interval ) * interval + interval;
    7.  
    8. setAzimuthOrigin( origin / 180.0 * M_PI );
    9. replot();
    10. }
    11.  
    12. void Plot::mirror()
    13. {
    14. const double a1 = scaleDiv( QwtPolar::Azimuth )->upperBound();
    15. const double a2 = scaleDiv( QwtPolar::Azimuth )->lowerBound();
    16.  
    17. setScale( QwtPolar::Azimuth, a1, a2, qAbs( a2 - a1 ) / 8.0 );
    18. replot();
    19. }
    To copy to clipboard, switch view to plain text mode 
    HTH, Uwe

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

    sampad1370 (5th April 2016)

  4. #3
    Join Date
    Mar 2016
    Posts
    19
    Thanks
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: change 'scale map' of QwtPolarGrid number!

    thanks you,Uwe...
    Solved my problem.

Similar Threads

  1. Move QwtPolarGrid to left of screen
    By sampad1370 in forum Qwt
    Replies: 6
    Last Post: 28th March 2016, 09:55
  2. Replies: 4
    Last Post: 27th July 2015, 06:46
  3. QLCDNumber change the color of the number???
    By arninio123 in forum Newbie
    Replies: 1
    Last Post: 11th May 2012, 14:58
  4. Change QTableView's index number displayed
    By rex in forum Qt Programming
    Replies: 0
    Last Post: 6th April 2011, 16:30
  5. How to change paragraph number in QTextEdit?
    By Sarma in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2006, 10:42

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.