File indexing completed on 2024-05-12 15:59:14

0001 /* This file is part of the KDE project
0002  * SPDX-FileCopyrightText: 2012 KO GmbH. Contact : Boudewijn Rempt <boud@kogmbh.com>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 #ifndef KRITA_SKETCH_PAGETHUMBNAILPROVIDER_H
0007 #define KRITA_SKETCH_PAGETHUMBNAILPROVIDER_H
0008 
0009 #include <QQuickImageProvider>
0010 #include <QObject>
0011 
0012 class PageThumbnailProvider : public QObject, public QQuickImageProvider
0013 {
0014     Q_OBJECT
0015 public:
0016     PageThumbnailProvider();
0017     virtual ~PageThumbnailProvider();
0018 
0019     virtual QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize);
0020 
0021     void addThumbnail(QString id, QImage thumb);
0022     bool hasThumbnail(QString id);
0023 
0024 private:
0025     class Private;
0026     Private* d;
0027 };
0028 
0029 #endif // CMPAGETHUMBNAILPROVIDER_H