| Qwt User's Guide
    6.0.2
    | 
#include <qwt_plot_renderer.h>
| Public Types | |
| enum | DiscardFlag { DiscardNone = 0x00, DiscardBackground = 0x01, DiscardTitle = 0x02, DiscardLegend = 0x04, DiscardCanvasBackground = 0x08 } | 
| typedef QFlags< DiscardFlag > | DiscardFlags | 
| enum | LayoutFlag { DefaultLayout = 0x00, KeepFrames = 0x01, FrameWithScales = 0x02 } | 
| typedef QFlags< LayoutFlag > | LayoutFlags | 
| Public Member Functions | |
| QwtPlotRenderer (QObject *=NULL) | |
| virtual | ~QwtPlotRenderer () | 
| DiscardFlags | discardFlags () const | 
| LayoutFlags | layoutFlags () const | 
| virtual void | render (QwtPlot *, QPainter *, const QRectF &rect) const | 
| virtual void | renderCanvas (const QwtPlot *, QPainter *, const QRectF &canvasRect, const QwtScaleMap *maps) const | 
| void | renderDocument (QwtPlot *, const QString &fileName, const QSizeF &sizeMM, int resolution=85) | 
| void | renderDocument (QwtPlot *, const QString &fileName, const QString &format, const QSizeF &sizeMM, int resolution=85) | 
| virtual void | renderLegend (const QwtPlot *, QPainter *, const QRectF &) const | 
| virtual void | renderLegendItem (const QwtPlot *, QPainter *, const QWidget *, const QRectF &) const | 
| virtual void | renderScale (const QwtPlot *, QPainter *, int axisId, int startDist, int endDist, int baseDist, const QRectF &) const | 
| virtual void | renderTitle (const QwtPlot *, QPainter *, const QRectF &) const | 
| void | renderTo (QwtPlot *, QPrinter &) const | 
| void | renderTo (QwtPlot *, QPaintDevice &p) const | 
| void | setDiscardFlag (DiscardFlag flag, bool on=true) | 
| void | setDiscardFlags (DiscardFlags flags) | 
| void | setLayoutFlag (LayoutFlag flag, bool on=true) | 
| void | setLayoutFlags (LayoutFlags flags) | 
| bool | testDiscardFlag (DiscardFlag flag) const | 
| bool | testLayoutFlag (LayoutFlag flag) const | 
| Protected Member Functions | |
| void | buildCanvasMaps (const QwtPlot *, const QRectF &, QwtScaleMap maps[]) const | 
Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice.
Layout flags.
| 
 | explicit | 
Constructor
| parent | Parent object | 
| 
 | protected | 
Calculated the scale maps for rendering the canvas
| plot | Plot widget | 
| canvasRect | Target rectangle | 
| maps | Scale maps to be calculated | 
| QwtPlotRenderer::DiscardFlags QwtPlotRenderer::discardFlags | ( | ) | const | 
| QwtPlotRenderer::LayoutFlags QwtPlotRenderer::layoutFlags | ( | ) | const | 
| 
 | virtual | 
Paint the contents of a QwtPlot instance into a given rectangle.
| plot | Plot to be rendered | 
| painter | Painter | 
| plotRect | Bounding rectangle | 
| 
 | virtual | 
Render the canvas into a given rectangle.
| plot | Plot widget | 
| painter | Painter | 
| map | Maps mapping between plot and paint device coordinates | 
| canvasRect | Canvas rectangle | 
| void QwtPlotRenderer::renderDocument | ( | QwtPlot * | plot, | 
| const QString & | fileName, | ||
| const QSizeF & | sizeMM, | ||
| int | resolution = 85 | ||
| ) | 
Render a plot to a file
The format of the document will be autodetected from the suffix of the filename.
| plot | Plot widget | 
| fileName | Path of the file, where the document will be stored | 
| sizeMM | Size for the document in millimeters. | 
| resolution | Resolution in dots per Inch (dpi) | 
| void QwtPlotRenderer::renderDocument | ( | QwtPlot * | plot, | 
| const QString & | fileName, | ||
| const QString & | format, | ||
| const QSizeF & | sizeMM, | ||
| int | resolution = 85 | ||
| ) | 
Render a plot to a file
Supported formats are:
Scalable vector graphic formats like PDF or SVG are superior to raster graphics formats.
| plot | Plot widget | 
| fileName | Path of the file, where the document will be stored | 
| format | Format for the document | 
| sizeMM | Size for the document in millimeters. | 
| resolution | Resolution in dots per Inch (dpi) | 
| 
 | virtual | 
Render the legend into a given rectangle.
| plot | Plot widget | 
| painter | Painter | 
| rect | Bounding rectangle | 
| 
 | virtual | 
Render the legend item into a given rectangle.
| plot | Plot widget | 
| painter | Painter | 
| widget | Widget representing a legend item | 
| rect | Bounding rectangle | 
| 
 | virtual | 
Paint a scale into a given rectangle. Paint the scale into a given rectangle.
| plot | Plot widget | 
| painter | Painter | 
| axisId | Axis | 
| startDist | Start border distance | 
| endDist | End border distance | 
| baseDist | Base distance | 
| rect | Bounding rectangle | 
| 
 | virtual | 
Render the title into a given rectangle.
| plot | Plot widget | 
| painter | Painter | 
| rect | Bounding rectangle | 
| void QwtPlotRenderer::renderTo | ( | QwtPlot * | plot, | 
| QPrinter & | printer | ||
| ) | const | 
Render the plot to a QPrinter.
This function renders the contents of a QwtPlot instance to QPaintDevice object. The size is derived from the printer metrics.
| plot | Plot to be rendered | 
| printer | Printer to paint on | 
| void QwtPlotRenderer::renderTo | ( | QwtPlot * | plot, | 
| QPaintDevice & | paintDevice | ||
| ) | const | 
Render the plot to a QPaintDevice. 
This function renders the contents of a QwtPlot instance to QPaintDevice object. The target rectangle is derived from its device metrics.
| plot | Plot to be rendered | 
| paintDevice | device to paint on, f.e a QImage | 
| void QwtPlotRenderer::setDiscardFlag | ( | DiscardFlag | flag, | 
| bool | on = true | ||
| ) | 
Change a flag, indicating what to discard from rendering
| flag | Flag to change | 
| on | On/Off | 
| void QwtPlotRenderer::setDiscardFlags | ( | DiscardFlags | flags | ) | 
Set the flags, indicating what to discard from rendering
| flags | Flags | 
| void QwtPlotRenderer::setLayoutFlag | ( | LayoutFlag | flag, | 
| bool | on = true | ||
| ) | 
Change a layout flag
| flag | Flag to change | 
| on | On/Off | 
| void QwtPlotRenderer::setLayoutFlags | ( | LayoutFlags | flags | ) | 
Set the layout flags
| flags | Flags | 
| bool QwtPlotRenderer::testDiscardFlag | ( | DiscardFlag | flag | ) | const | 
Check if a flag is set.
| flag | Flag to be tested | 
| bool QwtPlotRenderer::testLayoutFlag | ( | LayoutFlag | flag | ) | const | 
Check if a flag is set.
| flag | Flag to be tested | 
 1.8.1
 1.8.1