Inheritance diagram for QwtText:
QwtText is an interface class for drawing plain and rich text. It provides also an interface for text classes that understand other text description languages such as LaTeX or LyX.
Public Member Functions | |
virtual | ~QwtText () |
virtual void | setText (const QString &) |
QString | text () const |
bool | isNull () const |
bool | isEmpty () const |
bool | operator! () const |
virtual void | setFont (const QFont &) |
QFont | font () const |
QFontMetrics | fontMetrics () const |
virtual void | setAlignment (int align) |
int | alignment () const |
virtual void | setColor (const QColor &) |
QColor | color () const |
virtual void | setRectPen (const QPen &) |
QPen | rectPen () const |
virtual void | setRectBrush (const QBrush &) |
QBrush | rectBrush () const |
virtual int | heightForWidth (int width) const =0 |
virtual QRect | boundingRect (QPainter *painter=0) const =0 |
virtual void | draw (QPainter *painter, const QRect &rect) const =0 |
virtual QwtText * | clone () const =0 |
Static Public Member Functions | |
QwtText * | makeText (const QString &, Qt::TextFormat, int align, const QFont &, const QColor &color=QColor(), const QPen &pen=QPen(Qt::NoPen), const QBrush &brush=QBrush(Qt::NoBrush)) |
QwtText * | makeText (const QString &, int align, const QFont &, const QColor &color=QColor(), const QPen &pen=QPen(Qt::NoPen), const QBrush &brush=QBrush(Qt::NoBrush)) |
void | setDefaultFormat (Qt::TextFormat) |
Qt::TextFormat | defaultFormat () |
Protected Member Functions | |
QwtText (const QString &text, const QFont &, int align, const QColor &, const QPen &pen=QPen(Qt::NoPen), const QBrush &brush=QBrush(Qt::NoBrush)) |
|
Destructor.
|
|
Constructor.
|
|
Get the alignment flags.
|
|
Returns the bounding rectangle. The bounding rectangle is calculated with respect to (0, 0). The left and top border depend on the alignment flags:
Use for instance QRect::moveBy(x,y), before drawing the text into the rectangle. Implemented in QwtPlainText, and QwtRichText. |
|
Create a clone Implemented in QwtPlainText, and QwtRichText. |
|
Return the color.
|
|
Return default format for the QwtText factory.
|
|
Draw the text in a clipping rectangle.
Implemented in QwtPlainText, and QwtRichText. |
|
Return the font.
|
|
Return the font metrics.
|
|
Find the height for a given width.
Implemented in QwtPlainText, and QwtRichText. |
|
Factory function for QwtText objects. Creates a text according to QwtText::defaultFormat()
|
|
Factory function for QwtText objects.
|
|
Return the rectangle brush.
|
|
Return the rectangle pen.
|
|
Set the alignment flags.
Reimplemented in QwtRichText. |
|
Set the color.
|
|
Set the default format for the QwtText factory.
|
|
Set the font.
Reimplemented in QwtRichText. |
|
Set the rectangle brush.
|
|
Set the rectangle pen.
|
|
Set the text.
Reimplemented in QwtRichText. |
|
Return the text.
|