Hi everyone,
I am in need of a Timebar widget and would like some advice on how to best implement this in Qt. To give you a better idea, I attached two rough drawings of the widget at two different zoom levels:
drawing.jpg
The widget should provide the following main features:
- on top a basic timeline
- timestamps shown at regular intervals
- markers (and other things) that can be positioned and interacted with at various timepoints
- scrolling horizontally
- a zoom function (you can see in the picture that this should only increase the time-resolution and things like markers, timestamps etc are not changed in size)
- timestamps (and other things) are shown/hidden dynamically based on the zoom level
My first idea was to use a QGraphicsScene/-View for this, because those provide many of the elements I want.
I wrote a quick prototype and ran into the problem that the large number of timestamps and vertical time-point bars quickly causes performance issues.
Let's say I want to represent a timespan of only 1h up to miliseconds, that's already 3600000 timestamp objects that need to be shown/hidden based on the zoom level.
How could this be implemented in a less performance hungry way?
Thanks for any hints,
xdn
Bookmarks