mirror of
https://github.com/silverf0x/RpcView
synced 2026-06-08 17:26:38 +00:00
35 lines
776 B
C++
35 lines
776 B
C++
#ifndef _IDL_HIGHLIGHTER_H_
|
|
#define _IDL_HIGHLIGHTER_H_
|
|
|
|
#include "../Qt/Qt.h"
|
|
|
|
class IdlHighlighter_C : public QSyntaxHighlighter
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
IdlHighlighter_C(QTextDocument *parent = 0);
|
|
|
|
protected:
|
|
void highlightBlock(const QString &text);
|
|
|
|
private:
|
|
struct HighlightingRule
|
|
{
|
|
QRegExp pattern;
|
|
QTextCharFormat format;
|
|
};
|
|
QVector<HighlightingRule> highlightingRules;
|
|
|
|
QRegExp commentStartExpression;
|
|
QRegExp commentEndExpression;
|
|
|
|
QTextCharFormat keywordFormat;
|
|
QTextCharFormat classFormat;
|
|
QTextCharFormat singleLineCommentFormat;
|
|
QTextCharFormat multiLineCommentFormat;
|
|
QTextCharFormat quotationFormat;
|
|
QTextCharFormat functionFormat;
|
|
};
|
|
|
|
#endif //_IDL_HIGHLIGHTER_H_
|