KSyntaxHighlighting

htmlhighlighter.h
1 /*
2  SPDX-FileCopyrightText: 2016 Volker Krause <[email protected]>
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 <QIODevice>
14 #include <QString>
15 
16 #include <memory>
17 
18 namespace KSyntaxHighlighting
19 {
20 class HtmlHighlighterPrivate;
21 
22 class KSYNTAXHIGHLIGHTING_EXPORT HtmlHighlighter : public AbstractHighlighter
23 {
24 public:
25  HtmlHighlighter();
26  ~HtmlHighlighter() override;
27 
28  void highlightFile(const QString &fileName, const QString &title = QString());
29  void highlightData(QIODevice *device, const QString &title = QString());
30 
31  void setOutputFile(const QString &fileName);
32  void setOutputFile(FILE *fileHandle);
33 
34 protected:
35  void applyFormat(int offset, int length, const Format &format) override;
36 
37 private:
38  std::unique_ptr<HtmlHighlighterPrivate> d;
39 };
40 }
41 
42 #endif // KSYNTAXHIGHLIGHTING_HTMLHIGHLIGHTER_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:09:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.