PDA

View Full Version : How to append a QwtPlotItem, not attach?



daduda
14th May 2009, 14:44
Hi out there,

I've got a problem.
I want to add a QwtPlotCurve to another one.
Because I want to show several QwtPlotCurves seperated by some lines and when I click on a Curve, it will be shown alone.
My main problem is that i need to seperate and merge these PlotCurves multiple times.
But I don't know how to do this.
Is there a way to add the Curve, so that they are shown appended?
My Qt Version is: 4.2.2
My qwt Version is: 5.1.1

I hope someone can help me.

daduda

Uwe
15th May 2009, 11:05
If you want a curve with gaps paint a curve with gaps ( instead of using several curves ). All you need to do is to overload QwtPlotCurve::drawCurve.

Uwe

daduda
15th May 2009, 12:36
Paint the curves with gaps is not really what I want!
Because if I have this one big curve, how can I figure out on which curve I have clicked?
I want to show this single curve than.
There is no problem to merge all curves to a big one.
The problem is to show only a single curve if i click on it in the big one!

daduda

Uwe
16th May 2009, 10:16
A curve gets its points from a QwtData object. Implement your own type of QwtData, that returns a different set of points depending on the state of your application.

Uwe