File indexing completed on 2024-05-12 16:44:07
0001 /* 0002 SPDX-FileCopyrightText: 2006-2018 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-FileCopyrightText: 2017-2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef REGISTERITEMDELEGATE_H 0008 #define REGISTERITEMDELEGATE_H 0009 0010 // ---------------------------------------------------------------------------- 0011 // QT Includes 0012 0013 #include <QStyledItemDelegate> 0014 0015 // ---------------------------------------------------------------------------- 0016 // KDE Includes 0017 0018 // ---------------------------------------------------------------------------- 0019 // Project Includes 0020 0021 class QPainter; 0022 class QModelIndex; 0023 class QStyleOptionViewItem; 0024 0025 namespace KMyMoneyRegister 0026 { 0027 class Register; 0028 class RegisterItemDelegate : public QStyledItemDelegate 0029 { 0030 Q_OBJECT 0031 Q_DISABLE_COPY(RegisterItemDelegate) 0032 0033 public: 0034 explicit RegisterItemDelegate(Register *parent); 0035 ~RegisterItemDelegate(); 0036 0037 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const final override; 0038 0039 private: 0040 Register *m_register; 0041 }; 0042 0043 } // namespace 0044 0045 #endif