|
QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
|
用于组织Qwt绘图的图形容器,提供灵活的布局选项 更多...
#include <qwt_figure.h>
类 | |
| 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 |
| 获取图形的边缘线宽 | |
| QwtPlot * | createParasiteAxes (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) |
| 设置当前坐标轴(绘图) | |
| QwtPlot * | currentAxes () const |
| 获取当前坐标轴(绘图) | |
| QwtPlot * | gca () const |
| 获取当前坐标轴(绘图) | |
| QRectF | axesNormRect (QwtPlot *plot) const |
| 获取坐标系的归一化矩形 | |
| QRectF | widgetNormRect (QWidget *w) const |
| 获取窗口的归一化矩形 | |
| QwtPlot * | plotUnderPos (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 | ( | QWidget * | parent = nullptr, |
| Qt::WindowFlags | f = Qt::WindowFlags() |
||
| ) |
构造函数
| void QwtFigure::addAxes | ( | QwtPlot * | plot, |
| const QRectF & | rect | ||
| ) |
使用归一化坐标添加绘图
| void QwtFigure::addAxes | ( | QwtPlot * | plot, |
| qreal | left, | ||
| qreal | top, | ||
| qreal | width, | ||
| qreal | height | ||
| ) |
使用归一化坐标添加绘图(分离参数)
| 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 |
||
| ) |
添加窗口部件到网格布局
| 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 |
||
| ) |
添加窗口部件到网格布局
| void QwtFigure::addWidget | ( | QWidget * | widget, |
| qreal | left, | ||
| qreal | top, | ||
| qreal | width, | ||
| qreal | height | ||
| ) |
使用归一化坐标添加窗口
QwtPlot轴对齐函数
| void QwtFigure::applyAlignmentsForAxis | ( | int | axisId | ) |
应用指定轴ID的所有对齐配置
| void QwtFigure::applyAllAxisAlignments | ( | bool | replot = true | ) |
应用所有轴对齐配置
|
signal |
当坐标轴添加到图形时发出的信号
| QRectF QwtFigure::axesNormRect | ( | QwtPlot * | plot | ) | const |
获取坐标系的归一化矩形
|
signal |
当坐标轴从图形中移除时发出的信号
| int QwtFigure::axisAligmentCount | ( | ) | const |
获取轴对齐信息数量
| QRect QwtFigure::calcActualRect | ( | const QRectF & | normRect | ) |
通过归一化矩形计算真实矩形
| QRectF QwtFigure::calcNormRect | ( | const QRect & | geoRect | ) | const |
通过真实的窗口坐标计算归一化坐标
| void QwtFigure::clear | ( | ) |
清除图形中的所有坐标轴
| void QwtFigure::clearAxisAlignment | ( | ) |
清除所有轴对齐配置
| QwtPlot * QwtFigure::createParasiteAxes | ( | QwtPlot * | hostPlot, |
| QwtAxis::Position | enableAxis | ||
| ) |
为宿主绘图创建寄生轴
| QwtPlot * QwtFigure::currentAxes | ( | ) | const |
获取当前坐标轴(绘图)
|
signal |
当前激活的坐标系发生了改变的信号
| QColor QwtFigure::edgeColor | ( | ) | const |
获取图形的边缘颜色
| int QwtFigure::edgeLineWidth | ( | ) | const |
获取图形的边缘线宽
| QBrush QwtFigure::faceBrush | ( | ) | const |
获取图形的表面画刷
| QColor QwtFigure::faceColor | ( | ) | const |
获取图形的表面颜色
|
signal |
当图形被清除时发出的信号
| QwtPlot * QwtFigure::gca | ( | ) | const |
获取当前坐标轴(绘图)
| QSize QwtFigure::getSizeInches | ( | ) | const |
获取图形的英寸尺寸
| bool QwtFigure::hasAxes | ( | ) | const |
检查图形是否有坐标轴
| bool QwtFigure::hasAxes | ( | QwtPlot * | plot | ) | const |
检查图形是否存在特定plot
| QwtPlot * QwtFigure::plotUnderPos | ( | const QPoint & | pos | ) | const |
获取在此坐标下的绘图
| void QwtFigure::removeAxes | ( | QwtPlot * | plot | ) |
从图形中移除特定的坐标轴(绘图)
| void QwtFigure::replotAll | ( | ) |
更新所有的绘图
| bool QwtFigure::saveFig | ( | const QString & | filename, |
| int | dpi = -1 |
||
| ) | const |
使用指定DPI将图形保存到文件
| QPixmap QwtFigure::saveFig | ( | int | dpi = -1 | ) | const |
使用指定DPI将图形保存为QPixmap
| QPixmap QwtFigure::saveFig | ( | QSizeF & | inchesSize | ) | const |
使用指定英寸尺寸将图形保存为QPixmap
| void QwtFigure::sca | ( | QwtPlot * | plot | ) |
设置当前坐标轴(绘图)
| void QwtFigure::setCurrentAxes | ( | QwtPlot * | plot | ) |
设置当前坐标轴(绘图)
| void QwtFigure::setEdgeColor | ( | const QColor & | color | ) |
设置图形的边缘颜色
| void QwtFigure::setEdgeLineWidth | ( | int | width | ) |
设置图形的边缘线宽
| void QwtFigure::setFaceBrush | ( | const QBrush & | brush | ) |
设置图形的背景画刷
| void QwtFigure::setFaceColor | ( | const QColor & | color | ) |
设置图形的背景颜色
| void QwtFigure::setSizeInches | ( | const QSizeF & | size | ) |
设置图形的英寸尺寸
| void QwtFigure::setSizeInches | ( | float | width, |
| float | height | ||
| ) |
设置图形的英寸尺寸
| void QwtFigure::setWidgetNormPos | ( | QWidget * | widget, |
| const QRectF & | rect | ||
| ) |
改变已经添加的窗口的位置占比,如果窗口还没添加,此函数无效
| widget | |
| rect |
| bool QwtFigure::takeAxes | ( | QwtPlot * | plot | ) |
从图形中取出特定的坐标轴(绘图)但不删除它
| QRectF QwtFigure::widgetNormRect | ( | QWidget * | w | ) | const |
获取窗口的归一化矩形