22#include <Qsci/qscilexercss.h> 
   41  QsciLexerCSS *lexer = 
new QgsQsciLexerCSS( 
this );
 
   44  lexer->setDefaultFont( font );
 
   45  lexer->setFont( font, -1 );
 
   47  font.setItalic( 
true );
 
   48  lexer->setFont( font, QsciLexerCSS::Comment );
 
   50  font.setItalic( 
false );
 
   52  lexer->setFont( font, QsciLexerCSS::SingleQuotedString );
 
   53  lexer->setFont( font, QsciLexerCSS::DoubleQuotedString );
 
   83QgsQsciLexerCSS::QgsQsciLexerCSS( QObject *parent )
 
   84  : QsciLexerCSS( parent )
 
   89QString QgsQsciLexerCSS::description( 
int style )
 const 
   92  if ( style == QsciLexerCSS::Comment )
 
   93    return QStringLiteral( 
"Comment" );
 
   95  return QsciLexerCSS::description( style );
 
void initializeLexer() override
Called when the dialect specific code lexer needs to be initialized (or reinitialized).
QgsCodeEditorCSS(QWidget *parent=nullptr)
Constructor for QgsCodeEditorCSS.
@ Identifier
Identifier color.
@ DoubleQuote
Double quote color.
@ Default
Default text color.
@ Background
Background color.
@ SingleQuote
Single quote color.
@ Operator
Operator color.
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.
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.