PDA

View Full Version : Z value on the QwtPlot spectrogram example



john_k
28th August 2014, 16:45
In the example as you move your mouse around the screen it shows you the X and Y values through the modified QwtPlotZoomer class. Is there a way to get the Z value as well? I have setup an example using QwtPlotSpectrogram with QwtRasterData and it works well but I am a little stumped as to how to get the Z value as well as the X and Y as I move my mouse around.

Thanks for your time guys

Uwe
29th August 2014, 08:48
In QwtPlotPicker::trackerTextF() you have the x and the y value ( in plot coordinates ) of the mouse position. All you need to do is to call QwtRasterData::z() with them and to build and return the string from the x,y,z values you want to be displayed.

Uwe