QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
QwtParasitePlotLayout类 参考

Layout manager for parasite plots 更多...

#include <qwt_parasite_plot_layout.h>

类 QwtParasitePlotLayout 继承关系图:
QwtPlotLayout

Public 成员函数

 QwtParasitePlotLayout ()
 Construct a parasite plot layout
 
 ~QwtParasitePlotLayout () override
 Destructor
 
virtual void activate (const QwtPlot *plot, const QRectF &plotRect, Options options=Options()) override
 Activate the layout for a parasite plot
 
virtual QSize minimumSizeHint (const QwtPlot *plot) const override
 Get minimum size hint for a parasite plot
 
QRectF parasiteScaleRect (QwtAxisId aid) const
 Get the parasite axis scale rect without offset
 
- Public 成员函数 继承自 QwtPlotLayout
 QwtPlotLayout ()
 Constructor
 
void setCanvasMargin (int margin, int axis=-1)
 Set the canvas margin for a specific axis position
 
int canvasMargin (int axisId) const
 Get the canvas margin for a specific axis position
 
void setAlignCanvasToScales (bool)
 Set the align-canvas-to-axis-scales flag for all axes
 
void setAlignCanvasToScale (int axisId, bool)
 Set the align-canvas-to-axis-scales setting for a specific axis
 
bool alignCanvasToScale (int axisId) const
 Get the align-canvas-to-axis-scales setting for a specific axis
 
void setSpacing (int)
 Set the spacing between plot components
 
int spacing () const
 Get the spacing between plot components
 
void setLegendPosition (QwtPlot::LegendPosition pos, double ratio)
 Set the legend position with a specified ratio
 
void setLegendPosition (QwtPlot::LegendPosition pos)
 Set the legend position
 
QwtPlot::LegendPosition legendPosition () const
 Get the legend position
 
void setLegendRatio (double ratio)
 Set the relative size of the legend in the plot
 
double legendRatio () const
 Get the relative size of the legend in the plot
 
virtual void invalidate ()
 Invalidate the geometry of all components
 
QRectF titleRect () const
 Get the geometry for the title
 
QRectF footerRect () const
 Get the geometry for the footer
 
QRectF legendRect () const
 Get the geometry for the legend
 
QRectF scaleRect (QwtAxisId) const
 Get the geometry for a scale axis
 
QRectF canvasRect () const
 Get the geometry for the canvas
 

额外继承的成员函数

- Public 类型 继承自 QwtPlotLayout
enum  Option {
  AlignScales = 0x01 , IgnoreScrollbars = 0x02 , IgnoreFrames = 0x04 , IgnoreLegend = 0x08 ,
  IgnoreTitle = 0x10 , IgnoreFooter = 0x20
}
 Options to configure the plot layout engine 更多...
 
- Protected 成员函数 继承自 QwtPlotLayout
void setTitleRect (const QRectF &)
 Set the geometry for the title
 
void setFooterRect (const QRectF &)
 Set the geometry for the footer
 
void setLegendRect (const QRectF &)
 Set the geometry for the legend
 
void setScaleRect (QwtAxisId, const QRectF &)
 Set the geometry for an axis
 
void setCanvasRect (const QRectF &)
 Set the geometry for the canvas
 
QwtPlotLayoutEnginelayoutEngine ()
 
void doActivate (const QwtPlot *plot, const QRectF &plotRect, Options options=Options())
 Concrete implementation of QwtPlotLayout::activate
 

详细描述

Layout manager for parasite plots

QwtParasitePlotLayout manages the layout of parasite plots that share the same canvas area with their host plot. It copies layout attributes from the host plot to ensure visual consistency.

参见
QwtPlot::createParasitePlot()

成员函数说明

◆ activate()

void QwtParasitePlotLayout::activate ( const QwtPlot plot,
const QRectF &  plotRect,
Options  options = Options() 
)
overridevirtual

Activate the layout for a parasite plot

Copies all layout attributes from the host plot to maintain visual consistency. If no host plot is found, uses default layout behavior.

参数
plotParasite plot to activate layout for
plotRectRectangle for the plot area
optionsLayout options

重载 QwtPlotLayout .

◆ minimumSizeHint()

QSize QwtParasitePlotLayout::minimumSizeHint ( const QwtPlot plot) const
overridevirtual

Get minimum size hint for a parasite plot

Returns the minimum size from the host plot's layout if available, otherwise uses default QwtPlotLayout behavior.

参数
plotParasite plot to get size hint for
返回
Minimum size hint

重载 QwtPlotLayout .

◆ parasiteScaleRect()

QRectF QwtParasitePlotLayout::parasiteScaleRect ( QwtAxisId  aid) const

Get the parasite axis scale rect without offset

Returns the scale rectangle for a parasite axis before it was copied from the host plot layout. This is the original unmodified position.

参数
aidAxis ID to get scale rect for
返回
Scale rectangle for the axis

该类的文档由以下文件生成: