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

0001 /*
0002     SPDX-FileCopyrightText: 2021 Thomas Baumgart <tbaumgart@kde.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef RECONCILIATIONDELEGATE_H
0007 #define RECONCILIATIONDELEGATE_H
0008 
0009 // ----------------------------------------------------------------------------
0010 // QT Includes
0011 
0012 class QColor;
0013 
0014 // ----------------------------------------------------------------------------
0015 // KDE Includes
0016 
0017 // ----------------------------------------------------------------------------
0018 // Project Includes
0019 
0020 #include "kmmstyleditemdelegate.h"
0021 #include "mymoneyenums.h"
0022 
0023 class MyMoneyMoney;
0024 
0025 class ReconciliationDelegate : public KMMStyledItemDelegate
0026 {
0027     Q_OBJECT
0028 public:
0029     explicit ReconciliationDelegate(QWidget* parent = 0);
0030     virtual ~ReconciliationDelegate();
0031 
0032     void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const final override;
0033     QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const final override;
0034 
0035 protected:
0036     bool eventFilter(QObject* o, QEvent* event) final override;
0037 
0038 private:
0039     class Private;
0040     Private* const d;
0041 
0042     static QColor m_erroneousColor;
0043     static QColor m_importedColor;
0044     static QColor m_separatorColor;
0045 };
0046 
0047 #endif // RECONCILIATIONDELEGATE_H