QwtTextLabel(3)

πŸ“¦ version 5.2.3a, in epel 9, fedora 43, fedora 44

πŸ’– QwtTextLabel(3) β€” Qwt User's Guide πŸ’–

okay bestie, welcome to the QwtTextLabel page from the Qwt User's Guide β€” this is the one, the icon, the moment. sit down, hydrate, let's get into it 🫢


✨ NAME ✨

QwtTextLabel β€” literally just... a widget. a label. that's it. that's the whole name section, they gave us nothing else and honestly? respect. πŸ’…


🌸 SYNOPSIS 🌸

#include <qwt_text_label.h>

Inherited by QwtLegendItem. πŸ‘‘

πŸŽ€ Public Slots

void clear ()
void setText (const QString &, QwtText::TextFormat
    textFormat=QwtText::AutoText)
virtual void setText (const QwtText &)

πŸ¦‹ Public Member Functions

QwtTextLabel (QWidget *parent=NULL)
QwtTextLabel (const QwtText &, QWidget *parent=NULL)
virtual ~QwtTextLabel ()
virtual int heightForWidth (int) const
int indent () const
int margin () const
virtual QSize minimumSizeHint () const
void setIndent (int)
void setMargin (int)
virtual QSize sizeHint () const
const QwtText & text () const
QRect textRect () const

πŸ’œ Protected Member Functions

virtual void drawContents (QPainter *)
virtual void drawText (QPainter *, const QRect &)
virtual void paintEvent (QPaintEvent *e)

🌈 Detailed Description 🌈

A Widget which displays a QwtText. that's it bestie, that's the whole vibe. it's a label, it holds a QwtText, it shows it. main character energy but make it a QWidget. ✨


πŸ’… Constructor & Destructor Documentation πŸ’…

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

Constructs an empty label. no text, no drama, a blank canvas, a fresh start, the beginning of a journey πŸŽ€

Parameters:

  • parent β€” Parent widget

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

Constructs a label that displays the text, text. yes the parameter is literally called text and yes the doc says "the text, text". they ate with that one fr fr πŸ’€

Parameters:

  • parent β€” Parent widget
  • text β€” Text

πŸ”₯ Member Function Documentation πŸ”₯

int QwtTextLabel::heightForWidth (int width) const [virtual]

Returns the preferred height for this widget, given the width. so like... you tell it how wide you are, it tells you how tall it wants to be. communication. we love a healthy relationship 🫢

Parameters:

  • width β€” Width

void QwtTextLabel::paintEvent (QPaintEvent *event) [protected], [virtual]

Qt paint event. this is where the actual drawing happens, the moment the label shows up and shows out ✨

Parameters:

  • event β€” Paint event
Reimplemented in QwtLegendItem.

void QwtTextLabel::setIndent (int indent)

Set label's text indent in pixels. giving your text some personal space, as it deserves πŸ’…

Parameters:

  • indent β€” Indentation in pixels

void QwtTextLabel::setMargin (int margin)

Set label's margin in pixels. the little buffer zone. the bubble around the vibe. πŸŽ€

Parameters:

  • margin β€” Margin in pixels

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

Change the label's text, keeping all other QwtText attributes. so like, the text changes but everything else about it stays exactly as it was β€” a glow-up, not a whole new person. πŸ’–

Parameters:

  • text β€” New text
  • textFormat β€” Format of text

See also: QwtText

void QwtTextLabel::setText (const QwtText &text) [virtual], [slot]

Change the label's text. that's the whole thing. short and sweet, periodt. 🌸

Parameters:

  • text β€” New text
Reimplemented in QwtLegendItem.

QRect QwtTextLabel::textRect () const

Calculate the rect for the text in widget coordinates. it's giving "here's exactly where the text lives" πŸ¦‹

Returns:

  • Text rect

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code. so nobody actually hand-wrote this, the robot did it, and honestly the robot served. πŸ™ˆ


okay that's the whole page bestie, you're officially a QwtTextLabel expert, no cap. this was Version 5.2.3, dated Tue Nov 20 2012 β€” an absolute vintage icon, a classic, and it still slays. mwah. πŸ’‹πŸ’–πŸŒˆβ­

πŸ“¦ where this page comes from