From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: TQt4 port kmymoney This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/mymoney/mymoneyforecast.h | 74 ++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'kmymoney2/mymoney/mymoneyforecast.h') diff --git a/kmymoney2/mymoney/mymoneyforecast.h b/kmymoney2/mymoney/mymoneyforecast.h index f69e596..7291b2b 100644 --- a/kmymoney2/mymoney/mymoneyforecast.h +++ b/kmymoney2/mymoney/mymoneyforecast.h @@ -25,9 +25,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include -#include -#include +#include +#include +#include // ---------------------------------------------------------------------------- // Project Includes @@ -59,7 +59,7 @@ public: /** * Returns the list of accounts to be forecast. */ - QValueList accountList(void); + TQValueList accountList(void); /** * Returns the balance trend for account @a acc based on a number of days @p forecastDays @@ -69,9 +69,9 @@ public: static MyMoneyMoney calculateAccountTrend(const MyMoneyAccount& acc, int forecastDays); /** - * Returns the forecast balance trend for account @a acc for day @p QDate + * Returns the forecast balance trend for account @a acc for day @p TQDate */ - MyMoneyMoney forecastBalance(const MyMoneyAccount& acc, QDate forecastDate); + MyMoneyMoney forecastBalance(const MyMoneyAccount& acc, TQDate forecastDate); /** * Returns the forecast balance trend for account @a acc for offset @p int @@ -111,12 +111,12 @@ public: /** * returns a list of the dates where the account was on its lowest balance in each cycle */ - QValueList accountMinimumBalanceDateList(const MyMoneyAccount& acc); + TQValueList accountMinimumBalanceDateList(const MyMoneyAccount& acc); /** * returns a list of the dates where the account was on its highest balance in each cycle */ - QValueList accountMaximumBalanceDateList(const MyMoneyAccount& acc); + TQValueList accountMaximumBalanceDateList(const MyMoneyAccount& acc); /** * returns the average balance of the account within the forecast period @@ -126,7 +126,7 @@ public: /** * creates a budget based on the history of a given timeframe */ - void createBudget(MyMoneyBudget& budget, QDate historyStart, QDate historyEnd, QDate budgetStart, QDate budgetEnd, const bool returnBudget); + void createBudget(MyMoneyBudget& budget, TQDate historyStart, TQDate historyEnd, TQDate budgetStart, TQDate budgetEnd, const bool returnBudget); /** * number of days to go back in history to calculate forecast @@ -136,15 +136,15 @@ public: void setAccountsCycle(int accountsCycle) { m_accountsCycle = accountsCycle; } void setForecastCycles(int forecastCycles) { m_forecastCycles = forecastCycles; } void setForecastDays(int forecastDays) { m_forecastDays = forecastDays; } - void setBeginForecastDate(QDate beginForecastDate) { m_beginForecastDate = beginForecastDate; } + void setBeginForecastDate(TQDate beginForecastDate) { m_beginForecastDate = beginForecastDate; } void setBeginForecastDay(int beginDay) { m_beginForecastDay = beginDay; } void setForecastMethod(int forecastMethod) { m_forecastMethod = forecastMethod; } - void setHistoryStartDate(QDate historyStartDate) { m_historyStartDate = historyStartDate; } - void setHistoryEndDate(QDate historyEndDate) { m_historyEndDate = historyEndDate; } - void setHistoryStartDate(int daysToStartDate) { setHistoryStartDate(QDate::currentDate().addDays(-daysToStartDate)); } - void setHistoryEndDate(int daysToEndDate) { setHistoryEndDate(QDate::currentDate().addDays(-daysToEndDate)); } - void setForecastStartDate(QDate _startDate) { m_forecastStartDate = _startDate; } - void setForecastEndDate(QDate _endDate) { m_forecastEndDate = _endDate; } + void setHistoryStartDate(TQDate historyStartDate) { m_historyStartDate = historyStartDate; } + void setHistoryEndDate(TQDate historyEndDate) { m_historyEndDate = historyEndDate; } + void setHistoryStartDate(int daysToStartDate) { setHistoryStartDate(TQDate::tqcurrentDate().addDays(-daysToStartDate)); } + void setHistoryEndDate(int daysToEndDate) { setHistoryEndDate(TQDate::tqcurrentDate().addDays(-daysToEndDate)); } + void setForecastStartDate(TQDate _startDate) { m_forecastStartDate = _startDate; } + void setForecastEndDate(TQDate _endDate) { m_forecastEndDate = _endDate; } void setSkipOpeningDate(bool _skip) { m_skipOpeningDate = _skip; } void setHistoryMethod(int historyMethod) { m_historyMethod = historyMethod; } void setIncludeUnusedAccounts(bool _bool) { m_includeUnusedAccounts = _bool; } @@ -155,13 +155,13 @@ public: int accountsCycle(void) const { return m_accountsCycle; } int forecastCycles(void) const { return m_forecastCycles; } int forecastDays(void) const { return m_forecastDays; } - QDate beginForecastDate(void) const { return m_beginForecastDate; } + TQDate beginForecastDate(void) const { return m_beginForecastDate; } int beginForecastDay(void) const { return m_beginForecastDay; } int forecastMethod(void) const { return m_forecastMethod; } - QDate historyStartDate(void) const { return m_historyStartDate; } - QDate historyEndDate(void) const { return m_historyEndDate; } - QDate forecastStartDate(void) const { return m_forecastStartDate; } - QDate forecastEndDate(void) const { return m_forecastEndDate; } + TQDate historyStartDate(void) const { return m_historyStartDate; } + TQDate historyEndDate(void) const { return m_historyEndDate; } + TQDate forecastStartDate(void) const { return m_forecastStartDate; } + TQDate forecastEndDate(void) const { return m_forecastEndDate; } bool skipOpeningDate(void) const { return m_skipOpeningDate; } int historyMethod(void) const { return m_historyMethod; } bool isIncludingUnusedAccounts(void) const { return m_includeUnusedAccounts; } @@ -175,11 +175,11 @@ public: * * @param schedule const reference to the schedule the transaction is based on * @param transaction reference to the transaction to be checked and modified - * @param balances QMap of (account-id,balance) pairs to be used as current balance + * @param balances TQMap of (account-id,balance) pairs to be used as current balance * for the calculation of interest. If map is empty, the engine * will be interrogated for current balances. */ - static void calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const QMap& balances); + static void calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const TQMap& balances); private: @@ -188,22 +188,22 @@ private: /** * daily balances of an account */ - typedef QMap dailyBalances; + typedef TQMap dailyBalances; /** * map of trends of an account */ - typedef QMap trendBalances; + typedef TQMap trendBalances; /** * Returns the list of accounts to be forecast. Only Asset and Liability are returned. */ - static QValueList forecastAccountList(void); + static TQValueList forecastAccountList(void); /** * Returns the list of accounts to create a budget. Only Income and Expenses are returned. */ - QValueList budgetAccountList(void); + TQValueList budgetAccountList(void); /** * calculate daily forecast balance based on historic transactions @@ -300,27 +300,27 @@ private: * remove accounts from the list if the accounts has no transactions in the forecast timeframe. * Used for scheduled-forecast method. */ - void purgeForecastAccountsList(QMap& accountList); + void purgeForecastAccountsList(TQMap& accountList); /** * daily forecast balance of accounts */ - QMap m_accountList; + TQMap m_accountList; /** * daily past balance of accounts */ - QMap m_accountListPast; + TQMap m_accountListPast; /** * daily forecast trends of accounts */ - QMap m_accountTrendList; + TQMap m_accountTrendList; /** * list of forecast accounts */ - QMap m_nameIdx; + TQMap m_nameIdx; /** * cycle of accounts in days @@ -340,7 +340,7 @@ private: /** * date to start forecast */ - QDate m_beginForecastDate; + TQDate m_beginForecastDate; /** * day to start forecast @@ -360,22 +360,22 @@ private: /** * start date of history */ - QDate m_historyStartDate; + TQDate m_historyStartDate; /** * end date of history */ - QDate m_historyEndDate; + TQDate m_historyEndDate; /** * start date of forecast */ - QDate m_forecastStartDate; + TQDate m_forecastStartDate; /** * end date of forecast */ - QDate m_forecastEndDate; + TQDate m_forecastEndDate; /** * skip opening date when fetching transactions of an account -- cgit v1.2.1