Workspace 6.21.5
|
#include <Tools/Widgets/highlightingtextedit.h>
Public Slots | |
virtual void | tempHighlightBlock (int blockNumber) |
virtual void | tempHighlightCurrentBlock () |
Signals | |
void | columnNumberChanged (int columnNumber) |
void | lineTempHighlighted (int blockNumber) |
Public Member Functions | |
HighlightingTextEdit (const QString &text, QBrush highlightBrush, bool readOnlyEditor=true, QWidget *parent=nullptr) | |
HighlightingTextEdit (const QString &text, QColor highlightColor, bool readOnlyEditor=true, QWidget *parent=nullptr) | |
virtual void | clearHighlights () |
void | highlightBlock (const int blockNumber, bool moveCursor=true) |
void | highlightBlockFragment (const int blockNumber, int start, int count, bool isInline, bool moveCursor=true) |
void | highlightFromBlock (const int blockNumber, bool moveCursor=true) |
virtual void | highlightInsertionPoint (const int blockNumber, int column, bool moveCursor=true) |
virtual void | lineNumberAreaPaintEvent (QPaintEvent *event) |
int | lineNumberAreaWidth () |
void | paintEvent (QPaintEvent *event) override |
QTextCharFormat | selectedLineFormat () |
void | setAlternativeHighlightBrush (const QBrush &brush) |
void | setBackgroundColor (const QColor &colour) |
void | setBackgroundHighlight (const QBrush &brush) |
void | setBackgroundHighlight (const QColor &colour) |
bool | setDocumentCursor (const int blockNumber) |
void | setForegroundHighlight (const QBrush &brush) |
void | setForegroundHighlight (const QColor &colour) |
virtual void | updateExtraSelections () |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *event) override |
void | init (bool readOnly) |
virtual QString | lineNumberStr (int blockNumber) |
void | resizeEvent (QResizeEvent *event) override |
Protected Attributes | |
TextHighlighter | highlighter_ |
QTextEdit::ExtraSelection | lineMatchSelection_ |
QWidget * | lineNumberArea_ |
bool | readOnlyEditor_ {true} |
int | selectedBlockNumber_ {-1} |
QTextCharFormat | selectedLineFormat_ |
int | selectionScrollPosition_ {-1} |
Adds single line or end block highlighting to a block of text
HighlightingTextEdit | ( | const QString & | text, |
QColor | highlightColor, | ||
bool | readOnlyEditor = true , |
||
QWidget * | parent = nullptr |
||
) |
HighlightingTextEdit | ( | const QString & | text, |
QBrush | highlightBrush, | ||
bool | readOnlyEditor = true , |
||
QWidget * | parent = nullptr |
||
) |
|
inlinevirtual |
Reimplemented in HighlightingGhostTextEdit.
|
signal |
|
overrideprotected |
void highlightBlock | ( | const int | blockNumber, |
bool | moveCursor = true |
||
) |
Highlights one line in the text, scrolls to show that line
void highlightBlockFragment | ( | const int | blockNumber, |
int | start, | ||
int | count, | ||
bool | isInline, | ||
bool | moveCursor = true |
||
) |
void highlightFromBlock | ( | const int | blockNumber, |
bool | moveCursor = true |
||
) |
Highlights every line from lineNumber onwards. Scrolls to blockNumber
|
virtual |
Reimplemented in HighlightingGhostTextEdit.
|
protected |
|
virtual |
Reimplemented in HighlightingGhostTextEdit.
int lineNumberAreaWidth | ( | ) |
|
protectedvirtual |
|
signal |
|
override |
|
overrideprotected |
|
inline |
|
inline |
void setBackgroundColor | ( | const QColor & | colour | ) |
|
inline |
|
inline |
bool setDocumentCursor | ( | const int | blockNumber | ) |
|
inline |
|
inline |
|
virtualslot |
|
virtualslot |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |