|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
Structure holding dimension values for layout calculation. More...
#include <qwt_plot_layout_engine.h>
Public Member Functions | |
| 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 Attributes | |
| 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 |