|
JS8Call-Improved master
|
Renders pill-shaped backgrounds for a QTextEdit host. More...
#include <PillRenderer.h>


Public Member Functions | |
| PillRenderer (TransmitTextEdit *host, QObject *parent=nullptr) | |
| Construct a PillRenderer attached to the given text edit. | |
| void | paintPills (QPaintEvent *event) |
| Paint pill backgrounds behind highlighted tokens. Call before the base-class paintEvent so pills appear behind text. | |
| bool | handleTooltip (QHelpEvent *helpEvent) |
| Handle a tooltip event by hit-testing pill format ranges. | |
| void | applyPillHighlighting () |
| Run the syntax highlighter and adjust letter-spacing around pills. | |
| void | setEnabled (bool enabled) |
| bool | isEnabled () const |
| void | setPillColors (const PillColorScheme &scheme) |
| void | setSelectedCallsign (const QString &callsign) |
Renders pill-shaped backgrounds for a QTextEdit host.
Owns a DirectedMessageHighlighter and drives it during each highlight cycle. Paints rounded-rectangle pill backgrounds behind highlighted tokens, handles tooltips on hover, and adjusts letter-spacing for proper pill padding.
|
explicit |
Construct a PillRenderer attached to the given text edit.
| host | TransmitTextEdit whose document is highlighted and whose viewport receives pill painting. |
| parent | QObject parent (typically the host itself). |
| bool PillRenderer::handleTooltip | ( | QHelpEvent * | helpEvent | ) |
Handle a tooltip event by hit-testing pill format ranges.