patch: add support for rendering rectangle & line segment curves
Brought to you by:
rathmann
Patch changes:
* Adds QwtPlotRectCurve - renders a series of rectangles with specified brush & pen.
* Adds QwtPlotSegmentCurve - renders a series of line segments with specified pen
* Adds playground/plotdemo - a demo application with tabs per feature
Motivation: with these new types of curves one can create a chart with activities spanning over time and connected to one another. Rather then creating thousands of individual rectangles / lines, each "curve" groups related rectangles / segments into a single item.
Anonymous
Added an example plot
Could you please submit 2 different patches ?
A curve segment might consist of more/less than 2 points - so IMO the name is misleading. Note, that there is also QwtPlotIntervalCurve. It also allows to draw - at least horizontal/vertical lines.
A side note: of course there is some overhead in converting rectangles/lines into a QPainterPath elements and you won't have any optimizations like early clipping, but QwtPlotShapeItem would allow you display your rectangles/lines with one plot item.