Qwt Polar User's Guide 1.0.0
Public Member Functions | Protected Member Functions

QwtPolarRenderer Class Reference

Renderer for exporting a polar plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice. More...

#include <qwt_polar_renderer.h>

List of all members.

Public Member Functions

 QwtPolarRenderer (QObject *parent=NULL)
virtual ~QwtPolarRenderer ()
void renderDocument (QwtPolarPlot *, const QString &format, const QSizeF &sizeMM, int resolution=85)
void renderDocument (QwtPolarPlot *, const QString &title, const QString &format, const QSizeF &sizeMM, int resolution=85)
void renderTo (QwtPolarPlot *, QPrinter &) const
void renderTo (QwtPolarPlot *, QPaintDevice &p) const
virtual void render (QwtPolarPlot *, QPainter *, const QRectF &rect) const

Protected Member Functions

virtual void renderTitle (QPainter *, const QRectF &) const
virtual void renderLegend (QPainter *, const QRectF &) const
virtual void renderLegendItem (QPainter *, const QWidget *, const QRectF &) const

Detailed Description

Renderer for exporting a polar plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice.


Constructor & Destructor Documentation

QwtPolarRenderer::QwtPolarRenderer ( QObject *  parent = NULL) [explicit]

Constructor

Parameters:
parentParent object
QwtPolarRenderer::~QwtPolarRenderer ( ) [virtual]

Destructor.


Member Function Documentation

void QwtPolarRenderer::render ( QwtPolarPlot plot,
QPainter *  painter,
const QRectF &  plotRect 
) const [virtual]

Render the plot to a given rectangle ( f.e QPrinter, QSvgRenderer )

Parameters:
plotPlot widget to be rendered
painterPainter
plotRectBounding rectangle for the plot
void QwtPolarRenderer::renderDocument ( QwtPolarPlot plot,
const QString &  fileName,
const QSizeF &  sizeMM,
int  resolution = 85 
)

Render a polar plot to a file

The format of the document will be autodetected from the suffix of the filename.

Parameters:
plotPlot widget
fileNamePath of the file, where the document will be stored
sizeMMSize for the document in millimeters.
resolutionResolution in dots per Inch (dpi)
void QwtPolarRenderer::renderDocument ( QwtPolarPlot plot,
const QString &  fileName,
const QString &  format,
const QSizeF &  sizeMM,
int  resolution = 85 
)

Render a plot to a file

Supported formats are:

  • pdf
  • ps
  • svg
  • all image formats supported by Qt, see QImageWriter::supportedImageFormats()
Parameters:
plotPlot widget
fileNamePath of the file, where the document will be stored
formatFormat for the document
sizeMMSize for the document in millimeters.
resolutionResolution in dots per Inch (dpi)
See also:
renderTo(), render(), QwtPainter::setRoundingAlignment()
void QwtPolarRenderer::renderLegend ( QPainter *  painter,
const QRectF &  rect 
) const [protected, virtual]

Render the legend into a given rectangle.

Parameters:
painterPainter
rectBounding rectangle
void QwtPolarRenderer::renderLegendItem ( QPainter *  painter,
const QWidget *  widget,
const QRectF &  rect 
) const [protected, virtual]

Print the legend item into a given rectangle.

Parameters:
painterPainter
widgetWidget representing a legend item
rectBounding rectangle
Note:
When widget is not derived from QwtLegendItem renderLegendItem does nothing and needs to be overloaded
void QwtPolarRenderer::renderTitle ( QPainter *  painter,
const QRectF &  rect 
) const [protected, virtual]

Render the title into a given rectangle.

Parameters:
painterPainter
rectBounding rectangle
void QwtPolarRenderer::renderTo ( QwtPolarPlot plot,
QPrinter &  printer 
) const

Render the plot to a QPrinter.

This function renders the contents of a QwtPolarPlot instance to QPaintDevice object. The size is derived from the printer metrics.

Parameters:
plotPlot to be rendered
printerPrinter to paint on
See also:
renderDocument(), render(), QwtPainter::setRoundingAlignment()
void QwtPolarRenderer::renderTo ( QwtPolarPlot plot,
QPaintDevice &  paintDevice 
) const

Render the plot to a QPaintDevice.

This function renders the contents of a QwtPolarPlot instance to QPaintDevice object. The target rectangle is derived from its device metrics.

Parameters:
plotPlot to be rendered
paintDevicedevice to paint on, f.e a QImage
See also:
renderDocument(), render(), QwtPainter::setRoundingAlignment()