I got it to work, thanks for pointing me in the right direction! For anyone who's curious here's the code for the class declaration:
{
public:
hertz(){}
virtual QwtText label
(double v
) const;
};
class hertz : public QwtScaleDraw
{
public:
hertz(){}
virtual QwtText label(double v) const;
};
To copy to clipboard, switch view to plain text mode
I nested the hertz() class within another class (spectrogram), here's the code for the implementation:
QwtText spectrogram
::hertz::label(double v
) const{ if(v >= 1000 || v <= -1000)
else
}
QwtText spectrogram::hertz::label(double v) const{
if(v >= 1000 || v <= -1000)
return QString::number(v/1000.0);
else
return QString::number(v);
}
To copy to clipboard, switch view to plain text mode
Bookmarks