
Originally Posted by
bubble
X-AXIS: 0 to 2048us with step 2us
Y-AXIS: -2560 to 2560Hz with step 20Hz
Then you have to write:
DSPFunc::DSPFunc()
{
setInterval( Qt::XAxis, QwtInterval( 0.0, 2048.0 ) );
setInterval( Qt::YAxis, QwtInterval( -2560, 2560 ) );
}
DSPFunc::DSPFunc()
{
setInterval( Qt::XAxis, QwtInterval( 0.0, 2048.0 ) );
setInterval( Qt::YAxis, QwtInterval( -2560, 2560 ) );
}
To copy to clipboard, switch view to plain text mode
and
double DSPFunc::value( double x, double y ) const
{
const int ix = x / 2;
const int iy = ( 2560 + y ) / 20;
if ( ix < 0 || iy < 0 || ... )
return qQNaN();
return Abs[ix][iy];
}
{
return QRectF( 0.0,
0.0,
2.0,
20.0 );
}
double DSPFunc::value( double x, double y ) const
{
const int ix = x / 2;
const int iy = ( 2560 + y ) / 20;
if ( ix < 0 || iy < 0 || ... )
return qQNaN();
return Abs[ix][iy];
}
QRectF DspFunc::pixelHint( const QRectF & ) const
{
return QRectF( 0.0, 0.0, 2.0, 20.0 );
}
To copy to clipboard, switch view to plain text mode
Bookmarks