ARGoS  3
A parallel, multi-engine simulator for swarm robotics
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 
18 class QTextDocument;
19 
20 namespace argos {
21 
22  class CQTOpenGLLuaSyntaxHighlighter : public QSyntaxHighlighter {
23 
24  Q_OBJECT
25 
26  public:
27 
28  CQTOpenGLLuaSyntaxHighlighter(QTextDocument* pc_text);
30 
31  protected:
32 
33  void highlightBlock(const QString& str_text);
34 
35  private:
36 
37  struct SHighlightingRule
38  {
39  QRegExp Pattern;
40  QTextCharFormat Format;
41  };
42  QVector<SHighlightingRule> m_vecHighlightingRules;
43 
44  QRegExp m_cCommentStartExpression;
45  QRegExp m_cCommentEndExpression;
46 
47  QTextCharFormat m_cKeywordFormat;
48  QTextCharFormat m_cSingleLineCommentFormat;
49  QTextCharFormat m_cMultiLineCommentFormat;
50  QTextCharFormat m_cQuotationFormat;
51  QTextCharFormat m_cFunctionFormat;
52  };
53 
54 }
55 
56 #endif
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CQTOpenGLLuaSyntaxHighlighter::highlightBlock
void highlightBlock(const QString &str_text)
Definition: qtopengl_lua_syntax_highlighter.cpp:56
argos::CQTOpenGLLuaSyntaxHighlighter::~CQTOpenGLLuaSyntaxHighlighter
virtual ~CQTOpenGLLuaSyntaxHighlighter()
Definition: qtopengl_lua_syntax_highlighter.h:29
argos::CQTOpenGLLuaSyntaxHighlighter
Definition: qtopengl_lua_syntax_highlighter.h:22
argos::CQTOpenGLLuaSyntaxHighlighter::CQTOpenGLLuaSyntaxHighlighter
CQTOpenGLLuaSyntaxHighlighter(QTextDocument *pc_text)
Definition: qtopengl_lua_syntax_highlighter.cpp:20