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


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