45 #include <QSyntaxHighlighter> 48 #include <QTextCharFormat> 50 #include <QTextDocument> 65 void highlightBlock(
const QString &text);
74 QTextCharFormat format;
80 QStringList keywordPatterns_;
81 QStringList typePatterns_;
84 QVector<HighlightingRule> highlightingRules_;
87 QRegExp vertexShaderStartExpression_;
88 QRegExp vertexShaderEndExpression_;
90 QRegExp geometryShaderStartExpression_;
91 QRegExp geometryShaderEndExpression_;
93 QRegExp fragmentShaderStartExpression_;
94 QRegExp fragmentShaderEndExpression_;
97 QTextCharFormat keywordFormat_;
98 QTextCharFormat defineFormat_;
99 QTextCharFormat typeFormat_;
101 QTextCharFormat singleLineCommentFormat_;
104 QTextCharFormat vertexShaderFormat_;
105 QTextCharFormat geometryShaderFormat_;
106 QTextCharFormat fragmentShaderFormat_;
void init()
common initializer function called by the constructors
void update()
Updates the highlighter with the current rule set defined in the patterns.