A plot item, which displays data in Scalable Vector Graphics (SVG) format. More...
#include <qwt_plot_svgitem.h>
Classes | |
class | PrivateData |
Public Member Functions | |
virtual QRectF | boundingRect () const |
Bounding rectangle of the item. | |
virtual void | draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &rect) const |
bool | loadData (const QRectF &, const QByteArray &) |
bool | loadFile (const QRectF &, const QString &fileName) |
QwtPlotSvgItem (const QString &title=QString::null) | |
Constructor. | |
QwtPlotSvgItem (const QwtText &title) | |
Constructor. | |
virtual int | rtti () const |
virtual | ~QwtPlotSvgItem () |
Destructor. | |
Protected Member Functions | |
void | render (QPainter *painter, const QRectF &viewBox, const QRectF &rect) const |
const QSvgRenderer & | renderer () const |
QSvgRenderer & | renderer () |
QRectF | viewBox (const QRectF &area) const |
Private Member Functions | |
void | init () |
Private Attributes | |
PrivateData * | d_data |
A plot item, which displays data in Scalable Vector Graphics (SVG) format.
SVG images are often used to display maps
Definition at line 27 of file qwt_plot_svgitem.h.
QwtPlotSvgItem::QwtPlotSvgItem | ( | const QString & | title = QString::null | ) | [explicit] |
Constructor.
Sets the following item attributes:
title | Title |
Definition at line 36 of file qwt_plot_svgitem.cpp.
QwtPlotSvgItem::QwtPlotSvgItem | ( | const QwtText & | title | ) | [explicit] |
Constructor.
Sets the following item attributes:
title | Title |
Definition at line 51 of file qwt_plot_svgitem.cpp.
QwtPlotSvgItem::~QwtPlotSvgItem | ( | ) | [virtual] |
Destructor.
Definition at line 58 of file qwt_plot_svgitem.cpp.
QRectF QwtPlotSvgItem::boundingRect | ( | ) | const [virtual] |
Bounding rectangle of the item.
Reimplemented from QwtPlotItem.
Definition at line 121 of file qwt_plot_svgitem.cpp.
void QwtPlotSvgItem::draw | ( | QPainter * | painter, |
const QwtScaleMap & | xMap, | ||
const QwtScaleMap & | yMap, | ||
const QRectF & | canvasRect | ||
) | const [virtual] |
Draw the SVG item
painter | Painter |
xMap | X-Scale Map |
yMap | Y-Scale Map |
canvasRect | Contents rect of the plot canvas |
Implements QwtPlotItem.
Definition at line 146 of file qwt_plot_svgitem.cpp.
void QwtPlotSvgItem::init | ( | ) | [private] |
Definition at line 63 of file qwt_plot_svgitem.cpp.
bool QwtPlotSvgItem::loadData | ( | const QRectF & | rect, |
const QByteArray & | data | ||
) |
Load SVG data
rect | Bounding rectangle |
data | in SVG format |
Definition at line 108 of file qwt_plot_svgitem.cpp.
bool QwtPlotSvgItem::loadFile | ( | const QRectF & | rect, |
const QString & | fileName | ||
) |
Load a SVG file
rect | Bounding rectangle |
fileName | SVG file name |
Definition at line 88 of file qwt_plot_svgitem.cpp.
void QwtPlotSvgItem::render | ( | QPainter * | painter, |
const QRectF & | viewBox, | ||
const QRectF & | rect | ||
) | const [protected] |
Render the SVG data
painter | Painter |
viewBox | View Box, see QSvgRenderer::viewBox() |
rect | Target rectangle on the paint device |
Definition at line 171 of file qwt_plot_svgitem.cpp.
const QSvgRenderer & QwtPlotSvgItem::renderer | ( | ) | const [protected] |
Definition at line 127 of file qwt_plot_svgitem.cpp.
QSvgRenderer & QwtPlotSvgItem::renderer | ( | ) | [protected] |
Definition at line 133 of file qwt_plot_svgitem.cpp.
int QwtPlotSvgItem::rtti | ( | ) | const [virtual] |
Reimplemented from QwtPlotItem.
Definition at line 75 of file qwt_plot_svgitem.cpp.
QRectF QwtPlotSvgItem::viewBox | ( | const QRectF & | rect | ) | const [protected] |
Calculate the view box from rect and boundingRect().
rect | Rectangle in scale coordinates |
Definition at line 197 of file qwt_plot_svgitem.cpp.
PrivateData* QwtPlotSvgItem::d_data [private] |
Reimplemented from QwtPlotItem.
Definition at line 57 of file qwt_plot_svgitem.h.