QwtPlotLegendItem(3) | Qwt User's Guide | QwtPlotLegendItem(3) |
QwtPlotLegendItem - A class which draws a legend inside the plot canvas.
#include <qwt_plot_legenditem.h>
Inherits QwtPlotItem.
enum BackgroundMode { LegendBackground,
ItemBackground }
Background mode.
QwtPlotLegendItem ()
Constructor. virtual ~QwtPlotLegendItem ()
Destructor. virtual int rtti () const
void setAlignment (Qt::Alignment)
Set the alignmnet. Qt::Alignment alignment () const
void setMaxColumns (uint)
Limit the number of columns. uint maxColumns () const
void setMargin (int)
Set the margin around legend items. int margin () const
void setSpacing (int)
Set the spacing between the legend items. int spacing () const
void setItemMargin (int)
int itemMargin () const
void setItemSpacing (int)
int itemSpacing () const
void setFont (const QFont &)
QFont font () const
void setBorderDistance (int)
Set the margin between the legend and the canvas border. int
borderDistance () const
void setBorderRadius (double)
double borderRadius () const
void setBorderPen (const QPen &)
QPen borderPen () const
void setBackgroundBrush (const QBrush &)
Set the background brush. QBrush backgroundBrush () const
void setBackgroundMode (BackgroundMode)
Set the background mode. BackgroundMode backgroundMode () const
void setTextPen (const QPen &)
Set the pen for drawing text labels. QPen textPen () const
virtual void draw (QPainter *, const QwtScaleMap &xMap,
const QwtScaleMap &yMap, const QRectF &canvasRect) const
void clearLegend ()
Remove all items from the legend. virtual void updateLegend (const
QwtPlotItem *, const QList< QwtLegendData > &)
virtual QRect geometry (const QRectF &canvasRect) const
virtual QSize minimumSize (const QwtLegendData &) const
virtual int heightForWidth (const QwtLegendData &, int
width) const
QList< const QwtPlotItem *> plotItems () const
QList< QRect > legendGeometries (const QwtPlotItem *)
const
virtual void drawLegendData (QPainter *painter, const
QwtPlotItem *, const QwtLegendData &, const QRectF &)
const
virtual void drawBackground (QPainter *, const QRectF &rect) const
A class which draws a legend inside the plot canvas.
QwtPlotLegendItem can be used to draw a inside the plot canvas. It can be used together with a QwtLegend or instead of it to have more space for the plot canvas.
In opposite to QwtLegend the legend item is not interactive. To identify mouse clicks on a legend item an event filter needs to be installed catching mouse events ob the plot canvas. The geometries of the legend items are available using legendGeometries().
The legend item is aligned to plot canvas according to its alignment() flags. It might have a background for the complete legend ( usually semi transparent ) or for each legend item.
Note:
Background mode. Depending on the mode the complete legend or each item might have an background.
The default setting is LegendBackground.
See also:
Enumerator
Returns:
See also:
Returns:
See also:
Returns:
See also:
Returns:
See also:
Returns:
See also:
Returns:
See also:
Draw the legend
Parameters:
Implements QwtPlotItem.
Draw a rounded rect
Parameters:
See also:
Draw an entry on the legend
Parameters:
Returns:
See also:
Calculate the geometry of the legend on the canvas
Parameters:
Returns:
Returns:
Parameters:
Returns:
See also:
Returns:
See also:
Returns:
Note:
Returns:
See also:
Returns:
See also:
Minimum size hint needed to display an entry
Parameters:
Returns:
Returns:
Note:
Returns:
Reimplemented from QwtPlotItem.
Set the alignmnet. Alignment means the position of the legend relative to the geometry of the plot canvas.
Parameters:
See also:
Note:
Set the background brush. The brush is used to fill the background
Parameters:
See also:
Set the background mode. Depending on the mode the complete legend or each item might have an background.
The default setting is LegendBackground.
See also:
Set the margin between the legend and the canvas border. The default setting for the margin is 10 pixels.
Parameters:
See also:
Set the pen for drawing the border
Parameters:
See also:
Set the radius for the border
Parameters:
See also:
Change the font used for drawing the text label
Parameters:
See also:
Set the margin around each item
Parameters:
See also:
Set the spacing inside of each item
Parameters:
See also:
Set the margin around legend items. The default setting for the margin is 0.
Parameters:
See also:
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:
See also:
Set the spacing between the legend items.
Parameters:
See also:
Set the pen for drawing text labels.
Parameters:
See also:
Returns:
See also:
Returns:
See also:
Update the legend items according to modifications of a plot item
Parameters:
Reimplemented from QwtPlotItem.
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |