summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views/khomeview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/views/khomeview.cpp')
-rw-r--r--kmymoney2/views/khomeview.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp
index ba6af3a..be92c29 100644
--- a/kmymoney2/views/khomeview.cpp
+++ b/kmymoney2/views/khomeview.cpp
@@ -311,7 +311,7 @@ void KHomeView::showNetWorthGraph(void)
reportCfg.setColumnsAreDays( true );
reportCfg.setConvertCurrency( true );
reportCfg.setIncludingForecast( true );
- reportCfg.setDateFilter(TQDate::tqcurrentDate(),TQDate::tqcurrentDate().addDays(+90));
+ reportCfg.setDateFilter(TQDate::currentDate(),TQDate::currentDate().addDays(+90));
reports::PivotTable table(reportCfg);
@@ -383,8 +383,8 @@ void KHomeView::showPayments(void)
schedule = file->scheduleList("", MyMoneySchedule::TYPE_ANY,
MyMoneySchedule::OCCUR_ANY,
MyMoneySchedule::STYPE_ANY,
- TQDate::tqcurrentDate(),
- TQDate::tqcurrentDate().addMonths(1));
+ TQDate::currentDate(),
+ TQDate::currentDate().addMonths(1));
overdues = file->scheduleList("", MyMoneySchedule::TYPE_ANY,
MyMoneySchedule::OCCUR_ANY,
MyMoneySchedule::STYPE_ANY,
@@ -455,7 +455,7 @@ void KHomeView::showPayments(void)
// determine number of overdue payments
TQDate nextDate = (*it).adjustedNextDueDate();
int cnt = 0;
- while(nextDate.isValid() && nextDate < TQDate::tqcurrentDate()) {
+ while(nextDate.isValid() && nextDate < TQDate::currentDate()) {
++cnt;
nextDate = (*it).nextPayment(nextDate);
// for single occurence nextDate will not change, so we
@@ -486,12 +486,12 @@ void KHomeView::showPayments(void)
TQValueList<MyMoneySchedule> todays;
TQValueList<MyMoneySchedule>::Iterator t_it;
for (t_it=schedule.begin(); t_it!=schedule.end();) {
- if ((*t_it).nextDueDate() == TQDate::tqcurrentDate()) {
+ if ((*t_it).nextDueDate() == TQDate::currentDate()) {
todays.append(*t_it);
(*t_it).setNextDueDate((*t_it).nextPayment((*t_it).nextDueDate()));
- //if nextDueDate is still tqcurrentDate then remove it from scheduled payments
- if ((*t_it).nextDueDate() == TQDate::tqcurrentDate()) {
+ //if nextDueDate is still currentDate then remove it from scheduled payments
+ if ((*t_it).nextDueDate() == TQDate::currentDate()) {
t_it = schedule.remove(t_it);
continue;
}
@@ -560,7 +560,7 @@ void KHomeView::showPayments(void)
cnt = (m_showAllSchedules) ? -1 : 6;
bool needMoreLess = m_showAllSchedules;
- TQDate lastDate = TQDate::tqcurrentDate().addMonths(1);
+ TQDate lastDate = TQDate::currentDate().addMonths(1);
qBubbleSort(schedule);
do {
it = schedule.begin();
@@ -812,7 +812,7 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc)
showAccountEntry(acc, value, MyMoneyMoney(), showLimit);
} else {
//get balance for normal accounts
- value = file->balance(acc.id(), TQDate::tqcurrentDate());
+ value = file->balance(acc.id(), TQDate::currentDate());
//if credit card or checkings account, show maximum credit
if( acc.accountType() == MyMoneyAccount::CreditCard ||
@@ -955,7 +955,7 @@ void KHomeView::showForecast(void)
int colspan = 1;
// get begin day
- int beginDay = TQDate::tqcurrentDate().daysTo(m_forecast.beginForecastDate());
+ int beginDay = TQDate::currentDate().daysTo(m_forecast.beginForecastDate());
// if begin day is today skip to next cycle
if(beginDay == 0)
beginDay = m_forecast.accountsCycle();
@@ -1003,7 +1003,7 @@ void KHomeView::showForecast(void)
}
for (int f = beginDay; f <= m_forecast.forecastDays(); f += m_forecast.accountsCycle()) {
- forecastBalance = m_forecast.forecastBalance(*it_account, TQDate::tqcurrentDate().addDays(f));
+ forecastBalance = m_forecast.forecastBalance(*it_account, TQDate::currentDate().addDays(f));
TQString amount;
amount = forecastBalance.formatMoney( *it_account, currency);
amount.replace(" ","&nbsp;");
@@ -1268,12 +1268,12 @@ void KHomeView::showAssetsLiabilities(void)
if( (*asset_it).accountType() == MyMoneyAccount::Investment) {
value = investmentBalance(*asset_it);
} else {
- value = MyMoneyFile::instance()->balance((*asset_it).id(), TQDate::tqcurrentDate());
+ value = MyMoneyFile::instance()->balance((*asset_it).id(), TQDate::currentDate());
}
//calculate balance for foreign currency accounts
if((*asset_it).currencyId() != file->baseCurrency().id()) {
ReportAccount repAcc = ReportAccount((*asset_it).id());
- MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
+ MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::currentDate());
MyMoneyMoney baseValue = value * curPrice;
baseValue = baseValue.convert(10000);
netAssets += baseValue;
@@ -1294,11 +1294,11 @@ void KHomeView::showAssetsLiabilities(void)
//write a liability account
if(liabilities_it != nameLiabilitiesIdx.end()) {
MyMoneyMoney value;
- value = MyMoneyFile::instance()->balance((*liabilities_it).id(), TQDate::tqcurrentDate());
+ value = MyMoneyFile::instance()->balance((*liabilities_it).id(), TQDate::currentDate());
//calculate balance if foreign currency
if((*liabilities_it).currencyId() != file->baseCurrency().id()) {
ReportAccount repAcc = ReportAccount((*liabilities_it).id());
- MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
+ MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::currentDate());
MyMoneyMoney baseValue = value * curPrice;
baseValue = baseValue.convert(10000);
netLiabilities += baseValue;
@@ -1518,16 +1518,16 @@ void KHomeView::doForecast(void)
MyMoneyMoney KHomeView::forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, TQDate& paymentDate)
{
- //if paymentDate before or equal to tqcurrentDate set it to current date plus 1
+ //if paymentDate before or equal to currentDate set it to current date plus 1
//so we get to accumulate forecast balance correctly
- if(paymentDate <= TQDate::tqcurrentDate())
- paymentDate = TQDate::tqcurrentDate().addDays(1);
+ if(paymentDate <= TQDate::currentDate())
+ paymentDate = TQDate::currentDate().addDays(1);
//check if the account is already there
if(m_accountList.find(acc.id()) == m_accountList.end()
|| m_accountList[acc.id()].find(paymentDate) == m_accountList[acc.id()].end())
{
- if(paymentDate == TQDate::tqcurrentDate()) {
+ if(paymentDate == TQDate::currentDate()) {
m_accountList[acc.id()][paymentDate] = m_forecast.forecastBalance(acc, paymentDate);
} else {
m_accountList[acc.id()][paymentDate] = m_forecast.forecastBalance(acc, paymentDate.addDays(-1));
@@ -1547,8 +1547,8 @@ void KHomeView::showCashFlowSummary()
int prec = MyMoneyMoney::denomToPrec(file->baseCurrency().smallestAccountFraction());
//set start and end of month dates
- TQDate startOfMonth = TQDate(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), 1);
- TQDate endOfMonth = TQDate(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), TQDate::tqcurrentDate().daysInMonth());
+ TQDate startOfMonth = TQDate(TQDate::currentDate().year(), TQDate::currentDate().month(), 1);
+ TQDate endOfMonth = TQDate(TQDate::currentDate().year(), TQDate::currentDate().month(), TQDate::currentDate().daysInMonth());
//Add total income and expenses for this month
//get transactions for current month
@@ -1660,8 +1660,8 @@ void KHomeView::showCashFlowSummary()
MyMoneyAccount acc = file->account((*it_s).accountId());
// collect all overdues on the first day
TQDate schedDate = nextDate;
- if(TQDate::tqcurrentDate() >= nextDate)
- schedDate = TQDate::tqcurrentDate().addDays(1);
+ if(TQDate::currentDate() >= nextDate)
+ schedDate = TQDate::currentDate().addDays(1);
balanceMap[acc.id()] += file->balance(acc.id());
}
@@ -1680,7 +1680,7 @@ void KHomeView::showCashFlowSummary()
//convert to foreign currency if needed
if(repSplitAcc.currencyId() != file->baseCurrency().id()) {
- MyMoneyMoney curPrice = repSplitAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
+ MyMoneyMoney curPrice = repSplitAcc.baseCurrencyPrice(TQDate::currentDate());
value = value * curPrice;
value = value.convert(10000);
}
@@ -1733,11 +1733,11 @@ void KHomeView::showCashFlowSummary()
case MyMoneyAccount::Savings:
case MyMoneyAccount::Cash:
{
- MyMoneyMoney value = MyMoneyFile::instance()->balance((*account_it).id(), TQDate::tqcurrentDate());
+ MyMoneyMoney value = MyMoneyFile::instance()->balance((*account_it).id(), TQDate::currentDate());
//calculate balance for foreign currency accounts
if((*account_it).currencyId() != file->baseCurrency().id()) {
ReportAccount repAcc = ReportAccount((*account_it).id());
- MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
+ MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::currentDate());
MyMoneyMoney baseValue = value * curPrice;
liquidAssets += baseValue;
liquidAssets = liquidAssets.convert(10000);
@@ -1750,11 +1750,11 @@ void KHomeView::showCashFlowSummary()
case MyMoneyAccount::CreditCard:
{
MyMoneyMoney value;
- value = MyMoneyFile::instance()->balance((*account_it).id(), TQDate::tqcurrentDate());
+ value = MyMoneyFile::instance()->balance((*account_it).id(), TQDate::currentDate());
//calculate balance if foreign currency
if((*account_it).currencyId() != file->baseCurrency().id()) {
ReportAccount repAcc = ReportAccount((*account_it).id());
- MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate());
+ MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::currentDate());
MyMoneyMoney baseValue = value * curPrice;
liquidLiabilities += baseValue;
liquidLiabilities = liquidLiabilities.convert(10000);