- bookworm 6.1.4-2
- testing 6.1.4-2
- unstable 6.1.4-2
- experimental 6.2.0-1
QwtPlotRenderer(3) | Qwt User's Guide | QwtPlotRenderer(3) |
NAME¶
QwtPlotRenderer - Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice.
SYNOPSIS¶
#include <qwt_plot_renderer.h>
Inherits QObject.
Public Types¶
enum DiscardFlag { DiscardNone = 0x00,
DiscardBackground = 0x01, DiscardTitle = 0x02,
DiscardLegend = 0x04, DiscardCanvasBackground = 0x08,
DiscardFooter = 0x10, DiscardCanvasFrame = 0x20 }
Disard flags. enum LayoutFlag { DefaultLayout = 0x00,
FrameWithScales = 0x01 }
Layout flags. typedef QFlags< DiscardFlag > DiscardFlags
Disard flags. typedef QFlags< LayoutFlag > LayoutFlags
Layout flags.
Public Member Functions¶
QwtPlotRenderer (QObject *=NULL)
virtual ~QwtPlotRenderer ()
Destructor. void setDiscardFlag (DiscardFlag flag, bool on=true)
bool testDiscardFlag (DiscardFlag flag) const
void setDiscardFlags (DiscardFlags flags)
DiscardFlags discardFlags () const
void setLayoutFlag (LayoutFlag flag, bool on=true)
bool testLayoutFlag (LayoutFlag flag) const
void setLayoutFlags (LayoutFlags flags)
LayoutFlags layoutFlags () 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)
void renderTo (QwtPlot *, QPrinter &) const
Render the plot to a QPrinter. void renderTo (QwtPlot *,
QPaintDevice &) const
Render the plot to a QPaintDevice. virtual void render
(QwtPlot *, QPainter *, const QRectF &plotRect) const
virtual void renderTitle (const QwtPlot *, QPainter *, const
QRectF &titleRect) const
virtual void renderFooter (const QwtPlot *, QPainter *, const
QRectF &footerRect) const
virtual void renderScale (const QwtPlot *, QPainter *, int
axisId, int startDist, int endDist, int baseDist, const QRectF
&scaleRect) const
Paint a scale into a given rectangle. Paint the scale into a given rectangle.
virtual void renderCanvas (const QwtPlot *, QPainter *, const
QRectF &canvasRect, const QwtScaleMap *maps) const
virtual void renderLegend (const QwtPlot *, QPainter *, const
QRectF &legendRect) const
bool exportTo (QwtPlot *, const QString &documentName, const
QSizeF &sizeMM=QSizeF(300, 200), int resolution=85)
Execute a file dialog and render the plot to the selected file.
Detailed Description¶
Renderer for exporting a plot to a document, a printer or anything else, that is supported by QPainter/QPaintDevice.
Member Enumeration Documentation¶
enum QwtPlotRenderer::DiscardFlag¶
Disard flags.
Enumerator
- DiscardNone
- Render all components of the plot.
- DiscardBackground
- Don't render the background of the plot.
- DiscardTitle
- Don't render the title of the plot.
- DiscardLegend
- Don't render the legend of the plot.
- DiscardCanvasBackground
- Don't render the background of the canvas.
- Don't render the footer of the plot.
- DiscardCanvasFrame
- Don't render the frame of the canvas
Note:
enum QwtPlotRenderer::LayoutFlag¶
Layout flags.
See also:
Enumerator
- DefaultLayout
- Use the default layout as on screen.
- FrameWithScales
- Instead of the scales a box is painted around the plot canvas, where the scale ticks are aligned to.
Constructor & Destructor Documentation¶
QwtPlotRenderer::QwtPlotRenderer (QObject * parent = NULL) [explicit]¶
Constructor
Parameters:
Member Function Documentation¶
QwtPlotRenderer::DiscardFlags QwtPlotRenderer::discardFlags () const¶
Returns:
See also:
bool QwtPlotRenderer::exportTo (QwtPlot * plot, const QString & documentName, const QSizeF & sizeMM = QSizeF( 300, 200 ), int resolution = 85)¶
Execute a file dialog and render the plot to the selected file.
Parameters:
documentName Default document name
sizeMM Size for the document in millimeters.
resolution Resolution in dots per Inch (dpi)
Returns:
See also:
QwtPlotRenderer::LayoutFlags QwtPlotRenderer::layoutFlags () const¶
Returns:
See also:
void QwtPlotRenderer::render (QwtPlot * plot, QPainter * painter, const QRectF & plotRect) const [virtual]¶
Paint the contents of a QwtPlot instance into a given rectangle.
Parameters:
painter Painter
plotRect Bounding rectangle
See also:
void QwtPlotRenderer::renderCanvas (const QwtPlot * plot, QPainter * painter, const QRectF & canvasRect, const QwtScaleMap * maps) const [virtual]¶
Render the canvas into a given rectangle.
Parameters:
painter Painter
maps 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 auto-detected from the suffix of the file name.
Parameters:
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:
- pdf
Portable Document Format PDF - ps
Postcript - svg
Scalable Vector Graphics SVG - all image formats supported by Qt
see QImageWriter::supportedImageFormats()
Scalable vector graphic formats like PDF or SVG are superior to raster graphics formats.
Parameters:
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)
See also:
void QwtPlotRenderer::renderFooter (const QwtPlot * plot, QPainter * painter, const QRectF & footerRect) const [virtual]¶
Render the footer into a given rectangle.
Parameters:
painter Painter
footerRect Bounding rectangle for the footer
void QwtPlotRenderer::renderLegend (const QwtPlot * plot, QPainter * painter, const QRectF & legendRect) const [virtual]¶
Render the legend into a given rectangle.
Parameters:
painter Painter
legendRect Bounding rectangle for the legend
void QwtPlotRenderer::renderScale (const QwtPlot * plot, QPainter * painter, int axisId, int startDist, int endDist, int baseDist, const QRectF & scaleRect) const [virtual]¶
Paint a scale into a given rectangle. Paint the scale into a given rectangle.
Parameters:
painter Painter
axisId Axis
startDist Start border distance
endDist End border distance
baseDist Base distance
scaleRect Bounding rectangle for the scale
void QwtPlotRenderer::renderTitle (const QwtPlot * plot, QPainter * painter, const QRectF & titleRect) const [virtual]¶
Render the title into a given rectangle.
Parameters:
painter Painter
titleRect Bounding rectangle for the title
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.
Parameters:
printer Printer to paint on
See also:
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.
Parameters:
paintDevice device to paint on, f.e a QImage
See also:
void QwtPlotRenderer::setDiscardFlag (DiscardFlag flag, bool on = true)¶
Change a flag, indicating what to discard from rendering
Parameters:
on On/Off
See also:
void QwtPlotRenderer::setDiscardFlags (DiscardFlags flags)¶
Set the flags, indicating what to discard from rendering
Parameters:
See also:
void QwtPlotRenderer::setLayoutFlag (LayoutFlag flag, bool on = true)¶
Change a layout flag
Parameters:
on On/Off
See also:
void QwtPlotRenderer::setLayoutFlags (LayoutFlags flags)¶
Set the layout flags
Parameters:
See also:
bool QwtPlotRenderer::testDiscardFlag (DiscardFlag flag) const¶
Returns:
Parameters:
See also:
bool QwtPlotRenderer::testLayoutFlag (LayoutFlag flag) const¶
Returns:
Parameters:
See also:
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |