A plot item, which displays any graphical shape, that can be defined by a QPainterPath.
More...
|
| | QwtPlotShapeItem (const QString &title=QString()) |
| | Constructor.
|
| |
| | QwtPlotShapeItem (const QwtText &title) |
| | Constructor.
|
| |
|
virtual | ~QwtPlotShapeItem () |
| | Destructor.
|
| |
| void | setPaintAttribute (PaintAttribute, bool on=true) |
| | Specify an attribute how to draw the shape.
|
| |
| bool | testPaintAttribute (PaintAttribute) const |
| |
| void | setLegendMode (LegendMode) |
| | Set the mode how to represent the item on the legend.
|
| |
| LegendMode | legendMode () const |
| |
| void | setRect (const QRectF &) |
| | Set a path built from a rectangle.
|
| |
| void | setPolygon (const QPolygonF &) |
| | Set a path built from a polygon.
|
| |
| void | setShape (const QPainterPath &) |
| | Set the shape to be displayed.
|
| |
| QPainterPath | shape () const |
| |
| void | setPen (const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine) |
| | Build and assign a pen.
|
| |
| void | setPen (const QPen &) |
| | Assign a pen.
|
| |
| QPen | pen () const |
| |
| void | setBrush (const QBrush &) |
| | Assign a brush.
|
| |
| QBrush | brush () const |
| |
| void | setRenderTolerance (double) |
| | Set the tolerance for the weeding optimization.
|
| |
| double | renderTolerance () const |
| |
| virtual QRectF | boundingRect () const QWT_OVERRIDE |
| | Bounding rectangle of the shape.
|
| |
| virtual void | draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const QWT_OVERRIDE |
| | Draw the shape item.
|
| |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &) const QWT_OVERRIDE |
| |
| virtual int | rtti () const QWT_OVERRIDE |
| |
|
| QwtPlotItem () |
| | Constructor.
|
| |
| | QwtPlotItem (const QString &title) |
| | Constructor.
|
| |
| | QwtPlotItem (const QwtText &title) |
| | Constructor.
|
| |
|
virtual | ~QwtPlotItem () |
| | Destroy the QwtPlotItem.
|
| |
| void | attach (QwtPlot *plot) |
| | Attach the item to a plot.
|
| |
| void | detach () |
| | This method detaches a QwtPlotItem from any QwtPlot it has been associated with.
|
| |
|
QwtPlot * | plot () const |
| | Return attached plot.
|
| |
| void | setTitle (const QString &title) |
| | Set a new title.
|
| |
| void | setTitle (const QwtText &title) |
| | Set a new title.
|
| |
| const QwtText & | title () const |
| |
| void | setItemAttribute (ItemAttribute, bool on=true) |
| | Toggle an item attribute.
|
| |
| bool | testItemAttribute (ItemAttribute) const |
| | Test an item attribute.
|
| |
| void | setItemInterest (ItemInterest, bool on=true) |
| | Toggle an item interest.
|
| |
| bool | testItemInterest (ItemInterest) const |
| | Test an item interest.
|
| |
| void | setRenderHint (RenderHint, bool on=true) |
| | Toggle an render hint.
|
| |
| bool | testRenderHint (RenderHint) const |
| | Test a render hint.
|
| |
| void | setRenderThreadCount (uint numThreads) |
| | On multi core systems rendering of certain plot item ( f.e QwtPlotRasterItem ) can be done in parallel in several threads.
|
| |
| uint | renderThreadCount () const |
| |
| void | setLegendIconSize (const QSize &) |
| | Set the size of the legend icon.
|
| |
| QSize | legendIconSize () const |
| |
| double | z () const |
| | Plot items are painted in increasing z-order.
|
| |
| void | setZ (double z) |
| | Set the z value.
|
| |
|
void | show () |
| | Show the item.
|
| |
|
void | hide () |
| | Hide the item.
|
| |
| virtual void | setVisible (bool) |
| | Show/Hide the item.
|
| |
| bool | isVisible () const |
| |
| void | setAxes (QwtAxisId xAxis, QwtAxisId yAxis) |
| | Set X and Y axis.
|
| |
| void | setXAxis (QwtAxisId) |
| | Set the X axis.
|
| |
|
QwtAxisId | xAxis () const |
| | Return xAxis.
|
| |
| void | setYAxis (QwtAxisId) |
| | Set the Y axis.
|
| |
|
QwtAxisId | yAxis () const |
| | Return yAxis.
|
| |
| virtual void | itemChanged () |
| | Update the legend and call QwtPlot::autoRefresh() for the parent plot.
|
| |
| virtual void | legendChanged () |
| | Update the legend of the parent plot.
|
| |
| virtual void | getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const |
| | Calculate a hint for the canvas margin.
|
| |
| virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) |
| | Update the item to changes of the axes scale division.
|
| |
| virtual void | updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &) |
| | Update the item to changes of the legend info.
|
| |
| QRectF | scaleRect (const QwtScaleMap &, const QwtScaleMap &) const |
| | Calculate the bounding scale rectangle of 2 maps.
|
| |
| QRectF | paintRect (const QwtScaleMap &, const QwtScaleMap &) const |
| | Calculate the bounding paint rectangle of 2 maps.
|
| |
| virtual QList< QwtLegendData > | legendData () const |
| | Return all information, that is needed to represent the item on the legend.
|
| |
A plot item, which displays any graphical shape, that can be defined by a QPainterPath.
A QPainterPath is a shape composed from intersecting and uniting regions, rectangles, ellipses or irregular areas defined by lines, and curves. QwtPlotShapeItem displays a shape with a pen and brush.
QwtPlotShapeItem offers a couple of optimizations like clipping or weeding. These algorithms need to convert the painter path into polygons that might be less performant for paths built from curves and ellipses.
More complex shapes, that can't be expressed by a QPainterPath can be displayed using QwtPlotGraphicItem.
- See also
- QwtPlotZone, QwtPlotGraphicItem