QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QwtTextEngine Class Referenceabstract

Abstract base class for rendering text strings. More...

#include <qwt_text_engine.h>

Inheritance diagram for QwtTextEngine:
QwtPlainTextEngine QwtRichTextEngine

Public Member Functions

virtual ~QwtTextEngine ()
 Destructor .
 
virtual double heightForWidth (const QFont &font, int flags, const QString &text, double width) const =0
 Find the height for a given width.
 
virtual QSizeF textSize (const QFont &font, int flags, const QString &text) const =0
 Return the size needed to render text.
 
virtual bool mightRender (const QString &text) const =0
 Test if a string can be rendered by this text engine.
 
virtual void textMargins (const QFont &font, const QString &text, double &left, double &right, double &top, double &bottom) const =0
 Return margins around the texts.
 
virtual void draw (QPainter *painter, const QRectF &rect, int flags, const QString &text) const =0
 Draw the text in a clipping rectangle.
 

Protected Member Functions

 QwtTextEngine ()
 Protected constructor.
 

Detailed Description

Abstract base class for rendering text strings.

Constructor & Destructor Documentation

◆ ~QwtTextEngine()

QwtTextEngine::~QwtTextEngine ( )
virtual

Destructor .

◆ QwtTextEngine()

QwtTextEngine::QwtTextEngine ( )
protected

Protected constructor.

Constructor .

Member Function Documentation

◆ draw()

virtual void QwtTextEngine::draw ( QPainter *  painter,
const QRectF &  rect,
int  flags,
const QString &  text 
) const
pure virtual

Draw the text in a clipping rectangle.

Implemented in QwtPlainTextEngine, and QwtRichTextEngine.

◆ heightForWidth()

virtual double QwtTextEngine::heightForWidth ( const QFont &  font,
int  flags,
const QString &  text,
double  width 
) const
pure virtual

Find the height for a given width.

Implemented in QwtPlainTextEngine, and QwtRichTextEngine.

◆ mightRender()

virtual bool QwtTextEngine::mightRender ( const QString &  text) const
pure virtual

Test if a string can be rendered by this text engine.

Implemented in QwtPlainTextEngine, and QwtRichTextEngine.

◆ textMargins()

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.

Implemented in QwtPlainTextEngine, and QwtRichTextEngine.

◆ textSize()

virtual QSizeF QwtTextEngine::textSize ( const QFont &  font,
int  flags,
const QString &  text 
) const
pure virtual

Return the size needed to render text.

Implemented in QwtPlainTextEngine, and QwtRichTextEngine.


The documentation for this class was generated from the following files: