11#include <QTextBlockFormat>
64 void setEnabled(
bool enabled);
65 bool isEnabled()
const;
67 void setSelectedCallsign(
const QString &callsign);
70 void refreshPillState();
71 void applyLineHeight(
bool enabled)
const;
72 void clearPillLetterSpacing()
const;
73 void applyPillLetterSpacing()
const;
77 qreal m_defaultDocumentMargin = 0.0;
78 QTextBlockFormat m_defaultBlockFormat;
79 bool m_enabled =
true;
80 QString m_selectedCallsign;
Definition DirectedMessageHighlighter.h:18
bool handleTooltip(QHelpEvent *helpEvent)
Handle a tooltip event by hit-testing pill format ranges.
Definition PillRenderer.cpp:223
void applyPillHighlighting()
Run the syntax highlighter and adjust letter-spacing around pills.
Definition PillRenderer.cpp:259
static constexpr qreal PillHPad
Horizontal padding.
Definition PillRenderer.h:32
static constexpr qreal PillVPad
Vertical padding.
Definition PillRenderer.h:33
PillRenderer(TransmitTextEdit *host, QObject *parent=nullptr)
Construct a PillRenderer attached to the given text edit.
Definition PillRenderer.cpp:28
static constexpr qreal PillMinRadius
Minimum corner radius.
Definition PillRenderer.h:35
void paintPills(QPaintEvent *event)
Paint pill backgrounds behind highlighted tokens. Call before the base-class paintEvent so pills appe...
Definition PillRenderer.cpp:56
static constexpr qreal PillMinGap
Minimum gap between adjacent pills.
Definition PillRenderer.h:37
static constexpr qreal PillMaxRadius
Maximum corner radius.
Definition PillRenderer.h:34
static constexpr qreal PillMinHPad
Floor during overlap resolution.
Definition PillRenderer.h:36
Definition TransmitTextEdit.h:22
Background and foreground colors for each pill category.
Definition DirectedMessageHighlighter.h:11