Krita Source Code Documentation
Loading...
Searching...
No Matches
KisResourceItemDelegate.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 KISRESOURCEITEMDELEGATE_H
9#define KISRESOURCEITEMDELEGATE_H
10
11#include <QAbstractItemDelegate>
12
15#include "kritaresourcewidgets_export.h"
16
18class KRITARESOURCEWIDGETS_EXPORT KisResourceItemDelegate : public QAbstractItemDelegate
19{
20 Q_OBJECT
21public:
22 explicit KisResourceItemDelegate(QObject *parent = 0);
24
25 void paint( QPainter *, const QStyleOptionViewItem &, const QModelIndex & ) const override;
26 void setShowText(bool);
27 void setIsWidget(bool);
28
29 QSize sizeHint ( const QStyleOptionViewItem &, const QModelIndex & ) const override;
30
31private:
36};
37
38#endif
The resource item delegate for rendering the resource preview.
KisResourceThumbnailPainter m_thumbnailPainter
KoCheckerBoardPainter m_checkerPainter
The resource item delegate for rendering the resource preview.