The best solution should be to translate the x coordinates from pcm to milliseconds. As you probably don't want to copy your samples for this I recommend to derive from QwtSeriesData<QwtPointF> and do the translation there. F.e. something like this:
class YourSeriesData: public QwtSeriesData<QwtPointF>
{
virtual QPointF sample
( size_t i
) const {
// depends how you have stored your samples
double xPCM = ...;
double y = ...;
}
};
class YourSeriesData: public QwtSeriesData<QwtPointF>
{
virtual QPointF sample( size_t i ) const
{
// depends how you have stored your samples
double xPCM = ...;
double y = ...;
return QPointF( toMS( xPCM ), y );
}
};
To copy to clipboard, switch view to plain text mode
Guess overloading YourSeriesData::boundingRect makes also sense as the x-range can be found easily for a series with increasing x values.
HTH,
Uwe
PS: It's always a good idea to check the cpuplot example - even if completely unrelated when you don't want to display the tick labels in a date/time format
Bookmarks