Matthias Pospiech | 16 Apr 15:49

Help with understanding QwtRasterData needed

This here is the example qwt delivers:

class SpectrogramData: public QwtRasterData

{

public:

    SpectrogramData(): QwtRasterData(QwtDoubleRect(-1.5, -1.5, 3.0, 3.0)) {}

virtual QwtRasterData *copy() const { return new SpectrogramData();}

virtual QwtDoubleInterval range() const { return QwtDoubleInterval(0.0, 
10.0);}

virtual double value(double x, double y) const{

const double c = 0.842;

const double v1 = x * x + (y-c) * (y+c);

const double v2 = x * (y+c) + x * (y+c);

return 1.0 / (v1 * v1 + v2 * v2);

}

};

In my problem the data however has to be delivered to the plot as a 
double array (2D Array).

Since I think that I do not understand the example really ( it is a bit 
advance c++) I would need to know where and how to integrate a function 
which delivers the data from an array to the QwtRasterData. This means 
as well that the range can not be know at construction of the class (as 
in the example) but only after the data has been set.

Matthias

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Gmane