[QWT] Time Stamp on a QwtPlot
Hi,
I'm trying to add a time stamp on the x axis of a qwtPlot like the one used in the CPU example.
I'm a beginner in Qt and I have difficulties understanding the cpuStat.upTime() function, and basically all the principle used to generate the time stamp in the CPU code.
For example, ? Does procValues[i] represents the buffer containing all the time data since the start of the programm or just the time data in a timeEvent intervall ?
Code:
QTime CpuStat
::upTime() const {
for ( int i = 0; i < NValues; i++ )
t = t.addSecs(int(procValues[i] / 100));
return t;
}
Thanks for your help !
Re: [QWT] Time Stamp on a QwtPlot
ok...never mind...
with the help of some qDebug()<< it was fairly easy to understand..
Because I wanted the time axis to show the currentTime(), I simply modified the Cpustat::upTime function like this:
Code:
QTime CpuStat
::upTime() const {
return t;
}
And, I added the TimeScale class to my code...