#include <qwt_text_label.h>
List of all members.
Protected Member Functions |
virtual void | drawContents (QPainter *) |
virtual void | drawText (QPainter *, const QRect &) |
virtual void | paintEvent (QPaintEvent *e) |
Detailed Description
A Widget which displays a QwtText.
Constructor & Destructor Documentation
QwtTextLabel::QwtTextLabel |
( |
QWidget * |
parent = NULL | ) |
|
|
explicit |
Constructs an empty label.
- Parameters:
-
QwtTextLabel::QwtTextLabel |
( |
const QwtText & |
text, |
|
|
QWidget * |
parent = NULL |
|
) |
| |
|
explicit |
Constructs a label that displays the text, text
- Parameters:
-
parent | Parent widget |
text | Text |
Member Function Documentation
int QwtTextLabel::heightForWidth |
( |
int |
width | ) |
const |
|
virtual |
Returns the preferred height for this widget, given the width.
- Parameters:
-
void QwtTextLabel::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protectedvirtual |
void QwtTextLabel::setIndent |
( |
int |
indent | ) |
|
Set label's text indent in pixels
- Parameters:
-
indent | Indentation in pixels |
void QwtTextLabel::setMargin |
( |
int |
margin | ) |
|
Set label's margin in pixels
- Parameters:
-
void QwtTextLabel::setText |
( |
const QString & |
text, |
|
|
QwtText::TextFormat |
textFormat = QwtText::AutoText |
|
) |
| |
|
slot |
Change the label's text, keeping all other QwtText attributes
- Parameters:
-
text | New text |
textFormat | Format of text |
- See also:
- QwtText
void QwtTextLabel::setText |
( |
const QwtText & |
text | ) |
|
|
virtualslot |
Change the label's text
- Parameters:
-
Reimplemented in QwtLegendItem.
QRect QwtTextLabel::textRect |
( |
| ) |
const |
Calculate the rect for the text in widget coordinates
- Returns:
- Text rect