qtopengl_lua_syntax_highlighter.h
Go to the documentation of this file.
1 
7 #ifndef QTOPENGL_LUA_SYNTAX_HIGHLIGHTER_H
8 #define QTOPENGL_LUA_SYNTAX_HIGHLIGHTER_H
9 
10 namespace argos {
11  class CQTOpenGLLuaSyntaxHighlighter;
12 }
13 
14 #include <QHash>
15 #include <QSyntaxHighlighter>
16 #include <QTextCharFormat>
17 #include <QRegularExpression>
18 
19 class QTextDocument;
20 
21 namespace argos {
22 
23  class CQTOpenGLLuaSyntaxHighlighter : public QSyntaxHighlighter {
24 
25  Q_OBJECT
26 
27  public:
28 
29  CQTOpenGLLuaSyntaxHighlighter(QTextDocument* pc_text);
31 
32  protected:
33 
34  void highlightBlock(const QString& str_text);
35 
36  private:
37 
38  struct SHighlightingRule
39  {
40  QRegularExpression Pattern;
41  QTextCharFormat Format;
42  };
43  QVector<SHighlightingRule> m_vecHighlightingRules;
44 
45  QRegularExpression m_cCommentStartExpression;
46  QRegularExpression m_cCommentEndExpression;
47 
48  QTextCharFormat m_cKeywordFormat;
49  QTextCharFormat m_cSingleLineCommentFormat;
50  QTextCharFormat m_cMultiLineCommentFormat;
51  QTextCharFormat m_cQuotationFormat;
52  QTextCharFormat m_cFunctionFormat;
53  };
54 
55 }
56 
57 #endif
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12