Migrating from QWT 4.2 to QWT 6.14
Brought to you by:
rathmann
|
From: Atma K. <atm...@gm...> - 2019-07-30 19:29:24
|
Hi All, I am struggling with the following code snippet (written using QWT 4.2): //Create scales for velocity and error double scaleAngle = (int)(RTOD*acos(NEEDLE_RATIO/ARC_RATIO)); velocityScale = new QwtScaleDraw(); errorScale = new QwtScaleDraw(); velocityScale->setAngleRange(-scaleAngle, scaleAngle); velocityScale->setScale(-maxVelocity,maxVelocity,2,2,maxVelocity/2.0); velocityScale->setTickLength(2,2,3); errorScale->setAngleRange(180 - scaleAngle,180 + scaleAngle); errorScale->setScale(maxError,-maxError,2,2,maxError/2.0); errorScale->setTickLength(2,2,3); I haven't figured out how to setScale. I have changed the QwtScaleDraw to QwtRoundScaleDraw //Create scales for velocity and error double scaleAngle = (int)(RTOD*acos(NEEDLE_RATIO/ARC_RATIO)); velocityScale = new QwtRoundScaleDraw(); errorScale = new QwtRoundScaleDraw(); velocityScale->setAngleRange(-scaleAngle, scaleAngle); ?? velocityScale->setScale(-maxVelocity,maxVelocity,2,2,maxVelocity/2.0); velocityScale->setTickLength(QwtScaleDiv::MinorTick,2); velocityScale->setTickLength(QwtScaleDiv::MediumTick,2); velocityScale->setTickLength(QwtScaleDiv::MajorTick,3); errorScale->setAngleRange(180 - scaleAngle,180 + scaleAngle); ?? errorScale->setScale(maxError,-maxError,2,2,maxError/2.0); errorScale->setTickLength(QwtScaleDiv::MinorTick,2); errorScale->setTickLength(QwtScaleDiv::MediumTick,2); errorScale->setTickLength(QwtScaleDiv::MajorTick,3); The setScale function declaration is as follows (from the documentation): void QwtScaleDraw::setScale (double x1, double x2, int maxMajIntv, int maxMinIntv, double step = 0.0, int logscale = 0) Any help is greatly appreciated Thanks Atma |