QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
QwtPlotLayoutEngine::Dimensions结构体 参考

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.

构造及析构函数说明

◆ Dimensions()

QwtPlotLayoutEngine::Dimensions::Dimensions ( )

Constructor for Dimensions structure

Initializes all dimension values to zero for title, footer, and all axis positions.

成员函数说明

◆ centered()

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.

参数
rectThe available rectangle
labelRectThe label rectangle to center
返回
Centered label rectangle

◆ dimAxes()

int QwtPlotLayoutEngine::Dimensions::dimAxes ( int  axisPos) const

Read dimension by axis position index

参数
axisPosAxis position enum value (YLeft, YRight, XTop, XBottom)
返回
Pixel size of the axis at the given position

◆ dimAxis()

int QwtPlotLayoutEngine::Dimensions::dimAxis ( QwtAxisId  axisId) const

Get the stored dimension for a given axis

参数
axisIdAxis identifier (QwtAxis::XTop, XBottom, YLeft, YRight)
返回
The reserved pixels for this axis

◆ dimXAxes()

int QwtPlotLayoutEngine::Dimensions::dimXAxes ( ) const

Sum height of top and bottom X axes

返回
Combined height in pixels

◆ dimYAxes()

int QwtPlotLayoutEngine::Dimensions::dimYAxes ( ) const

Sum width of left and right Y axes

返回
Combined width in pixels

◆ innerRect()

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.

参数
rectThe outer rectangle
返回
Inner rectangle for canvas

◆ setDimAxis()

void QwtPlotLayoutEngine::Dimensions::setDimAxis ( QwtAxisId  axisId,
int  dim 
)

Set the stored dimension for a given axis

参数
axisIdAxis identifier
dimNew dimension in pixels

该结构体的文档由以下文件生成: