QwtPlotLayout(3) | Qwt User's Guide | QwtPlotLayout(3) |
NAME¶
QwtPlotLayout -
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¶
Layout engine for QwtPlot.
It is 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.
Member Enumeration Documentation¶
enum QwtPlotLayout::Options¶
Options to configure the plot layout engine
- AlignScales
Unused - 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 the margin(). - IgnoreLegend
Ignore the legend.
See also:
Member Function Documentation¶
void QwtPlotLayout::activate (const QwtPlot *plot, const QRect &plotRect, intoptions = 0) [virtual]¶
Recalculate the geometry of all components. Parameters:
plotRect Rect where to place the components
options Options
See also:
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:
See also:
Note:
QRect QwtPlotLayout::alignLegend (const QRect &canvasRect, const QRect &legendRect) const [protected]¶
Align the legend to the canvas
Parameters:
legendRect Maximum geometry for the legend
Returns:
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.
See also:
int QwtPlotLayout::canvasMargin (intaxis) const¶
Returns:
See also:
const QRect & QwtPlotLayout::canvasRect () const¶
Returns:
See also:
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:
rect Bounding rect for title, axes and canvas.
dimTitle Expanded height of the title widget
dimAxis Expanded heights of the axis in axis orientation.
See also:
void QwtPlotLayout::invalidate () [virtual]¶
Invalidate the geometry of all components.
See also:
QRect QwtPlotLayout::layoutLegend (intoptions, const QRect &rect) const [protected]¶
Find the geometry for the legend
Parameters:
rect Rectangle where to place the legend
Returns:
See also:
QwtPlot::LegendPosition QwtPlotLayout::legendPosition () const¶
Returns:
See also:
double QwtPlotLayout::legendRatio () const¶
Returns:
See also:
const QRect & QwtPlotLayout::legendRect () const¶
Returns:
See also:
int QwtPlotLayout::margin () const¶
Returns:
See also:
QSize QwtPlotLayout::minimumSizeHint (const QwtPlot *plot) const [virtual]¶
Return a minimum size hint. See also:
const QRect & QwtPlotLayout::scaleRect (intaxis) const¶
Parameters:
Returns:
See also:
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:
See also:
Note:
Warning:
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:
axis One of QwtPlot::Axis. Specifies where the position of the margin. -1 means margin at all borders.
See also:
Warning:
void QwtPlotLayout::setLegendPosition (QwtPlot::LegendPositionpos, doubleratio)¶
Specify the position of the legend. 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.0 it will be reset to the default ratio. The default vertical/horizontal ratio is 0.33/0.5.
See also:
void QwtPlotLayout::setLegendPosition (QwtPlot::LegendPositionpos)¶
Specify the position of the legend. Parameters:
See also:
void QwtPlotLayout::setLegendRatio (doubleratio)¶
Specify the relative size of the legend in the plot
Parameters:
void QwtPlotLayout::setMargin (intmargin)¶
Change the margin of the plot. The margin is the space around all components.
Parameters:
See also:
void QwtPlotLayout::setSpacing (intspacing)¶
Change the spacing of the plot. The spacing is the distance between the plot components.
Parameters:
See also:
int QwtPlotLayout::spacing () const¶
Returns:
See also:
const QRect & QwtPlotLayout::titleRect () const¶
Returns:
See also:
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Tue Nov 20 2012 | Version 5.2.3 |