The legend widget. More...
#include <qwt_legend.h>
Public Types | |
| enum | LegendDisplayPolicy { NoIdentifier = 0, FixedIdentifier = 1, AutoIdentifier = 2 } |
| enum | LegendItemMode { ReadOnlyItem, ClickableItem, CheckableItem } |
Public Member Functions | |
| QwtLegend (QWidget *parent=NULL) | |
| virtual | ~QwtLegend () |
| void | setDisplayPolicy (LegendDisplayPolicy policy, int mode) |
| LegendDisplayPolicy | displayPolicy () const |
| void | setItemMode (LegendItemMode) |
| LegendItemMode | itemMode () const |
| int | identifierMode () const |
| QWidget * | contentsWidget () |
| const QWidget * | contentsWidget () const |
| void | insert (const QwtLegendItemManager *, QWidget *) |
| void | remove (const QwtLegendItemManager *) |
| QWidget * | find (const QwtLegendItemManager *) const |
| QwtLegendItemManager * | find (const QWidget *) const |
| virtual QList< QWidget * > | legendItems () const |
| void | clear () |
| bool | isEmpty () const |
| uint | itemCount () const |
| virtual bool | eventFilter (QObject *, QEvent *) |
| virtual QSize | sizeHint () const |
| virtual int | heightForWidth (int w) const |
| QScrollBar * | horizontalScrollBar () const |
| QScrollBar * | verticalScrollBar () const |
Protected Member Functions | |
| virtual void | resizeEvent (QResizeEvent *) |
| virtual void | layoutContents () |
The legend widget.
The QwtLegend widget is a tabular arrangement of legend items. Legend items might be any type of widget, but in general they will be a QwtLegendItem.
Display policy.
Default is AutoIdentifier.
Interaction mode for the legend items.
Default is ReadOnlyItem.
| QwtLegend::QwtLegend | ( | QWidget * | parent = NULL |
) | [explicit] |
Constructor
| parent | Parent widget |
| QwtLegend::~QwtLegend | ( | ) | [virtual] |
Destructor.
| void QwtLegend::clear | ( | ) |
Remove all items.
| const QWidget * QwtLegend::contentsWidget | ( | ) | const |
The contents widget is the only child of the viewport() and the parent widget of all legend items.
| QWidget * QwtLegend::contentsWidget | ( | ) |
The contents widget is the only child of the viewport() and the parent widget of all legend items.
| QwtLegend::LegendDisplayPolicy QwtLegend::displayPolicy | ( | ) | const |
| bool QwtLegend::eventFilter | ( | QObject * | o, | |
| QEvent * | e | |||
| ) | [virtual] |
Filter layout related events of QwtLegend::contentsWidget().
| o | Object to be filtered | |
| e | Event |
| QwtLegendItemManager * QwtLegend::find | ( | const QWidget * | legendItem | ) | const |
Find the widget that represents a plot item
| legendItem | Legend item |
| QWidget * QwtLegend::find | ( | const QwtLegendItemManager * | plotItem | ) | const |
Find the widget that represents a plot item
| plotItem | Plot item |
| int QwtLegend::heightForWidth | ( | int | width | ) | const [virtual] |
| width | Width |
| QScrollBar * QwtLegend::horizontalScrollBar | ( | ) | const |
| int QwtLegend::identifierMode | ( | ) | const |
Default is ShowLine | ShowSymbol | ShowText.
| void QwtLegend::insert | ( | const QwtLegendItemManager * | plotItem, | |
| QWidget * | legendItem | |||
| ) |
Insert a new item for a plot item
| plotItem | Plot item | |
| legendItem | New legend item |
| bool QwtLegend::isEmpty | ( | ) | const |
Return true, if there are no legend items.
| uint QwtLegend::itemCount | ( | ) | const |
Return the number of legend items.
| QwtLegend::LegendItemMode QwtLegend::itemMode | ( | ) | const |
| void QwtLegend::layoutContents | ( | ) | [protected, virtual] |
Adjust contents widget and item layout to the size of the viewport().
| QList< QWidget * > QwtLegend::legendItems | ( | ) | const [virtual] |
Return a list of all legend items.
| void QwtLegend::remove | ( | const QwtLegendItemManager * | plotItem | ) |
Find the corresponding item for a plotItem and remove it from the item list.
| plotItem | Plot item |
| void QwtLegend::resizeEvent | ( | QResizeEvent * | e | ) | [protected, virtual] |
Resize event
| e | Resize event |
| void QwtLegend::setDisplayPolicy | ( | LegendDisplayPolicy | policy, | |
| int | mode | |||
| ) |
Set the legend display policy to:
| policy | Legend display policy | |
| mode | Identifier mode (or'd ShowLine, ShowSymbol, ShowText) |
| void QwtLegend::setItemMode | ( | LegendItemMode | mode | ) |
| QSize QwtLegend::sizeHint | ( | ) | const [virtual] |
Return a size hint.
| QScrollBar * QwtLegend::verticalScrollBar | ( | ) | const |
1.6.3