KSyntaxHighlighting
definition.cpp
97 d->translatedName = QCoreApplication::instance()->translate("Language", d->nameUtf8.isEmpty() ? d->name.toUtf8().constData() : d->nameUtf8.constData());
235 std::sort(formatList.begin(), formatList.end(), [](const KSyntaxHighlighting::Format &lhs, const KSyntaxHighlighting::Format &rhs) {
507 caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
671 caseSensitive = Xml::attrToBool(reader.attributes().value(QLatin1String("casesensitive"))) ? Qt::CaseSensitive : Qt::CaseInsensitive;
687 indentationBasedFolding = Xml::attrToBool(reader.attributes().value(QLatin1String("indentationsensitive")));
728 const bool isSingleLine = reader.attributes().value(QLatin1String("name")) == QLatin1String("singleLine");
731 const bool afterWhiteSpace = reader.attributes().value(QLatin1String("position")) == QLatin1String("afterwhitespace");
732 singleLineCommentPosition = afterWhiteSpace ? CommentPosition::AfterWhitespace : CommentPosition::StartOfLine;
826 qCWarning(Log) << "Skipping" << fileName << "due to having no valid kateversion attribute:" << verStr;
832 if (major > KSYNTAXHIGHLIGHTING_VERSION_MAJOR || (major == KSYNTAXHIGHLIGHTING_VERSION_MAJOR && minor > KSYNTAXHIGHLIGHTING_VERSION_MINOR)) {
QStringList keywordList(const QString &name) const
Returns the list of keywords for the keyword list name.
Definition definition.cpp:210
QString singleLineCommentMarker() const
Returns the marker that starts a single line comment.
Definition definition.cpp:268
bool isValid() const
Checks whether this object refers to a valid syntax definition.
Definition definition.cpp:74
QStringList foldingIgnoreList() const
If indentationBasedFoldingEnabled() returns true, this function returns a list of regular expressions...
Definition definition.cpp:198
QString filePath() const
Returns the full path to the definition XML file containing the syntax definition.
Definition definition.cpp:79
Definition & operator=(Definition &&other) noexcept
Move assignment operator.
CommentPosition singleLineCommentPosition() const
Returns the insert position of the comment marker for sinle line comments.
Definition definition.cpp:274
bool isHidden() const
Returns true if this is an internal definition that should not be displayed to the user.
Definition definition.cpp:136
bool indentationBasedFoldingEnabled() const
Returns whether indentation-based folding is enabled.
Definition definition.cpp:192
QStringList alternativeNames() const
Alternate names the syntax can be referred to by.
Definition definition.cpp:89
Definition()
Default constructor, creating an empty (invalid) Definition instance.
Definition definition.cpp:44
QList< QString > mimeTypes() const
Mime types associated with this syntax definition.
Definition definition.cpp:116
bool operator!=(const Definition &other) const
Checks two definitions for inequality.
Definition definition.cpp:69
bool foldingEnabled() const
Returns whether the highlighting supports code folding.
Definition definition.cpp:173
bool setKeywordList(const QString &name, const QStringList &content)
Set the contents of the keyword list name to content.
Definition definition.cpp:217
bool operator==(const Definition &other) const
Checks two definitions for equality.
Definition definition.cpp:64
QPair< QString, QString > multiLineCommentMarker() const
Returns the markers that start and end multiline comments.
Definition definition.cpp:280
QList< QPair< QChar, QString > > characterEncodings() const
Returns a list of character/string mapping that can be used for spell checking.
Definition definition.cpp:286
bool isWordWrapDelimiter(QChar c) const
Returns whether it is safe to break a line at before the character .
Definition definition.cpp:167
bool isWordDelimiter(QChar c) const
Returns whether the character c is a word delimiter.
Definition definition.cpp:161
QList< QString > extensions() const
File extensions associated with this syntax definition.
Definition definition.cpp:121
QList< Format > formats() const
Returns a list of all Format items used by this definition.
Definition definition.cpp:229
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
QString name() const
The name of this format as used in the syntax definition file.
Definition format.cpp:96
Represents the raw xml data of a context and its rules.
Definition highlightingdata_p.hpp:27
KDB_EXPORT KDbVersionInfo version()
KIOCORE_EXPORT TransferJob * get(const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
QString name(StandardShortcut id)
Syntax highlighting engine for Kate syntax definitions.
Definition abstracthighlighter.h:17
@ AfterWhitespace
The comment marker is inserted after leading whitespaces right befire the first non-whitespace charac...
@ StartOfLine
The comment marker is inserted at the beginning of a line at column 0.
QCborValue value(QLatin1StringView key) const const
bool toBool(bool defaultValue) const const
QByteArray toByteArray(const QByteArray &defaultValue) const const
qint64 toInteger(qint64 defaultValue) const const
QString toString(const QString &defaultValue) const const
QCoreApplication * instance()
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
ReadOnly
reference back()
QString & insert(qsizetype position, QChar ch)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QStringView left(qsizetype length) const const
QStringView mid(qsizetype start, qsizetype length) const const
qsizetype indexOf(QChar c, qsizetype from, Qt::CaseSensitivity cs) const const
float toFloat(bool *ok) const const
int toInt(bool *ok, int base) const const
QString toString() const const
CaseSensitive
SkipEmptyParts
bool hasAttribute(QAnyStringView namespaceUri, QAnyStringView name) const const
QStringView value(QAnyStringView namespaceUri, QAnyStringView name) const const
StartElement
bool atEnd() const const
QXmlStreamAttributes attributes() const const
QStringView name() const const
TokenType readNext()
void skipCurrentElement()
TokenType tokenType() const const
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.