QwtMathMLTextEngine(3)

πŸ“¦ version 5.2.3a, in epel 9, fedora 43, fedora 44

πŸ‘‘ QwtMathMLTextEngine(3) β€” from the Qwt User's Guide, bestie πŸ’–

okay so. you opened the manual page for QwtMathMLTextEngine and honestly? iconic of you. this is the whole thing, no skips, no cuts, let's get into it πŸŽ€


✨ NAME ✨

QwtMathMLTextEngine β€” (yes bestie, that's it, that's the whole name, the manpage gives us no more and we respect it πŸ™ˆ)


🌸 SYNOPSIS 🌸

#include <qwt_mathml_text_engine.h>

Inherits QwtTextEngine.

πŸ’… Public Member Functions πŸ’…

  • QwtMathMLTextEngine ()
  • virtual ~QwtMathMLTextEngine ()
  • virtual void draw (QPainter *painter, const QRect &rect, int flags, const QString &text) const
  • virtual int heightForWidth (const QFont &font, int flags, const QString &text, int width) const
  • virtual bool mightRender (const QString &) const
  • virtual void textMargins (const QFont &, const QString &, int &left, int &right, int &top, int &bottom) const
  • virtual QSize textSize (const QFont &font, int flags, const QString &text) const

🫢 Additional Inherited Members 🫢

(they're inherited, they're extra, they're there. moving on πŸ’œ)


πŸ¦‹ Detailed Description πŸ¦‹

so this whole thing is a Text Engine for the MathML renderer of the Qt solutions package. that's the vibe. that's the job.

the Qt Solution package ships a renderer for MathML at:

http://www.trolltech.com/products/qt/addon/solutions/catalog/4/Widgets/qtmmlwidget

…and heads up bestie, that one is available for owners of a commercial Qt license. so you need a version >= 2.1, and that version is only available for Qt4. lowkey a whole situation but okay, we move πŸ’€

to enable MathML support you gotta add this code to the application, exactly like this:

#include <qwt_mathml_text_engine.h>

QwtText::setTextEngine(QwtText::MathMLText, new QwtMathMLTextEngine());

See also: QwtTextEngine, QwtText::setTextEngine

⚠️ Warning: unfortunately the MathML renderer doesn't support rotating of texts. not a single rotation. it simply said no. 😭

πŸ”₯ Member Function Documentation πŸ”₯

πŸ’– void QwtMathMLTextEngine::draw (QPainter *painter, const QRect &rect, intflags, const QString &text) const [virtual] πŸ’–

draws the text in a clipping rectangle. putting the words in the box, basically. slay.

Parameters:

  • painter β€” Painter
  • rect β€” Clipping rectangle
  • flags β€” Bitwise OR of the flags like in for QPainter::drawText
  • text β€” Text to be rendered

Implements QwtTextEngine.


🧚 int QwtMathMLTextEngine::heightForWidth (const QFont &font, intflags, const QString &text, intwidth) const [virtual] 🧚

finds the height for a given width. you hand it a width, it hands you back the height, mutual exchange, very healthy relationship ✨

Parameters:

  • font β€” Font of the text
  • flags β€” Bitwise OR of the flags used like in QPainter::drawText
  • text β€” Text to be rendered
  • width β€” Width

Returns: Calculated height

Implements QwtTextEngine.


🌈 bool QwtMathMLTextEngine::mightRender (const QString &text) const [virtual] 🌈

tests if a string can be rendered by QwtMathMLTextEngine. a little vibe check, if you will.

Parameters:

  • text β€” Text to be tested

Returns: true, if text begins with '<math>'.

Implements QwtTextEngine.


πŸŽ€ void QwtMathMLTextEngine::textMargins (const QFont &, const QString &, int &left, int &right, int &top, int &bottom) const [virtual] πŸŽ€

returns margins around the texts. and by "returns margins" we mean it's giving zero across the board, no cap:

Parameters:

  • left β€” Return 0
  • right β€” Return 0
  • top β€” Return 0
  • bottom β€” Return 0

Implements QwtTextEngine.


πŸ’œ QSize QwtMathMLTextEngine::textSize (const QFont &font, intflags, const QString &text) const [virtual] πŸ’œ

returns the size that is needed to render text. the measurements, the receipts, the whole fit check πŸ“

Parameters:

  • font β€” Font of the text
  • flags β€” Bitwise OR of the flags used like in QPainter::drawText
  • text β€” Text to be rendered

Returns: Caluclated size

Implements QwtTextEngine.


⭐ Author ⭐

Generated automatically by Doxygen for Qwt User's Guide from the source code. not a human, just a robot doing its lil thing πŸ€–πŸ’…


and that's the page bestie!! πŸ’– Version 5.2.3, dated Tue Nov 20 2012 β€” yes we know, vintage, retro, antique, a classic. mwah, go render some MathML, ily 🫢✨

πŸ“¦ where this page comes from