QwtPlotGraphicItem - Man Page

A plot item, which displays a recorded sequence of QPainter commands.

Synopsis

#include <qwt_plot_graphicitem.h>

Inherits QwtPlotItem.

Inherited by QwtPlotSvgItem.

Public Member Functions

QwtPlotGraphicItem (const QString &title=QString())
Constructor.
QwtPlotGraphicItem (const QwtText &title)
Constructor.
virtual ~QwtPlotGraphicItem ()
Destructor.
void setGraphic (const QRectF &rect, const QwtGraphic &)
QwtGraphic graphic () const
virtual QRectF boundingRect () const override
Bounding rectangle of the item.
virtual void draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const override
virtual int rtti () const override

Additional Inherited Members

Detailed Description

A plot item, which displays a recorded sequence of QPainter commands.

QwtPlotGraphicItem renders a sequence of recorded painter commands into a specific plot area. Recording of painter commands can be done manually by QPainter or e.g. QSvgRenderer.

See also

QwtPlotShapeItem, QwtPlotSvgItem

Definition at line 29 of file qwt_plot_graphicitem.h.

Constructor & Destructor Documentation

QwtPlotGraphicItem::QwtPlotGraphicItem (const QString & title = QString()) [explicit]

Constructor. Sets the following item attributes:

  • QwtPlotItem::AutoScale: true
  • QwtPlotItem::Legend: false
Parameters

title Title

Definition at line 32 of file qwt_plot_graphicitem.cpp.

QwtPlotGraphicItem::QwtPlotGraphicItem (const QwtText & title) [explicit]

Constructor. Sets the following item attributes:

  • QwtPlotItem::AutoScale: true
  • QwtPlotItem::Legend: false
Parameters

title Title

Definition at line 47 of file qwt_plot_graphicitem.cpp.

Member Function Documentation

void QwtPlotGraphicItem::draw (QPainter * painter, const QwtScaleMap & xMap, const QwtScaleMap & yMap, const QRectF & canvasRect) const [override], [virtual]

Draw the item

Parameters

painter Painter
xMap X-Scale Map
yMap Y-Scale Map
canvasRect Contents rect of the plot canvas

Implements QwtPlotItem.

Definition at line 115 of file qwt_plot_graphicitem.cpp.

QwtGraphic QwtPlotGraphicItem::graphic () const

Returns

Recorded sequence of painter commands

See also

setGraphic()

Definition at line 96 of file qwt_plot_graphicitem.cpp.

int QwtPlotGraphicItem::rtti () const [override], [virtual]

Returns

QwtPlotItem::Rtti_PlotGraphic

Reimplemented from QwtPlotItem.

Definition at line 71 of file qwt_plot_graphicitem.cpp.

void QwtPlotGraphicItem::setGraphic (const QRectF & rect, const QwtGraphic & graphic)

Set the graphic to be displayed

Parameters

rect Rectangle in plot coordinates
graphic Recorded sequence of painter commands

Definition at line 82 of file qwt_plot_graphicitem.cpp.

Author

Generated automatically by Doxygen for Qwt User's Guide from the source code.

Info

Sun Jul 18 2021 Version 6.2.0 Qwt User's Guide