voidQwtPlotLayout::activate(constQwtPlot*plot,constQRectF&plotRect,Optionsoptions=0x00)[virtual]
Recalculate the geometry of all components.
Parameters:plot Plot to be layout
plotRect Rectangle where to place the components
options Layout options
Seealso:invalidate(), titleRect(), footerRect()legendRect(), scaleRect(), canvasRect()boolQwtPlotLayout::alignCanvasToScale(intaxisId)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.
Parameters:axisId Axis index
Returns:
align-canvas-to-axis-scales setting
Seealso:setAlignCanvasToScale(), setAlignCanvasToScale(), setCanvasMargin()QRectFQwtPlotLayout::alignLegend(constQRectF&canvasRect,constQRectF&legendRect)const[protected]
Align the legend to the canvas
Parameters:canvasRect Geometry of the canvas
legendRect Maximum geometry for the legend
Returns:
Geometry for the aligned legend
voidQwtPlotLayout::alignScales(Optionsoptions,QRectF&canvasRect,QRectFscaleRect[QwtPlot::axisCnt])const[protected]
Align the ticks of the axis to the canvas borders using the empty corners.
Parameters:options Layout options
canvasRect Geometry of the canvas ( IN/OUT )
scaleRect Geometries of the scales ( IN/OUT )
Seealso:OptionsintQwtPlotLayout::canvasMargin(intaxisId)constParameters:axisId Axis index
Returns:
Margin around the scale tick borders
Seealso:setCanvasMargin()QRectFQwtPlotLayout::canvasRect()constReturns:
Geometry for the canvas
Seealso:activate(), invalidate()voidQwtPlotLayout::expandLineBreaks(Optionsoptions,constQRectF&rect,int&dimTitle,int&dimFooter,intdimAxes[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 legend
rect Bounding rectangle for title, footer, axes and canvas.
dimTitle Expanded height of the title widget
dimFooter Expanded height of the footer widget
dimAxes Expanded heights of the axis in axis orientation.
Seealso:OptionsQRectFQwtPlotLayout::footerRect()constReturns:
Geometry for the footer
Seealso:activate(), invalidate()voidQwtPlotLayout::invalidate()[virtual]
Invalidate the geometry of all components.
Seealso:activate()QRectFQwtPlotLayout::layoutLegend(Optionsoptions,constQRectF&rect)const[protected]
Find the geometry for the legend
Parameters:options Options how to layout the legend
rect Rectangle where to place the legend
Returns:
Geometry for the legend
Seealso:OptionsQwtPlot::LegendPositionQwtPlotLayout::legendPosition()constReturns:
Position of the legend
Seealso:setLegendPosition(), QwtPlot::setLegendPosition(), QwtPlot::legendPosition()
doubleQwtPlotLayout::legendRatio()constReturns:
The relative size of the legend in the plot.
Seealso:setLegendPosition()QRectFQwtPlotLayout::legendRect()constReturns:
Geometry for the legend
Seealso:activate(), invalidate()QSizeQwtPlotLayout::minimumSizeHint(constQwtPlot*plot)const[virtual]Returns:
Minimum size hint
Parameters:plot Plot widget
Seealso:QwtPlot::minimumSizeHint()QRectFQwtPlotLayout::scaleRect(intaxis)constParameters:axis Axis index
Returns:
Geometry for the scale
Seealso:activate(), invalidate()voidQwtPlotLayout::setAlignCanvasToScale(intaxisId,boolon)
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.
The axisId parameter is somehow confusing as it identifies a border of the plot and not the axes, that
are aligned. F.e when QwtPlot::yLeft is set, the left end of the the x-axes ( QwtPlot::xTop,
QwtPlot::xBottom ) is aligned.
Parameters:axisId Axis index
on New align-canvas-to-axis-scales setting
Seealso:setCanvasMargin(), alignCanvasToScale(), setAlignCanvasToScales()Warning:
In case of on == true canvasMargin() will have no effect
voidQwtPlotLayout::setAlignCanvasToScales(boolon)
Set the align-canvas-to-axis-scales flag for all axes.
Parameters:on True/False
Seealso:setAlignCanvasToScale(), alignCanvasToScale()voidQwtPlotLayout::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 margin
axis One of QwtPlot::Axis. Specifies where the position of the margin. -1 means margin at all
borders.
Seealso:canvasMargin()Warning:
The margin will have no effect when alignCanvasToScale() is true
voidQwtPlotLayout::setCanvasRect(constQRectF&rect)[protected]
Set the geometry for the canvas. This method is intended to be used from derived layouts overloading
activate()Seealso:canvasRect(), activate()voidQwtPlotLayout::setFooterRect(constQRectF&rect)[protected]
Set the geometry for the footer. This method is intended to be used from derived layouts overloading
activate()Seealso:footerRect(), activate()voidQwtPlotLayout::setLegendPosition(QwtPlot::LegendPositionpos,doubleratio)
Specify the position of the legend.
Parameters:pos The legend's position.
ratio Ratio between legend and the bounding rectangle of title, footer, canvas and axes. The legend
will be shrunk 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.
Seealso:
QwtPlot::setLegendPosition()
voidQwtPlotLayout::setLegendPosition(QwtPlot::LegendPositionpos)
Specify the position of the legend.
Parameters:pos The legend's position. Valid values are QwtPlot::LeftLegend,QwtPlot::RightLegend,QwtPlot::TopLegend,QwtPlot::BottomLegend.Seealso:
QwtPlot::setLegendPosition()
voidQwtPlotLayout::setLegendRatio(doubleratio)
Specify the relative size of the legend in the plot
Parameters:ratio Ratio between legend and the bounding rectangle of title, footer, canvas and axes. The legend
will be shrunk 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.
voidQwtPlotLayout::setLegendRect(constQRectF&rect)[protected]
Set the geometry for the legend. This method is intended to be used from derived layouts overloading
activate()Parameters:rect Rectangle for the legend
Seealso:legendRect(), activate()voidQwtPlotLayout::setScaleRect(intaxis,constQRectF&rect)[protected]
Set the geometry for an axis. This method is intended to be used from derived layouts overloading
activate()Parameters:axis Axis index
rect Rectangle for the scale
Seealso:scaleRect(), activate()voidQwtPlotLayout::setSpacing(intspacing)
Change the spacing of the plot. The spacing is the distance between the plot components.
Parameters:spacing New spacing
Seealso:setCanvasMargin(), spacing()voidQwtPlotLayout::setTitleRect(constQRectF&rect)[protected]
Set the geometry for the title. This method is intended to be used from derived layouts overloading
activate()Seealso:titleRect(), activate()intQwtPlotLayout::spacing()constReturns:
Spacing
Seealso:
margin(), setSpacing()QRectFQwtPlotLayout::titleRect()constReturns:
Geometry for the title
Seealso:activate(), invalidate()