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 toQwtText::AutoText.virtual void setText (const QwtText &)β sets the label text from aQwtText.void clear ()β Clear the text and allQwtTextattributes.
π«Ά Public Member Functions π«Ά
QwtTextLabel (QWidget *parent=NULL)β constructor for an empty label.QwtTextLabel (const QwtText &, QWidget *parent=NULL)β constructor with aQwtText.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
39of fileqwt_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
50of fileqwt_text_label.cpp.
π QwtTextLabel::~QwtTextLabel () [virtual]
Destructor.
- Definition: line
58of fileqwt_text_label.cpp.
β Member Function Documentation β
π§Ό void QwtTextLabel::clear () [slot]
Clear the text and all QwtText attributes.
- Definition: line
124of fileqwt_text_label.cpp.
π¨ void QwtTextLabel::drawContents (QPainter * painter) [protected], [virtual]
Redraw the text and focus indicator.
- Definition: line
257of fileqwt_text_label.cpp.
ποΈ void QwtTextLabel::drawText (QPainter * painter, const QRectF & textRect) [virtual]
Redraw the text.
- Definition: line
279of fileqwt_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
209of fileqwt_text_label.cpp.
πΏ int QwtTextLabel::indent () const
Return label's text indent in pixels.
- Definition: line
133of fileqwt_text_label.cpp.
πΏ int QwtTextLabel::margin () const
Return label's text margin in pixels.
- Definition: line
154of fileqwt_text_label.cpp.
πͺ QSize QwtTextLabel::minimumSizeHint () const [override], [virtual]
Return a minimum size hint.
- Definition: line
178of fileqwt_text_label.cpp.
πΌοΈ void QwtTextLabel::paintEvent (QPaintEvent * event) [override], [protected], [virtual]
Qt paint event
- Parameters:
eventβ Paint event - Reimplemented in
QwtLegendLabel. - Definition: line
236of fileqwt_text_label.cpp.
π QString QwtTextLabel::plainText () const
Interface for the designer plugin
- Returns: Text as plain text
- See also:
setPlainText(),text() - Definition: line
84of fileqwt_text_label.cpp.
πͺ‘ void QwtTextLabel::setIndent (int indent)
Set label's text indent in pixels
- Parameters:
indentβ Indentation in pixels - Definition: line
142of fileqwt_text_label.cpp.
πͺ‘ void QwtTextLabel::setMargin (int margin)
Set label's margin in pixels
- Parameters:
marginβ Margin in pixels - Definition: line
163of fileqwt_text_label.cpp.
π§Έ void QwtTextLabel::setPlainText (const QString & text)
Interface for the designer plugin - does the same as setText()
- See also:
plainText() - Definition: line
73of fileqwt_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
96of fileqwt_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
109of fileqwt_text_label.cpp.
π QSize QwtTextLabel::sizeHint () const [override], [virtual]
Return a size hint.
- Reimplemented in
QwtLegendLabel. - Definition: line
172of fileqwt_text_label.cpp.
π·οΈ const QwtText & QwtTextLabel::text () const
Return the text.
- Definition: line
118of fileqwt_text_label.cpp.
π¦ QRect QwtTextLabel::textRect () const
Calculate geometry for the text in widget coordinates
- Returns: Geometry for the text
- Definition: line
288of fileqwt_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
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms