QwtTextLabel(3)

okay bestie, welcome to QwtTextLabel(3) from the Library Functions Manual ✨ this page is literally all about a widget that displays a QwtText, and yes she has lore πŸ’…

🌸 NAME 🌸

QwtTextLabel β€” a Widget which displays a QwtText. iconic, no notes.

πŸ’– SYNOPSIS πŸ’–

#include <qwt_text_label.h>

Inherits QFrame.

Inherited by QwtLegendLabel.

πŸ’… Public Slots πŸ’…

  • void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText) β€” sets the label text with a text format, defaulting to QwtText::AutoText.
  • virtual void setText (const QwtText &) β€” sets the label text from a QwtText.
  • void clear () β€” Clear the text and all QwtText attributes.

🫢 Public Member Functions 🫢

  • QwtTextLabel (QWidget *parent=NULL) β€” constructor for an empty label.
  • QwtTextLabel (const QwtText &, QWidget *parent=NULL) β€” constructor with a QwtText.
  • virtual ~QwtTextLabel () β€” Destructor.
  • void setPlainText (const QString &) β€” interface for the designer plugin.
  • QString plainText () const β€” gets the text as plain text.
  • const QwtText & text () const β€” Return the text.
  • int indent () const β€” Return label's text indent in pixels.
  • void setIndent (int) β€” sets the text indent.
  • int margin () const β€” Return label's text margin in pixels.
  • void setMargin (int) β€” sets the text margin.
  • virtual QSize sizeHint () const override β€” Return a size hint.
  • virtual QSize minimumSizeHint () const override β€” Return a minimum size hint.
  • virtual int heightForWidth (int) const override β€” preferred height for a given width.
  • QRect textRect () const β€” calculates text geometry.
  • virtual void drawText (QPainter *, const QRectF &) β€” Redraw the text.

🧚 Protected Member Functions 🧚

  • virtual void paintEvent (QPaintEvent *) override β€” Qt paint event.
  • virtual void drawContents (QPainter *) β€” Redraw the text and focus indicator.

πŸ¦‹ Detailed Description πŸ¦‹

A Widget which displays a QwtText.

Definition at line 26 of file qwt_text_label.h.

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

🍼 QwtTextLabel::QwtTextLabel (QWidget * parent = NULL) [explicit]

Constructs an empty label.

  • Parameters: parent β€” Parent widget
  • Definition: line 39 of file qwt_text_label.cpp.

🍼 QwtTextLabel::QwtTextLabel (const QwtText & text, QWidget * parent = NULL) [explicit]

Constructs a label that displays the text, text.

  • Parameters: parent β€” Parent widget
  • Parameters: text β€” Text
  • Definition: line 50 of file qwt_text_label.cpp.

πŸ’€ QwtTextLabel::~QwtTextLabel () [virtual]

Destructor.

  • Definition: line 58 of file qwt_text_label.cpp.

⭐ Member Function Documentation ⭐

🧼 void QwtTextLabel::clear () [slot]

Clear the text and all QwtText attributes.

  • Definition: line 124 of file qwt_text_label.cpp.

🎨 void QwtTextLabel::drawContents (QPainter * painter) [protected], [virtual]

Redraw the text and focus indicator.

  • Definition: line 257 of file qwt_text_label.cpp.

πŸ–ŒοΈ void QwtTextLabel::drawText (QPainter * painter, const QRectF & textRect) [virtual]

Redraw the text.

  • Definition: line 279 of file qwt_text_label.cpp.

πŸ“ int QwtTextLabel::heightForWidth (int width) const [override], [virtual]

  • Parameters: width β€” Width
  • Returns: Preferred height for this widget, given the width.
  • Definition: line 209 of file qwt_text_label.cpp.

🌿 int QwtTextLabel::indent () const

Return label's text indent in pixels.

  • Definition: line 133 of file qwt_text_label.cpp.

🌿 int QwtTextLabel::margin () const

Return label's text margin in pixels.

  • Definition: line 154 of file qwt_text_label.cpp.

πŸͺž QSize QwtTextLabel::minimumSizeHint () const [override], [virtual]

Return a minimum size hint.

  • Definition: line 178 of file qwt_text_label.cpp.

πŸ–ΌοΈ void QwtTextLabel::paintEvent (QPaintEvent * event) [override], [protected], [virtual]

Qt paint event

  • Parameters: event β€” Paint event
  • Reimplemented in QwtLegendLabel.
  • Definition: line 236 of file qwt_text_label.cpp.

πŸ“ QString QwtTextLabel::plainText () const

Interface for the designer plugin

  • Returns: Text as plain text
  • See also: setPlainText(), text()
  • Definition: line 84 of file qwt_text_label.cpp.

πŸͺ‘ void QwtTextLabel::setIndent (int indent)

Set label's text indent in pixels

  • Parameters: indent β€” Indentation in pixels
  • Definition: line 142 of file qwt_text_label.cpp.

πŸͺ‘ void QwtTextLabel::setMargin (int margin)

Set label's margin in pixels

  • Parameters: margin β€” Margin in pixels
  • Definition: line 163 of file qwt_text_label.cpp.

🧸 void QwtTextLabel::setPlainText (const QString & text)

Interface for the designer plugin - does the same as setText()

  • See also: plainText()
  • Definition: line 73 of file qwt_text_label.cpp.

πŸ’¬ void QwtTextLabel::setText (const QString & text, QwtText::TextFormat textFormat = QwtText::AutoText) [slot]

Change the label's text, keeping all other QwtText attributes

  • Parameters: text β€” New text
  • Parameters: textFormat β€” Format of text
  • See also: QwtText
  • Definition: line 96 of file qwt_text_label.cpp.

πŸ’¬ void QwtTextLabel::setText (const QwtText & text) [virtual], [slot]

Change the label's text

  • Parameters: text β€” New text
  • Reimplemented in QwtLegendLabel.
  • Definition: line 109 of file qwt_text_label.cpp.

πŸ“ QSize QwtTextLabel::sizeHint () const [override], [virtual]

Return a size hint.

  • Reimplemented in QwtLegendLabel.
  • Definition: line 172 of file qwt_text_label.cpp.

🏷️ const QwtText & QwtTextLabel::text () const

Return the text.

  • Definition: line 118 of file qwt_text_label.cpp.

πŸ“¦ QRect QwtTextLabel::textRect () const

Calculate geometry for the text in widget coordinates

  • Returns: Geometry for the text
  • Definition: line 288 of file qwt_text_label.cpp.

πŸ‘‘ Author πŸ‘‘

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


okay that's the whole page bestie 🫢 signing off from the Qwt User's Guide copy of QwtTextLabel(3) β€” footer source/version is Qwt User's Guide, and the date? not printed, so we're just gonna vibe with that πŸ˜­πŸ’–βœ¨

πŸ“¦ where this page comes from