Hello.
I spent a lot of time while reading related topics before asking the question, but unfortunately didn't find the answer.
Situation:
I need an oscilloscope window in my app. It has to show the data from outside, time period between any two neighbour points is the same (f.e. 0.1 sec). bottom axis is a time axis. user can vary this interval in a big range (from 30 seconds to 8 hours), so the number of points can be big enough. I need to show the last points in setted time interval, so after filling all the plot area i have to move my plot by 1 point to the left and add a point at the right edge of my curve (like in refresh example of qwt), without changing grid and any axis. First I realized my oscilliscope like in refreshtest example, and it works fine but i pointed time needed to add next point to the curve depends on point count very much.
its not siutable for me. this is because of "replot" function call for every added point. I changed the way of painting by using QwtDirectPainter to paint incrementally. It works fine with huge amount of point adding incrementally while all this points suit my time interval. but i have no idea how to scroll painted area in this case(remove first painted point and then incrementally add new point to the end of painted curve). is it possible.
another one variant is still use variant of shifting from refreshtest example but to filter points before putting them into the curve in the case of big time interval. this will decrease point count while replotting.
does exist more simple way to solve my problem.
Thanks for your answers.
PS qwt 6.1.0; qt4.8.4 MSVC compiler, WinXP-Win7


Reply With Quote

Bookmarks