Workspace 6.21.5
|
#include <Tools/Widgets/highlightingtextedit.h>
Inherits QSyntaxHighlighter.
Public Member Functions | |
TextHighlighter (QTextDocument *parent, const QBrush &highlightBrush) | |
TextHighlighter (QTextDocument *parent, const QColor &highlightColor) | |
QBrush | alternativeHighlightBrush () |
virtual void | clearHighlights () |
virtual void | highlightBlock (const int blockNumber, bool highlight=true) |
virtual void | highlightBlock (const QString &text) override |
void | highlightBlockFragment (const int blockNumber, int start, int count, bool isInline) |
QColor | highlightedTextColor () |
void | highlightFromBlock (const int blockNumber) |
void | highlightInsertionPoint (const int blockNumber, int column, bool moveCursor=true) |
QColor | selectionColor () |
void | setAlternativeHighlightBrush (const QBrush &highlightBrush) |
void | setBackgroundHighlight (const QBrush &brush) |
void | setBackgroundHighlight (const QColor &colour) |
void | setForegroundHighlight (const QBrush &brush) |
void | setForegroundHighlight (const QColor &colour) |
Protected Member Functions | |
void | init (const QColor &highlightColor) |
Protected Attributes | |
int | blockNumber_ |
QTextCharFormat | highlightedLineFormat_ |
QTextCharFormat | highlightedTextFormat_ |
QTextCharFormat | highlightedTextOverLineBreakFormat_ |
int | highlightStartBlock_ |
Simple highlighter for one or more lines of text
TextHighlighter | ( | QTextDocument * | parent, |
const QColor & | highlightColor | ||
) |
TextHighlighter | ( | QTextDocument * | parent, |
const QBrush & | highlightBrush | ||
) |
|
inline |
|
virtual |
|
virtual |
Adds or removes highlight from a line
blockNumber | Line to highlight or remove from highlighting |
highlight | False to remove highlighting |
|
overridevirtual |
void highlightBlockFragment | ( | const int | blockNumber, |
int | start, | ||
int | count, | ||
bool | isInline | ||
) |
|
inline |
void highlightFromBlock | ( | const int | blockNumber | ) |
Highlights every line from the given line to the end of the text. Removes existing highlighting
blockNumber | First line of highlighted block |
void highlightInsertionPoint | ( | const int | blockNumber, |
int | column, | ||
bool | moveCursor = true |
||
) |
|
protected |
QColor selectionColor | ( | ) |
void setAlternativeHighlightBrush | ( | const QBrush & | highlightBrush | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |