|
| static QVector< std::pair< int, int > > | extract (const QString &input, QString &output) noexcept |
| |
| static QVector< QLineF > | calculate (const QString &text, const QFontMetricsF &fm, int flags, const QVector< std::pair< int, int > > &spans, QRectF &boundingRect) noexcept |
| |
| static void | process (const QString &input, const QFontMetricsF &fm, int flags, QString &output, QVector< QLineF > &overlines, QRectF &boundingRect) noexcept |
| |
| static qreal | getLineWidth (qreal heightPx) noexcept |
| |
Extract overlines of text with markup.
Parses text like RST/!SHDN, removes the functional ! and returns the coordinates where to draw overlines instead.
Markup rules:
- A single
! toggles the overline on/off, depending on its previous state (initial state is off).
- The character
/ implicitly switches off the overline before rendering. This can be prevented by prefixing it with !.
- A double
!! has no effect on overlines, they are rendered as a single !. In case of an odd number of ! (e.g. !!!), the last one toggles overline on/off.
- Any trailing
! have no effect, they are rendered as-is (bypassing rules 1 and 3).