KSyntaxHighlighting

htmlhighlighter.h
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#include "theme.h"
13
14#include <QString>
15
16QT_BEGIN_NAMESPACE
17class QIODevice;
18QT_END_NAMESPACE
19
20namespace KSyntaxHighlighting
21{
22class HtmlHighlighterPrivate;
23
24class KSYNTAXHIGHLIGHTING_EXPORT HtmlHighlighter : public AbstractHighlighter
25{
26public:
27 HtmlHighlighter();
28 ~HtmlHighlighter() override;
29
30 void highlightFile(const QString &fileName, const QString &title = QString());
31 void highlightData(QIODevice *device, const QString &title = QString());
32
33 void setOutputFile(const QString &fileName);
34 void setOutputFile(FILE *fileHandle);
35
36 void setBackgroundRole(Theme::EditorColorRole bgRole);
37
38protected:
39 void applyFormat(int offset, int length, const Format &format) override;
40
41private:
42 Q_DECLARE_PRIVATE(HtmlHighlighter)
43};
44}
45
46#endif // KSYNTAXHIGHLIGHTING_HTMLHIGHLIGHTER_H
Syntax highlighting engine for Kate syntax definitions.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.