31 lines
604 B
C
31 lines
604 B
C
|
#ifndef WORDSHIGHTLIGHTER_H
|
||
|
#define WORDSHIGHTLIGHTER_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QSyntaxHighlighter>
|
||
|
#include <libParse.h>
|
||
|
|
||
|
|
||
|
|
||
|
namespace Enhancement {
|
||
|
/**
|
||
|
* @brief 词语语法高亮
|
||
|
*/
|
||
|
class ChainHightlighter : public QSyntaxHighlighter
|
||
|
{
|
||
|
public:
|
||
|
ChainHightlighter(QObject *parent = nullptr);
|
||
|
void reset(Parse::Result::DocCore *base);
|
||
|
|
||
|
private:
|
||
|
Parse::Result::DocCore *parse_core;
|
||
|
|
||
|
// QSyntaxHighlighter interface
|
||
|
protected:
|
||
|
virtual void highlightBlock(const QString &text) override;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
|
||
|
#endif // WORDSHIGHTLIGHTER_H
|