/* SPDX-FileCopyrightText: 2011 Ilia Kats SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ #ifndef DELEGATE_H #define DELEGATE_H #include #include class Delegate : public QStyledItemDelegate { Q_OBJECT public: explicit Delegate(QObject *parent = nullptr); ~Delegate() override; QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override; void setEditorData(QWidget *editor, const QModelIndex &index) const override; void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override; void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override; }; #endif