1 | /* |
2 | SPDX-FileCopyrightText: 2019 Friedrich W. H. Kossebau <kossebau@kde.org> |
3 | |
4 | SPDX-License-Identifier: MIT |
5 | */ |
6 | |
7 | #ifndef CODEPDFPRINTER_H |
8 | #define CODEPDFPRINTER_H |
9 | |
10 | #include <KSyntaxHighlighting/Repository> |
11 | |
12 | #include <QTextDocument> |
13 | |
14 | namespace KSyntaxHighlighting |
15 | { |
16 | class SyntaxHighlighter; |
17 | } |
18 | |
19 | class CodePdfPrinter |
20 | { |
21 | public: |
22 | explicit CodePdfPrinter(); |
23 | ~CodePdfPrinter(); |
24 | |
25 | public: |
26 | bool openSourceFile(const QString &fileName); |
27 | void printPdfFile(const QString &fileName); |
28 | |
29 | private: |
30 | QTextDocument m_document; |
31 | |
32 | KSyntaxHighlighting::Repository m_repository; |
33 | KSyntaxHighlighting::SyntaxHighlighter *m_highlighter; |
34 | }; |
35 | |
36 | #endif |
37 | |