A Widget which displays a QwtText.
More...
#include <qwt_text_label.h>
|
| | QwtTextLabel (QWidget *parent=nullptr) |
| | Constructs an empty label.
|
| |
| | QwtTextLabel (const QwtText &, QWidget *parent=nullptr) |
| | Constructs a label that displays the text.
|
| |
| virtual | ~QwtTextLabel () |
| | Destructor .
|
| |
| void | setPlainText (const QString &) |
| | Interface for the designer plugin - does the same as setText()
|
| |
| QString | plainText () const |
| | Interface for the designer plugin.
|
| |
| const QwtText & | text () const |
| | Return the text.
|
| |
| int | indent () const |
| | Return label's text indent in pixels.
|
| |
| void | setIndent (int) |
| | Set label's text indent in pixels.
|
| |
| int | margin () const |
| | Return label's margin in pixels.
|
| |
| void | setMargin (int) |
| | Set label's margin in pixels.
|
| |
| 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 |
| | Return the preferred height for a given width.
|
| |
| QRect | textRect () const |
| | Calculate geometry for the text in widget coordinates.
|
| |
| virtual void | drawText (QPainter *, const QRectF &) |
| | Redraw the text.
|
| |
|
| virtual void | paintEvent (QPaintEvent *) override |
| | Paint event handler.
|
| |
| virtual void | drawContents (QPainter *) |
| | Draw the contents.
|
| |
|
|
int | indent |
| |
|
int | margin |
| |
|
QString | plainText |
| |
A Widget which displays a QwtText.
◆ QwtTextLabel() [1/2]
| QwtTextLabel::QwtTextLabel |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Constructs an empty label.
◆ QwtTextLabel() [2/2]
| QwtTextLabel::QwtTextLabel |
( |
const QwtText & |
text, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructs a label that displays the text.
◆ ~QwtTextLabel()
| QwtTextLabel::~QwtTextLabel |
( |
| ) |
|
|
virtual |
◆ clear
| void QwtTextLabel::clear |
( |
| ) |
|
|
slot |
Clear the text and all QwtText attributes.
◆ drawContents()
| void QwtTextLabel::drawContents |
( |
QPainter * |
painter | ) |
|
|
protectedvirtual |
Draw the contents.
Redraw the text and focus indicator.
◆ drawText()
| void QwtTextLabel::drawText |
( |
QPainter * |
painter, |
|
|
const QRectF & |
textRect |
|
) |
| |
|
virtual |
◆ heightForWidth()
| int QwtTextLabel::heightForWidth |
( |
int |
width | ) |
const |
|
overridevirtual |
Return the preferred height for a given width.
◆ indent()
| int QwtTextLabel::indent |
( |
| ) |
const |
Return label's text indent in pixels.
◆ margin()
| int QwtTextLabel::margin |
( |
| ) |
const |
Return label's margin in pixels.
◆ minimumSizeHint()
| QSize QwtTextLabel::minimumSizeHint |
( |
| ) |
const |
|
overridevirtual |
Return a minimum size hint.
◆ paintEvent()
| void QwtTextLabel::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotectedvirtual |
Paint event handler.
Qt paint event handler.
Reimplemented in QwtLegendLabel.
◆ plainText()
| QString QwtTextLabel::plainText |
( |
| ) |
const |
Interface for the designer plugin.
◆ setIndent()
| void QwtTextLabel::setIndent |
( |
int |
indent | ) |
|
Set label's text indent in pixels.
◆ setMargin()
| void QwtTextLabel::setMargin |
( |
int |
margin | ) |
|
Set label's margin in pixels.
◆ setPlainText()
| void QwtTextLabel::setPlainText |
( |
const QString & |
text | ) |
|
Interface for the designer plugin - does the same as setText()
◆ setText [1/2]
Change the label's text, keeping all other QwtText attributes.
◆ setText [2/2]
| void QwtTextLabel::setText |
( |
const QwtText & |
text | ) |
|
|
virtualslot |
◆ sizeHint()
| QSize QwtTextLabel::sizeHint |
( |
| ) |
const |
|
overridevirtual |
◆ text()
| const QwtText & QwtTextLabel::text |
( |
| ) |
const |
◆ textRect()
| QRect QwtTextLabel::textRect |
( |
| ) |
const |
Calculate geometry for the text in widget coordinates.
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/plot/qwt_text_label.h
- /home/runner/work/QWT/QWT/src/plot/qwt_text_label.cpp