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

用于将绘图导出到文档、打印机或其他受 QPainter/QPaintDevice 支持的对象的渲染器 更多...

#include <qwt_plot_renderer.h>

类 QwtPlotRenderer 继承关系图:

class  PrivateData
 

Public 类型

enum  DiscardFlag {
  DiscardNone = 0x00 , DiscardBackground = 0x01 , DiscardTitle = 0x02 , DiscardLegend = 0x04 ,
  DiscardCanvasBackground = 0x08 , DiscardFooter = 0x10 , DiscardCanvasFrame = 0x20
}
 丢弃标志 更多...
 
enum  LayoutFlag { DefaultLayout = 0x00 , FrameWithScales = 0x01 }
 布局标志 更多...
 

Public 成员函数

 QwtPlotRenderer (QObject *=nullptr)
 构造函数
 
virtual ~QwtPlotRenderer ()
 析构函数
 
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
 将绘图渲染到 QPrinter
 
void renderTo (QwtPlot *, QPaintDevice &) const
 将绘图渲染到 QPaintDevice
 
virtual void render (QwtPlot *, QPainter *, const QRectF &plotRect) const
 QwtPlot 实例的内容绘制到给定矩形中
 
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 *, QwtAxisId, int startDist, int endDist, int baseDist, const QRectF &scaleRect) const
 将比例尺绘制到给定矩形中
 
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)
 执行文件对话框并将绘图渲染到选定文件
 

详细描述

用于将绘图导出到文档、打印机或其他受 QPainter/QPaintDevice 支持的对象的渲染器

成员枚举类型说明

◆ DiscardFlag

丢弃标志

枚举值
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

DiscardFooter 

Don't render the footer of the plot

DiscardCanvasFrame 

不渲染画布的边框

注解
当使用样式表时,此标志无效,因为边框是背景的一部分

◆ LayoutFlag

布局标志

枚举值
DefaultLayout 

Use the default layout as on screen

FrameWithScales 

代替比例尺,在绘图画布周围绘制一个框,比例尺刻度对齐到该框。

构造及析构函数说明

◆ QwtPlotRenderer()

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

构造函数

◆ ~QwtPlotRenderer()

QwtPlotRenderer::~QwtPlotRenderer ( )
virtual

析构函数

成员函数说明

◆ discardFlags()

QwtPlotRenderer::DiscardFlags QwtPlotRenderer::discardFlags ( ) const

获取指示渲染时丢弃内容的标志

◆ exportTo()

bool QwtPlotRenderer::exportTo ( QwtPlot plot,
const QString &  documentName,
const QSizeF &  sizeMM = QSizeF( 300, 200 ),
int  resolution = 85 
)

执行文件对话框并将绘图渲染到选定文件

◆ layoutFlags()

QwtPlotRenderer::LayoutFlags QwtPlotRenderer::layoutFlags ( ) const

获取布局标志

◆ render()

void QwtPlotRenderer::render ( QwtPlot plot,
QPainter *  painter,
const QRectF &  plotRect 
) const
virtual

QwtPlot 实例的内容绘制到给定矩形中

◆ renderCanvas()

void QwtPlotRenderer::renderCanvas ( const QwtPlot plot,
QPainter *  painter,
const QRectF &  canvasRect,
const QwtScaleMap maps 
) const
virtual

将画布渲染到给定矩形中

◆ renderDocument() [1/2]

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

将绘图渲染到文件

◆ renderDocument() [2/2]

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

将绘图渲染到指定格式的文件

◆ renderFooter()

void QwtPlotRenderer::renderFooter ( const QwtPlot plot,
QPainter *  painter,
const QRectF &  footerRect 
) const
virtual

将页脚渲染到给定矩形中

◆ renderLegend()

void QwtPlotRenderer::renderLegend ( const QwtPlot plot,
QPainter *  painter,
const QRectF &  legendRect 
) const
virtual

将图例渲染到给定矩形中

◆ renderScale()

void QwtPlotRenderer::renderScale ( const QwtPlot plot,
QPainter *  painter,
QwtAxisId  axisId,
int  startDist,
int  endDist,
int  baseDist,
const QRectF &  scaleRect 
) const
virtual

将比例尺绘制到给定矩形中

◆ renderTitle()

void QwtPlotRenderer::renderTitle ( const QwtPlot plot,
QPainter *  painter,
const QRectF &  titleRect 
) const
virtual

将标题渲染到给定矩形中

◆ renderTo() [1/2]

void QwtPlotRenderer::renderTo ( QwtPlot plot,
QPaintDevice &  paintDevice 
) const

将绘图渲染到 QPaintDevice

◆ renderTo() [2/2]

void QwtPlotRenderer::renderTo ( QwtPlot plot,
QPrinter &  printer 
) const

将绘图渲染到 QPrinter

◆ setDiscardFlag()

void QwtPlotRenderer::setDiscardFlag ( DiscardFlag  flag,
bool  on = true 
)

更改指示渲染时丢弃内容的标志

◆ setDiscardFlags()

void QwtPlotRenderer::setDiscardFlags ( DiscardFlags  flags)

设置指示渲染时丢弃内容的标志

◆ setLayoutFlag()

void QwtPlotRenderer::setLayoutFlag ( LayoutFlag  flag,
bool  on = true 
)

更改布局标志

◆ setLayoutFlags()

void QwtPlotRenderer::setLayoutFlags ( LayoutFlags  flags)

设置布局标志

◆ testDiscardFlag()

bool QwtPlotRenderer::testDiscardFlag ( DiscardFlag  flag) const

测试丢弃标志是否启用

◆ testLayoutFlag()

bool QwtPlotRenderer::testLayoutFlag ( LayoutFlag  flag) const

测试布局标志是否启用


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