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

用于组织Qwt绘图的图形容器,提供灵活的布局选项 更多...

#include <qwt_figure.h>

类 QwtFigure 继承关系图:

class  PrivateData
 

信号

void axesAdded (QwtPlot *newAxes)
 当坐标轴添加到图形时发出的信号
 
void axesRemoved (QwtPlot *removedAxes)
 当坐标轴从图形中移除时发出的信号
 
void figureCleared ()
 当图形被清除时发出的信号
 
void currentAxesChanged (QwtPlot *current)
 当前激活的坐标系发生了改变的信号
 

Public 成员函数

 QwtFigure (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
 构造函数
 
void addWidget (QWidget *widget, qreal left, qreal top, qreal width, qreal height)
 使用归一化坐标添加窗口
 
void addWidget (QWidget *widget, int rowCnt, int colCnt, int row, int col, int rowSpan=1, int colSpan=1, qreal wspace=0.0, qreal hspace=0.0)
 添加窗口部件到网格布局
 
void addAxes (QwtPlot *plot, const QRectF &rect)
 使用归一化坐标添加绘图
 
void addAxes (QwtPlot *plot, qreal left, qreal top, qreal width, qreal height)
 使用归一化坐标添加绘图(分离参数)
 
void addGridAxes (QwtPlot *plot, int rowCnt, int colCnt, int row, int col, int rowSpan=1, int colSpan=1, qreal wspace=0.0, qreal hspace=0.0)
 添加窗口部件到网格布局
 
void setWidgetNormPos (QWidget *widget, const QRectF &rect)
 改变已经添加的窗口的位置占比,如果窗口还没添加,此函数无效
 
QList< QwtPlot * > allAxes (bool byZOrder=false) const
 获取图形中的所有坐标轴(绘图)(不包含寄生轴)
 
bool hasAxes () const
 检查图形是否有坐标轴
 
bool hasAxes (QwtPlot *plot) const
 检查图形是否存在特定plot
 
void removeAxes (QwtPlot *plot)
 从图形中移除特定的坐标轴(绘图)
 
bool takeAxes (QwtPlot *plot)
 从图形中取出特定的坐标轴(绘图)但不删除它
 
void clear ()
 清除图形中的所有坐标轴
 
QSize getSizeInches () const
 获取图形的英寸尺寸
 
void setSizeInches (float width, float height)
 设置图形的英寸尺寸
 
void setSizeInches (const QSizeF &size)
 设置图形的英寸尺寸
 
void setFaceColor (const QColor &color)
 设置图形的背景颜色
 
QColor faceColor () const
 获取图形的表面颜色
 
void setFaceBrush (const QBrush &brush)
 设置图形的背景画刷
 
QBrush faceBrush () const
 获取图形的表面画刷
 
void setEdgeColor (const QColor &color)
 设置图形的边缘颜色
 
QColor edgeColor () const
 获取图形的边缘颜色
 
void setEdgeLineWidth (int width)
 设置图形的边缘线宽
 
int edgeLineWidth () const
 获取图形的边缘线宽
 
QwtPlotcreateParasiteAxes (QwtPlot *hostPlot, QwtAxis::Position enableAxis)
 为宿主绘图创建寄生轴
 
QList< QwtPlot * > getParasiteAxes (QwtPlot *hostPlot) const
 获取宿主绘图的所有寄生轴
 
QPixmap saveFig (int dpi=-1) const
 使用指定DPI将图形保存为QPixmap
 
QPixmap saveFig (QSizeF &inchesSize) const
 使用指定英寸尺寸将图形保存为QPixmap
 
bool saveFig (const QString &filename, int dpi=-1) const
 使用指定DPI将图形保存到文件
 
void setCurrentAxes (QwtPlot *plot)
 设置当前坐标轴(绘图)
 
void sca (QwtPlot *plot)
 设置当前坐标轴(绘图)
 
QwtPlotcurrentAxes () const
 获取当前坐标轴(绘图)
 
QwtPlotgca () const
 获取当前坐标轴(绘图)
 
QRectF axesNormRect (QwtPlot *plot) const
 获取坐标系的归一化矩形
 
QRectF widgetNormRect (QWidget *w) const
 获取窗口的归一化矩形
 
QwtPlotplotUnderPos (const QPoint &pos) const
 获取在此坐标下的绘图
 
QRectF calcNormRect (const QRect &geoRect) const
 通过真实的窗口坐标计算归一化坐标
 
QRect calcActualRect (const QRectF &normRect)
 通过归一化矩形计算真实矩形
 
void replotAll ()
 更新所有的绘图
 
void addAxisAlignment (const QList< QwtPlot * > &plots, int axisId)
 添加轴对齐配置
 
bool removeAxisAlignment (const QList< QwtPlot * > &plots, int axisId)
 移除指定的轴对齐配置
 
void clearAxisAlignment ()
 清除所有轴对齐配置
 
void applyAllAxisAlignments (bool replot=true)
 应用所有轴对齐配置
 
void applyAlignmentsForAxis (int axisId)
 应用指定轴ID的所有对齐配置
 
int axisAligmentCount () const
 获取轴对齐信息数量
 
QPair< QList< QwtPlot * >, int > axisAligmentInfo (int index) const
 获取轴对齐信息
 

静态 Public 成员函数

static void alignAxes (QList< QwtPlot * > plots, int axisId, bool update=true)
 QwtPlot轴对齐函数
 

Protected 成员函数

void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 

详细描述

用于组织Qwt绘图的图形容器,提供灵活的布局选项

构造及析构函数说明

◆ QwtFigure()

QwtFigure::QwtFigure ( QWidget *  parent = nullptr,
Qt::WindowFlags  f = Qt::WindowFlags() 
)

构造函数

成员函数说明

◆ addAxes() [1/2]

void QwtFigure::addAxes ( QwtPlot plot,
const QRectF &  rect 
)

使用归一化坐标添加绘图

◆ addAxes() [2/2]

void QwtFigure::addAxes ( QwtPlot plot,
qreal  left,
qreal  top,
qreal  width,
qreal  height 
)

使用归一化坐标添加绘图(分离参数)

◆ addAxisAlignment()

void QwtFigure::addAxisAlignment ( const QList< QwtPlot * > &  plots,
int  axisId 
)

添加轴对齐配置

◆ addGridAxes()

void QwtFigure::addGridAxes ( QwtPlot plot,
int  rowCnt,
int  colCnt,
int  row,
int  col,
int  rowSpan = 1,
int  colSpan = 1,
qreal  wspace = 0.0,
qreal  hspace = 0.0 
)

添加窗口部件到网格布局

◆ addWidget() [1/2]

void QwtFigure::addWidget ( QWidget *  widget,
int  rowCnt,
int  colCnt,
int  row,
int  col,
int  rowSpan = 1,
int  colSpan = 1,
qreal  wspace = 0.0,
qreal  hspace = 0.0 
)

添加窗口部件到网格布局

◆ addWidget() [2/2]

void QwtFigure::addWidget ( QWidget *  widget,
qreal  left,
qreal  top,
qreal  width,
qreal  height 
)

使用归一化坐标添加窗口

◆ alignAxes()

void QwtFigure::alignAxes ( QList< QwtPlot * >  plots,
int  axisId,
bool  update = true 
)
static

QwtPlot轴对齐函数

◆ allAxes()

QList< QwtPlot * > QwtFigure::allAxes ( bool  byZOrder = false) const

获取图形中的所有坐标轴(绘图)(不包含寄生轴)

◆ applyAlignmentsForAxis()

void QwtFigure::applyAlignmentsForAxis ( int  axisId)

应用指定轴ID的所有对齐配置

◆ applyAllAxisAlignments()

void QwtFigure::applyAllAxisAlignments ( bool  replot = true)

应用所有轴对齐配置

◆ axesAdded

void QwtFigure::axesAdded ( QwtPlot newAxes)
signal

当坐标轴添加到图形时发出的信号

◆ axesNormRect()

QRectF QwtFigure::axesNormRect ( QwtPlot plot) const

获取坐标系的归一化矩形

◆ axesRemoved

void QwtFigure::axesRemoved ( QwtPlot removedAxes)
signal

当坐标轴从图形中移除时发出的信号

◆ axisAligmentCount()

int QwtFigure::axisAligmentCount ( ) const

获取轴对齐信息数量

◆ axisAligmentInfo()

QPair< QList< QwtPlot * >, int > QwtFigure::axisAligmentInfo ( int  index) const

获取轴对齐信息

◆ calcActualRect()

QRect QwtFigure::calcActualRect ( const QRectF &  normRect)

通过归一化矩形计算真实矩形

◆ calcNormRect()

QRectF QwtFigure::calcNormRect ( const QRect &  geoRect) const

通过真实的窗口坐标计算归一化坐标

◆ clear()

void QwtFigure::clear ( )

清除图形中的所有坐标轴

◆ clearAxisAlignment()

void QwtFigure::clearAxisAlignment ( )

清除所有轴对齐配置

◆ createParasiteAxes()

QwtPlot * QwtFigure::createParasiteAxes ( QwtPlot hostPlot,
QwtAxis::Position  enableAxis 
)

为宿主绘图创建寄生轴

◆ currentAxes()

QwtPlot * QwtFigure::currentAxes ( ) const

获取当前坐标轴(绘图)

◆ currentAxesChanged

void QwtFigure::currentAxesChanged ( QwtPlot current)
signal

当前激活的坐标系发生了改变的信号

◆ edgeColor()

QColor QwtFigure::edgeColor ( ) const

获取图形的边缘颜色

◆ edgeLineWidth()

int QwtFigure::edgeLineWidth ( ) const

获取图形的边缘线宽

◆ faceBrush()

QBrush QwtFigure::faceBrush ( ) const

获取图形的表面画刷

◆ faceColor()

QColor QwtFigure::faceColor ( ) const

获取图形的表面颜色

◆ figureCleared

void QwtFigure::figureCleared ( )
signal

当图形被清除时发出的信号

◆ gca()

QwtPlot * QwtFigure::gca ( ) const

获取当前坐标轴(绘图)

◆ getParasiteAxes()

QList< QwtPlot * > QwtFigure::getParasiteAxes ( QwtPlot hostPlot) const

获取宿主绘图的所有寄生轴

◆ getSizeInches()

QSize QwtFigure::getSizeInches ( ) const

获取图形的英寸尺寸

◆ hasAxes() [1/2]

bool QwtFigure::hasAxes ( ) const

检查图形是否有坐标轴

◆ hasAxes() [2/2]

bool QwtFigure::hasAxes ( QwtPlot plot) const

检查图形是否存在特定plot

◆ plotUnderPos()

QwtPlot * QwtFigure::plotUnderPos ( const QPoint &  pos) const

获取在此坐标下的绘图

◆ removeAxes()

void QwtFigure::removeAxes ( QwtPlot plot)

从图形中移除特定的坐标轴(绘图)

◆ removeAxisAlignment()

bool QwtFigure::removeAxisAlignment ( const QList< QwtPlot * > &  plots,
int  axisId 
)

移除指定的轴对齐配置

◆ replotAll()

void QwtFigure::replotAll ( )

更新所有的绘图

◆ saveFig() [1/3]

bool QwtFigure::saveFig ( const QString &  filename,
int  dpi = -1 
) const

使用指定DPI将图形保存到文件

◆ saveFig() [2/3]

QPixmap QwtFigure::saveFig ( int  dpi = -1) const

使用指定DPI将图形保存为QPixmap

◆ saveFig() [3/3]

QPixmap QwtFigure::saveFig ( QSizeF &  inchesSize) const

使用指定英寸尺寸将图形保存为QPixmap

◆ sca()

void QwtFigure::sca ( QwtPlot plot)

设置当前坐标轴(绘图)

◆ setCurrentAxes()

void QwtFigure::setCurrentAxes ( QwtPlot plot)

设置当前坐标轴(绘图)

◆ setEdgeColor()

void QwtFigure::setEdgeColor ( const QColor &  color)

设置图形的边缘颜色

◆ setEdgeLineWidth()

void QwtFigure::setEdgeLineWidth ( int  width)

设置图形的边缘线宽

◆ setFaceBrush()

void QwtFigure::setFaceBrush ( const QBrush &  brush)

设置图形的背景画刷

◆ setFaceColor()

void QwtFigure::setFaceColor ( const QColor &  color)

设置图形的背景颜色

◆ setSizeInches() [1/2]

void QwtFigure::setSizeInches ( const QSizeF &  size)

设置图形的英寸尺寸

◆ setSizeInches() [2/2]

void QwtFigure::setSizeInches ( float  width,
float  height 
)

设置图形的英寸尺寸

◆ setWidgetNormPos()

void QwtFigure::setWidgetNormPos ( QWidget *  widget,
const QRectF &  rect 
)

改变已经添加的窗口的位置占比,如果窗口还没添加,此函数无效

参数
widget
rect

◆ takeAxes()

bool QwtFigure::takeAxes ( QwtPlot plot)

从图形中取出特定的坐标轴(绘图)但不删除它

◆ widgetNormRect()

QRectF QwtFigure::widgetNormRect ( QWidget *  w) const

获取窗口的归一化矩形


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