File indexing completed on 2024-04-14 03:59:18
0001 /* 0002 This file is part of the KDE project "KAtomic" 0003 0004 SPDX-FileCopyrightText: 2006-2009 Dmitry Suzdalev <dimsuz@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef LEVEL_SET_DELEGATE_H 0010 #define LEVEL_SET_DELEGATE_H 0011 0012 #include <QStyledItemDelegate> 0013 0014 class LevelSetDelegate : public QStyledItemDelegate 0015 { 0016 Q_OBJECT 0017 public: 0018 explicit LevelSetDelegate(QObject* parent = nullptr); 0019 0020 void paint(QPainter* p, const QStyleOptionViewItem& option, const QModelIndex& index) const override; 0021 QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override; 0022 0023 private: 0024 mutable int m_lineHeight; 0025 }; 0026 0027 #endif