KSyntaxHighlighting
htmlhighlighter.cpp
91 static const char16_t digits[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
134 // htmlStyles must not be empty for applyFormat to work even with a definition without any context
142 buffer += QStringLiteral("color:") + toHtmlRgbaString(format.textColor(theme)) + QStringLiteral(";");
145 buffer += QStringLiteral("background-color:") + toHtmlRgbaString(format.backgroundColor(theme)) + QStringLiteral(";");
174 *d->out << "<meta name=\"generator\" content=\"KF5::SyntaxHighlighting - Definition (" << definition.name() << ") - Theme (" << theme.name() << ")\"/>\n";
176 *d->out << " style=\"background-color:" << toHtmlRgbaString(QColor::fromRgba(theme.editorColor(Theme::BackgroundColor)));
Abstract base class for highlighters.
Definition abstracthighlighter.h:67
Theme theme() const
Returns the currently selected theme for highlighting.
Definition abstracthighlighter.cpp:75
Definition definition() const
Returns the syntax definition used for highlighting.
Definition abstracthighlighter.cpp:64
State highlightLine(QStringView text, const State &state)
Highlight the given line.
Definition abstracthighlighter.cpp:101
QList< Definition > includedDefinitions() const
Returns a list of Definitions that are referenced with the IncludeRules rule.
Definition definition.cpp:242
Describes the format to be used for a specific text fragment.
Definition format.h:28
QRgb textColor(TextStyle style) const
Returns the text color to be used for style.
Definition theme.cpp:62
@ Normal
Default text style for normal text and source code without special highlighting.
Definition theme.h:78
QRgb editorColor(EditorColorRole role) const
Returns the editor color for the requested role.
Definition theme.cpp:102
KIOCORE_EXPORT TransferJob * get(const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
Syntax highlighting engine for Kate syntax definitions.
Definition abstracthighlighter.h:17
int alpha() const const
int blue() const const
QColor fromRgba(QRgb rgba)
int green() const const
QString name(NameFormat format) const const
int red() const const
WriteOnly
bool isEmpty() const const
QString toHtmlEscaped() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.