QwtTextEngine(3) | Qwt User's Guide | QwtTextEngine(3) |
NAME
QwtTextEngine - Abstract base class for rendering text strings.
SYNOPSIS
#include <qwt_text_engine.h>
Inherited by QwtPlainTextEngine, and QwtRichTextEngine.
Public Member Functions
virtual ~QwtTextEngine ()
Destructor. virtual double heightForWidth (const QFont &font, int
flags, const QString &text, double width) const =0
virtual QSizeF textSize (const QFont &font, int flags, const
QString &text) const =0
virtual bool mightRender (const QString &text) const =0
virtual void textMargins (const QFont &font, const QString
&text, double &left, double &right, double &top, double
&bottom) const =0
virtual void draw (QPainter *painter, const QRectF &rect, int
flags, const QString &text) const =0
Protected Member Functions
QwtTextEngine ()
Constructor.
Detailed Description
Abstract base class for rendering text strings.
A text engine is responsible for rendering texts for a specific text format. They are used by QwtText to render a text.
See also
Definition at line 30 of file qwt_text_engine.h.
Member Function Documentation
virtual void QwtTextEngine::draw (QPainter * painter, const QRectF & rect, int flags, const QString & text) const [pure virtual]
Draw the text in a clipping rectangle
Parameters
rect Clipping rectangle
flags Bitwise OR of the flags like in for QPainter::drawText()
text Text to be rendered
Implemented in QwtRichTextEngine, and QwtPlainTextEngine.
virtual double QwtTextEngine::heightForWidth (const QFont & font, int flags, const QString & text, double width) const [pure virtual]
Find the height for a given width
Parameters
flags Bitwise OR of the flags used like in QPainter::drawText
text Text to be rendered
width Width
Returns
Implemented in QwtRichTextEngine, and QwtPlainTextEngine.
virtual bool QwtTextEngine::mightRender (const QString & text) const [pure virtual]
Test if a string can be rendered by this text engine
Parameters
Returns
Implemented in QwtRichTextEngine, and QwtPlainTextEngine.
virtual void QwtTextEngine::textMargins (const QFont & font, const QString & text, double & left, double & right, double & top, double & bottom) const [pure virtual]
Return margins around the texts
The textSize might include margins around the text, like QFontMetrics::descent(). In situations where texts need to be aligned in detail, knowing these margins might improve the layout calculations.
Parameters
text Text to be rendered
left Return value for the left margin
right Return value for the right margin
top Return value for the top margin
bottom Return value for the bottom margin
Implemented in QwtRichTextEngine, and QwtPlainTextEngine.
virtual QSizeF QwtTextEngine::textSize (const QFont & font, int flags, const QString & text) const [pure virtual]
Returns the size, that is needed to render text
Parameters
flags Bitwise OR of the flags like in for QPainter::drawText
text Text to be rendered
Returns
Implemented in QwtRichTextEngine, and QwtPlainTextEngine.
Author
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Sun Jul 18 2021 | Version 6.2.0 |