File indexing completed on 2024-04-28 04:58:04

0001 /*  This file is part of the KDE libraries
0002     SPDX-FileCopyrightText: 2000 Malte Starostik <malte@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef _TEXTCREATOR_H_
0008 #define _TEXTCREATOR_H_
0009 
0010 #include <KIO/ThumbnailCreator>
0011 #include <KSyntaxHighlighting/Repository>
0012 
0013 #include <QPixmap>
0014 
0015 class TextCreator : public KIO::ThumbnailCreator
0016 {
0017     Q_OBJECT
0018 public:
0019     TextCreator(QObject *parent, const QVariantList &args);
0020     ~TextCreator() override;
0021     KIO::ThumbnailResult create(const KIO::ThumbnailRequest &request) override;
0022 
0023 private:
0024     char *m_data;
0025     int m_dataSize;
0026     QPixmap m_pixmap;
0027 
0028     KSyntaxHighlighting::Repository m_highlightingRepository;
0029 };
0030 
0031 #endif