1 | /* |
2 | SPDX-FileCopyrightText: 2016 Volker Krause <vkrause@kde.org> |
3 | |
4 | SPDX-License-Identifier: MIT |
5 | */ |
6 | |
7 | #ifndef KSYNTAXHIGHLIGHTING_HTMLHIGHLIGHTER_H |
8 | #define KSYNTAXHIGHLIGHTING_HTMLHIGHLIGHTER_H |
9 | |
10 | #include "abstracthighlighter.h" |
11 | #include "ksyntaxhighlighting_export.h" |
12 | |
13 | #include <QString> |
14 | |
15 | QT_BEGIN_NAMESPACE |
16 | class QIODevice; |
17 | QT_END_NAMESPACE |
18 | |
19 | namespace KSyntaxHighlighting |
20 | { |
21 | class HtmlHighlighterPrivate; |
22 | |
23 | class KSYNTAXHIGHLIGHTING_EXPORT HtmlHighlighter : public AbstractHighlighter |
24 | { |
25 | public: |
26 | HtmlHighlighter(); |
27 | ~HtmlHighlighter() override; |
28 | |
29 | void highlightFile(const QString &fileName, const QString &title = QString()); |
30 | void highlightData(QIODevice *device, const QString &title = QString()); |
31 | |
32 | void setOutputFile(const QString &fileName); |
33 | void setOutputFile(FILE *fileHandle); |
34 | |
35 | protected: |
36 | void applyFormat(int offset, int length, const Format &format) override; |
37 | |
38 | private: |
39 | Q_DECLARE_PRIVATE(HtmlHighlighter) |
40 | }; |
41 | } |
42 | |
43 | #endif // KSYNTAXHIGHLIGHTING_HTMLHIGHLIGHTER_H |
44 | |