File indexing completed on 2024-05-12 05:07:41

0001 /*
0002     SPDX-FileCopyrightText: 2019 Thomas Baumgart <tbaumgart@kde.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef KMMSTYLEDITEMDELEGATE_H
0007 #define KMMSTYLEDITEMDELEGATE_H
0008 
0009 // ----------------------------------------------------------------------------
0010 // QT Includes
0011 
0012 #include <QStyledItemDelegate>
0013 
0014 // ----------------------------------------------------------------------------
0015 // KDE Includes
0016 
0017 // ----------------------------------------------------------------------------
0018 // Project Includes
0019 
0020 
0021 class KMMStyledItemDelegate : public QStyledItemDelegate
0022 {
0023     Q_OBJECT
0024 public:
0025     explicit KMMStyledItemDelegate(QWidget* parent = 0);
0026     virtual ~KMMStyledItemDelegate();
0027 
0028     /**
0029      * Make the editorEvent publicly available
0030      */
0031     virtual bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override;
0032 
0033     /**
0034      * Make the eventFilter publicly available
0035      */
0036     bool eventFilter ( QObject * watched, QEvent * event ) override;
0037 };
0038 
0039 #endif // KMMSTYLEDITEMDELEGATE_H
0040