[Qt-interest] Placing waveforms in stripes, examples needed.
Ross Bencina
rossb-lists at audiomulch.com
Tue Sep 22 17:44:15 CEST 2009
Hi Svenn
I'm not sure this is the best way, but the way I handle it is to use a
QTableWidget to manage the "channels" (one per waveform) and have a separate
QWidget for rendering/editing each channel. Use QTableWidget::setCellWidget
to embed the waveform widgets in the table.
You can get the table to manage the vertical scrolling and channel resizing.
I manage the horizontal scrolling/zooming using code external to the table
widget, with a separate horizontal scroll bar.
A good alternative would be to use QGraphicsView and have a separate
QGraphicsItem for each channel. This might make scrolling/zooming easier.
Ross.
Svenn Are Bjerkem wrote:
> Hi,
>
> Audio sequencers and waveform viewers place visual data in horizontal
> stripes and these stripes are attached to a horizontal scrollbar so
> that the data viewport can be changed. Example is qtractor or kst. I
> downloaded qtractor source to see if I could learn something, but this
> is a complete application and not very easy to use as a reference. I
> tried to google, but qt seems to mean a lot, and stripes happens on
> lcd-panels and waveform is everywhere. If somebody has a URL or two to
> simple panelized waveforms in a graphic view I would be happy to learn
> from them.
>
> I have a list of x and y data where x is time and y is either logical
> 0 or 1, basically I want to write a very simple waveform viewer for
> digital simulation data. I could present the data in vcd and use
> gtkwave, but my needs are a bit different than those offered by
> gtkwave.
>
> --
> Kind regards,
> Svenn
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list