File indexing completed on 2024-05-05 04:01:43
0001 /* 0002 SPDX-FileCopyrightText: 2019 Friedrich W. H. Kossebau <kossebau@kde.org> 0003 0004 SPDX-License-Identifier: MIT 0005 */ 0006 0007 #ifndef CODEPDFPRINTER_H 0008 #define CODEPDFPRINTER_H 0009 0010 #include <KSyntaxHighlighting/Repository> 0011 0012 #include <QTextDocument> 0013 0014 namespace KSyntaxHighlighting 0015 { 0016 class SyntaxHighlighter; 0017 } 0018 0019 class CodePdfPrinter 0020 { 0021 public: 0022 explicit CodePdfPrinter(); 0023 ~CodePdfPrinter(); 0024 0025 public: 0026 bool openSourceFile(const QString &fileName); 0027 void printPdfFile(const QString &fileName); 0028 0029 private: 0030 QTextDocument m_document; 0031 0032 KSyntaxHighlighting::Repository m_repository; 0033 KSyntaxHighlighting::SyntaxHighlighter *m_highlighter; 0034 }; 0035 0036 #endif