|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
Custom layout manager for QwtFigureWidget that handles both normalized coordinates and grid layouts . More...
#include <qwt_figure_layout.h>
Classes | |
| class | PrivateData |
Public Member Functions | |
| QwtFigureLayout (QWidget *parent) | |
| virtual void | addItem (QLayoutItem *item) override |
| virtual QLayoutItem * | itemAt (int index) const override |
| virtual QLayoutItem * | takeAt (int index) override |
| virtual int | count () const override |
| virtual QSize | sizeHint () const override |
| virtual QSize | minimumSize () const override |
| virtual void | setGeometry (const QRect &rect) override |
| void | addAxes (QWidget *widget, const QRectF &rect) |
| Add a widget with normalized coordinates. | |
| void | addAxes (QWidget *widget, qreal left, qreal top, qreal width, qreal height) |
| Add a widget with normalized coordinates using separate parameters. | |
| void | addGridAxes (QWidget *widget, int rowCnt, int colCnt, int row, int col, int rowSpan=1, int colSpan=1, qreal wspace=0.0, qreal hspace=0.0) |
| Add a widget by grid layout. | |
| void | setAxesNormPos (QWidget *widget, const QRectF &rect) |
| Change the normalized position of an already added widget. | |
| QRectF | widgetNormRect (QWidget *widget) const |
| Get the normalized rectangle for a widget. | |
| QRect | calcActualRect (const QRect &parentRect, const QRectF &normRect) |
| Calculate actual rectangle from normalized coordinates. | |
Static Public Member Functions | |
| static QRectF | calcNormRect (const QRect &parentRect, const QRect &rect) |
| Calculate normalized coordinates of rect relative to parentRect. | |
Protected Member Functions | |
| QRectF | calcGridRect (int rowCnt, int colCnt, int row, int col, int rowSpan=1, int colSpan=1, qreal wspace=0.0, qreal hspace=0.0) const |
| calc the normalized rectangle for a grid cell/获取网格单元格的归一化矩形 | |
Custom layout manager for QwtFigureWidget that handles both normalized coordinates and grid layouts
.
| void QwtFigureLayout::addAxes | ( | QWidget * | widget, |
| const QRectF & | rect | ||
| ) |
Add a widget with normalized coordinates.
| void QwtFigureLayout::addAxes | ( | QWidget * | widget, |
| qreal | left, | ||
| qreal | top, | ||
| qreal | width, | ||
| qreal | height | ||
| ) |
Add a widget with normalized coordinates using separate parameters.
| void QwtFigureLayout::addGridAxes | ( | QWidget * | widget, |
| int | rowCnt, | ||
| int | colCnt, | ||
| int | row, | ||
| int | col, | ||
| int | rowSpan = 1, |
||
| int | colSpan = 1, |
||
| qreal | wspace = 0.0, |
||
| qreal | hspace = 0.0 |
||
| ) |
Add a widget by grid layout.
| QRect QwtFigureLayout::calcActualRect | ( | const QRect & | parentRect, |
| const QRectF & | normRect | ||
| ) |
Calculate actual rectangle from normalized coordinates.
|
protected |
calc the normalized rectangle for a grid cell/获取网格单元格的归一化矩形
This method calculates the normalized coordinates for a specific grid cell based on the current layout parameters and grid configuration.
此方法根据当前布局参数和网格配置计算特定网格单元格的归一化坐标。
| rowCnt | Total number of rows in the grid / 网格总行数 |
| colCnt | Total number of columns in the grid / 网格总列数 |
| row | Grid row position (0-based) / 网格行位置(从0开始) |
| col | Grid column position (0-based) / 网格列位置(从0开始) |
| rowSpan | Number of rows to span (default: 1) / 跨行数(默认:1) |
| colSpan | Number of columns to span (default: 1) / 跨列数(默认:1) |
|
static |
Calculate normalized coordinates of rect relative to parentRect.
| void QwtFigureLayout::setAxesNormPos | ( | QWidget * | widget, |
| const QRectF & | rect | ||
| ) |
Change the normalized position of an already added widget.
| QRectF QwtFigureLayout::widgetNormRect | ( | QWidget * | widget | ) | const |
Get the normalized rectangle for a widget.