File indexing completed on 2024-05-12 05:06:44
0001 /* 0002 SPDX-FileCopyrightText: 2000-2004 Michael Edwardes <mte@users.sourceforge.net> 0003 SPDX-FileCopyrightText: 2002-2018 Thomas Baumgart <tbaumgart@kde.org> 0004 SPDX-FileCopyrightText: 2005 Ace Jones <acejones@users.sourceforge.net> 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef MYMONEYSCHEDULE_P_H 0009 #define MYMONEYSCHEDULE_P_H 0010 0011 // ---------------------------------------------------------------------------- 0012 // QT Includes 0013 0014 #include <QDate> 0015 #include <QMap> 0016 0017 // ---------------------------------------------------------------------------- 0018 // KDE Includes 0019 0020 // ---------------------------------------------------------------------------- 0021 // Project Includes 0022 0023 #include "mymoneyobject_p.h" 0024 #include "mymoneytransaction.h" 0025 #include "mymoneyenums.h" 0026 0027 using namespace eMyMoney; 0028 0029 class MyMoneySchedulePrivate : public MyMoneyObjectPrivate 0030 { 0031 public: 0032 MyMoneySchedulePrivate() 0033 : m_occurrence(Schedule::Occurrence::Any) 0034 , m_occurrenceMultiplier(1) 0035 , m_type(Schedule::Type::Any) 0036 , m_paymentType(Schedule::PaymentType::Any) 0037 , m_fixed(false) 0038 , m_lastDayInMonth(false) 0039 , m_autoEnter(false) 0040 , m_weekendOption(Schedule::WeekendOption::MoveNothing) 0041 {} 0042 0043 void collectReferencedObjects() override 0044 { 0045 m_referencedObjects = m_transaction.referencedObjects(); 0046 } 0047 0048 /// Its occurrence 0049 eMyMoney::Schedule::Occurrence m_occurrence; 0050 0051 /// Its occurrence multiplier 0052 int m_occurrenceMultiplier; 0053 0054 /// Its type 0055 eMyMoney::Schedule::Type m_type; 0056 0057 /// The date the schedule commences 0058 QDate m_startDate; 0059 0060 /// The payment type 0061 eMyMoney::Schedule::PaymentType m_paymentType; 0062 0063 /// Can the amount vary 0064 bool m_fixed; 0065 0066 /// The, possibly estimated, amount plus all other relevant details 0067 MyMoneyTransaction m_transaction; 0068 0069 /// The last transaction date if the schedule does end at a fixed date 0070 QDate m_endDate; 0071 0072 /// the last day in month flag 0073 bool m_lastDayInMonth; 0074 0075 /// Enter the transaction into the register automatically 0076 bool m_autoEnter; 0077 0078 /// Internal date used for calculations 0079 QDate m_lastPayment; 0080 0081 /// The name 0082 QString m_name; 0083 0084 /// The recorded payments 0085 QList<QDate> m_recordedPayments; 0086 0087 /// The weekend option 0088 eMyMoney::Schedule::WeekendOption m_weekendOption; 0089 }; 0090 0091 #endif