|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
Layout manager for parasite plots 更多...
#include <qwt_parasite_plot_layout.h>
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 | |
| QwtPlotLayoutEngine * | layoutEngine () |
| 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.
|
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.
| plot | Parasite plot to activate layout for |
| plotRect | Rectangle for the plot area |
| options | Layout options |
重载 QwtPlotLayout .
|
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.
| plot | Parasite plot to get size hint for |
重载 QwtPlotLayout .
| 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.
| aid | Axis ID to get scale rect for |