1/* -*- C++ -*-
2 This file declares the SMIVItemDelegate class.
3
4 SPDX-FileCopyrightText: 2005 Mirko Boehm <mirko@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7
8 License: LGPL with the following explicit clarification:
9 This code may be linked against any version of the Qt toolkit
10 from Trolltech, Norway.
11
12 $Id: SMIVItemDelegate.h 30 2005-08-16 16:16:04Z mirko $
13*/
14
15#ifndef ITEMDELEGATE_H
16#define ITEMDELEGATE_H
17
18#include <QItemDelegate>
19#include <QSize>
20
21class ItemDelegate : public QItemDelegate
22{
23 Q_OBJECT
24public:
25 ItemDelegate(QObject *parent = nullptr);
26 static const int FrameWidth;
27 static const int TextMargin;
28 static const int Margin;
29
30private:
31 QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
32 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
33};
34
35#endif // SMIVITEMDELEGATE
36

source code of threadweaver/examples/ThumbNailer/ItemDelegate.h