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 
QRegularExpression m_commentStartPattern
QRegularExpression m_includePattern
QRegularExpression m_commentEndPattern
Class, that describes Glsl code highlighter.
QRegularExpression m_defTypePattern
void highlightBlock(const QString &text) override
Class, that describes Qt style parser for QCodeEditor.
Class, that descrubes highlighter with syntax style.
QGLSLHighlighter(QTextDocument *document=nullptr)
Constructor.
QRegularExpression m_functionPattern
QVector< QHighlightRule > m_highlightRules


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:38