summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views/kforecastview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/views/kforecastview.cpp')
-rw-r--r--kmymoney2/views/kforecastview.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kmymoney2/views/kforecastview.cpp b/kmymoney2/views/kforecastview.cpp
index d636ec4..9ea9f80 100644
--- a/kmymoney2/views/kforecastview.cpp
+++ b/kmymoney2/views/kforecastview.cpp
@@ -21,8 +21,8 @@
#include <tqspinbox.h>
#include <tqlabel.h>
#include <tqbuttongroup.h>
-#include <tqtextedit.h>
-#include <tqlayout.h>
+#include <textedit.h>
+#include <layout.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -68,7 +68,7 @@ KForecastView::KForecastView(TQWidget *parent, const char *name) :
m_advancedList->setAllColumnsShowFocus(true);
m_forecastChart = new KReportChartView(m_tabChart, "forecastChart" );
- m_forecastChart->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+ m_forecastChart->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
loadForecastSettings();
@@ -292,13 +292,13 @@ void KForecastView::loadSummaryView(void)
case -1:
break;
case 0:
- msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The balance of %2 is below the minimum balance %3 today.").tqarg(acc.name()).tqarg(minBalance.formatMoney(acc, currency));
+ msg = TQString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The balance of %2 is below the minimum balance %3 today.").arg(acc.name()).arg(minBalance.formatMoney(acc, currency));
msg += TQString("</font>");
break;
default:
- msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").tqarg(acc.name()).tqarg(minBalance.formatMoney(acc, currency)).tqarg(dropMinimum-1);
+ msg = TQString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").arg(acc.name()).arg(minBalance.formatMoney(acc, currency)).arg(dropMinimum-1);
msg += TQString("</font>");
}
@@ -314,25 +314,25 @@ void KForecastView::loadSummaryView(void)
break;
case 0:
if(acc.accountGroup() == MyMoneyAccount::Asset) {
- msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The balance of %1 is below %2 today.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency));
+ msg = TQString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The balance of %1 is below %2 today.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency));
msg += TQString("</font>");
break;
}
if(acc.accountGroup() == MyMoneyAccount::Liability) {
- msg = i18n("The balance of %1 is above %2 today.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency));
+ msg = i18n("The balance of %1 is above %2 today.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency));
break;
}
break;
default:
if(acc.accountGroup() == MyMoneyAccount::Asset) {
- msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The balance of %1 will drop below %2 in %3 days.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)).tqarg(dropZero);
+ msg = TQString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The balance of %1 will drop below %2 in %3 days.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)).arg(dropZero);
msg += TQString("</font>");
break;
}
if(acc.accountGroup() == MyMoneyAccount::Liability) {
- msg = i18n("The balance of %1 will raise above %2 in %3 days.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)).tqarg(dropZero);
+ msg = i18n("The balance of %1 will raise above %2 in %3 days.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)).arg(dropZero);
break;
}
}
@@ -344,8 +344,8 @@ void KForecastView::loadSummaryView(void)
msg = TQString();
MyMoneyMoney accCycleVariation = forecast.accountCycleVariation(acc);
if (accCycleVariation < MyMoneyMoney(0, 1)) {
- msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
- msg += i18n("The account %1 is decreasing %2 per cycle.").tqarg(acc.name()).tqarg(accCycleVariation.formatMoney(acc, currency));
+ msg = TQString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name());
+ msg += i18n("The account %1 is decreasing %2 per cycle.").arg(acc.name()).arg(accCycleVariation.formatMoney(acc, currency));
msg += TQString("</font>");
}
@@ -393,22 +393,22 @@ void KForecastView::loadAdvancedView(void)
int accountColumn = m_advancedList->addColumn(i18n("Account"), -1);
//if beginning of forecast is today, set the begin day to next cycle to avoid repeating the first cycle
- if(TQDate::tqcurrentDate() < forecast.beginForecastDate()) {
- daysToBeginDay = TQDate::tqcurrentDate().daysTo(forecast.beginForecastDate());
+ if(TQDate::currentDate() < forecast.beginForecastDate()) {
+ daysToBeginDay = TQDate::currentDate().daysTo(forecast.beginForecastDate());
} else {
daysToBeginDay = forecast.accountsCycle();
}
//add columns
for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) {
- int col = m_advancedList->addColumn(i18n("Min Bal %1").tqarg(i), -1);
+ int col = m_advancedList->addColumn(i18n("Min Bal %1").arg(i), -1);
m_advancedList->setColumnAlignment(col, TQt::AlignRight);
- m_advancedList->addColumn(i18n("Min Date %1").tqarg(i), -1);
+ m_advancedList->addColumn(i18n("Min Date %1").arg(i), -1);
}
for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) {
- int col = m_advancedList->addColumn(i18n("Max Bal %1").tqarg(i), -1);
+ int col = m_advancedList->addColumn(i18n("Max Bal %1").arg(i), -1);
m_advancedList->setColumnAlignment(col, TQt::AlignRight);
- m_advancedList->addColumn(i18n("Max Date %1").tqarg(i), -1);
+ m_advancedList->addColumn(i18n("Max Date %1").arg(i), -1);
}
int col = m_advancedList->addColumn(i18n("Average"), -1);
m_advancedList->setColumnAlignment(col, TQt::AlignRight);
@@ -486,10 +486,10 @@ void KForecastView::loadBudgetView(void)
m_budgetList->setBaseCurrency(file->baseCurrency());
//get the settings from current page and calculate this year based on last year
- TQDate historyEndDate = TQDate(TQDate::tqcurrentDate().year()-1, 12, 31);
+ TQDate historyEndDate = TQDate(TQDate::currentDate().year()-1, 12, 31);
TQDate historyStartDate = historyEndDate.addDays(-m_accountsCycle->value() * m_forecastCycles->value());
- TQDate forecastStartDate = TQDate(TQDate::tqcurrentDate().year(), 1, 1);
- TQDate forecastEndDate = TQDate::tqcurrentDate().addDays(m_forecastDays->value());
+ TQDate forecastStartDate = TQDate(TQDate::currentDate().year(), 1, 1);
+ TQDate forecastEndDate = TQDate::currentDate().addDays(m_forecastDays->value());
forecast.setHistoryMethod(m_historyMethod->selectedId());
MyMoneyBudget budget;
@@ -658,7 +658,7 @@ void KForecastView::loadChartView(void)
reportCfg.setColumnsAreDays( true );
reportCfg.setConvertCurrency( true );
reportCfg.setIncludingForecast( true );
- reportCfg.setDateFilter(TQDate::tqcurrentDate(),TQDate::tqcurrentDate().addDays(m_forecastDays->value()));
+ reportCfg.setDateFilter(TQDate::currentDate(),TQDate::currentDate().addDays(m_forecastDays->value()));
reports::PivotTable table(reportCfg);