KSyntaxHighlighting
syntaxhighlighter.cpp
137 if (data->state == state && data->foldingRegions == d->foldingRegions) { // we ended up in the same state, so we are done here
145 QMetaObject::invokeMethod(this, "rehighlightBlock", Qt::QueuedConnection, Q_ARG(QTextBlock, nextBlock));
149 void SyntaxHighlighter::applyFormat(int offset, int length, const KSyntaxHighlighting::Format &format)
190 if (d->foldingRegions.at(i).id() != region.id() || d->foldingRegions.at(i).type() != FoldingRegion::Begin) {
void setCurrentBlockUserData(QTextBlockUserData *data)
void applyFolding(int offset, int length, FoldingRegion region) override
Reimplement this to apply folding to your output.
Definition: syntaxhighlighter.cpp:178
Opaque handle to the state of the highlighting engine.
Definition: state.h:25
Represents a begin or end of a folding region.
Definition: foldingregion.h:18
void setFormat(int start, int count, const QTextCharFormat &format)
void setFontWeight(int weight)
QTextBlock findFoldingRegionEnd(const QTextBlock &startBlock) const
Finds the end of the folding region starting at startBlock.
Definition: syntaxhighlighter.cpp:83
Describes the format to be used for a specific text fragment.
Definition: format.h:33
Abstract base class for highlighters.
Definition: abstracthighlighter.h:71
QTextBlock currentBlock() const const
QTextBlock next() const const
void setFontStrikeOut(bool strikeOut)
void setBackground(const QBrush &brush)
void setFontItalic(bool italic)
void applyFormat(int offset, int length, const Format &format) override
Reimplement this to apply formats to your output.
Definition: syntaxhighlighter.cpp:149
void setForeground(const QBrush &brush)
QTextBlockUserData * currentBlockUserData() const const
QTextBlock previous() const const
Definition: abstracthighlighter.h:20
QueuedConnection
QTextBlockUserData * userData() const const
void setDefinition(const Definition &def) override
Sets the syntax definition used for highlighting.
Definition: syntaxhighlighter.cpp:69
Bold
void rehighlight()
QTextCharFormat format(int position) const const
bool startsFoldingRegion(const QTextBlock &startBlock) const
Returns whether there is a folding region beginning at startBlock.
Definition: syntaxhighlighter.cpp:78
State highlightLine(QStringView text, const State &state)
Highlight the given line.
Definition: abstracthighlighter.cpp:107
Type type() const
Returns whether this is the begin or end of a region.
Definition: foldingregion.cpp:40
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
virtual void setDefinition(const Definition &def)
Sets the syntax definition used for highlighting.
Definition: abstracthighlighter.cpp:68
A QSyntaxHighlighter implementation for use with QTextDocument.
Definition: syntaxhighlighter.h:26
Definition definition() const
Returns the syntax definition used for highlighting.
Definition: abstracthighlighter.cpp:63
void setFontUnderline(bool underline)
Theme theme() const
Returns the currently selected theme for highlighting.
Definition: abstracthighlighter.cpp:74
quint16 id() const
Returns a unique identifier for this folding region.
Definition: foldingregion.cpp:35
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:09:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:09:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.