Manpage logo

QwtTextLabel - A Widget which displays a QwtText.

NAME  SYNOPSIS  Public Slots  Public Member Functions  Protected Member Functions  Detailed Description  Constructor & Destructor Documentation  QwtTextLabel::QwtTextLabel (QWidget * parent = NULL) [explicit]  QwtTextLabel::QwtTextLabel (const QwtText & text, QWidget * parent = NULL)[explicit]  QwtTextLabel::˜QwtTextLabel () [virtual]  Member Function Documentation  void QwtTextLabel::clear () [slot]  void QwtTextLabel::drawContents (QPainter * painter) [protected],[virtual]  void QwtTextLabel::drawText (QPainter * painter, const QRectF & textRect)[virtual]  int QwtTextLabel::heightForWidth (int width) const [override], [virtual]  int QwtTextLabel::indent () const  int QwtTextLabel::margin () const  QSize QwtTextLabel::minimumSizeHint () const [override], [virtual]  void QwtTextLabel::paintEvent (QPaintEvent * event) [override],[protected], [virtual]  QString QwtTextLabel::plainText () const  void QwtTextLabel::setIndent (int indent)  void QwtTextLabel::setMargin (int margin)  void QwtTextLabel::setPlainText (const QString & text)  void QwtTextLabel::setText (const QString & text, QwtText::TextFormattextFormat = QwtText::AutoText) [slot]  void QwtTextLabel::setText (const QwtText & text) [virtual], [slot]  QSize QwtTextLabel::sizeHint () const [override], [virtual]  const QwtText & QwtTextLabel::text () const  QRect QwtTextLabel::textRect () const  Author 

NAME

QwtTextLabel − A Widget which displays a QwtText.

SYNOPSIS

#include <qwt_text_label.h>

Inherits QFrame.

Inherited by QwtLegendLabel.

Public Slots

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

Public Member Functions

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 sizeHint () const override
Return a size hint.
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

virtual void paintEvent (QPaintEvent *) override
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 at 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
text
Text

Definition at line 50 of file qwt_text_label.cpp.

QwtTextLabel::˜QwtTextLabel () [virtual]

Destructor.

Definition at line 58 of file qwt_text_label.cpp.

Member Function Documentation

void QwtTextLabel::clear () [slot]

Clear the text and all QwtText attributes.

Definition at line 124 of file qwt_text_label.cpp.

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

Redraw the text and focus indicator.

Definition at line 257 of file qwt_text_label.cpp.

void QwtTextLabel::drawText (QPainter * painter, const QRectF & textRect)[virtual]

Redraw the text.

Definition at 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 at line 209 of file qwt_text_label.cpp.

int QwtTextLabel::indent () const

Return label’s text indent in pixels.

Definition at line 133 of file qwt_text_label.cpp.

int QwtTextLabel::margin () const

Return label’s text margin in pixels.

Definition at line 154 of file qwt_text_label.cpp.

QSize QwtTextLabel::minimumSizeHint () const [override], [virtual]

Return a minimum size hint.

Definition at 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 at 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 at 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 at 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 at 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 at line 73 of file qwt_text_label.cpp.

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

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

Parameters

text New text
textFormat
Format of text

See also

QwtText

Definition at 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 at line 109 of file qwt_text_label.cpp.

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

Return a size hint.

Reimplemented in QwtLegendLabel.

Definition at line 172 of file qwt_text_label.cpp.

const QwtText & QwtTextLabel::text () const

Return the text.

Definition at 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 at line 288 of file qwt_text_label.cpp.

Author

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


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