File indexing completed on 2024-05-12 13:04:47

0001 /*
0002  * This file is part of the KDE project
0003  * SPDX-FileCopyrightText: 2013 Arjen Hiemstra <ahiemstra@heimr.nl>
0004  *
0005  * SPDX-License-Identifier: GPL-2.0-or-later
0006  */
0007 
0008 #ifndef CQTHUMBNAILITEM_H
0009 #define CQTHUMBNAILITEM_H
0010 
0011 #include <QDeclarativeItem>
0012 
0013 class CQThumbnailItem : public QDeclarativeItem
0014 {
0015     Q_OBJECT
0016     Q_PROPERTY(QPixmap content READ content WRITE setContent NOTIFY contentChanged)
0017 
0018 public:
0019     explicit CQThumbnailItem(QDeclarativeItem* parent = 0);
0020     ~CQThumbnailItem();
0021 
0022     virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* );
0023 
0024     QPixmap content() const;
0025 
0026 public Q_SLOTS:
0027     void setContent(const QPixmap& content);
0028 
0029 Q_SIGNALS:
0030     void contentChanged();
0031 
0032 private:
0033     class Private;
0034     Private * const d;
0035 };
0036 
0037 #endif // CQTHUMBNAILITEM_H