QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 成员函数 | 所有成员列表
QwtPolarRenderer类 参考

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

#include <qwt_polar_renderer.h>

类 QwtPolarRenderer 继承关系图:

class  PrivateData
 

Public 成员函数

 QwtPolarRenderer (QObject *parent=nullptr)
 Constructor
 
 ~QwtPolarRenderer () override
 Destructor
 
void renderDocument (QwtPolarPlot *, const QString &format, const QSizeF &sizeMM, int resolution=85)
 Render a polar plot to a document
 
void renderDocument (QwtPolarPlot *, const QString &title, const QString &format, const QSizeF &sizeMM, int resolution=85)
 Render a polar plot to a document with title
 
void renderTo (QwtPolarPlot *, QPrinter &) const
 Render a polar plot to a printer
 
void renderTo (QwtPolarPlot *, QPaintDevice &) const
 Render a polar plot to a paint device
 
virtual void render (QwtPolarPlot *, QPainter *, const QRectF &rect) const
 Render a polar plot to a painter
 
bool exportTo (QwtPolarPlot *, const QString &documentName, const QSizeF &sizeMM=QSizeF(200, 200), int resolution=85)
 Export a polar plot to a document
 
virtual void renderTitle (QPainter *, const QRectF &) const
 Render the title
 
virtual void renderLegend (const QwtPolarPlot *, QPainter *, const QRectF &) const
 Render the legend
 

详细描述

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

构造及析构函数说明

◆ QwtPolarRenderer()

QwtPolarRenderer::QwtPolarRenderer ( QObject *  parent = nullptr)
explicit

Constructor

参数
parentParent object

Destructor

成员函数说明

◆ exportTo()

bool QwtPolarRenderer::exportTo ( QwtPolarPlot plot,
const QString &  documentName,
const QSizeF &  sizeMM = QSizeF(200, 200),
int  resolution = 85 
)

Export a polar plot to a document

Execute a file dialog and render the plot to the selected file

The document will be rendered in 85 dpi for a size 30x30 cm.

参数
plotPlot widget
documentNameDefault document name
sizeMMSize for the document in millimeters
resolutionResolution in dots per Inch (dpi)
返回
True if export was successful, false otherwise
参见
renderDocument()

◆ render()

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

Render a polar plot to a painter

Render the plot to a given rectangle

Renders the plot to the specified rectangle on the given painter.

参数
plotPlot widget to be rendered
painterPainter
plotRectBounding rectangle for the plot

◆ renderDocument() [1/2]

void QwtPolarRenderer::renderDocument ( QwtPolarPlot plot,
const QString &  fileName,
const QSizeF &  sizeMM,
int  resolution = 85 
)

Render a polar plot to a document

Render a polar plot to a file

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

参数
plotPlot widget
fileNamePath of the file, where the document will be stored
sizeMMSize for the document in millimeters
resolutionResolution in dots per Inch (dpi)

◆ renderDocument() [2/2]

void QwtPolarRenderer::renderDocument ( QwtPolarPlot plot,
const QString &  fileName,
const QString &  format,
const QSizeF &  sizeMM,
int  resolution = 85 
)

Render a polar plot to a document with title

Render a plot to a file with specified format

Supported formats are: pdf, ps, svg, and all image formats supported by Qt.

参数
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)
参见
renderTo(), render(), QwtPainter::setRoundingAlignment()

◆ renderLegend()

void QwtPolarRenderer::renderLegend ( const QwtPolarPlot plot,
QPainter *  painter,
const QRectF &  rect 
) const
virtual

Render the legend

Render the legend into a given rectangle

参数
plotPlot widget
painterPainter
rectBounding rectangle

◆ renderTitle()

void QwtPolarRenderer::renderTitle ( QPainter *  painter,
const QRectF &  rect 
) const
virtual

Render the title

Render the title into a given rectangle

参数
painterPainter
rectBounding rectangle

◆ renderTo() [1/2]

void QwtPolarRenderer::renderTo ( QwtPolarPlot plot,
QPaintDevice &  paintDevice 
) const

Render a polar plot to a paint device

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.

参数
plotPlot to be rendered
paintDeviceDevice to paint on, e.g. a QImage
参见
renderDocument(), render(), QwtPainter::setRoundingAlignment()

◆ renderTo() [2/2]

void QwtPolarRenderer::renderTo ( QwtPolarPlot plot,
QPrinter &  printer 
) const

Render a polar plot to a printer

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.

参数
plotPlot to be rendered
printerPrinter to paint on
参见
renderDocument(), render(), QwtPainter::setRoundingAlignment()

该类的文档由以下文件生成: