{
public:
QpnwPhasedArrayPlot * someParent;
QVector< QList<double> > someData;
// Provide pointer to QpnwPhasedArrayPlot so we can access the data
SpectrogramData( QpnwPhasedArrayPlot * theParent ):
QwtRasterData(QwtDoubleRect
(0.0,
0.0,
180.0,
2000.0)) // Left, bottom, width, height {
someParent = theParent;
someData = theParent->spectData;
//QMessageBox::information(0,"","Creating Raster");
}
{
return new SpectrogramData(someParent);
}
{
}
virtual double value(double x, double y) const
{
//QMessageBox::information(0,"","Real: " + QString::number(y) + " Round: " + QString::number((unsigned int)y));
QList<double> temp;
if( x < 0.0 || x > 180.0 || y < 0.0 || y > 2000.0 )
return 0.0;
else
{
return someData.at( (unsigned int)x ).at( (unsigned int)y );
}
//return someParent->spectData.at(1).at(1);
//return 100;
}
};
class SpectrogramData: public QwtRasterData
{
public:
QpnwPhasedArrayPlot * someParent;
QVector< QList<double> > someData;
// Provide pointer to QpnwPhasedArrayPlot so we can access the data
SpectrogramData( QpnwPhasedArrayPlot * theParent ):
QwtRasterData(QwtDoubleRect(0.0, 0.0, 180.0, 2000.0)) // Left, bottom, width, height
{
someParent = theParent;
someData = theParent->spectData;
//QMessageBox::information(0,"","Creating Raster");
}
virtual QwtRasterData *copy() const
{
return new SpectrogramData(someParent);
}
virtual QwtDoubleInterval range() const
{
return QwtDoubleInterval(0.0, 4096.0);
}
virtual double value(double x, double y) const
{
//QMessageBox::information(0,"","Real: " + QString::number(y) + " Round: " + QString::number((unsigned int)y));
QList<double> temp;
if( x < 0.0 || x > 180.0 || y < 0.0 || y > 2000.0 )
return 0.0;
else
{
return someData.at( (unsigned int)x ).at( (unsigned int)y );
}
//return someParent->spectData.at(1).at(1);
//return 100;
}
};
To copy to clipboard, switch view to plain text mode
Bookmarks