QwtLegendLabel(3)

πŸ’– NAME πŸ’–

QwtLegendLabel β€” a widget representing something on a QwtLegend. bestie, this is QwtLegendLabel(3) from the Library Functions Manual, and it's giving legend-label main character energy πŸ‘‘βœ¨


🌸 SYNOPSIS 🌸

#include <qwt_legend_label.h>

Inherits QwtTextLabel.

πŸ’… Public Slots

  • void setChecked (bool on) β€” checks or unchecks the item, bestie πŸ’–

✨ Public Slots inherited from QwtTextLabel

  • void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText) β€” sets the text with that text-format argument.
  • void clear () β€” clears the text and every QwtText attribute. periodt.

πŸ“£ 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) β€” constructor; parent is the parent widget.
  • virtual ~QwtLegendLabel () β€” destructor.
  • void setData (const QwtLegendData &) β€” sets the attributes of the legend label.
  • const QwtLegendData & data () const β€” returns the label's attributes.
  • void setItemMode (QwtLegendData::Mode) β€” sets the item mode.
  • QwtLegendData::Mode itemMode () const β€” returns the item mode.
  • void setSpacing (int spacing) β€” changes the spacing between icon and text.
  • int spacing () const β€” returns the spacing between icon and text.
  • virtual void setText (const QwtText &) override β€” sets the text on the legend item.
  • void setIcon (const QPixmap &) β€” assigns the icon.
  • QPixmap icon () const β€” returns the icon pixmap.
  • virtual QSize sizeHint () const override β€” returns a size hint.
  • bool isChecked () const β€” returns true if the item is checked.

🫢 Public Member Functions inherited from QwtTextLabel

  • QwtTextLabel (QWidget *parent=NULL) β€” constructor.
  • QwtTextLabel (const QwtText &, QWidget *parent=NULL) β€” constructor with text.
  • virtual ~QwtTextLabel () β€” destructor.
  • void setPlainText (const QString &) β€” sets plain text.
  • QString plainText () const β€” returns plain text.
  • const QwtText & text () const β€” returns the text.
  • int indent () const β€” returns the label's text indent in pixels.
  • void setIndent (int) β€” sets the indent.
  • int margin () const β€” returns the label's text margin in pixels.
  • void setMargin (int) β€” sets the margin.
  • virtual QSize minimumSizeHint () const override β€” returns a minimum size hint.
  • virtual int heightForWidth (int) const override β€” height-for-width behavior.
  • QRect textRect () const β€” returns the text rectangle.
  • virtual void drawText (QPainter *, const QRectF &) β€” redraws the text.

πŸ”’ Protected Member Functions

  • void setDown (bool) β€” sets the item being down.
  • bool isDown () const β€” returns true if the item is down.
  • virtual void paintEvent (QPaintEvent *) override β€” paint event.
  • virtual void mousePressEvent (QMouseEvent *) override β€” handles mouse press events.
  • virtual void mouseReleaseEvent (QMouseEvent *) override β€” handles mouse release events.
  • virtual void keyPressEvent (QKeyEvent *) override β€” handles key press events.
  • virtual void keyReleaseEvent (QKeyEvent *) override β€” handles key release events.

🧚 Protected Member Functions inherited from QwtTextLabel

  • virtual void drawContents (QPainter *) β€” redraws the text and focus indicator.

πŸ“– Detailed Description

A widget representing something on a QwtLegend. that's literally the whole vibe, bestie ✨

Definition at line 22 of file qwt_legend_label.h.


πŸ› οΈ Constructor & Destructor Documentation

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

Builds the label.

  • 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 the Attributes of the label.

  • See also: setData(), QwtPlotItem::legendData()

Definition at line 84 of file qwt_legend_label.cpp.

QPixmap QwtLegendLabel::icon () const

Returns the 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 the 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 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 the 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. yes, the robots typed this one πŸ€–πŸ’–


πŸ’– okay that's the whole page, bestie! sign-off vibes: source/version is Qwt User's Guide, generated automatically by Doxygen from the source code, footer title is QwtLegendLabel(3), and the date slot is empty β€” no date shown. byeee πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from