QWT 7.0.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QwtParasitePlotLayout Class Reference
Inheritance diagram for QwtParasitePlotLayout:
QwtPlotLayout

Public Member Functions

virtual void activate (const QwtPlot *plot, const QRectF &plotRect, Options options=Options()) override
 Recalculate the geometry of all components./根据给定的外框矩形,重新计算并记录 QwtPlot 内所有子部件(标题、页脚、图例、4 条轴、画布)的几何位置。
 
virtual QSize minimumSizeHint (const QwtPlot *plot) const override
 
QRectF parasiteScaleRect (QwtAxisId aid) const
 
- Public Member Functions inherited from QwtPlotLayout
 QwtPlotLayout ()
 Constructor.
 
virtual ~QwtPlotLayout ()
 Destructor.
 
void setCanvasMargin (int margin, int axis=-1)
 Change a margin of the canvas.
 
int canvasMargin (int axisId) const
 
void setAlignCanvasToScales (bool)
 Set the align-canvas-to-axis-scales flag for all axes.
 
void setAlignCanvasToScale (int axisId, bool)
 Change the align-canvas-to-axis-scales setting.
 
bool alignCanvasToScale (int axisId) const
 Return the align-canvas-to-axis-scales setting.
 
void setSpacing (int)
 Change the spacing of the plot.
 
int spacing () const
 
void setLegendPosition (QwtPlot::LegendPosition pos, double ratio)
 Specify the position of the legend.
 
void setLegendPosition (QwtPlot::LegendPosition pos)
 Specify the position of the legend.
 
QwtPlot::LegendPosition legendPosition () const
 
void setLegendRatio (double ratio)
 Specify the relative size of the legend in the plot.
 
double legendRatio () const
 
virtual void invalidate ()
 Invalidate the geometry of all components.
 
QRectF titleRect () const
 
QRectF footerRect () const
 
QRectF legendRect () const
 
QRectF scaleRect (QwtAxisId) const
 
QRectF canvasRect () const
 

Additional Inherited Members

- Public Types inherited from QwtPlotLayout
enum  Option {
  AlignScales = 0x01 , IgnoreScrollbars = 0x02 , IgnoreFrames = 0x04 , IgnoreLegend = 0x08 ,
  IgnoreTitle = 0x10 , IgnoreFooter = 0x20
}
 Options to configure the plot layout engine. More...
 
- Protected Member Functions inherited from 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())
 QwtPlotLayout::activate的具体实现
 

Member Function Documentation

◆ activate()

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

Recalculate the geometry of all components./根据给定的外框矩形,重新计算并记录 QwtPlot 内所有子部件(标题、页脚、图例、4 条轴、画布)的几何位置。

Parameters
plotPlot to be layout/待布局的 plot 对象
plotRectRectangle where to place the components/外部可用矩形(逻辑坐标,单位是像素)
optionsLayout options/布局选项,例如是否忽略图例、是否忽略某条轴等

结果全部写入 m_data->xxxRect,外部可通过 titleRect()/footerRect()/legendRect()/canvasRect()/scaleRect() 直接读取。

See also
invalidate(), titleRect(), footerRect(), legendRect(), scaleRect(), canvasRect()

Reimplemented from QwtPlotLayout.

◆ minimumSizeHint()

QSize QwtParasitePlotLayout::minimumSizeHint ( const QwtPlot plot) const
overridevirtual
Returns
Minimum size hint
Parameters
plotPlot widget
See also
QwtPlot::minimumSizeHint()

Reimplemented from QwtPlotLayout.


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