Hi,
I have looked at the real time demo as well as the finance chart for qt. Both appear to be
doing something along the lines of:
1. Use drawChart() to avoid too many updates in a short period of time
2. Create a new chart
3. Copy the data into the chart
4. Set a bunch of chart parameters
5. Delete old chart and set new chart
First, in the finance demo, why do you not need to use new for:
// Create the chart object using the selected size
FinanceChart m(width);
whereas in the other realtime tracking demo you do new and delete every time?
Second, why do we need a different chart object every time? Isn't it more efficient to
update the chart object directly? Are we not allowed to update due to race conditions? If
this is the case and we know there is very little change between updates, can we just use
two charts and switch back and forth between the two?
As an idea maybe in the finance chart should include locks for your updates then.
Finally, as a request for future releases, can you please make finance chart have all either
public or protected functions so we do not need to modify the code and instead we can inherent this chart.
Thanks,
Marc |