A Widget which displays a QwtText. More...
#include <qwt_text_label.h>
Classes | |
class | PrivateData |
Public Slots | |
void | clear () |
Clear the text and all QwtText attributes. | |
void | setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText) |
virtual void | setText (const QwtText &) |
Public Member Functions | |
virtual void | drawText (QPainter *, const QRectF &) |
Redraw the text. | |
virtual int | heightForWidth (int) const |
int | indent () const |
int | margin () const |
virtual QSize | minimumSizeHint () const |
Return a minimum size hint. | |
QString | plainText () const |
QwtTextLabel (QWidget *parent=NULL) | |
QwtTextLabel (const QwtText &, QWidget *parent=NULL) | |
void | setIndent (int) |
void | setMargin (int) |
void | setPlainText (const QString &) |
virtual QSize | sizeHint () const |
Return a size hint. | |
const QwtText & | text () const |
Return the text. | |
QRect | textRect () const |
virtual | ~QwtTextLabel () |
Destructor. | |
Protected Member Functions | |
virtual void | drawContents (QPainter *) |
Redraw the text and focus indicator. | |
virtual void | paintEvent (QPaintEvent *e) |
Properties | |
int | indent |
Return label's text indent in pixels. | |
int | margin |
Return label's text margin in pixels. | |
QString | plainText |
Private Member Functions | |
int | defaultIndent () const |
void | init () |
Private Attributes | |
PrivateData * | d_data |
A Widget which displays a QwtText.
Definition at line 25 of file qwt_text_label.h.
QwtTextLabel::QwtTextLabel | ( | QWidget * | parent = NULL | ) | [explicit] |
Constructs an empty label.
parent | Parent widget |
Definition at line 37 of file qwt_text_label.cpp.
QwtTextLabel::QwtTextLabel | ( | const QwtText & | text, |
QWidget * | parent = NULL |
||
) | [explicit] |
Constructs a label that displays the text, text
parent | Parent widget |
text | Text |
Definition at line 48 of file qwt_text_label.cpp.
QwtTextLabel::~QwtTextLabel | ( | ) | [virtual] |
Destructor.
Definition at line 56 of file qwt_text_label.cpp.
void QwtTextLabel::clear | ( | ) | [slot] |
Clear the text and all QwtText attributes.
Definition at line 122 of file qwt_text_label.cpp.
int QwtTextLabel::defaultIndent | ( | ) | const [private] |
Definition at line 330 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 [virtual] |
width | Width |
Definition at line 208 of file qwt_text_label.cpp.
int QwtTextLabel::indent | ( | ) | const |
void QwtTextLabel::init | ( | ) | [private] |
Definition at line 61 of file qwt_text_label.cpp.
int QwtTextLabel::margin | ( | ) | const |
QSize QwtTextLabel::minimumSizeHint | ( | ) | const [virtual] |
Return a minimum size hint.
Definition at line 176 of file qwt_text_label.cpp.
void QwtTextLabel::paintEvent | ( | QPaintEvent * | event | ) | [protected, virtual] |
Qt paint event
event | Paint event |
Reimplemented in QwtLegendLabel.
Definition at line 236 of file qwt_text_label.cpp.
QString QwtTextLabel::plainText | ( | ) | const |
void QwtTextLabel::setIndent | ( | int | indent | ) |
Set label's text indent in pixels
indent | Indentation in pixels |
Definition at line 140 of file qwt_text_label.cpp.
void QwtTextLabel::setMargin | ( | int | margin | ) |
Set label's margin in pixels
margin | Margin in pixels |
Definition at line 161 of file qwt_text_label.cpp.
void QwtTextLabel::setPlainText | ( | const QString & | text | ) |
Interface for the designer plugin - does the same as setText()
Definition at line 71 of file qwt_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
text | New text |
textFormat | Format of text |
Definition at line 94 of file qwt_text_label.cpp.
void QwtTextLabel::setText | ( | const QwtText & | text | ) | [virtual, slot] |
Change the label's text
text | New text |
Reimplemented in QwtLegendLabel.
Definition at line 107 of file qwt_text_label.cpp.
QSize QwtTextLabel::sizeHint | ( | ) | const [virtual] |
Return a size hint.
Reimplemented in QwtLegendLabel.
Definition at line 170 of file qwt_text_label.cpp.
const QwtText & QwtTextLabel::text | ( | ) | const |
Return the text.
Definition at line 116 of file qwt_text_label.cpp.
QRect QwtTextLabel::textRect | ( | ) | const |
Calculate geometry for the text in widget coordinates
Definition at line 288 of file qwt_text_label.cpp.
PrivateData* QwtTextLabel::d_data [private] |
Reimplemented in QwtLegendLabel.
Definition at line 73 of file qwt_text_label.h.
int QwtTextLabel::indent [read, write] |
Return label's text indent in pixels.
Definition at line 29 of file qwt_text_label.h.
int QwtTextLabel::margin [read, write] |
Return label's text margin in pixels.
Definition at line 30 of file qwt_text_label.h.
QString QwtTextLabel::plainText [read, write] |
Interface for the designer plugin
Definition at line 31 of file qwt_text_label.h.