QWT 7.0.1
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
QwtPlotLayoutEngine::LayoutData::LegendData Struct Reference

Public Member Functions

void init (const QwtAbstractLegend *legend)
 Initialize legend data from a QwtAbstractLegend / 从QwtAbstractLegend初始化图例数据
 
QSize legendHint (const QwtAbstractLegend *legend, const QRectF &rect) const
 Calculate optimal legend size for given rectangle / 计算给定矩形的优化图例尺寸
 

Public Attributes

int frameWidth
 
int hScrollExtent
 
int vScrollExtent
 
QSize hint
 

Member Function Documentation

◆ init()

void QwtPlotLayoutEngine::LayoutData::LegendData::init ( const QwtAbstractLegend legend)

Initialize legend data from a QwtAbstractLegend / 从QwtAbstractLegend初始化图例数据

Extracts frame width, scroll extents and size hint from the legend widget.

从图例部件提取边框宽度、滚动范围和尺寸提示。

Parameters
legendPointer to the legend widget / 指向图例部件的指针

◆ legendHint()

QSize QwtPlotLayoutEngine::LayoutData::LegendData::legendHint ( const QwtAbstractLegend legend,
const QRectF &  rect 
) const

Calculate optimal legend size for given rectangle / 计算给定矩形的优化图例尺寸

Determines the best size for the legend within the available space, considering both width and height constraints.

在可用空间内确定图例的最佳尺寸,同时考虑宽度和高度限制。

Parameters
legendPointer to the legend widget / 指向图例部件的指针
rectAvailable rectangle for the legend / 图例的可用矩形区域
Returns
Optimal size for the legend / 图例的优化尺寸

The documentation for this struct was generated from the following files: