| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2013-2016 Simon St James <kdedevel@etotheipiplusone.com> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 5 | */ |
| 6 | |
| 7 | #ifndef KATEVI_EMULATED_COMMAND_BAR_MATCHHIGHLIGHTER_H |
| 8 | #define KATEVI_EMULATED_COMMAND_BAR_MATCHHIGHLIGHTER_H |
| 9 | |
| 10 | #include <ktexteditor/attribute.h> |
| 11 | |
| 12 | #include <QObject> |
| 13 | |
| 14 | namespace KTextEditor |
| 15 | { |
| 16 | class ViewPrivate; |
| 17 | class Range; |
| 18 | class MovingRange; |
| 19 | } |
| 20 | |
| 21 | namespace KateVi |
| 22 | { |
| 23 | class MatchHighlighter : public QObject |
| 24 | { |
| 25 | public: |
| 26 | explicit MatchHighlighter(KTextEditor::ViewPrivate *view); |
| 27 | ~MatchHighlighter() override; |
| 28 | void updateMatchHighlight(KTextEditor::Range matchRange); |
| 29 | |
| 30 | private: |
| 31 | void updateMatchHighlightAttrib(); |
| 32 | |
| 33 | private: |
| 34 | KTextEditor::ViewPrivate *m_view = nullptr; |
| 35 | KTextEditor::Attribute::Ptr m_highlightMatchAttribute; |
| 36 | KTextEditor::MovingRange *m_highlightedMatch; |
| 37 | }; |
| 38 | } |
| 39 | #endif |
| 40 | |