Lovec47
30th October 2014, 08:26
Beginner question, I want to make button to switch between Log and Linear axis. How to determine which transformation is active without declaring new variable ?
void HistPlot::switchLogLin()
{
if(plot->axisScaleDraw(QwtPlot::yLeft)-> ?....== ? )
plot->setAxisScaleEngine(QwtPlot::yLeft, new QwtLogScaleEngine);
else plot->setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine);
}
Thanks
Martin
void HistPlot::switchLogLin()
{
if(plot->axisScaleDraw(QwtPlot::yLeft)-> ?....== ? )
plot->setAxisScaleEngine(QwtPlot::yLeft, new QwtLogScaleEngine);
else plot->setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine);
}
Thanks
Martin