Manpage logo

QwtLegendLabel - A widget representing something on a QwtLegend.

NAME  SYNOPSIS  Public Slots  Signals  Public Member Functions  Protected Member Functions  Detailed Description  Constructor & Destructor Documentation  QwtLegendLabel::QwtLegendLabel (QWidget * parent = 0) [explicit]  QwtLegendLabel::˜QwtLegendLabel () [virtual]  Member Function Documentation  const QwtLegendData & QwtLegendLabel::data () const  QPixmap QwtLegendLabel::icon () const  bool QwtLegendLabel::isChecked () const  bool QwtLegendLabel::isDown () const [protected]  QwtLegendData::Mode QwtLegendLabel::itemMode () const  void QwtLegendLabel::keyPressEvent (QKeyEvent * e) [override],[protected], [virtual]  void QwtLegendLabel::keyReleaseEvent (QKeyEvent * e) [override],[protected], [virtual]  void QwtLegendLabel::mousePressEvent (QMouseEvent * e) [override],[protected], [virtual]  void QwtLegendLabel::mouseReleaseEvent (QMouseEvent * e) [override],[protected], [virtual]  void QwtLegendLabel::paintEvent (QPaintEvent * e) [override], [protected],[virtual]  void QwtLegendLabel::setChecked (bool on) [slot]  void QwtLegendLabel::setData (const QwtLegendData & legendData)  void QwtLegendLabel::setDown (bool down) [protected]  void QwtLegendLabel::setIcon (const QPixmap & icon)  void QwtLegendLabel::setItemMode (QwtLegendData::Mode mode)  void QwtLegendLabel::setSpacing (int spacing)  void QwtLegendLabel::setText (const QwtText & text) [override], [virtual]  QSize QwtLegendLabel::sizeHint () const [override], [virtual]  int QwtLegendLabel::spacing () const  Author 

NAME

QwtLegendLabel − A widget representing something on a QwtLegend.

SYNOPSIS

#include <qwt_legend_label.h>

Inherits QwtTextLabel.

Public Slots

void setChecked (bool on)

Public Slots inherited from QwtTextLabel

void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)
void clear ()
Clear the text and all QwtText attributes.

Signals

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.

Public Member Functions

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.

Public Member Functions inherited from QwtTextLabel

QwtTextLabel (QWidget *parent=NULL)
QwtTextLabel
(const QwtText &, QWidget *parent=NULL)
virtual ˜QwtTextLabel ()
Destructor.
void setPlainText (const QString &)
QString plainText () const
const QwtText & text () const
Return the text.
int indent () const
Return label’s text indent in pixels.
void setIndent (int)
int margin () const
Return label’s text margin in pixels.
void setMargin (int)
virtual QSize minimumSizeHint () const override
Return a minimum size hint.
virtual int heightForWidth (int) const override
QRect textRect () const
virtual void drawText (QPainter *, const QRectF &)
Redraw the text.

Protected Member Functions

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.

Protected Member Functions inherited from QwtTextLabel

virtual void drawContents (QPainter *)
Redraw the text and focus indicator.

Detailed Description

A widget representing something on a QwtLegend.

Definition at line 22 of file qwt_legend_label.h.

Constructor & Destructor Documentation

QwtLegendLabel::QwtLegendLabel (QWidget * parent = 0) [explicit]

Parameters

parent Parent widget

Definition at line 92 of file qwt_legend_label.cpp.

QwtLegendLabel::˜QwtLegendLabel () [virtual]

Destructor.

Definition at line 101 of file qwt_legend_label.cpp.

Member Function Documentation

const QwtLegendData & QwtLegendLabel::data () const

Returns

Attributes of the label

See also

setData(), QwtPlotItem::legendData()

Definition at line 84 of file qwt_legend_label.cpp.

QPixmap QwtLegendLabel::icon () const

Returns

Pixmap representing a plot item

See also

setIcon()

Definition at line 180 of file qwt_legend_label.cpp.

bool QwtLegendLabel::isChecked () const

Return true, if the item is checked.

Definition at line 235 of file qwt_legend_label.cpp.

bool QwtLegendLabel::isDown () const [protected]

Return true, if the item is down.

Definition at line 265 of file qwt_legend_label.cpp.

QwtLegendData::Mode QwtLegendLabel::itemMode () const

Returns

Item mode

See also

setItemMode()

Definition at line 150 of file qwt_legend_label.cpp.

void QwtLegendLabel::keyPressEvent (QKeyEvent * e) [override],[protected], [virtual]

Handle key press events.

Definition at line 374 of file qwt_legend_label.cpp.

void QwtLegendLabel::keyReleaseEvent (QKeyEvent * e) [override],[protected], [virtual]

Handle key release events.

Definition at line 400 of file qwt_legend_label.cpp.

void QwtLegendLabel::mousePressEvent (QMouseEvent * e) [override],[protected], [virtual]

Handle mouse press events.

Definition at line 329 of file qwt_legend_label.cpp.

void QwtLegendLabel::mouseReleaseEvent (QMouseEvent * e) [override],[protected], [virtual]

Handle mouse release events.

Definition at line 352 of file qwt_legend_label.cpp.

void QwtLegendLabel::paintEvent (QPaintEvent * e) [override], [protected],[virtual]

Paint event.

Reimplemented from QwtTextLabel.

Definition at line 286 of file qwt_legend_label.cpp.

void QwtLegendLabel::setChecked (bool on) [slot]

Check/Uncheck a the item

Parameters

on check/uncheck

See also

setItemMode()

Definition at line 221 of file qwt_legend_label.cpp.

void QwtLegendLabel::setData (const QwtLegendData & legendData)

Set the attributes of the legend label

Parameters

legendData Attributes of the label

See also

data()

Definition at line 62 of file qwt_legend_label.cpp.

void QwtLegendLabel::setDown (bool down) [protected]

Set the item being down.

Definition at line 241 of file qwt_legend_label.cpp.

void QwtLegendLabel::setIcon (const QPixmap & icon)

Assign the icon

Parameters

icon Pixmap representing a plot item

See also

icon(), QwtPlotItem::legendIcon()

Definition at line 162 of file qwt_legend_label.cpp.

void QwtLegendLabel::setItemMode (QwtLegendData::Mode mode)

Set the item mode The default is QwtLegendData::ReadOnly

Parameters

mode Item mode

See also

itemMode()

Definition at line 131 of file qwt_legend_label.cpp.

void QwtLegendLabel::setSpacing (int spacing)

Change the spacing between icon and text.

Parameters

spacing Spacing

See also

spacing(), QwtTextLabel::margin()

Definition at line 191 of file qwt_legend_label.cpp.

void QwtLegendLabel::setText (const QwtText & text) [override], [virtual]

Set the text to the legend item

Parameters

text Text label

See also

QwtTextLabel::text()

Reimplemented from QwtTextLabel.

Definition at line 113 of file qwt_legend_label.cpp.

QSize QwtLegendLabel::sizeHint () const [override], [virtual]

Return a size hint.

Reimplemented from QwtTextLabel.

Definition at line 271 of file qwt_legend_label.cpp.

int QwtLegendLabel::spacing () const

Returns

Spacing between icon and text

See also

setSpacing(), QwtTextLabel::margin()

Definition at line 210 of file qwt_legend_label.cpp.

Author

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


Updated 2026-06-01 - jenkler.se | uex.se