File indexing completed on 2024-04-21 04:50:13

0001 /*
0002     SPDX-FileCopyrightText: 2009 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef _K3B_MEDIUM_DELEGATE_H_
0009 #define _K3B_MEDIUM_DELEGATE_H_
0010 
0011 #include <QStyledItemDelegate>
0012 
0013 namespace K3b {
0014     class MediumDelegate : public QStyledItemDelegate
0015     {
0016         Q_OBJECT
0017 
0018     public:
0019         explicit MediumDelegate( QObject* parent );
0020         ~MediumDelegate() override;
0021 
0022         // FIXME: move this elsewhere
0023         enum CustomRoles {
0024             MediumRole = 7777
0025         };
0026 
0027         QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const override;
0028         void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const override;
0029     };
0030 }
0031 
0032 #endif