Qwt User's Guide
|
A plot item, which displays data in Scalable Vector Graphics (SVG) format. More...
#include <qwt_plot_svgitem.h>
Public Member Functions | |
QwtPlotSvgItem (const QString &title=QString::null) | |
Constructor. | |
QwtPlotSvgItem (const QwtText &title) | |
Constructor. | |
virtual | ~QwtPlotSvgItem () |
Destructor. | |
bool | loadFile (const QRectF &, const QString &fileName) |
bool | loadData (const QRectF &, const QByteArray &) |
virtual QRectF | boundingRect () const |
Bounding rectangle of the item. | |
virtual void | draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &rect) const |
virtual int | rtti () const |
Protected Member Functions | |
const QSvgRenderer & | renderer () const |
QSvgRenderer & | renderer () |
void | render (QPainter *painter, const QRectF &viewBox, const QRectF &rect) const |
QRectF | viewBox (const QRectF &area) const |
A plot item, which displays data in Scalable Vector Graphics (SVG) format.
SVG images are often used to display maps
QwtPlotSvgItem::QwtPlotSvgItem | ( | const QString & | title = QString::null | ) | [explicit] |
Constructor.
Sets the following item attributes:
title | Title |
QwtPlotSvgItem::QwtPlotSvgItem | ( | const QwtText & | title | ) | [explicit] |
Constructor.
Sets the following item attributes:
title | Title |
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.
bool QwtPlotSvgItem::loadData | ( | const QRectF & | rect, |
const QByteArray & | data | ||
) |
Load SVG data
rect | Bounding rectangle |
data | in SVG format |
bool QwtPlotSvgItem::loadFile | ( | const QRectF & | rect, |
const QString & | fileName | ||
) |
Load a SVG file
rect | Bounding rectangle |
fileName | SVG file name |
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 |
const QSvgRenderer & QwtPlotSvgItem::renderer | ( | ) | const [protected] |
QSvgRenderer & QwtPlotSvgItem::renderer | ( | ) | [protected] |
int QwtPlotSvgItem::rtti | ( | ) | const [virtual] |
Reimplemented from QwtPlotItem.
QRectF QwtPlotSvgItem::viewBox | ( | const QRectF & | rect | ) | const [protected] |
Calculate the view box from rect and boundingRect().
rect | Rectangle in scale coordinates |