QwtPlainTextEngine(3)

🌸 NAME 🌸

hey bestie, welcome to QwtPlainTextEngine(3) from the Library Functions Manual πŸ’– this is the page for QwtPlainTextEngine β€” literally a text engine for plain texts. that's the whole vibe.


✨ SYNOPSIS ✨

#include <qwt_text_engine.h>

Inherits QwtTextEngine.

πŸ’… Public Member Functions

  • QwtPlainTextEngine () β€” Constructor.
  • virtual ~QwtPlainTextEngine () β€” Destructor.
  • virtual double heightForWidth (const QFont &font, int flags, const QString &text, double width) const override
  • virtual QSizeF textSize (const QFont &font, int flags, const QString &text) const override
  • virtual void draw (QPainter *, const QRectF &rect, int flags, const QString &text) const override β€” Draw the text in a clipping rectangle.
  • virtual bool mightRender (const QString &) const override
  • virtual void textMargins (const QFont &, const QString &, double &left, double &right, double &top, double &bottom) const override

🫢 Public Member Functions inherited from QwtTextEngine

  • virtual ~QwtTextEngine () β€” Destructor.

πŸŽ€ Additional Inherited Members

🧚 Protected Member Functions inherited from QwtTextEngine

  • QwtTextEngine () β€” Constructor.

πŸ¦‹ Detailed Description πŸ¦‹

QwtPlainTextEngine is a text engine for plain texts β€” no cap, that's the whole assignment πŸ’…

it renders texts using the basic Qt classes QPainter and QFontMetrics ✨

Definition at line 111 of file qwt_text_engine.h.


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

QwtPlainTextEngine::QwtPlainTextEngine ()

Constructor. that's it, that's the function 🫢

Definition at line 151 of file qwt_text_engine.cpp.

QwtPlainTextEngine::~QwtPlainTextEngine () [virtual]

Destructor. goodbye bestie 😭

Definition at line 157 of file qwt_text_engine.cpp.


πŸ”₯ Member Function Documentation πŸ”₯

🎨 draw

void QwtPlainTextEngine::draw (QPainter * painter, const QRectF & rect, int flags, const QString & text) const [override],  [virtual]

Draw the text in a clipping rectangle. it's a wrapper for QPainter::drawText, periodt ✨

Parameters

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

Implements QwtTextEngine.

Definition at line 230 of file qwt_text_engine.cpp.

πŸ“ heightForWidth

double QwtPlainTextEngine::heightForWidth (const QFont & font, int flags, const QString & text, double width) const [override],  [virtual]

Find the height for a given width πŸ‘‘ yes ma'am, math time.

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.

Definition at line 172 of file qwt_text_engine.cpp.

πŸ‘€ mightRender

bool QwtPlainTextEngine::mightRender (const QString & ) const [override],  [virtual]

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

Returns

Always true. All texts can be rendered by QwtPlainTextEngine.

Implements QwtTextEngine.

Definition at line 240 of file qwt_text_engine.cpp.

🧸 textMargins

void QwtPlainTextEngine::textMargins (const QFont & font, const QString & , double & left, double & right, double & top, double & bottom) const [override],  [virtual]

Return margins around the texts 🌸

Parameters

  • font β€” Font of the text
  • left β€” Return 0
  • right β€” Return 0
  • top β€” Return value for the top margin
  • bottom β€” Return value for the bottom margin

Implements QwtTextEngine.

Definition at line 210 of file qwt_text_engine.cpp.

πŸ¦‹ textSize

QSizeF QwtPlainTextEngine::textSize (const QFont & font, int flags, const QString & text) const [override],  [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

Calculated size.

Implements QwtTextEngine.

Definition at line 191 of file qwt_text_engine.cpp.


🌈 Author 🌈

Generated automatically by Doxygen for Qwt User's Guide from the source code. so yeah, no human author to tag here β€” just the machine doing its thing πŸ€–βœ¨


πŸ’– cute little sign-off: this footer energy is Qwt User's Guide for QwtPlainTextEngine(3) β€” and no date was printed in the footer, so we're not inventing one, bestie 🌸✨

πŸ“¦ where this page comes from