QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
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 "qgscodeeditor.h"
20#include "qgis_sip.h"
21#include "qgis_gui.h"
22#include <Qsci/qscilexer.h>
23
24SIP_IF_MODULE( HAVE_QSCI_SIP )
25
26#ifndef SIP_RUN
27
29class GUI_EXPORT QgsQsciLexerR : public QsciLexer
30{
31 Q_OBJECT
32 public:
33
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
61
62};
64#endif
65
72class GUI_EXPORT QgsCodeEditorR : public QgsCodeEditor
73{
74 Q_OBJECT
75
76 public:
77
80 Qgis::ScriptLanguage language() const override;
81
82 protected:
83 void initializeLexer() override;
84
85};
86
87#endif // QGSCODEEDITORR_H
ScriptLanguage
Scripting languages.
Definition qgis.h:4173
A R stats code editor based on QScintilla2.
A text editor based on QScintilla2.
Mode
Code editor modes.
@ ScriptEditor
Standard mode, allows for display and edit of entire scripts.
#define SIP_IF_MODULE(condition)
Definition qgis_sip.h:28
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53