QwtTextEngine(3)
β¨ QwtTextEngine β¨
okay bestie, welcome to the manual page for QwtTextEngine(3) from the Qwt User's Guide π this is the abstract base class situation and honestly? it's giving blueprint energy. let's get into it π«Ά
πΈ NAME πΈ
QwtTextEngine β the abstract text-rendering base class, no cap π
π¦ SYNOPSIS π¦
#include <qwt_text_engine.h>
Inherited by QwtMathMLTextEngine, QwtPlainTextEngine, and QwtRichTextEngine.
π Public Member Functions
virtual ~QwtTextEngine ()
virtual void draw (QPainter *painter, const QRect &rect, int flags,
const QString &text) const =0
virtual int heightForWidth (const QFont &font, int flags, const QString
&text, int width) const =0
virtual bool mightRender (const QString &text) const =0
virtual void textMargins (const QFont &font, const QString &text, int
&left, int &right, int &top, int &bottom) const =0
virtual QSize textSize (const QFont &font, int flags, const QString
&text) const =0
π Protected Member Functions
QwtTextEngine ()
π Detailed Description π
Abstract base class for rendering text strings. yes bestie, abstract β you cannot just make one of these and vibe, you gotta subclass it π
A text engine is responsible for rendering texts for a specific text format. They are used by QwtText to render a text. so like, QwtText is the main character and the text engine is the stylist doing the actual look β¨
QwtPlainTextEngine and QwtRichTextEngine are part of the Qwt library. π«Ά
QwtMathMLTextEngine can be found in Qwt MathML extension, that needs the MathML renderer of the Qt solutions package. Unfortunately it is only available with a commercial Qt license. π yeah... that one's paywalled, sorry babe.
See also:
QwtText::setTextEngine()
β Member Function Documentation β
π§ virtual void QwtTextEngine::draw (QPainter *painter, const QRect &rect, int flags, const QString &text) const [pure virtual]
Draw the text in a clipping rectangle. literally just, paint it π
Parameters:
painterβ Painterrectβ Clipping rectangleflagsβ Bitwise OR of the flags like in forQPainter::drawTexttextβ Text to be rendered
Implemented in QwtRichTextEngine, QwtPlainTextEngine, and QwtMathMLTextEngine.
π virtual int QwtTextEngine::heightForWidth (const QFont &font, int flags, const QString &text, int width) const [pure virtual]
Find the height for a given width. it's the "how tall does this get if you squeeze it to this wide" question β¨
Parameters:
fontβ Font of the textflagsβ Bitwise OR of the flags used like inQPainter::drawTexttextβ Text to be renderedwidthβ Width
Returns:
- Calculated height
Implemented in QwtRichTextEngine, QwtPlainTextEngine, and QwtMathMLTextEngine.
π¦ virtual bool QwtTextEngine::mightRender (const QString &text) const [pure virtual]
Test if a string can be rendered by this text engine. like a lil vibe check on the string π
Parameters:
textβ Text to be tested
Returns:
true, if it can be rendered
Implemented in QwtRichTextEngine, QwtPlainTextEngine, and QwtMathMLTextEngine.
π virtual void QwtTextEngine::textMargins (const QFont &font, const QString &text, int &left, int &right, int &top, int &bottom) const [pure virtual]
Return margins around the texts. the little breathing room, the personal space, the aura πΈ
The textSize might include margins around the text, like QFontMetrics::descent. In situations where texts need to be aligend in detail, knowing these margins might improve the layout calculations. (yes, "aligend" β that's the original's typo, we keep it fr fr π)
Parameters:
fontβ Font of the texttextβ Text to be renderedleftβ Return value for the left marginrightβ Return value for the right margintopβ Return value for the top marginbottomβ Return value for the bottom margin
Implemented in QwtRichTextEngine, QwtPlainTextEngine, and QwtMathMLTextEngine.
π virtual QSize QwtTextEngine::textSize (const QFont &font, int flags, const QString &text) const [pure virtual]
Returns the size, that is needed to render text. the full measurements bestie, we're taking notes π
Parameters:
fontβ Font of the textflagsβ Bitwise OR of the flags like in forQPainter::drawTexttextβ Text to be rendered
Returns:
- Caluclated size
Implemented in QwtRichTextEngine, QwtPlainTextEngine, and QwtMathMLTextEngine.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code. so nobody hand-wrote this, Doxygen did it and honestly? it ate π
π and that's the whole page bestie, you understood it, you slayed it, periodt β¨
Version 5.2.3 β dated Tue Nov 20 2012 β and that's QwtTextEngine(3) signing off π bye babe, go render some text π¦
π¦ where this page comes from
- epel 9: qwt5-qt5-devel 5.2.3a-12.20210522gita2b11e3.el9 Β· LGPLv2+ with exceptions
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms