QwtTextLabel - A Widget which displays a QwtText.
Contents
Constructor & Destructor Documentation
QwtTextLabel::QwtTextLabel(QWidget*parent=NULL)[explicit]
Constructs an empty label.
Parameters:parent Parent widget
QwtTextLabel::QwtTextLabel(constQwtText&text,QWidget*parent=NULL)[explicit]
Constructs a label that displays the text, text
Parameters:parent Parent widget
text Text
Detailed Description
A Widget which displays a QwtText.
Member Function Documentation
intQwtTextLabel::heightForWidth(intwidth)const[virtual]Parameters:width Width
Returns:
Preferred height for this widget, given the width.
voidQwtTextLabel::paintEvent(QPaintEvent*event)[protected],[virtual]
Qt paint event
Parameters:event Paint event
Reimplemented in QwtLegendLabel.
QStringQwtTextLabel::plainText()const
Interface for the designer plugin
Returns:
Text as plain text
Seealso:setPlainText(), text()voidQwtTextLabel::setIndent(intindent)
Set label's text indent in pixels
Parameters:indent Indentation in pixels
voidQwtTextLabel::setMargin(intmargin)
Set label's margin in pixels
Parameters:margin Margin in pixels
voidQwtTextLabel::setPlainText(constQString&text)
Interface for the designer plugin - does the same as setText()Seealso:plainText()voidQwtTextLabel::setText(constQString&text,QwtText::TextFormattextFormat=QwtText::AutoText)[slot]
Change the label's text, keeping all other QwtText attributes
Parameters:text New text
textFormat Format of text
Seealso:QwtTextvoidQwtTextLabel::setText(constQwtText&text)[virtual],[slot]
Change the label's text
Parameters:text New text
Reimplemented in QwtLegendLabel.
QRectQwtTextLabel::textRect()const
Calculate geometry for the text in widget coordinates
Returns:
Geometry for the text
Name
QwtTextLabel - A Widget which displays a QwtText.
Synopsis
#include <qwt_text_label.h>
Inherits QFrame.
Inherited by QwtLegendLabel.
PublicSlots
void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)
virtual void setText (const QwtText &)
void clear ()
Clear the text and all QwtText attributes.
PublicMemberFunctionsQwtTextLabel (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.
ProtectedMemberFunctions
virtual void paintEvent (QPaintEvent *)
virtual void drawContents (QPainter *)
Redraw the text and focus indicator.
