One comment on your code: Spectrogram::value is called very often ( for each pixel ! ) and you should try to implement it as fast as possible. Better calculate dx and dy once instead of recalculating it again and again.
Your code implements a nearest neighbor resampling. You can do the same for XData - beside the algorithm how to identify the next neighbor is different.
Again you should be aware of the fact, that Spectrogram::value is called very often and heavy calculations shouldn't be avoided if possible. F.e. you could overload QwtRasterData::initRaster() and QwtRasterData::discardRaster() to initialize some values, that are constant for the situation - or build a temporary linear value matrix.
Uwe
Bookmarks