Qt::AlignmentQwtPlotLegendItem::alignment()constReturns:
Alignment flags
Seealso:setAlignment()QBrushQwtPlotLegendItem::backgroundBrush()constReturns:
Brush is used to fill the background
Seealso:setBackgroundBrush(), backgroundMode(), drawBackground()QwtPlotLegendItem::BackgroundModeQwtPlotLegendItem::backgroundMode()constReturns:
backgroundMode
Seealso:setBackgroundMode(), backgroundBrush(), drawBackground()intQwtPlotLegendItem::borderDistance()constReturns:
Margin between the legend and the canvas border
Seealso:margin()QPenQwtPlotLegendItem::borderPen()constReturns:
Pen for drawing the border
Seealso:setBorderPen(), backgroundBrush()doubleQwtPlotLegendItem::borderRadius()constReturns:
Radius of the border
Seealso:setBorderRadius(), setBorderPen()voidQwtPlotLegendItem::draw(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQRectF&canvasRect)const[virtual]
Draw the legend
Parameters:painter Painter
xMap x Scale Map
yMap y Scale Map
canvasRect Contents rectangle of the canvas in painter coordinates
Implements QwtPlotItem.
voidQwtPlotLegendItem::drawBackground(QPainter*painter,constQRectF&rect)const[protected],[virtual]
Draw a rounded rect
Parameters:painter Painter
rect Bounding rectangle
Seealso:setBorderRadius(), setBorderPen(), setBackgroundBrush(), setBackgroundMode()voidQwtPlotLegendItem::drawLegendData(QPainter*painter,constQwtPlotItem*plotItem,constQwtLegendData&data,constQRectF&rect)const[protected],[virtual]
Draw an entry on the legend
Parameters:painter Qt Painter
plotItem Plot item, represented by the entry
data Attributes of the legend entry
rect Bounding rectangle for the entry
QFontQwtPlotLegendItem::font()constReturns:
Font used for drawing the text label
Seealso:setFont()QRectQwtPlotLegendItem::geometry(constQRectF&canvasRect)const[virtual]
Calculate the geometry of the legend on the canvas
Parameters:canvasRect Geometry of the canvas
Returns:
Geometry of the legend
intQwtPlotLegendItem::heightForWidth(constQwtLegendData&data,intwidth)const[virtual]Returns:
The preferred height, for a width.
Parameters:data Attributes of the legend entry
width Width
intQwtPlotLegendItem::itemMargin()constReturns:
Margin around each item
Seealso:setItemMargin(), itemSpacing(), margin(), spacing()intQwtPlotLegendItem::itemSpacing()constReturns:
Spacing inside of each item
Seealso:setItemSpacing(), itemMargin(), margin(), spacing()QList<QRect>QwtPlotLegendItem::legendGeometries(constQwtPlotItem*plotItem)constReturns:
Geometries of the items of a plot item
Note:
Usually a plot item has only one entry on the legend
intQwtPlotLegendItem::margin()constReturns:
Margin around the legend items
Seealso:setMargin(), spacing(), itemMargin(), itemSpacing()uintQwtPlotLegendItem::maxColumns()constReturns:
Maximum number of columns
Seealso:maxColumns(), QwtDynGridLayout::maxColumns()QSizeQwtPlotLegendItem::minimumSize(constQwtLegendData&data)const[virtual]
Minimum size hint needed to display an entry
Parameters:data Attributes of the legend entry
Returns:
Minimum size
QList<constQwtPlotItem*>QwtPlotLegendItem::plotItems()constReturns:
All plot items with an entry on the legend
Note:
A plot item might have more than one entry on the legend
intQwtPlotLegendItem::rtti()const[virtual]Returns:QwtPlotItem::Rtti_PlotLegend
Reimplemented from QwtPlotItem.
voidQwtPlotLegendItem::setAlignment(Qt::Alignmentalignment)
Set the alignmnet. Alignment means the position of the legend relative to the geometry of the plot
canvas.
Parameters:alignment Alignment flags
Seealso:alignment(), setMaxColumns()Note:
To align a legend with many items horizontally the number of columns need to be limited
voidQwtPlotLegendItem::setBackgroundBrush(constQBrush&brush)
Set the background brush. The brush is used to fill the background
Parameters:brush Brush
Seealso:backgroundBrush(), setBackgroundMode(), drawBackground()voidQwtPlotLegendItem::setBackgroundMode(BackgroundModemode)
Set the background mode. Depending on the mode the complete legend or each item might have an background.
The default setting is LegendBackground.
Seealso:backgroundMode(), setBackgroundBrush(), drawBackground()voidQwtPlotLegendItem::setBorderDistance(intdistance)
Set the margin between the legend and the canvas border. The default setting for the margin is 10 pixels.
Parameters:distance Margin in pixels
Seealso:setMargin()voidQwtPlotLegendItem::setBorderPen(constQPen&pen)
Set the pen for drawing the border
Parameters:pen Border pen
Seealso:borderPen(), setBackgroundBrush()voidQwtPlotLegendItem::setBorderRadius(doubleradius)
Set the radius for the border
Parameters:radius A value <= 0 defines a rectangular border
Seealso:borderRadius(), setBorderPen()voidQwtPlotLegendItem::setFont(constQFont&font)
Change the font used for drawing the text label
Parameters:font Legend font
Seealso:font()voidQwtPlotLegendItem::setItemMargin(intmargin)
Set the margin around each item
Parameters:margin Margin
Seealso:itemMargin(), setItemSpacing(), setMargin(), setSpacing()voidQwtPlotLegendItem::setItemSpacing(intspacing)
Set the spacing inside of each item
Parameters:spacing Spacing
Seealso:itemSpacing(), setItemMargin(), setMargin(), setSpacing()voidQwtPlotLegendItem::setMargin(intmargin)
Set the margin around legend items. The default setting for the margin is 0.
Parameters:margin Margin in pixels
Seealso:margin(), setSpacing(), setItemMargin(), setItemSpacingvoidQwtPlotLegendItem::setMaxColumns(uintmaxColumns)
Limit the number of columns. When aligning the legend horizontally ( Qt::AlignLeft, Qt::AlignRight ) the
number of columns needs to be limited to avoid, that the width of the legend grows with an increasing
number of entries.
Parameters:maxColumns Maximum number of columns. 0 means unlimited.
Seealso:maxColumns(), QwtDynGridLayout::setMaxColumns()voidQwtPlotLegendItem::setSpacing(intspacing)
Set the spacing between the legend items.
Parameters:spacing Spacing in pixels
Seealso:spacing(), setMargin()voidQwtPlotLegendItem::setTextPen(constQPen&pen)
Set the pen for drawing text labels.
Parameters:pen Text pen
Seealso:textPen(), setFont()intQwtPlotLegendItem::spacing()constReturns:
Spacing between the legend items
Seealso:setSpacing(), margin(), itemSpacing(), itemMargin()QPenQwtPlotLegendItem::textPen()constReturns:
Pen for drawing text labels
Seealso:setTextPen(), font()voidQwtPlotLegendItem::updateLegend(constQwtPlotItem*plotItem,constQList<QwtLegendData>&data)[virtual]
Update the legend items according to modifications of a plot item
Parameters:plotItem Plot item
data Attributes of the legend entries
Reimplemented from QwtPlotItem.