QGLSLHighlighter.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 // QCodeEditor
4 #include <QStyleSyntaxHighlighter> // Required for inheritance
5 #include <QHighlightRule>
6 
7 // Qt
8 #include <QRegularExpression>
9 #include <QVector>
10 
11 class QSyntaxStyle;
12 
18 {
19  Q_OBJECT
20 public:
21 
26  explicit QGLSLHighlighter(QTextDocument* document=nullptr);
27 
28 protected:
29  void highlightBlock(const QString& text) override;
30 
31 private:
32 
34 
35  QRegularExpression m_includePattern;
36  QRegularExpression m_functionPattern;
37  QRegularExpression m_defTypePattern;
38 
39  QRegularExpression m_commentStartPattern;
40  QRegularExpression m_commentEndPattern;
41 };
42 
QGLSLHighlighter::m_defTypePattern
QRegularExpression m_defTypePattern
Definition: QGLSLHighlighter.hpp:37
QGLSLHighlighter::m_commentEndPattern
QRegularExpression m_commentEndPattern
Definition: QGLSLHighlighter.hpp:40
QGLSLHighlighter::highlightBlock
void highlightBlock(const QString &text) override
Definition: QGLSLHighlighter.cpp:69
QGLSLHighlighter::m_functionPattern
QRegularExpression m_functionPattern
Definition: QGLSLHighlighter.hpp:36
QVector< QHighlightRule >
QGLSLHighlighter::m_commentStartPattern
QRegularExpression m_commentStartPattern
Definition: QGLSLHighlighter.hpp:39
QGLSLHighlighter::QGLSLHighlighter
QGLSLHighlighter(QTextDocument *document=nullptr)
Constructor.
Definition: QGLSLHighlighter.cpp:10
QGLSLHighlighter::m_highlightRules
QVector< QHighlightRule > m_highlightRules
Definition: QGLSLHighlighter.hpp:33
QGLSLHighlighter
Class, that describes Glsl code highlighter.
Definition: QGLSLHighlighter.hpp:17
QStyleSyntaxHighlighter
Class, that descrubes highlighter with syntax style.
Definition: QStyleSyntaxHighlighter.hpp:12
QSyntaxStyle
Class, that describes Qt style parser for QCodeEditor.
Definition: QSyntaxStyle.hpp:13
QGLSLHighlighter::m_includePattern
QRegularExpression m_includePattern
Definition: QGLSLHighlighter.hpp:35


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45