QGIS API Documentation
3.43.0-Master (32433f7016e)
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
h
i
l
m
n
o
p
q
r
s
t
w
Functions
a
b
c
d
f
g
h
i
l
m
n
o
p
r
s
t
w
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Symbols
3
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Files
File List
File Members
All
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
e
f
g
h
i
l
n
o
p
q
r
s
t
w
Typedefs
3
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
Loading...
Searching...
No Matches
src
gui
codeeditors
qgscodeeditorexpression.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscodeeditorexpression.h - A SQL editor based on QScintilla
3
--------------------------------------
4
Date : 06-Oct-2013
5
Copyright : (C) 2013 by Salvatore Larosa
6
Email : lrssvtml (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 QGSCODEEDITOREXPRESSION_H
17
#define QGSCODEEDITOREXPRESSION_H
18
19
#include "
qgis_sip.h
"
20
#include "qgis_gui.h"
21
#include "
qgscodeeditor.h
"
22
#include "
qgsexpressioncontext.h
"
23
24
#include <Qsci/qscilexersql.h>
25
26
SIP_IF_MODULE
( HAVE_QSCI_SIP )
27
28
37
class GUI_EXPORT
QgsCodeEditorExpression
: public
QgsCodeEditor
38
{
39
Q_OBJECT
40
41
public
:
43
QgsCodeEditorExpression
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
44
45
Qgis::ScriptLanguage
language()
const override
;
46
Qgis::ScriptLanguageCapabilities
languageCapabilities()
const override
;
47
53
void
setExpressionContext(
const
QgsExpressionContext
&context );
54
58
void
setFields(
const
QgsFields
&fields );
59
60
void
toggleComment()
override
;
61
62
protected
:
63
void
initializeLexer()
override
;
64
65
private
:
66
void
updateApis();
67
QsciAPIs *mApis =
nullptr
;
68
QsciLexerSQL *mSqlLexer =
nullptr
;
69
70
QStringList mVariables;
71
QStringList mContextFunctions;
72
QStringList mFunctions;
73
QStringList mFieldNames;
74
};
37
class GUI_EXPORT
QgsCodeEditorExpression
: public
QgsCodeEditor
{
…
};
75
76
#ifndef SIP_RUN
78
88
class
QgsLexerExpression :
public
QsciLexerSQL
89
{
90
Q_OBJECT
91
92
public
:
94
explicit
QgsLexerExpression( QObject *parent =
nullptr
);
95
96
const
char
*language()
const override
;
97
98
bool
caseSensitive()
const override
;
99
100
const
char
*wordCharacters()
const override
;
101
};
102
103
class
QgsSciApisExpression :
public
QsciAPIs
104
{
105
Q_OBJECT
106
public
:
107
QgsSciApisExpression( QsciLexer *lexer );
108
109
QStringList callTips(
const
QStringList &context,
int
commas, QsciScintilla::CallTipsStyle style, QList<int> &shifts )
override
;
110
};
112
#endif
113
114
#endif
Qgis::ScriptLanguage
ScriptLanguage
Scripting languages.
Definition
qgis.h:4328
Qgis::ScriptLanguageCapabilities
QFlags< ScriptLanguageCapability > ScriptLanguageCapabilities
Script language capabilities.
Definition
qgis.h:4363
QgsCodeEditorExpression
A QGIS expression editor based on QScintilla2.
Definition
qgscodeeditorexpression.h:38
QgsCodeEditor
A text editor based on QScintilla2.
Definition
qgscodeeditor.h:98
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:472
QgsFields
Container of fields for a vector layer.
Definition
qgsfields.h:46
qgis_sip.h
SIP_IF_MODULE
#define SIP_IF_MODULE(condition)
Definition
qgis_sip.h:28
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
qgscodeeditor.h
qgsexpressioncontext.h
Generated on Thu Apr 10 2025 10:57:09 for QGIS API Documentation by
1.9.8