A Widget which displays a QwtText.
More...
#include <qwt_text_label.h>
|
| | QwtTextLabel (QWidget *parent=NULL) |
| | Constructs an empty label.
|
| |
| | QwtTextLabel (const QwtText &, QWidget *parent=NULL) |
| | Constructs a label that displays the text, 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 text margin in pixels.
|
| |
| void | setMargin (int) |
| | Set label's margin in pixels.
|
| |
| virtual QSize | sizeHint () const QWT_OVERRIDE |
| | Return a size hint.
|
| |
|
virtual QSize | minimumSizeHint () const QWT_OVERRIDE |
| | Return a minimum size hint.
|
| |
| virtual int | heightForWidth (int) const QWT_OVERRIDE |
| |
| QRect | textRect () const |
| | Calculate geometry for the text in widget coordinates.
|
| |
|
virtual void | drawText (QPainter *, const QRectF &) |
| | Redraw the text.
|
| |
|
| virtual void | paintEvent (QPaintEvent *) QWT_OVERRIDE |
| | Qt paint event.
|
| |
|
virtual void | drawContents (QPainter *) |
| | Redraw the text and focus indicator.
|
| |
|
|
int | indent |
| |
|
int | margin |
| |
|
QString | plainText |
| |
A Widget which displays a QwtText.
◆ QwtTextLabel() [1/2]
| QwtTextLabel::QwtTextLabel |
( |
QWidget * |
parent = NULL | ) |
|
|
explicit |
Constructs an empty label.
- Parameters
-
◆ QwtTextLabel() [2/2]
| QwtTextLabel::QwtTextLabel |
( |
const QwtText & |
text, |
|
|
QWidget * |
parent = NULL |
|
) |
| |
|
explicit |
Constructs a label that displays the text, text.
- Parameters
-
| parent | Parent widget |
| text | Text |
◆ heightForWidth()
| int QwtTextLabel::heightForWidth |
( |
int |
width | ) |
const |
|
virtual |
- Parameters
-
- Returns
- Preferred height for this widget, given the width.
◆ paintEvent()
| void QwtTextLabel::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protectedvirtual |
◆ plainText()
| QString QwtTextLabel::plainText |
( |
| ) |
const |
◆ setIndent()
| void QwtTextLabel::setIndent |
( |
int |
indent | ) |
|
Set label's text indent in pixels.
- Parameters
-
| indent | Indentation in pixels |
◆ setMargin()
| void QwtTextLabel::setMargin |
( |
int |
margin | ) |
|
Set label's margin in pixels.
- Parameters
-
◆ setPlainText()
| void QwtTextLabel::setPlainText |
( |
const QString & |
text | ) |
|
Interface for the designer plugin - does the same as setText()
- See also
- plainText()
◆ setText [1/2]
Change the label's text, keeping all other QwtText attributes.
- Parameters
-
| text | New text |
| textFormat | Format of text |
- See also
- QwtText
◆ setText [2/2]
| void QwtTextLabel::setText |
( |
const QwtText & |
text | ) |
|
|
virtualslot |
◆ sizeHint()
| QSize QwtTextLabel::sizeHint |
( |
| ) |
const |
|
virtual |
◆ textRect()
| QRect QwtTextLabel::textRect |
( |
| ) |
const |
Calculate geometry for the text in widget coordinates.
- Returns
- Geometry for the text
The documentation for this class was generated from the following files:
- /home/runner/work/QWT/QWT/src/qwt_text_label.h
- /home/runner/work/QWT/QWT/src/qwt_text_label.cpp