21#ifndef _ExprHighlighter_h_
22#define _ExprHighlighter_h_
23#include <QSyntaxHighlighter>
46 lightness = palette.color(QPalette::Base).value() < 127 ? 250 : 130;
65 rule.
pattern = QRegExp(
"\\b[0-9]*\\.[0-9]*)?|[0-9]+\\b");
71 rule.
pattern = QRegExp(
"\\$[A-Za-z][A-Za-z0-9]*\\b");
76 rule.
pattern = QRegExp(
"#[^\n]*");
91 setCurrentBlockState(0);
void fixStyle(const QPalette &palette)
QTextCharFormat numberFormat
QTextCharFormat operatorFormat
ExprHighlighter(QTextDocument *parent)
QTextCharFormat variableFormat
void highlightBlock(const QString &text)
ExprHighlighter(QTextEdit *edit)
QVector< HighlightingRule > highlightingRules
QTextCharFormat singleLineCommentFormat
double length(const Vec3d &v)
For a multi line expression
The result is computed int int< br >< div style="margin-left: 40px;"> Picks values randomly between loRange and hiRange based on supplied index(which is automatically hashed).