QGIS API Documentation
3.14.0-Pi (9f7028fd23)
src
gui
qgscodeeditorsql.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscodeeditorsql.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 QGSCODEEDITORSQL_H
17
#define QGSCODEEDITORSQL_H
18
19
#include "
qgscodeeditor.h
"
20
#include "
qgis_sip.h
"
21
#include "qgis_gui.h"
22
#include "
qgsfeature.h
"
23
#include <Qsci/qscilexersql.h>
24
25
SIP_IF_MODULE
( HAVE_QSCI_SIP )
26
27
34
class GUI_EXPORT
QgsCodeEditorSQL
: public
QgsCodeEditor
35
{
36
Q_OBJECT
37
38
public
:
40
QgsCodeEditorSQL
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
41
47
void
setFields(
const
QgsFields
&fields );
48
49
private
:
50
//QgsCodeEditor *mSciWidget;
51
//QWidget *mWidget;
52
void
setSciLexerSQL();
53
void
initializeLexer();
54
void
updateApis();
55
QsciAPIs *mApis =
nullptr
;
56
QsciLexerSQL *mSqlLexer;
57
58
QStringList mFieldNames;
59
};
60
61
#ifndef SIP_RUN
62
73
class
QgsCaseInsensitiveLexerSQL:
public
QsciLexerSQL
74
{
75
Q_OBJECT
76
77
public
:
79
explicit
QgsCaseInsensitiveLexerSQL( QObject *parent =
nullptr
) : QsciLexerSQL( parent ) {}
80
81
bool
caseSensitive()
const override
{
return
false
; }
82
};
84
#endif
85
86
#endif
QgsFields
Definition:
qgsfields.h:44
qgsfeature.h
QgsCodeEditor
Definition:
qgscodeeditor.h:38
qgis_sip.h
QgsCodeEditorSQL
Definition:
qgscodeeditorsql.h:34
qgscodeeditor.h
SIP_IF_MODULE
#define SIP_IF_MODULE(condition)
Definition:
qgis_sip.h:28
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition:
qgis_sip.h:53
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17