.TH "QwtPlotRenderer" 3 "Fri Apr 15 2011" "Version 6.0.0" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtPlotRenderer \- .PP Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Types" .in +1c .ti -1c .RI "enum \fBDiscardFlag\fP { \fBDiscardNone\fP = 0x00, \fBDiscardBackground\fP = 0x01, \fBDiscardTitle\fP = 0x02, \fBDiscardLegend\fP = 0x04, \fBDiscardCanvasBackground\fP = 0x08 }" .br .ti -1c .RI "enum \fBLayoutFlag\fP { \fBDefaultLayout\fP = 0x00, \fBKeepFrames\fP = 0x01, \fBFrameWithScales\fP = 0x02 }" .br .ti -1c .RI "typedef QFlags< \fBDiscardFlag\fP > \fBDiscardFlags\fP" .br .ti -1c .RI "typedef QFlags< \fBLayoutFlag\fP > \fBLayoutFlags\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtPlotRenderer\fP (QObject *=NULL)" .br .ti -1c .RI "virtual \fB~QwtPlotRenderer\fP ()" .br .ti -1c .RI "void \fBsetDiscardFlag\fP (\fBDiscardFlag\fP flag, bool on=true)" .br .ti -1c .RI "bool \fBtestDiscardFlag\fP (\fBDiscardFlag\fP flag) const " .br .ti -1c .RI "void \fBsetDiscardFlags\fP (\fBDiscardFlags\fP flags)" .br .ti -1c .RI "\fBDiscardFlags\fP \fBdiscardFlags\fP () const " .br .ti -1c .RI "void \fBsetLayoutFlag\fP (\fBLayoutFlag\fP flag, bool on=true)" .br .ti -1c .RI "bool \fBtestLayoutFlag\fP (\fBLayoutFlag\fP flag) const " .br .ti -1c .RI "void \fBsetLayoutFlags\fP (\fBLayoutFlags\fP flags)" .br .ti -1c .RI "\fBLayoutFlags\fP \fBlayoutFlags\fP () const " .br .ti -1c .RI "void \fBrenderDocument\fP (\fBQwtPlot\fP *, const QString &format, const QSizeF &sizeMM, int resolution=85)" .br .ti -1c .RI "void \fBrenderDocument\fP (\fBQwtPlot\fP *, const QString &title, const QString &format, const QSizeF &sizeMM, int resolution=85)" .br .ti -1c .RI "void \fBrenderTo\fP (\fBQwtPlot\fP *, QPrinter &) const " .br .ti -1c .RI "void \fBrenderTo\fP (\fBQwtPlot\fP *, QPaintDevice &p) const " .br .ti -1c .RI "virtual void \fBrender\fP (\fBQwtPlot\fP *, QPainter *, const QRectF &rect) const " .br .ti -1c .RI "virtual void \fBrenderLegendItem\fP (const \fBQwtPlot\fP *, QPainter *, const QWidget *, const QRectF &) const " .br .ti -1c .RI "virtual void \fBrenderTitle\fP (const \fBQwtPlot\fP *, QPainter *, const QRectF &) const " .br .ti -1c .RI "virtual void \fBrenderScale\fP (const \fBQwtPlot\fP *, QPainter *, int axisId, int startDist, int endDist, int baseDist, const QRectF &) const " .br .ti -1c .RI "virtual void \fBrenderCanvas\fP (const \fBQwtPlot\fP *, QPainter *, const QRectF &canvasRect, const \fBQwtScaleMap\fP *maps) const " .br .ti -1c .RI "virtual void \fBrenderLegend\fP (const \fBQwtPlot\fP *, QPainter *, const QRectF &) const " .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBbuildCanvasMaps\fP (const \fBQwtPlot\fP *, const QRectF &, \fBQwtScaleMap\fP maps[]) const " .br .in -1c .SH "Detailed Description" .PP Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice. .SH "Member Typedef Documentation" .PP .SS "typedef QFlags<\fBDiscardFlag\fP> \fBQwtPlotRenderer::DiscardFlags\fP" .PP Disard flags. .SS "typedef QFlags<\fBLayoutFlag\fP> \fBQwtPlotRenderer::LayoutFlags\fP" .PP Layout flags. .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtPlotRenderer::DiscardFlag\fP" .PP Disard flags. .PP \fBEnumerator: \fP .in +1c .TP \fB\fIDiscardNone \fP\fP Render all components of the plot. .TP \fB\fIDiscardBackground \fP\fP Don't render the background of the plot. .TP \fB\fIDiscardTitle \fP\fP Don't render the title of the plot. .TP \fB\fIDiscardLegend \fP\fP Don't render the legend of the plot. .TP \fB\fIDiscardCanvasBackground \fP\fP Don't render the background of the canvas. .SS "enum \fBQwtPlotRenderer::LayoutFlag\fP" .PP Layout flags. \fBSee also:\fP .RS 4 \fBsetLayoutFlag()\fP, \fBtestLayoutFlag()\fP .RE .PP .PP \fBEnumerator: \fP .in +1c .TP \fB\fIDefaultLayout \fP\fP Use the default layout without margins and frames. .TP \fB\fIKeepFrames \fP\fP Render all frames of the plot. .TP \fB\fIFrameWithScales \fP\fP Instead of the scales a box is painted around the plot canvas, where the scale ticks are aligned to. .SH "Constructor & Destructor Documentation" .PP .SS "QwtPlotRenderer::QwtPlotRenderer (QObject *parent = \fCNULL\fP)\fC [explicit]\fP"Constructor .PP \fBParameters:\fP .RS 4 \fIparent\fP Parent object .RE .PP .SS "QwtPlotRenderer::~QwtPlotRenderer ()\fC [virtual]\fP" .PP Destructor. .SH "Member Function Documentation" .PP .SS "void QwtPlotRenderer::buildCanvasMaps (const \fBQwtPlot\fP *plot, const QRectF &canvasRect, \fBQwtScaleMap\fPmaps[]) const\fC [protected]\fP"Calculated the scale maps for rendering the canvas .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot widget .br \fIcanvasRect\fP Target rectangle .br \fImaps\fP Scale maps to be calculated .RE .PP .SS "\fBQwtPlotRenderer::DiscardFlags\fP QwtPlotRenderer::discardFlags () const"\fBReturns:\fP .RS 4 Flags, indicating what to discard from rendering .RE .PP \fBSee also:\fP .RS 4 \fBDiscardFlag\fP, \fBsetDiscardFlags()\fP, \fBsetDiscardFlag()\fP, \fBtestDiscardFlag()\fP .RE .PP .SS "\fBQwtPlotRenderer::LayoutFlags\fP QwtPlotRenderer::layoutFlags () const"\fBReturns:\fP .RS 4 Layout flags .RE .PP \fBSee also:\fP .RS 4 \fBLayoutFlag\fP, \fBsetLayoutFlags()\fP, \fBsetLayoutFlag()\fP, \fBtestLayoutFlag()\fP .RE .PP .SS "void QwtPlotRenderer::render (\fBQwtPlot\fP *plot, QPainter *painter, const QRectF &plotRect) const\fC [virtual]\fP"Paint the contents of a \fBQwtPlot\fP instance into a given rectangle. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot to be rendered .br \fIpainter\fP Painter .br \fIplotRect\fP Bounding rectangle .RE .PP \fBSee also:\fP .RS 4 \fBrenderDocument()\fP, \fBrenderTo()\fP, \fBQwtPainter::setRoundingAlignment()\fP .RE .PP .SS "void QwtPlotRenderer::renderCanvas (const \fBQwtPlot\fP *plot, QPainter *painter, const QRectF &canvasRect, const \fBQwtScaleMap\fP *map) const\fC [virtual]\fP"Render the canvas into a given rectangle. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot widget .br \fIpainter\fP Painter .br \fImap\fP Maps mapping between plot and paint device coordinates .br \fIcanvasRect\fP Canvas rectangle .RE .PP .SS "void QwtPlotRenderer::renderDocument (\fBQwtPlot\fP *plot, const QString &fileName, const QSizeF &sizeMM, intresolution = \fC85\fP)"Render a plot to a file .PP The format of the document will be autodetected from the suffix of the filename. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot widget .br \fIfileName\fP Path of the file, where the document will be stored .br \fIsizeMM\fP Size for the document in millimeters. .br \fIresolution\fP Resolution in dots per Inch (dpi) .RE .PP .SS "void QwtPlotRenderer::renderDocument (\fBQwtPlot\fP *plot, const QString &fileName, const QString &format, const QSizeF &sizeMM, intresolution = \fC85\fP)"Render a plot to a file .PP Supported formats are: .PP .IP "\(bu" 2 pdf .br Portable Document Format PDF .IP "\(bu" 2 ps .br Postcript .IP "\(bu" 2 svg .br Scalable Vector Graphics SVG .IP "\(bu" 2 all image formats supported by Qt .br see QImageWriter::supportedImageFormats() .PP .PP Scalable vector graphic formats like PDF or SVG are superior to raster graphics formats. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot widget .br \fIfileName\fP Path of the file, where the document will be stored .br \fIformat\fP Format for the document .br \fIsizeMM\fP Size for the document in millimeters. .br \fIresolution\fP Resolution in dots per Inch (dpi) .RE .PP \fBSee also:\fP .RS 4 \fBrenderTo()\fP, \fBrender()\fP, \fBQwtPainter::setRoundingAlignment()\fP .RE .PP .SS "void QwtPlotRenderer::renderLegend (const \fBQwtPlot\fP *plot, QPainter *painter, const QRectF &rect) const\fC [virtual]\fP"Render the legend into a given rectangle. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot widget .br \fIpainter\fP Painter .br \fIrect\fP Bounding rectangle .RE .PP .SS "void QwtPlotRenderer::renderLegendItem (const \fBQwtPlot\fP *plot, QPainter *painter, const QWidget *widget, const QRectF &rect) const\fC [virtual]\fP"Render the legend item into a given rectangle. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot widget .br \fIpainter\fP Painter .br \fIwidget\fP Widget representing a legend item .br \fIrect\fP Bounding rectangle .RE .PP \fBNote:\fP .RS 4 When widget is not derived from \fBQwtLegendItem\fP renderLegendItem does nothing and needs to be overloaded .RE .PP .SS "void QwtPlotRenderer::renderScale (const \fBQwtPlot\fP *plot, QPainter *painter, intaxisId, intstartDist, intendDist, intbaseDist, const QRectF &rect) const\fC [virtual]\fP" .PP Paint a scale into a given rectangle. Paint the scale into a given rectangle. \fBParameters:\fP .RS 4 \fIplot\fP Plot widget .br \fIpainter\fP Painter .br \fIaxisId\fP Axis .br \fIstartDist\fP Start border distance .br \fIendDist\fP End border distance .br \fIbaseDist\fP Base distance .br \fIrect\fP Bounding rectangle .RE .PP .SS "void QwtPlotRenderer::renderTitle (const \fBQwtPlot\fP *plot, QPainter *painter, const QRectF &rect) const\fC [virtual]\fP"Render the title into a given rectangle. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot widget .br \fIpainter\fP Painter .br \fIrect\fP Bounding rectangle .RE .PP .SS "void QwtPlotRenderer::renderTo (\fBQwtPlot\fP *plot, QPrinter &printer) const" .PP Render the plot to a QPrinter. This function renders the contents of a \fBQwtPlot\fP instance to \fCQPaintDevice\fP object. The size is derived from the printer metrics. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot to be rendered .br \fIprinter\fP Printer to paint on .RE .PP \fBSee also:\fP .RS 4 \fBrenderDocument()\fP, \fBrender()\fP, \fBQwtPainter::setRoundingAlignment()\fP .RE .PP .SS "void QwtPlotRenderer::renderTo (\fBQwtPlot\fP *plot, QPaintDevice &paintDevice) const" .PP Render the plot to a \fCQPaintDevice\fP. This function renders the contents of a \fBQwtPlot\fP instance to \fCQPaintDevice\fP object. The target rectangle is derived from its device metrics. .PP \fBParameters:\fP .RS 4 \fIplot\fP Plot to be rendered .br \fIpaintDevice\fP device to paint on, f.e a QImage .RE .PP \fBSee also:\fP .RS 4 \fBrenderDocument()\fP, \fBrender()\fP, \fBQwtPainter::setRoundingAlignment()\fP .RE .PP .SS "void QwtPlotRenderer::setDiscardFlag (\fBDiscardFlag\fPflag, boolon = \fCtrue\fP)"Change a flag, indicating what to discard from rendering .PP \fBParameters:\fP .RS 4 \fIflag\fP Flag to change .br \fIon\fP On/Off .RE .PP \fBSee also:\fP .RS 4 \fBDiscardFlag\fP, \fBtestDiscardFlag()\fP, \fBsetDiscardFlags()\fP, \fBdiscardFlags()\fP .RE .PP .SS "void QwtPlotRenderer::setDiscardFlags (\fBDiscardFlags\fPflags)"Set the flags, indicating what to discard from rendering .PP \fBParameters:\fP .RS 4 \fIflags\fP Flags .RE .PP \fBSee also:\fP .RS 4 \fBDiscardFlag\fP, \fBsetDiscardFlag()\fP, \fBtestDiscardFlag()\fP, \fBdiscardFlags()\fP .RE .PP .SS "void QwtPlotRenderer::setLayoutFlag (\fBLayoutFlag\fPflag, boolon = \fCtrue\fP)"Change a layout flag .PP \fBParameters:\fP .RS 4 \fIflag\fP Flag to change .br \fIon\fP On/Off .RE .PP \fBSee also:\fP .RS 4 \fBLayoutFlag\fP, \fBtestLayoutFlag()\fP, \fBsetLayoutFlags()\fP, \fBlayoutFlags()\fP .RE .PP .SS "void QwtPlotRenderer::setLayoutFlags (\fBLayoutFlags\fPflags)"Set the layout flags .PP \fBParameters:\fP .RS 4 \fIflags\fP Flags .RE .PP \fBSee also:\fP .RS 4 \fBLayoutFlag\fP, \fBsetLayoutFlag()\fP, \fBtestLayoutFlag()\fP, \fBlayoutFlags()\fP .RE .PP .SS "bool QwtPlotRenderer::testDiscardFlag (\fBDiscardFlag\fPflag) const"Check if a flag is set. .PP \fBParameters:\fP .RS 4 \fIflag\fP Flag to be tested .RE .PP \fBSee also:\fP .RS 4 \fBDiscardFlag\fP, \fBsetDiscardFlag()\fP, \fBsetDiscardFlags()\fP, \fBdiscardFlags()\fP .RE .PP .SS "bool QwtPlotRenderer::testLayoutFlag (\fBLayoutFlag\fPflag) const"Check if a flag is set. .PP \fBParameters:\fP .RS 4 \fIflag\fP Flag to be tested .RE .PP \fBSee also:\fP .RS 4 \fBLayoutFlag\fP, \fBsetLayoutFlag()\fP, \fBsetLayoutFlags()\fP, \fBlayoutFlags()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code.