src/ldrawsyntaxhighlighter.h

Sat, 08 Apr 2023 15:50:38 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sat, 08 Apr 2023 15:50:38 +0300
changeset 351
9e3c1f838406
parent 331
638a7458ef5e
permissions
-rw-r--r--

Add missing 'static' keywords and deleted unused code

#pragma once
#include <QSyntaxHighlighter>
#include <QRegularExpression>

class LDrawSyntaxHighlighter final : public QSyntaxHighlighter
{
	Q_OBJECT
	QRegularExpression commentPattern;
	QRegularExpression bfcPattern;
	QRegularExpression refPattern;
	QRegularExpression trianglePattern;
	QRegularExpression quadrilateralPattern;
	QRegularExpression cedgePattern;
	QTextCharFormat lineTypeFormat;
	QTextCharFormat colorFormat;
	QTextCharFormat point1Format;
	QTextCharFormat point2Format;
	QTextCharFormat point3Format;
	QTextCharFormat point4Format;
	QTextCharFormat bfcFormat;
	QTextCharFormat nameFormat;
	QTextCharFormat errorFormat;
public:
	LDrawSyntaxHighlighter(QTextDocument* parent = nullptr);
	
	// QSyntaxHighlighter interface
protected:
	void highlightBlock(const QString& text) override;
};

mercurial