|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
The legend widget. More...
#include <qwt_legend.h>
Classes | |
| class | PrivateData |
Public Slots | |
| virtual void | updateLegend (const QVariant &, const QList< QwtLegendData > &) override |
| Update the entries for an item. | |
Public Slots inherited from QwtAbstractLegend | |
| virtual void | updateLegend (const QVariant &itemInfo, const QList< QwtLegendData > &data)=0 |
| Update the entries for a plot item. | |
Signals | |
| void | clicked (const QVariant &itemInfo, int index) |
| Signal emitted when the user clicks on a legend label in Clickable mode. | |
| void | checked (const QVariant &itemInfo, bool on, int index) |
| Signal emitted when the user clicks on a legend label in Checkable mode. | |
Public Member Functions | |
| QwtLegend (QWidget *parent=nullptr) | |
| Constructor for QwtLegend. | |
| virtual | ~QwtLegend () |
| Destructor . | |
| void | setMaxColumns (uint numColums) |
| Set the maximum number of entries in a row. | |
| uint | maxColumns () const |
| Return the maximum number of entries in a row. | |
| void | setDefaultItemMode (QwtLegendData::Mode) |
| Set the default mode for legend labels. | |
| QwtLegendData::Mode | defaultItemMode () const |
| Return the default item mode. | |
| QWidget * | contentsWidget () |
| Return the contents widget. | |
| const QWidget * | contentsWidget () const |
| Return the contents widget (const version) | |
| QWidget * | legendWidget (const QVariant &) const |
| Return first widget in the list of widgets associated to an item. | |
| QList< QWidget * > | legendWidgets (const QVariant &) const |
| Return list of widgets associated to an item. | |
| QVariant | itemInfo (const QWidget *) const |
| Find the item that is associated to a widget. | |
| virtual bool | eventFilter (QObject *, QEvent *) override |
| Handle QEvent::ChildRemoved and QEvent::LayoutRequest events. | |
| virtual QSize | sizeHint () const override |
| Return a size hint. | |
| virtual int | heightForWidth (int w) const override |
| Return the preferred height for a given width. | |
| QScrollBar * | horizontalScrollBar () const |
| Return the horizontal scrollbar. | |
| QScrollBar * | verticalScrollBar () const |
| Return the vertical scrollbar. | |
| virtual void | renderLegend (QPainter *, const QRectF &, bool fillBackground) const override |
| Render the legend into a given rectangle. | |
| virtual void | renderItem (QPainter *, const QWidget *, const QRectF &, bool fillBackground) const |
| Render a legend entry into a given rectangle. | |
| virtual bool | isEmpty () const override |
| Check if the legend is empty. | |
| virtual int | scrollExtent (Qt::Orientation) const override |
| Return the extent that is needed for the scrollbars. | |
Public Member Functions inherited from QwtAbstractLegend | |
| QwtAbstractLegend (QWidget *parent=nullptr) | |
| Constructor for QwtAbstractLegend. | |
| virtual | ~QwtAbstractLegend () |
| Destructor for QwtAbstractLegend . | |
Protected Slots | |
| void | itemClicked () |
| Called internally when the legend has been clicked on. | |
| void | itemChecked (bool) |
| Called internally when the legend has been checked. | |
Protected Member Functions | |
| virtual QWidget * | createWidget (const QwtLegendData &) const |
| Create a widget to be inserted into the legend. | |
| virtual void | updateWidget (QWidget *, const QwtLegendData &) |
| Update the widget. | |
The legend widget.
|
explicit |
Constructor for QwtLegend.
|
virtual |
Destructor .
|
signal |
Signal emitted when the user clicks on a legend label in Checkable mode.
|
signal |
Signal emitted when the user clicks on a legend label in Clickable mode.
| QWidget * QwtLegend::contentsWidget | ( | ) |
Return the contents widget.
| const QWidget * QwtLegend::contentsWidget | ( | ) | const |
Return the contents widget (const version)
|
protectedvirtual |
Create a widget to be inserted into the legend.
| QwtLegendData::Mode QwtLegend::defaultItemMode | ( | ) | const |
Return the default item mode.
|
overridevirtual |
Handle QEvent::ChildRemoved and QEvent::LayoutRequest events.
|
overridevirtual |
Return the preferred height for a given width.
| QScrollBar * QwtLegend::horizontalScrollBar | ( | ) | const |
Return the horizontal scrollbar.
|
overridevirtual |
Check if the legend is empty.
Implements QwtAbstractLegend.
|
protectedslot |
Called internally when the legend has been checked.
|
protectedslot |
Called internally when the legend has been clicked on.
| QVariant QwtLegend::itemInfo | ( | const QWidget * | widget | ) | const |
Find the item that is associated to a widget.
| QWidget * QwtLegend::legendWidget | ( | const QVariant & | itemInfo | ) | const |
Return first widget in the list of widgets associated to an item.
| QList< QWidget * > QwtLegend::legendWidgets | ( | const QVariant & | itemInfo | ) | const |
Return list of widgets associated to an item.
| uint QwtLegend::maxColumns | ( | ) | const |
Return the maximum number of entries in a row.
|
virtual |
Render a legend entry into a given rectangle.
|
overridevirtual |
Render the legend into a given rectangle.
Implements QwtAbstractLegend.
|
overridevirtual |
Return the extent that is needed for the scrollbars.
Reimplemented from QwtAbstractLegend.
| void QwtLegend::setDefaultItemMode | ( | QwtLegendData::Mode | mode | ) |
Set the default mode for legend labels.
| void QwtLegend::setMaxColumns | ( | uint | numColums | ) |
Set the maximum number of entries in a row.
|
overridevirtual |
Return a size hint.
|
overridevirtualslot |
Update the entries for an item.
|
protectedvirtual |
Update the widget.
| QScrollBar * QwtLegend::verticalScrollBar | ( | ) | const |
Return the vertical scrollbar.