File indexing completed on 2025-01-19 04:56:41

0001 /*
0002  * SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com>
0003    SPDX-FileCopyrightText: 2014 Kevin Ottens <ervin@kde.org>
0004    * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005    */
0006 
0007 
0008 
0009 #ifndef DATASOURCEDELEGATE_H
0010 #define DATASOURCEDELEGATE_H
0011 
0012 #include <QStyledItemDelegate>
0013 
0014 #include "domain/datasource.h"
0015 
0016 namespace Widgets
0017 {
0018 
0019 class DataSourceDelegate : public QStyledItemDelegate
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit DataSourceDelegate(QObject *parent = nullptr);
0024 
0025     void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
0026     QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
0027 };
0028 
0029 }
0030 
0031 #endif
0032