KSyntaxHighlighting
syntaxhighlighter.cpp
213 if (data->state == newState && data->foldingRegions == d->foldingRegions) { // we ended up in the same state, so we are done here
221 QMetaObject::invokeMethod(this, "rehighlightBlock", Qt::QueuedConnection, Q_ARG(QTextBlock, nextBlock));
261 if (d->foldingRegions.at(i).id() != region.id() || d->foldingRegions.at(i).type() != FoldingRegion::Begin) {
Abstract base class for highlighters.
Definition abstracthighlighter.h:67
Theme theme() const
Returns the currently selected theme for highlighting.
Definition abstracthighlighter.cpp:77
State highlightLine(QStringView text, const State &state)
Highlight the given line.
Definition abstracthighlighter.cpp:103
Represents a begin or end of a folding region.
Definition foldingregion.h:19
Type type() const
Returns whether this is the begin or end of a region.
Definition foldingregion.cpp:35
Describes the format to be used for a specific text fragment.
Definition format.h:28
bool isUnderline(const Theme &theme) const
Returns true if the combination of this format and the given theme results in underlined text.
Definition format.cpp:167
QColor textColor(const Theme &theme) const
Returns the foreground color of the combination of this format and the given theme.
Definition format.cpp:124
bool hasBackgroundColor(const Theme &theme) const
Returns true if the combination of this format and the theme theme change the background color compar...
Definition format.cpp:134
bool isBold(const Theme &theme) const
Returns true if the combination of this format and the given theme results in bold text formatting.
Definition format.cpp:149
QColor backgroundColor(const Theme &theme) const
Returns the background color of the combination of this format and the given theme.
Definition format.cpp:139
bool isItalic(const Theme &theme) const
Returns true if the combination of this format and the given theme results in italic text formatting.
Definition format.cpp:158
bool isStrikeThrough(const Theme &theme) const
Returns true if the combination of this format and the given theme results in struck through text.
Definition format.cpp:176
Opaque handle to the state of the highlighting engine.
Definition state.h:30
A QSyntaxHighlighter implementation for use with QTextDocument.
Definition syntaxhighlighter.h:27
QTextBlock findFoldingRegionEnd(const QTextBlock &startBlock) const
Finds the end of the folding region starting at startBlock.
Definition syntaxhighlighter.cpp:158
void applyFolding(int offset, int length, FoldingRegion region) override
Reimplement this to apply folding to your output.
Definition syntaxhighlighter.cpp:249
void setTheme(const Theme &theme) override
Sets the theme used for highlighting.
Definition syntaxhighlighter.cpp:144
bool startsFoldingRegion(const QTextBlock &startBlock) const
Returns whether there is a folding region beginning at startBlock.
Definition syntaxhighlighter.cpp:153
void applyFormat(int offset, int length, const Format &format) override
Reimplement this to apply formats to your output.
Definition syntaxhighlighter.cpp:225
void setDefinition(const Definition &def) override
Sets the syntax definition used for highlighting.
Definition syntaxhighlighter.cpp:130
Syntax highlighting engine for Kate syntax definitions.
Definition abstracthighlighter.h:17
Bold
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
QTextBlock currentBlock() const const
QTextBlockUserData * currentBlockUserData() const const
QTextCharFormat format(int position) const const
void rehighlight()
void setCurrentBlockUserData(QTextBlockUserData *data)
void setFormat(int start, int count, const QColor &color)
QueuedConnection
TextFormat
QTextBlock next() const const
QTextBlock previous() const const
QTextBlockUserData * userData() const const
void setFontItalic(bool italic)
void setFontStrikeOut(bool strikeOut)
void setFontUnderline(bool underline)
void setFontWeight(int weight)
void setBackground(const QBrush &brush)
void setForeground(const QBrush &brush)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.