QwtRichTextEngine(3)

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

πŸ’– QwtRichTextEngine(3) β€” straight from the Qwt User's Guide πŸ’–

okay bestie, sit down, hydrate, because we're about to get into QwtRichTextEngine and honestly? she's giving quiet luxury. this page comes to you from the Qwt User's Guide and it's short, sweet, and full of virtual functions. let's go πŸ¦‹


🌸 NAME 🌸

QwtRichTextEngine β€”

that's it. that's the name. no little tagline, no subtitle, the NAME section said "she's mysterious" and moved on. main character energy fr fr. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <qwt_text_engine.h>

Inherits QwtTextEngine. yes bestie, she's a subclass, she's got a whole lineage, we love a nepo baby who actually delivers πŸ’…

✨ Public Member Functions ✨

QwtRichTextEngine ()

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

like… six functions, four of them virtual, one plain old constructor. a whole personality in six lines. obsessed. 😭

🫢 Additional Inherited Members 🫢

there's more, babes β€” the stuff she inherits from QwtTextEngine lives on that page. this one's just the glow-up. 🌈


πŸ’œ Detailed Description πŸ’œ

A text engine for Qt rich texts.

QwtRichTextEngine renders Qt rich texts using the classes of the Scribe framework of Qt. so like, she doesn't hand-draw your markup herself, she calls in the Scribe girlies and they handle it. delegation queen. πŸ‘‘


🌟 Member Function Documentation 🌟

πŸ’… void QwtRichTextEngine::draw (QPainter *painter, const QRect &rect, int flags, const QString &text) const [virtual]

Draw the text in a clipping rectangle.

Parameters:

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

Implements QwtTextEngine.

yes the original really says "like in for" β€” we're quoting the source, no notes, we don't edit the ancestors πŸ™ˆ

πŸ¦‹ int QwtRichTextEngine::heightForWidth (const QFont &font, int flags, const QString &text, int width) const [virtual]

Find the height for a given width.

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.

you give her a width, she tells you how tall it's gonna be. it's giving "will it fit in the group chat bio" energy. πŸ“


🌸 bool QwtRichTextEngine::mightRender (const QString &text) const [virtual]

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

Parameters:

  • text β€” Text to be tested

Returns: QStyleSheet::mightBeRichText(text);

Implements QwtTextEngine.

a vibe check, basically. "can you be rich text?" and the answer comes straight from QStyleSheet::mightBeRichText(text);. no cap. ✨


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

Return margins around the texts.

Parameters:

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

Implements QwtTextEngine.

not her setting them to zero β€” you return 0 in each of those references. all four of them. every single time. she said "margins? never heard of her." zero, zero, zero, zero. iconic minimalism. πŸ’€


⭐ QSize QwtRichTextEngine::textSize (const QFont &font, int flags, const QString &text) const [virtual]

Returns the size, that is needed to render text.

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.

(we left "Caluclated" exactly how the source spells it β€” she's got a typo and she's thriving, we respect the lore 🫢)


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code.

like, a robot wrote this about her. a robot. and it still ate. πŸ€–βœ¨


πŸ’Œ the sign-off πŸ’Œ

so that's the whole page, bestie β€” Version 5.2.3, dated Tue Nov 20 2012, living under QwtRichTextEngine(3). old money, timeless, still serving. mwah. πŸ’–πŸŽ€πŸ¦‹πŸŒΈπŸ’…

now go render some rich text. periodt. β­πŸŒˆπŸ’œ

πŸ“¦ where this page comes from