KSyntaxHighlighting
ksyntaxhighlighter.cpp
64 parser.setApplicationDescription(app.translate("SyntaxHighlightingCLI", "Command line syntax highlighter using KSyntaxHighlighting syntax definitions."));
69 app.translate("SyntaxHighlightingCLI", "The source file to highlight. If absent, read the file from stdin and the --syntax option must be used."));
74 QCommandLineOption listThemes(QStringList() << QStringLiteral("list-themes"), app.translate("SyntaxHighlightingCLI", "List all available themes."));
87 app.translate("SyntaxHighlightingCLI", "Highlight using this syntax definition (default: auto-detect based on input file)."),
96 QCommandLineOption outputFormatOption(QStringList() << QStringLiteral("f") << QStringLiteral("output-format"),
97 app.translate("SyntaxHighlightingCLI", "Use the specified format instead of html. Must be html, ansi or ansi256."),
104 "Add information to debug a syntax file. Only works with --output-format=ansi or ansi256. Possible "
109 QCommandLineOption noAnsiEditorBg(QStringList() << QStringLiteral("b") << QStringLiteral("no-ansi-background"),
113 QCommandLineOption bgRole(QStringList() << QStringLiteral("B") << QStringLiteral("background-role"),
118 QCommandLineOption unbufferedAnsi(QStringList() << QStringLiteral("U") << QStringLiteral("unbuffered"),
119 app.translate("SyntaxHighlightingCLI", "For ansi and ansi256 formats, flush the output buffer on each line."));
124 app.translate("SyntaxHighlightingCLI", "Set HTML page's title\n(default: the filename or \"KSyntaxHighlighter\" if reading from stdin)."),
210 QObject::connect(&downloader, &DefinitionDownloader::informationMessage, &app, [](const QString &msg) {
275 options |= parser.isSet(noAnsiEditorBg) ? AnsiHighlighter::Option::NoOptions : AnsiHighlighter::Option::UseEditorBackground;
276 options |= parser.isSet(unbufferedAnsi) ? AnsiHighlighter::Option::Unbuffered : AnsiHighlighter::Option::NoOptions;
301 applyHighlighter(highlighter, parser, fromFileName, inFileName, outputName, AnsiFormat, options);
virtual void setDefinition(const Definition &def)
Sets the syntax definition used for highlighting.
Definition abstracthighlighter.cpp:71
virtual void setTheme(const Theme &theme)
Sets the theme used for highlighting.
Definition abstracthighlighter.cpp:83
Helper class to download definition file updates.
Definition definitiondownloader.h:47
void done()
This signal is emitted when there are no pending downloads anymore.
void informationMessage(const QString &msg)
Prints the information about the current state of the definition files.
bool isValid() const
Checks whether this object refers to a valid syntax definition.
Definition definition.cpp:71
EditorColorRole
Editor color roles, used to paint line numbers, editor background etc.
Definition theme.h:158
QString name(StandardAction id)
KGuiItem ok()
Syntax highlighting engine for Kate syntax definitions.
Definition abstracthighlighter.h:17
QCommandLineOption addHelpOption()
bool addOption(const QCommandLineOption &option)
void addPositionalArgument(const QString &name, const QString &description, const QString &syntax)
QCommandLineOption addVersionOption()
bool isSet(const QCommandLineOption &option) const const
QStringList positionalArguments() const const
void process(const QCoreApplication &app)
void setApplicationDescription(const QString &description)
void showHelp(int exitCode)
QString value(const QCommandLineOption &option) const const
QStringList values(const QCommandLineOption &option) const const
void setApplicationName(const QString &application)
void setApplicationVersion(const QString &version)
void setOrganizationDomain(const QString &orgDomain)
void setOrganizationName(const QString &orgName)
void quit()
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
ReadOnly
const_reference at(qsizetype i) const const
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
int compare(QLatin1StringView s1, const QString &s2, Qt::CaseSensitivity cs)
bool isEmpty() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
CaseInsensitive
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.