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. More... | |
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. More... | |
virtual int | heightForWidth (int) const QWT_OVERRIDE |
int | indent () const |
int | margin () const |
virtual QSize | minimumSizeHint () const QWT_OVERRIDE |
Return a minimum size hint. More... | |
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 QWT_OVERRIDE |
Return a size hint. More... | |
const QwtText & | text () const |
Return the text. More... | |
QRect | textRect () const |
virtual | ~QwtTextLabel () |
Destructor. More... | |
Protected Member Functions | |
virtual void | drawContents (QPainter *) |
Redraw the text and focus indicator. More... | |
virtual void | paintEvent (QPaintEvent *) QWT_OVERRIDE |
Properties | |
int | indent |
Return label's text indent in pixels. More... | |
int | margin |
Return label's text margin in pixels. More... | |
QString | plainText |
Private Member Functions | |
int | defaultIndent () const |
void | init () |
Private Attributes | |
PrivateData * | d_data |
A Widget which displays a QwtText.
Definition at line 26 of file qwt_text_label.h.
|
explicit |
Constructs an empty label.
parent | Parent widget |
Definition at line 39 of file qwt_text_label.cpp.
|
explicit |
Constructs a label that displays the text, text
parent | Parent widget |
text | Text |
Definition at line 50 of file qwt_text_label.cpp.
|
virtual |
Destructor.
Definition at line 58 of file qwt_text_label.cpp.
|
slot |
Clear the text and all QwtText attributes.
Definition at line 124 of file qwt_text_label.cpp.
|
private |
Definition at line 330 of file qwt_text_label.cpp.
|
protectedvirtual |
Redraw the text and focus indicator.
Definition at line 257 of file qwt_text_label.cpp.
|
virtual |
Redraw the text.
Definition at line 279 of file qwt_text_label.cpp.
|
virtual |
width | Width |
Definition at line 209 of file qwt_text_label.cpp.
int QwtTextLabel::indent | ( | ) | const |
|
private |
Definition at line 63 of file qwt_text_label.cpp.
int QwtTextLabel::margin | ( | ) | const |
|
virtual |
Return a minimum size hint.
Definition at line 178 of file qwt_text_label.cpp.
|
protectedvirtual |
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 142 of file qwt_text_label.cpp.
void QwtTextLabel::setMargin | ( | int | margin | ) |
Set label's margin in pixels
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()
Definition at line 73 of file qwt_text_label.cpp.
|
slot |
Change the label's text, keeping all other QwtText attributes
text | New text |
textFormat | Format of text |
Definition at line 96 of file qwt_text_label.cpp.
|
virtualslot |
Change the label's text
text | New text |
Reimplemented in QwtLegendLabel.
Definition at line 109 of file qwt_text_label.cpp.
|
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
Definition at line 288 of file qwt_text_label.cpp.
|
private |
Definition at line 74 of file qwt_text_label.h.
|
readwrite |
Return label's text indent in pixels.
Definition at line 30 of file qwt_text_label.h.
|
readwrite |
Return label's text margin in pixels.
Definition at line 31 of file qwt_text_label.h.
|
readwrite |
Interface for the designer plugin
Definition at line 32 of file qwt_text_label.h.