QwtPlotLayout(3)
QwtPlotLayout(3) π Qwt User's Guide β¨
okay bestie, welcome to the QwtPlotLayout(3) page from the Qwt User's Guide. this is the layout engine for QwtPlot and we're gonna go through it together, no cap. π«Ά
NAME
QwtPlotLayout β literally the name, bestie. that's it. that's the name. π
SYNOPSIS
#include <qwt_plot_layout.h>
Public Types
enum Options { AlignScales = 1, IgnoreScrollbars = 2, IgnoreFrames =
4, IgnoreMargin = 8, IgnoreLegend = 16 }
Public Member Functions
QwtPlotLayout ()
virtual ~QwtPlotLayout ()
virtual void activate (const QwtPlot *, const QRect &rect, int
options=0)
bool alignCanvasToScales () const
int canvasMargin (int axis) const
const QRect & canvasRect () const
virtual void invalidate ()
QwtPlot::LegendPosition legendPosition () const
double legendRatio () const
const QRect & legendRect () const
int margin () const
virtual QSize minimumSizeHint (const QwtPlot *) const
const QRect & scaleRect (int axis) const
void setAlignCanvasToScales (bool)
void setCanvasMargin (int margin, int axis=-1)
void setLegendPosition (QwtPlot::LegendPosition pos, double ratio)
void setLegendPosition (QwtPlot::LegendPosition pos)
void setLegendRatio (double ratio)
void setMargin (int)
void setSpacing (int)
int spacing () const
const QRect & titleRect () const
Protected Member Functions
QRect alignLegend (const QRect &canvasRect, const QRect &legendRect)
const
void alignScales (int options, QRect &canvasRect, QRect
scaleRect[QwtPlot::axisCnt]) const
void expandLineBreaks (int options, const QRect &rect, int &dimTitle,
int dimAxes[QwtPlot::axisCnt]) const
QRect layoutLegend (int options, const QRect &) const
Detailed Description
so QwtPlotLayout is the layout engine for QwtPlot. it's used by the QwtPlot widget to organize its internal widgets, or by QwtPlot::print() to render its content to a QPaintDevice like a QPrinter, QPixmap/QImage or QSvgRenderer. periodt. β¨
Member Enumeration Documentation
enum QwtPlotLayout::Options
these are the options to configure the plot layout engine, bestie. choose your fighter:
AlignScalesβ Unused. (not me putting an unused one first π)IgnoreScrollbarsβ Ignore the dimension of the scrollbars. There are no scrollbars, when the plot is rendered to a paint device (QwtPlot::print()).IgnoreFramesβ Ignore all frames.QwtPlot::print()doesn't paint them.IgnoreMarginβ Ignore themargin().IgnoreLegendβ Ignore the legend.
See also: activate()
Member Function Documentation
void QwtPlotLayout::activate (const QwtPlot *plot, const QRect &plotRect, intoptions = 0) [virtual]
recalculate the geometry of all components. like, all of them. π
Parameters:
plotβ Plot to be layoutplotRectβ Rect where to place the componentsoptionsβ Options
See also: invalidate(), Options, titleRect(), legendRect(), scaleRect(), canvasRect()
bool QwtPlotLayout::alignCanvasToScales () const
return the align-canvas-to-axis-scales setting. the canvas may:
- extend beyond the axis scale ends to maximize its size
- align with the axis scale ends to control its size.
Returns: align-canvas-to-axis-scales setting
See also: setAlignCanvasToScales, setCanvasMargin()
Note: In this context the term 'scale' means the backbone of a scale.
QRect QwtPlotLayout::alignLegend (const QRect &canvasRect, const QRect &legendRect) const [protected]
align the legend to the canvas.
Parameters:
canvasRectβ Geometry of the canvaslegendRectβ Maximum geometry for the legend
Returns: Geometry for the aligned legend
void QwtPlotLayout::alignScales (intoptions, QRect &canvasRect, QRectscaleRect[QwtPlot::axisCnt]) const [protected]
align the ticks of the axis to the canvas borders using the empty corners. iykyk.
See also: Options
int QwtPlotLayout::canvasMargin (intaxis) const
Returns: Margin around the scale tick borders
See also: setCanvasMargin()
const QRect & QwtPlotLayout::canvasRect () const
Returns: Geometry for the canvas
See also: activate(), invalidate()
void QwtPlotLayout::expandLineBreaks (intoptions, const QRect &rect, int &dimTitle, intdimAxis[QwtPlot::axisCnt]) const [protected]
expand all line breaks in text labels, and calculate the height of their widgets in orientation of the text.
Parameters:
optionsβ Options how to layout the legendrectβ Bounding rect for title, axes and canvas.dimTitleβ Expanded height of the title widgetdimAxisβ Expanded heights of the axis in axis orientation.
See also: Options
void QwtPlotLayout::invalidate () [virtual]
invalidate the geometry of all components. basically a glow-down so it can glow-up again. β¨
See also: activate()
QRect QwtPlotLayout::layoutLegend (intoptions, const QRect &rect) const [protected]
find the geometry for the legend.
Parameters:
optionsβ Options how to layout the legendrectβ Rectangle where to place the legend
Returns: Geometry for the legend
See also: Options
QwtPlot::LegendPosition QwtPlotLayout::legendPosition () const
Returns: Position of the legend
See also: setLegendPosition(), QwtPlot::setLegendPosition(), QwtPlot::legendPosition()
double QwtPlotLayout::legendRatio () const
Returns: The relative size of the legend in the plot.
See also: setLegendPosition()
const QRect & QwtPlotLayout::legendRect () const
Returns: Geometry for the legend
See also: activate(), invalidate()
int QwtPlotLayout::margin () const
Returns: margin
See also: setMargin(), spacing(), QwtPlot::margin()
QSize QwtPlotLayout::minimumSizeHint (const QwtPlot *plot) const [virtual]
return a minimum size hint.
See also: QwtPlot::minimumSizeHint()
const QRect & QwtPlotLayout::scaleRect (intaxis) const
Parameters:
axisβ Axis index
Returns: Geometry for the scale
See also: activate(), invalidate()
void QwtPlotLayout::setAlignCanvasToScales (boolalignCanvasToScales)
change the align-canvas-to-axis-scales setting. the canvas may:
- extend beyond the axis scale ends to maximize its size,
- align with the axis scale ends to control its size.
Parameters:
alignCanvasToScalesβ New align-canvas-to-axis-scales setting
See also: setCanvasMargin()
Note: In this context the term 'scale' means the backbone of a scale.
Warning: In case ofalignCanvasToScales == truecanvasMarginwill have no effect
void QwtPlotLayout::setCanvasMargin (intmargin, intaxis = -1)
change a margin of the canvas. the margin is the space above/below the scale ticks. a negative margin will be set to -1, excluding the borders of the scales.
Parameters:
marginβ New marginaxisβ One ofQwtPlot::Axis. Specifies where the position of the margin.-1means margin at all borders.
See also: canvasMargin()
Warning: The margin will have no effect when alignCanvasToScales is true
void QwtPlotLayout::setLegendPosition (QwtPlot::LegendPositionpos, doubleratio)
specify the position of the legend.
Parameters:
posβ The legend's position.ratioβ Ratio between legend and the bounding rect of title, canvas and axes. The legend will be shrinked if it would need more space than the given ratio. The ratio is limited to]0.0 .. 1.0]. In case of<= 0.0it will be reset to the default ratio. The default vertical/horizontal ratio is0.33/0.5.
See also: QwtPlot::setLegendPosition()
void QwtPlotLayout::setLegendPosition (QwtPlot::LegendPositionpos)
specify the position of the legend.
Parameters:
posβ The legend's position. Valid values areQwtPlot::LeftLegend,QwtPlot::RightLegend,QwtPlot::TopLegend,QwtPlot::BottomLegend.
See also: QwtPlot::setLegendPosition()
void QwtPlotLayout::setLegendRatio (doubleratio)
specify the relative size of the legend in the plot.
Parameters:
ratioβ Ratio between legend and the bounding rect of title, canvas and axes. The legend will be shrinked if it would need more space than the given ratio. The ratio is limited to]0.0 .. 1.0]. In case of<= 0.0it will be reset to the default ratio. The default vertical/horizontal ratio is0.33/0.5.
void QwtPlotLayout::setMargin (intmargin)
change the margin of the plot. the margin is the space around all components.
Parameters:
marginβ new margin
See also: margin(), setSpacing(), QwtPlot::setMargin()
void QwtPlotLayout::setSpacing (intspacing)
change the spacing of the plot. the spacing is the distance between the plot components.
Parameters:
spacingβ new spacing
See also: setMargin(), spacing()
int QwtPlotLayout::spacing () const
Returns: spacing
See also: margin(), setSpacing()
const QRect & QwtPlotLayout::titleRect () const
Returns: Geometry for the title
See also: activate(), invalidate()
Author
generated automatically by Doxygen for Qwt User's Guide from the source code. no human, just Doxygen doing its little dance. π
okay bestie, that's the whole QwtPlotLayout(3) page from Qwt User's Guide, Version 5.2.3, dated Tue Nov 20 2012. you ate that. periodt. πβ¨π
π¦ where this page comes from
- epel 9: qwt5-qt5-devel 5.2.3a-12.20210522gita2b11e3.el9 Β· LGPLv2+ with exceptions
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms