File indexing completed on 2024-05-12 16:44:08

0001 /*
0002     SPDX-FileCopyrightText: 2008-2018 Thomas Baumgart <tbaumgart@kde.org>
0003     SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef STDTRANSACTIONMATCHED_H
0008 #define STDTRANSACTIONMATCHED_H
0009 
0010 // ----------------------------------------------------------------------------
0011 // QT Includes
0012 
0013 // ----------------------------------------------------------------------------
0014 // KDE Includes
0015 
0016 // ----------------------------------------------------------------------------
0017 // Project Includes
0018 
0019 #include "stdtransaction.h"
0020 
0021 class MyMoneySplit;
0022 class MyMoneyTransaction;
0023 
0024 namespace KMyMoneyRegister
0025 {
0026 
0027 class Register;
0028 class StdTransactionMatched : public StdTransaction
0029 {
0030     static const int m_additionalRows = 3;
0031 
0032 public:
0033     explicit StdTransactionMatched(Register* getParent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId);
0034     ~StdTransactionMatched() override;
0035 
0036     const char* className() override;
0037 
0038     bool paintRegisterCellSetup(QPainter *painter, QStyleOptionViewItem &option, const QModelIndex &index) override;
0039 
0040     void registerCellText(QString& txt, Qt::Alignment& align, int row, int col, QPainter* painter = 0) override;
0041 
0042     /**
0043     * Provided for internal reasons. No API change. See RegisterItem::numRowsRegister(bool)
0044     */
0045     int numRowsRegister(bool expanded) const override;
0046 
0047     /**
0048     * Provided for internal reasons. No API change. See RegisterItem::numRowsRegister()
0049     */
0050     int numRowsRegister() const override;
0051 };
0052 
0053 } // namespace
0054 
0055 #endif