/
Zero_Fly
/
JSON_viewer
Обзор
Документация
Войти
/
Zero_Fly
/
JSON_viewer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
result
src/json-viewer/JSON_highlight.h
27 строк
593 B
Zero-Fly-
add tree jsonView
16 янв 2025, 16:31
16 янв 2025, 16:31
ace3dac
Код
Авторство
О чём код?
#ifndef JSON_HIGHLIGHT_H #define JSON_HIGHLIGHT_H #include <QSyntaxHighlighter> #include <QTextCharFormat> #include <QRegularExpression> #include <QColor> class JsonSyntaxHighlighter : public QSyntaxHighlighter { Q_OBJECT public: JsonSyntaxHighlighter(QTextDocument *parent = nullptr); //~JsonSyntaxHighlighter(){}; protected: void highlightBlock(const QString &text) override; private: struct HighlightingRule { QRegularExpression pattern; QTextCharFormat format; }; QVector<HighlightingRule> highlightingRules; }; #endif // JSON_HIGHLIGHT_H