QGIS API Documentation 3.41.0-Master (af5edcb665c)
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 enum Styles
34 {
35 Default = 0,
36 Comment = 1,
37 Kword = 2,
38 BaseKword = 3,
39 OtherKword = 4,
40 Number = 5,
41 String = 6,
42 String2 = 7,
43 Operator = 8,
44 Identifier = 9,
45 Infix = 10,
46 InfixEOL = 11,
47 Backticks = 12,
48 RawString = 13,
49 RawString2 = 14,
50 EscapeSequence = 15
51 };
52
53 QgsQsciLexerR( QObject *parent = nullptr );
54 const char *language() const override;
55 const char *lexer() const override;
56 int lexerId() const override;
57 QString description( int style ) const override;
58 const char *keywords( int set ) const override;
59};
61#endif
62
69class GUI_EXPORT QgsCodeEditorR : public QgsCodeEditor
70{
71 Q_OBJECT
72
73 public:
76 Qgis::ScriptLanguage language() const override;
77
78 protected:
79 void initializeLexer() override;
80};
81
82#endif // QGSCODEEDITORR_H
ScriptLanguage
Scripting languages.
Definition qgis.h:4244
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