QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
codeeditors
qgscodeeditorcolorscheme.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscodeeditorcolorscheme.h
3
--------------------------------------
4
Date : October 2020
5
Copyright : (C) 2020 by Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSCODEEDITORCOLORSCHEME_H
17
#define QGSCODEEDITORCOLORSCHEME_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
22
#include <QColor>
23
#include <QMap>
24
#include <QString>
25
31
class
GUI_EXPORT
QgsCodeEditorColorScheme
32
{
33
public
:
37
enum class
ColorRole
38
{
39
Default,
40
Keyword,
41
Class,
42
Method,
43
Decoration,
44
Number,
45
Comment,
46
CommentLine,
47
CommentBlock,
48
Background,
49
Cursor,
50
CaretLine,
51
SingleQuote,
52
DoubleQuote,
53
TripleSingleQuote,
54
TripleDoubleQuote,
55
Operator,
56
QuotedOperator,
57
Identifier,
58
QuotedIdentifier,
59
Tag,
60
UnknownTag,
61
MarginBackground,
62
MarginForeground,
63
SelectionBackground,
64
SelectionForeground,
65
MatchedBraceBackground,
66
MatchedBraceForeground,
67
Edge,
68
Fold,
69
Error,
70
ErrorBackground,
71
FoldIconForeground,
72
FoldIconHalo,
73
IndentationGuide,
74
SearchMatchBackground,
75
};
76
84
QgsCodeEditorColorScheme
(
const
QString &
id
= QString(),
const
QString &name = QString() );
85
86
90
QString
id
()
const
{
return
mId; }
91
95
QString
name
()
const
{
return
mThemeName; }
96
102
QColor color( ColorRole role )
const
;
103
109
void
setColor( ColorRole role,
const
QColor &color );
110
116
void
setColors(
const
QMap<ColorRole, QColor> &colors )
SIP_SKIP
;
117
118
private
:
119
QString mId;
120
QString mThemeName;
121
QMap<ColorRole, QColor> mColors;
122
};
123
124
#endif
// QGSCODEEDITORCOLORSCHEME_H
QgsCodeEditorColorScheme
Defines a color scheme for use in QgsCodeEditor widgets.
Definition
qgscodeeditorcolorscheme.h:32
QgsCodeEditorColorScheme::ColorRole
ColorRole
Color roles.
Definition
qgscodeeditorcolorscheme.h:38
QgsCodeEditorColorScheme::id
QString id() const
Returns the ID of the color scheme, which is a unique, non-translated identifier for the scheme.
Definition
qgscodeeditorcolorscheme.h:90
QgsCodeEditorColorScheme::QgsCodeEditorColorScheme
QgsCodeEditorColorScheme(const QString &id=QString(), const QString &name=QString())
Constructor for QgsCodeEditorColorScheme.
Definition
qgscodeeditorcolorscheme.cpp:17
QgsCodeEditorColorScheme::name
QString name() const
Returns the name of the color scheme, which is the translated, user-visible name of the scheme.
Definition
qgscodeeditorcolorscheme.h:95
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
Generated on
for QGIS API Documentation by
1.17.0