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) |
| |
| void | setPaintAttribute (PaintAttribute, bool on=true) |
| | Specify an attribute how to draw the shape.
|
| |
| bool | testPaintAttribute (PaintAttribute) const |
| | Check if a paint attribute is enabled.
|
| |
| 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 override |
| | Bounding rectangle of the shape.
|
| |
| virtual void | draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const override |
| | Draw the shape item.
|
| |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &) const override |
| |
| virtual int | rtti () const override |
| | Get the runtime type information.
|
| |
| | QwtPlotItem () |
| | Default constructor.
|
| |
|
| QwtPlotItem (const QString &title) |
| | Constructor with title as QString.
|
| |
|
| QwtPlotItem (const QwtText &title) |
| | Constructor with title as QwtText.
|
| |
|
virtual | ~QwtPlotItem () |
| | Destructor.
|
| |
| virtual void | attach (QwtPlot *plot) |
| | Attach the item to a plot.
|
| |
| void | detach () |
| | Detach the item from the plot.
|
| |
| QwtPlot * | plot () const |
| | Get the plot the item is attached to.
|
| |
| void | setTitle (const QString &title) |
| | Set the title using a QString.
|
| |
| void | setTitle (const QwtText &title) |
| | Set the title using a QwtText.
|
| |
| const QwtText & | title () const |
| | Get the title.
|
| |
| void | setItemAttribute (ItemAttribute, bool on=true) |
| | Set an item attribute.
|
| |
| bool | testItemAttribute (ItemAttribute) const |
| | Test an item attribute.
|
| |
| void | setItemInterest (ItemInterest, bool on=true) |
| | Set an item interest.
|
| |
| bool | testItemInterest (ItemInterest) const |
| | Test an item interest.
|
| |
| void | setRenderHint (RenderHint, bool on=true) |
| | Set a render hint.
|
| |
| bool | testRenderHint (RenderHint) const |
| | Test a render hint.
|
| |
| void | setRenderThreadCount (uint numThreads) |
| | Set the number of render threads.
|
| |
| uint | renderThreadCount () const |
| | Get the number of render threads.
|
| |
| void | setLegendIconSize (const QSize &) |
| | Set the legend icon size.
|
| |
| QSize | legendIconSize () const |
| | Get the legend icon size.
|
| |
| double | z () const |
| | Get the z-value.
|
| |
| void | setZ (double z) |
| | Set the z-value.
|
| |
| void | show () |
| | Show the item.
|
| |
| void | hide () |
| | Hide the item.
|
| |
| virtual void | setVisible (bool) |
| | Set the visibility.
|
| |
| bool | isVisible () const |
| | Check if the item is visible.
|
| |
| void | setAxes (QwtAxisId xAxis, QwtAxisId yAxis) |
| | Set both axes.
|
| |
| void | setXAxis (QwtAxisId) |
| | Set the x-axis.
|
| |
| QwtAxisId | xAxis () const |
| | Get the x-axis.
|
| |
| void | setYAxis (QwtAxisId) |
| | Set the y-axis.
|
| |
| QwtAxisId | yAxis () const |
| | Get the y-axis.
|
| |
| virtual void | itemChanged () |
| | Notify the plot that the item has changed.
|
| |
| virtual void | legendChanged () |
| | Notify the item that the legend has changed.
|
| |
| virtual void | getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const |
| | Get margin hints for the canvas.
|
| |
| virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) |
| | Update the item with new scale divisions.
|
| |
| virtual void | updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &) |
| | Update the item with changes of the legend.
|
| |
| QRectF | scaleRect (const QwtScaleMap &, const QwtScaleMap &) const |
| | Calculate the scale rectangle.
|
| |
| QRectF | paintRect (const QwtScaleMap &, const QwtScaleMap &) const |
| | Calculate the paint rectangle.
|
| |
| virtual QList< QwtLegendData > | legendData () const |
| | Return legend data.
|
| |
A plot item, which displays any graphical shape that can be defined by a QPainterPath.
QwtPlotShapeItem displays a shape composed from intersecting and uniting regions, rectangles, ellipses or irregular areas defined by lines, and curves. The shape is displayed 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