|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
Structure holding dimension values for layout calculation 更多...
#include <qwt_plot_layout_engine.h>
Public 成员函数 | |
| Dimensions () | |
| Constructor for Dimensions structure | |
| int | dimAxis (QwtAxisId axisId) const |
| Get the stored dimension for a given axis | |
| void | setDimAxis (QwtAxisId axisId, int dim) |
| Set the stored dimension for a given axis | |
| int | dimAxes (int axisPos) const |
| Read dimension by axis position index | |
| int | dimYAxes () const |
| Sum width of left and right Y axes | |
| int | dimXAxes () const |
| Sum height of top and bottom X axes | |
| QRectF | centered (const QRectF &rect, const QRectF &labelRect) const |
| Center a label rectangle within available space | |
| QRectF | innerRect (const QRectF &rect) const |
| Calculate inner rectangle after accounting for axis dimensions | |
Public 属性 | |
| int | dimTitle |
| int | dimFooter |
Structure holding dimension values for layout calculation
Contains width/height values for title, footer, and all four axes.
| QwtPlotLayoutEngine::Dimensions::Dimensions | ( | ) |
Constructor for Dimensions structure
Initializes all dimension values to zero for title, footer, and all axis positions.
| QRectF QwtPlotLayoutEngine::Dimensions::centered | ( | const QRectF & | rect, |
| const QRectF & | labelRect | ||
| ) | const |
Center a label rectangle within available space
Adjusts the label rectangle to be centered horizontally within the available space after accounting for Y axis dimensions.
| rect | The available rectangle |
| labelRect | The label rectangle to center |
| int QwtPlotLayoutEngine::Dimensions::dimAxes | ( | int | axisPos | ) | const |
Read dimension by axis position index
| axisPos | Axis position enum value (YLeft, YRight, XTop, XBottom) |
| int QwtPlotLayoutEngine::Dimensions::dimAxis | ( | QwtAxisId | axisId | ) | const |
Get the stored dimension for a given axis
| axisId | Axis identifier (QwtAxis::XTop, XBottom, YLeft, YRight) |
| int QwtPlotLayoutEngine::Dimensions::dimXAxes | ( | ) | const |
Sum height of top and bottom X axes
| int QwtPlotLayoutEngine::Dimensions::dimYAxes | ( | ) | const |
Sum width of left and right Y axes
| QRectF QwtPlotLayoutEngine::Dimensions::innerRect | ( | const QRectF & | rect | ) | const |
Calculate inner rectangle after accounting for axis dimensions
Calculates the available space for the canvas after reserving space for all axes.
| rect | The outer rectangle |
| void QwtPlotLayoutEngine::Dimensions::setDimAxis | ( | QwtAxisId | axisId, |
| int | dim | ||
| ) |
Set the stored dimension for a given axis
| axisId | Axis identifier |
| dim | New dimension in pixels |