Qwt User's Guide
|
A Widget which displays a QwtText. More...
#include <qwt_text_label.h>
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 |
Return a size hint. | |
virtual QSize | minimumSizeHint () const |
Return a minimum size hint. | |
virtual int | heightForWidth (int) const |
QRect | textRect () const |
virtual void | drawText (QPainter *, const QRectF &) |
Redraw the text. | |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *e) |
virtual void | drawContents (QPainter *) |
Redraw the text and focus indicator. |
A Widget which displays a QwtText.
QwtTextLabel::QwtTextLabel | ( | QWidget * | parent = NULL | ) | [explicit] |
Constructs an empty label.
parent | Parent widget |
QwtTextLabel::QwtTextLabel | ( | const QwtText & | text, |
QWidget * | parent = NULL |
||
) | [explicit] |
Constructs a label that displays the text, text
parent | Parent widget |
text | Text |
int QwtTextLabel::heightForWidth | ( | int | width | ) | const [virtual] |
width | Width |
void QwtTextLabel::paintEvent | ( | QPaintEvent * | event | ) | [protected, virtual] |
QString QwtTextLabel::plainText | ( | ) | const |
void QwtTextLabel::setIndent | ( | int | indent | ) |
Set label's text indent in pixels
indent | Indentation in pixels |
void QwtTextLabel::setMargin | ( | int | margin | ) |
Set label's margin in pixels
margin | Margin in pixels |
void QwtTextLabel::setPlainText | ( | const QString & | text | ) |
Interface for the designer plugin - does the same as setText()
void QwtTextLabel::setText | ( | const QString & | text, |
QwtText::TextFormat | textFormat = QwtText::AutoText |
||
) | [slot] |
void QwtTextLabel::setText | ( | const QwtText & | text | ) | [virtual, slot] |
QRect QwtTextLabel::textRect | ( | ) | const |
Calculate geometry for the text in widget coordinates