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
21/*!
22 * \class ItemDelegate
23 *
24 * \inmodule ThreadWeaver
25 */
26class ItemDelegate : public QItemDelegate
27{
28 Q_OBJECT
29public:
30 /*!
31 */
32 ItemDelegate(QObject *parent = nullptr);
33 static const int FrameWidth;
34 static const int TextMargin;
35 static const int Margin;
36
37private:
38 QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
39 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
40};
41
42#endif // SMIVITEMDELEGATE
43

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