147 if ( mColorSchemes.contains(
scheme.
id() ) )
156 if ( !mColorSchemes.contains(
id ) )
159 mColorSchemes.remove(
id );
165 return mColorSchemes.keys();
170 if ( !mColorSchemes.contains(
id ) )
171 return mColorSchemes.value( QStringLiteral(
"default" ) );
173 return mColorSchemes.value(
id );
bool addColorScheme(const QgsCodeEditorColorScheme &scheme)
Adds a color scheme to the registry.
bool removeColorScheme(const QString &id)
Removes the color scheme with matching id from the registry.
QgsCodeEditorColorScheme scheme(const QString &id) const
Returns the color scheme with matching id.
QStringList schemes() const
Returns a list of the QgsCodeEditorColorScheme::id() values for all registered color schemes.
QgsCodeEditorColorSchemeRegistry()
Constructor for a color scheme registry.
Defines a color scheme for use in QgsCodeEditor widgets.
@ TripleSingleQuote
Triple single quote color.
@ CommentBlock
Comment block color.
@ QuotedOperator
Quoted operator color.
@ Decoration
Decoration color.
@ Identifier
Identifier color.
@ DoubleQuote
Double quote color.
@ QuotedIdentifier
Quoted identifier color.
@ SelectionForeground
Selection foreground color.
@ CommentLine
Line comment color.
@ FoldIconForeground
Fold icon foreground color.
@ MarginForeground
Margin foreground color.
@ ErrorBackground
Error background color.
@ MatchedBraceBackground
Matched brace background color.
@ Default
Default text color.
@ CaretLine
Caret line color.
@ IndentationGuide
Indentation guide line.
@ Background
Background color.
@ SingleQuote
Single quote color.
@ MarginBackground
Margin background color.
@ SelectionBackground
Selection background color.
@ MatchedBraceForeground
Matched brace foreground color.
@ Operator
Operator color.
@ TripleDoubleQuote
Triple double quote color.
@ FoldIconHalo
Fold icon halo color.
QString id() const
Returns the ID of the color scheme, which is a unique, non-translated identifier for the scheme.
void setColors(const QMap< ColorRole, QColor > &colors)
Sets all colors for the scheme.