QwtLegendLabel(3) Qwt User's Guide QwtLegendLabel(3)

QwtLegendLabel - A widget representing something on a QwtLegend.

#include <qwt_legend_label.h>

Inherits QwtTextLabel.


void setChecked (bool on)


void clicked ()
Signal, when the legend item has been clicked. void pressed ()
Signal, when the legend item has been pressed. void released ()
Signal, when the legend item has been released. void checked (bool)
Signal, when the legend item has been toggled.


QwtLegendLabel (QWidget *parent=0)
virtual ~QwtLegendLabel ()
Destructor. void setData (const QwtLegendData &)
const QwtLegendData & data () const
void setItemMode (QwtLegendData::Mode)
QwtLegendData::Mode itemMode () const
void setSpacing (int spacing)
Change the spacing between icon and text. int spacing () const
virtual void setText (const QwtText &) override
void setIcon (const QPixmap &)
QPixmap icon () const
virtual QSize sizeHint () const override
Return a size hint. bool isChecked () const
Return true, if the item is checked.


void setDown (bool)
Set the item being down. bool isDown () const
Return true, if the item is down. virtual void paintEvent (QPaintEvent *) override
Paint event. virtual void mousePressEvent (QMouseEvent *) override
Handle mouse press events. virtual void mouseReleaseEvent (QMouseEvent *) override
Handle mouse release events. virtual void keyPressEvent (QKeyEvent *) override
Handle key press events. virtual void keyReleaseEvent (QKeyEvent *) override
Handle key release events.

A widget representing something on a QwtLegend.

Definition at line 22 of file qwt_legend_label.h.

Parameters

parent Parent widget

Definition at line 91 of file qwt_legend_label.cpp.

Returns

Attributes of the label

See also

setData(), QwtPlotItem::legendData()

Definition at line 83 of file qwt_legend_label.cpp.

Returns

Pixmap representing a plot item

See also

setIcon()

Definition at line 176 of file qwt_legend_label.cpp.

QwtLegendData::Mode QwtLegendLabel::itemMode () const

Returns

Item mode

See also

setItemMode()

Definition at line 149 of file qwt_legend_label.cpp.

Check/Uncheck a the item

Parameters

on check/uncheck

See also

setItemMode()

Definition at line 217 of file qwt_legend_label.cpp.

Set the attributes of the legend label

Parameters

legendData Attributes of the label

See also

data()

Definition at line 61 of file qwt_legend_label.cpp.

Assign the icon

Parameters

icon Pixmap representing a plot item

See also

icon(), QwtPlotItem::legendIcon()

Definition at line 161 of file qwt_legend_label.cpp.

Set the item mode The default is QwtLegendData::ReadOnly

Parameters

mode Item mode

See also

itemMode()

Definition at line 130 of file qwt_legend_label.cpp.

Change the spacing between icon and text.

Parameters

spacing Spacing

See also

spacing(), QwtTextLabel::margin()

Definition at line 187 of file qwt_legend_label.cpp.

Set the text to the legend item

Parameters

text Text label

See also

QwtTextLabel::text()

Reimplemented from QwtTextLabel.

Definition at line 112 of file qwt_legend_label.cpp.

Returns

Spacing between icon and text

See also

setSpacing(), QwtTextLabel::margin()

Definition at line 206 of file qwt_legend_label.cpp.

Generated automatically by Doxygen for Qwt User's Guide from the source code.

Sun Jul 18 2021 Version 6.2.0