PDA

View Full Version : QwtRasterData : value(x, y) : How to have always same x and y value called



lionel.s
9th October 2015, 08:51
Hello,

We have developped a WaterFall widget with the Qwt.
We are showing it in a range of 20 second but we can also show 180 second.

The problem is when we are showing 180s it is "blinking". This is because value is called but x and y value are different than the second before.

It is hard to explain. But how can we be sure the value is called with the same x and y value ?

I have a QList for each second of value depending on the x value.

So how can i be sure that value is always called with same x value ?

Thanks

Added after 5 minutes:

I used a QList<QList<double> > mDataDouble

I add information in this Qlist every 100ms.

Every 100 ms I do something like this :


refreshNotPossible = true;

// Ajout des nouvelles donnees en tete de matrice
mDataDouble.push_front(pData);

// Suppression des donnees trop anciennes
if (mFrequency != 0)
{
double dataDoubleSize = mDataDouble.size();
double maxDataDoubleSize = (mYMax + 1) * (1 / mFrequency);
// On garde les donnees jusqu'au max + 1 pour eviter l'apparition d'un offset en bas du waterfall
while (mDataDouble.size() >= 180*1000)
{
mDataDouble.pop_back();
}
}

refreshNotPossible = false;

And when we are in the value function, depending on the y value we are retrieving the good QList in the QList<QList> and then retreiving the good value in this QList<> using X value.

Of course X and Y value are cast into the good interger to get the value into the QList

Uwe
9th October 2015, 11:44
To be honest I didn't get what you are asking for ?

Uwe