Krita Source Code Documentation
Loading...
Searching...
No Matches
KisResourceThumbnailPainter.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2008 Jan Hambrecht <jaham@gmx.net>
3 * SPDX-FileCopyrightText: 2018 Boudewijn Rempt <boud@valdyas.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#ifndef KIS_RESOURCE_THUMBNAIL_PAINTER_H
9#define KIS_RESOURCE_THUMBNAIL_PAINTER_H
10
11#include <QAbstractItemDelegate>
12
14
15#include "kritaresourcewidgets_export.h"
16#include <KisResourceTypes.h>
17#include <QObject>
18
20class KRITARESOURCEWIDGETS_EXPORT KisResourceThumbnailPainter : public QObject
21{
22 Q_OBJECT
23public:
24 explicit KisResourceThumbnailPainter(QObject *parent = 0);
26
27 // (QPainter*, QModelIndex&, QRect, const QPalette&, bool)’
28
29 QImage getReadyThumbnail(const QModelIndex& index, QSize rect, const QPalette& palette) const;
30 void paint(QPainter *painter,
31 const QModelIndex &index,
32 QRect rect,
33 const QPalette &palette,
34 bool selected,
35 bool addMargin) const;
36
37private:
39};
40
41#endif
The resource item delegate for rendering the resource preview.
rgba palette[MAX_PALETTE]
Definition palette.c:35