Abstract base class for legend widgets.
More...
#include <qwt_abstract_legend.h>
|
| | QwtAbstractLegend (QWidget *parent=NULL) |
| | Constructor.
|
| |
|
virtual | ~QwtAbstractLegend () |
| | Destructor.
|
| |
| virtual void | renderLegend (QPainter *painter, const QRectF &rect, bool fillBackground) const =0 |
| | Render the legend into a given rectangle.
|
| |
| virtual bool | isEmpty () const =0 |
| |
| virtual int | scrollExtent (Qt::Orientation) const |
| | Return the extent, that is needed for elements to scroll the legend ( usually scrollbars ),.
|
| |
Abstract base class for legend widgets.
Legends, that need to be under control of the QwtPlot layout system need to be derived from QwtAbstractLegend.
- Note
- Other type of legends can be implemented by connecting to the QwtPlot::legendDataChanged() signal. But as these legends are unknown to the plot layout system the layout code ( on screen and for QwtPlotRenderer ) need to be organized in application code.
- See also
- QwtLegend
◆ QwtAbstractLegend()
| QwtAbstractLegend::QwtAbstractLegend |
( |
QWidget * |
parent = NULL | ) |
|
|
explicit |
◆ isEmpty()
| virtual bool QwtAbstractLegend::isEmpty |
( |
| ) |
const |
|
pure virtual |
- Returns
- True, when no plot item is inserted
Implemented in QwtLegend.
◆ renderLegend()
| virtual void QwtAbstractLegend::renderLegend |
( |
QPainter * |
painter, |
|
|
const QRectF & |
rect, |
|
|
bool |
fillBackground |
|
) |
| const |
|
pure virtual |
Render the legend into a given rectangle.
- Parameters
-
| painter | Painter |
| rect | Bounding rectangle |
| fillBackground | When true, fill rect with the widget background |
- See also
- renderLegend() is used by QwtPlotRenderer
Implemented in QwtLegend.
◆ scrollExtent()
| int QwtAbstractLegend::scrollExtent |
( |
Qt::Orientation |
orientation | ) |
const |
|
virtual |
Return the extent, that is needed for elements to scroll the legend ( usually scrollbars ),.
- Parameters
-
- Returns
- Extent of the corresponding scroll element
Reimplemented in QwtLegend.
◆ updateLegend
| virtual void QwtAbstractLegend::updateLegend |
( |
const QVariant & |
itemInfo, |
|
|
const QList< QwtLegendData > & |
data |
|
) |
| |
|
pure virtualslot |
Update the entries for a plot item.
- Parameters
-
| itemInfo | Info about an item |
| data | List of legend entry attributes for the item |
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/qwt_abstract_legend.h
- /home/runner/work/QWT/QWT/src/qwt_abstract_legend.cpp