Results 1 to 7 of 7

Thread: setCurveType missing in Qwt 6.0.1?

  1. #1
    Join Date
    Feb 2012
    Posts
    17
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default setCurveType missing in Qwt 6.0.1?

    Hi to all,
    I'm new to Qwt, and I need a little help.

    Using qwtPlotCurve class I am not able to compile the following part of program:

    Qt Code:
    1. curve->setSamples(xValue, yValue, samplesNumber);
    2. curve->setPen(QColor(Qt::blue));
    3. curve->setStyle(QwtPlotCurve::Lines);
    4. curve->setBrush(QBrush(Qt::blue, Qt::SolidPattern));
    5. curve->setBaseline(0);
    6. curve->setCurveType(QwtPlotCurve::Yfx);
    To copy to clipboard, switch view to plain text mode 

    These are the errors I have:

    error: 'class QwtPlotCurve' has no member named 'setCurveType'
    error: 'Yfx' is not a member of 'QwtPlotCurve'

    I'm using QT Creator 2.2.1 (Qt 4.7.4) on Windows XP, and QWT 6.0.1.

    I searched in the documentation, and setCurveType member, Yfx and Xfy have disappeared in the last version.
    Even searching in .c and.h file in C:\qwt-6.0.1\src folder on my PC, I'm not able to find the setCurveType member or Yfx and Xfy definitions.

    What seems strange to me is that noone in the forum raised this problem, so maybe I'm wrong: I apologize with all if this is the case.
    Thank you in advance,
    c

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

    Default Re: setCurveType missing in Qwt 6.0.1?


  3. #3
    Join Date
    Feb 2012
    Posts
    17
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: setCurveType missing in Qwt 6.0.1?

    Thank you very much Uwe,
    I checked the link that you proposed, but it doesn't solve my problem.
    I needed to setCurvType equal to Xfy because I need to rotate the two axises x-y, having at the end the x axis (time axis) vertical and the y axis (amplitude axis) horizontal.
    The result has to be as in the left part of this picture:
    http://www.halliburton.com/public/la...promaxvsp3.jpg
    The setOrientation command seems to me more related to the type of brush filling than related to the axis rotation.
    c

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

    Default Re: setCurveType missing in Qwt 6.0.1?

    Quote Originally Posted by chinalski View Post
    The setOrientation command seems to me more related to the type of brush filling than related to the axis rotation ...
    Like what the curve type was in Qwt 5.x - there is ( and never was ) a mode to mirror points.
    How are your points stored and how do you connect them to the curve object ?

    Uwe

  5. #5
    Join Date
    Feb 2012
    Posts
    17
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: setCurveType missing in Qwt 6.0.1?

    Hi, this is the complete code for the part releted to the plot, I added setOrientation and setStyle to check your suggestion:

    Qt Code:
    1. int samplesNumber=100;
    2. double yValue[samplesNumber], xValue[samplesNumber];
    3. double tempf;
    4. for (int i = 0; i < samplesNumber; i++){
    5. tempf = (double) (i-5)/5;
    6. yValue[i] = sin(tempf);
    7. xValue[i] = double(i);
    8. }
    9.  
    10. QwtPlot * grafico;
    11. QwtPlotCurve * curve = new QwtPlotCurve("Curve");
    12. grafico = new QwtPlot(this);
    13. curve->setOrientation(Qt::Vertical);
    14.  
    15. curve->setSamples(xValue, yValue, samplesNumber);
    16. curve->setPen(QColor(Qt::blue));
    17. curve->setStyle(QwtPlotCurve::Steps);
    18.  
    19. curve->setBrush(QBrush(Qt::blue, Qt::SolidPattern));
    20. curve->setBaseline(0);
    21.  
    22. curve->attach(grafico);
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: setCurveType missing in Qwt 6.0.1?

    O.k then all you need to do is:

    Qt Code:
    1. curve->setSamples(yValue, xValue, samplesNumber);
    To copy to clipboard, switch view to plain text mode 
    Uwe

  7. #7
    Join Date
    Feb 2012
    Posts
    17
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: setCurveType missing in Qwt 6.0.1?

    Ok Uwe, I've got it!

    Just to resume for the forum people:

    With the following command, inverting the position of xValue and yValue, I rotate the axises:
    Qt Code:
    1. curve->setSamples(yValue, xValue, samplesNumber);
    To copy to clipboard, switch view to plain text mode 

    With the following command I change the orientation of the baseline, according to the new axises orientation.
    Qt Code:
    1. curve->setOrientation(Qt::Horizontal);
    To copy to clipboard, switch view to plain text mode 

    Thank you Uwe, and thank you especially for the great job that you do with Qwt!
    c

Similar Threads

  1. Qt SDK 1.1 missing driver
    By codeman in forum Installation and Deployment
    Replies: 2
    Last Post: 9th May 2011, 01:19
  2. Mac OSX: missing executable ?
    By Hiwa in forum Qt Tools
    Replies: 2
    Last Post: 22nd April 2011, 15:02
  3. SQLite -- obviously missing something...
    By scott_hollen in forum Newbie
    Replies: 10
    Last Post: 27th January 2011, 21:21
  4. Qt Creator Help missing? (QT 2010.02)
    By Asperamanca in forum Qt Tools
    Replies: 0
    Last Post: 22nd July 2010, 08:56
  5. libQtGui_debug.so.4 missing
    By fwohlfert in forum Installation and Deployment
    Replies: 2
    Last Post: 5th October 2006, 19:07

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.