QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
QwtPlotLayoutEngine::LayoutData::LegendData Struct Reference

Data for legend layout calculation. More...

#include <qwt_plot_layout_engine.h>

Public Member Functions

void init (const QwtAbstractLegend *legend)
 Initialize legend data from a 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
 

Detailed Description

Data for legend layout calculation.

Contains frame width, scroll extents, and size hint for the legend.

Member Function Documentation

◆ init()

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

Initialize legend data from a 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: