File indexing completed on 2024-05-26 05:56:50
0001 /* 0002 This file is part of the Okteta Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2009 Alex Richardson <alex.richardson@gmx.de> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_STRUCTUREVIEWITEMDELEGATE_HPP 0010 #define KASTEN_STRUCTUREVIEWITEMDELEGATE_HPP 0011 0012 #include <QStyledItemDelegate> 0013 0014 namespace Kasten { 0015 0016 class StructureViewItemDelegate : public QStyledItemDelegate 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit StructureViewItemDelegate(QObject* parent = nullptr); 0022 ~StructureViewItemDelegate() override; 0023 0024 public: // QStyledItemDelegate API 0025 void setModelData(QWidget* editor, QAbstractItemModel* model, 0026 const QModelIndex& index) const override; 0027 void setEditorData(QWidget* editor, const QModelIndex& index) const override; 0028 QWidget* createEditor(QWidget* parent, 0029 const QStyleOptionViewItem& option, const QModelIndex& index) const override; 0030 }; 0031 0032 } 0033 0034 #endif