21#include <Qsci/qscilexerjavascript.h>
33 setTitle( tr(
"JavaScript Editor" ) );
45 QsciLexerJavaScript *lexer =
new QsciLexerJavaScript(
this );
48 lexer->setDefaultFont( font );
49 lexer->setFont( font, -1 );
51 font.setItalic(
true );
52 lexer->setFont( font, QsciLexerJavaScript::Comment );
53 lexer->setFont( font, QsciLexerJavaScript::CommentLine );
ScriptLanguage
Scripting languages.
@ Identifier
Identifier color.
@ DoubleQuote
Double quote color.
@ CommentLine
Line comment color.
@ Default
Default text color.
@ Background
Background color.
@ SingleQuote
Single quote color.
@ Operator
Operator color.
QgsCodeEditorJavascript(QWidget *parent=nullptr)
Constructor for QgsCodeEditorJavascript.
Qgis::ScriptLanguage language() const override
Returns the associated scripting language.
void initializeLexer() override
Called when the dialect specific code lexer needs to be initialized (or reinitialized).
A text editor based on QScintilla2.
void runPostLexerConfigurationTasks()
Performs tasks which must be run after a lexer has been set for the widget.
void setTitle(const QString &title)
Set the widget title.
Flag
Flags controlling behavior of code editor.
void setLineNumbersVisible(bool visible)
Sets whether line numbers should be visible in the editor.
QFont lexerFont() const
Returns the font to use in the lexer.
QColor lexerColor(QgsCodeEditorColorScheme::ColorRole role) const
Returns the color to use in the lexer for the specified role.