| 1 | #cxx . . $ `<file>/include/internal/QXMLHighlighter.hpp`/pragma once |
| 2 | |
| 3 | // QCodeEditor |
| 4 | #include <QStyleSyntaxHighlighter>cxx . . $ `<file>/include/QStyleSyntaxHighlighter`/ // Required for inheritance |
| 5 | |
| 6 | // Qt |
| 7 | #include <QVector> |
| 8 | #include <QRegularExpression> |
| 9 | |
| 10 | /** |
| 11 | * @brief Class, that describes XML code |
| 12 | * highlighter. |
| 13 | */ |
| 14 | class QXMLHighlightercxx . . $ QXMLHighlighter# : public QStyleSyntaxHighlightercxx . . $ QStyleSyntaxHighlighter# |
| 15 | { |
| 16 | Q_OBJECTcxx . . $ QXMLHighlighter#trUtf8(75d9f1c324b4579d). |
| 17 | public: |
| 18 | |
| 19 | /** |
| 20 | * @brief Constructor. |
| 21 | * @param document Pointer to document. |
| 22 | */ |
| 23 | explicit QXMLHighlightercxx . . $ QXMLHighlighter#QXMLHighlighter(68d7deb16251beb9).(QTextDocumentcxx . . $ QTextDocument#* document=nullptr); |
| 24 | |
| 25 | protected: |
| 26 | |
| 27 | void highlightBlockcxx . . $ QXMLHighlighter#highlightBlock(3520e46b33348bf6).(const QStringcxx . . $ QString#& text) override; |
| 28 | |
| 29 | private: |
| 30 | |
| 31 | void highlightByRegexcxx . . $ QXMLHighlighter#highlightByRegex(ea4fab14ee2548da).(const QTextCharFormatcxx . . $ QTextCharFormat#& format, |
| 32 | const QRegularExpressioncxx . . $ QRegularExpression#& regex, |
| 33 | const QStringcxx . . $ QString#& text); |
| 34 | |
| 35 | QVectorcxx . . $ QVector#<QRegularExpressioncxx . . $ QRegularExpression#> m_xmlKeywordRegexescxx . . $ QXMLHighlighter#m_xmlKeywordRegexes.; |
| 36 | QRegularExpressioncxx . . $ QRegularExpression# m_xmlElementRegexcxx . . $ QXMLHighlighter#m_xmlElementRegex.; |
| 37 | QRegularExpressioncxx . . $ QRegularExpression# m_xmlAttributeRegexcxx . . $ QXMLHighlighter#m_xmlAttributeRegex.; |
| 38 | QRegularExpressioncxx . . $ QRegularExpression# m_xmlValueRegexcxx . . $ QXMLHighlighter#m_xmlValueRegex.; |
| 39 | QRegularExpressioncxx . . $ QRegularExpression# m_xmlCommentBeginRegexcxx . . $ QXMLHighlighter#m_xmlCommentBeginRegex.; |
| 40 | QRegularExpressioncxx . . $ QRegularExpression# m_xmlCommentEndRegexcxx . . $ QXMLHighlighter#m_xmlCommentEndRegex.; |
| 41 | |
| 42 | }; |
| 43 |