File indexing completed on 2024-05-26 05:10:14
0001 /* 0002 SPDX-FileCopyrightText: 2007 Thomas Baumgart <ipwizard@users.sourceforge.net> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef KLOANPAYMENTPAGE_H 0007 #define KLOANPAYMENTPAGE_H 0008 0009 // ---------------------------------------------------------------------------- 0010 // QT Includes 0011 0012 #include <QWidget> 0013 0014 // ---------------------------------------------------------------------------- 0015 // KDE Includes 0016 0017 // ---------------------------------------------------------------------------- 0018 // Project Includes 0019 0020 #include "wizardpage.h" 0021 0022 class MyMoneyMoney; 0023 class MyMoneySplit; 0024 0025 namespace NewAccountWizard 0026 { 0027 class Wizard; 0028 0029 class LoanPaymentPagePrivate; 0030 class LoanPaymentPage : public QWidget, public WizardPage<Wizard> 0031 { 0032 Q_OBJECT 0033 Q_DISABLE_COPY(LoanPaymentPage) 0034 0035 public: 0036 explicit LoanPaymentPage(Wizard* parent); 0037 ~LoanPaymentPage() override; 0038 0039 KMyMoneyWizardPage* nextPage() const override; 0040 0041 void enterPage() override; 0042 0043 /** 0044 * This method returns the sum of the additional fees 0045 */ 0046 MyMoneyMoney additionalFees() const; 0047 0048 /** 0049 * This method returns the base payment, that's principal and interest 0050 */ 0051 MyMoneyMoney basePayment() const; 0052 0053 /** 0054 * This method returns the splits that make up the additional fees in @p list. 0055 * @note The splits may contain assigned ids which the caller must remove before 0056 * adding the splits to a MyMoneyTransaction object. 0057 */ 0058 void additionalFeesSplits(QList<MyMoneySplit>& list); 0059 0060 protected Q_SLOTS: 0061 void slotAdditionalFees(); 0062 0063 protected: 0064 void updateAmounts(); 0065 0066 private: 0067 Q_DECLARE_PRIVATE_D(WizardPage<Wizard>::d_ptr, LoanPaymentPage) 0068 friend class Wizard; 0069 friend class AccountSummaryPage; 0070 }; 0071 } // namespace 0072 0073 #endif