QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
codeeditors
qgscodeeditorr.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscodeeditorr.h - A R stats editor based on QScintilla
3
--------------------------------------
4
Date : October 2022
5
Copyright : (C) 2022 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 QGSCODEEDITORR_H
17
#define QGSCODEEDITORR_H
18
19
#include "qgis_gui.h"
20
#include "
qgis_sip.h
"
21
#include "
qgscodeeditor.h
"
22
23
#include <Qsci/qscilexer.h>
24
25
SIP_IF_MODULE
( HAVE_QSCI_SIP )
26
27
#ifndef SIP_RUN
28
30
class
GUI_EXPORT QgsQsciLexerR :
public
QsciLexer
31
{
32
Q_OBJECT
33
public
:
34
enum
Styles
35
{
36
Default = 0,
37
Comment = 1,
38
Kword = 2,
39
BaseKword = 3,
40
OtherKword = 4,
41
Number = 5,
42
String = 6,
43
String2 = 7,
44
Operator = 8,
45
Identifier = 9,
46
Infix = 10,
47
InfixEOL = 11,
48
Backticks = 12,
49
RawString = 13,
50
RawString2 = 14,
51
EscapeSequence = 15
52
};
53
54
QgsQsciLexerR( QObject *parent =
nullptr
);
55
const
char
*language()
const override
;
56
const
char
*lexer()
const override
;
57
int
lexerId()
const override
;
58
QString description(
int
style )
const override
;
59
const
char
*keywords(
int
set )
const override
;
60
};
62
#endif
63
71
class
GUI_EXPORT
QgsCodeEditorR
:
public
QgsCodeEditor
72
{
73
Q_OBJECT
74
75
public
:
77
QgsCodeEditorR
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
QgsCodeEditor::Mode
mode
=
QgsCodeEditor::Mode::ScriptEditor
);
78
Qgis::ScriptLanguage
language
()
const override
;
79
80
protected
:
81
void
initializeLexer
()
override
;
82
};
83
84
#endif
// QGSCODEEDITORR_H
Qgis::ScriptLanguage
ScriptLanguage
Scripting languages.
Definition
qgis.h:4978
QgsCodeEditorR::QgsCodeEditorR
QgsCodeEditorR(QWidget *parent=nullptr, QgsCodeEditor::Mode mode=QgsCodeEditor::Mode::ScriptEditor)
Constructor for QgsCodeEditorR.
Definition
qgscodeeditorr.cpp:27
QgsCodeEditorR::initializeLexer
void initializeLexer() override
Called when the dialect specific code lexer needs to be initialized (or reinitialized).
Definition
qgscodeeditorr.cpp:42
QgsCodeEditorR::language
Qgis::ScriptLanguage language() const override
Returns the associated scripting language.
Definition
qgscodeeditorr.cpp:37
QgsCodeEditor::mode
QgsCodeEditor::Mode mode() const
Returns the code editor mode.
Definition
qgscodeeditor.h:344
QgsCodeEditor::Mode
Mode
Code editor modes.
Definition
qgscodeeditor.h:123
QgsCodeEditor::Mode::ScriptEditor
@ ScriptEditor
Standard mode, allows for display and edit of entire scripts.
Definition
qgscodeeditor.h:124
QgsCodeEditor::QgsCodeEditor
QgsCodeEditor(QWidget *parent=nullptr, const QString &title=QString(), bool folding=false, bool margin=false, QgsCodeEditor::Flags flags=QgsCodeEditor::Flags(), QgsCodeEditor::Mode mode=QgsCodeEditor::Mode::ScriptEditor)
Construct a new code editor.
Definition
qgscodeeditor.cpp:96
qgis_sip.h
SIP_IF_MODULE
#define SIP_IF_MODULE(condition)
Definition
qgis_sip.h:27
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgscodeeditor.h
Generated on
for QGIS API Documentation by
1.17.0