summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views/khomeview.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-15 15:31:01 -0600
committerTimothy Pearson <[email protected]>2011-12-15 15:31:01 -0600
commit252fce5a2a5384702fbcc1c9987284d7bd2e6943 (patch)
treed5768ff1e9065f29bec60c94d31880b38b4e82f2 /kmymoney2/views/khomeview.cpp
parent69ef6c4beaa37474a2170d0bfe842de647f53102 (diff)
downloadkmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.tar.gz
kmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmymoney2/views/khomeview.cpp')
-rw-r--r--kmymoney2/views/khomeview.cpp216
1 files changed, 108 insertions, 108 deletions
diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp
index ba6af3a..e96744f 100644
--- a/kmymoney2/views/khomeview.cpp
+++ b/kmymoney2/views/khomeview.cpp
@@ -23,14 +23,14 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <tqlayout.h>
+#include <layout.h>
#include <tqdatetime.h>
#include <tqapplication.h>
#include <dom/dom_element.h>
#include <dom/dom_doc.h>
#include <dom/dom_text.h>
#include <tqfile.h>
-#include <tqtextstream.h>
+#include <textstream.h>
#include <tqtimer.h>
#include <tqbuffer.h>
@@ -101,10 +101,10 @@ void KHomeView::Private::addNameIndex(TQMap<TQString, MyMoneyAccount> &idx, cons
} else if(idx[key].id() != account.id()) {
key = account.name() + "[%1]";
int dup = 2;
- while(!idx[key.tqarg(dup)].id().isEmpty()
- && idx[key.tqarg(dup)].id() != account.id())
+ while(!idx[key.arg(dup)].id().isEmpty()
+ && idx[key.arg(dup)].id() != account.id())
++dup;
- idx[key.tqarg(dup)] = account;
+ idx[key.arg(dup)] = account;
}
}
@@ -215,7 +215,7 @@ void KHomeView::loadView(void)
m_forecast.setForecastDone(false);
TQString filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css");
- TQString header = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">\n").tqarg(filename);
+ TQString header = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">\n").arg(filename);
header += KMyMoneyUtils::variableCSS();
@@ -226,7 +226,7 @@ void KHomeView::loadView(void)
m_part->begin();
m_part->write(header);
- m_part->write(TQString("<div id=\"summarytitle\">%1</div>").tqarg(i18n("Your Financial Summary")));
+ m_part->write(TQString("<div id=\"summarytitle\">%1</div>").arg(i18n("Your Financial Summary")));
TQStringList settings = KMyMoneyGlobalSettings::itemList();
@@ -291,7 +291,7 @@ void KHomeView::loadView(void)
void KHomeView::showNetWorthGraph(void)
{
#ifdef HAVE_KDCHART
- m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").tqarg(i18n("Networth Forecast")));
+ m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").arg(i18n("Networth Forecast")));
MyMoneyReport reportCfg = MyMoneyReport(
MyMoneyReport::eAssetLiability,
@@ -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);
@@ -361,7 +361,7 @@ void KHomeView::showNetWorthGraph(void)
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
m_part->write("<tr>");
- m_part->write(TQString("<td><center><IMG SRC=\"data:image/png;base64,%1\" ALT=\"Networth\"></center></td>").tqarg(TQString(KCodecs::base64Encode(ba))));
+ m_part->write(TQString("<td><center><IMG SRC=\"data:image/png;base64,%1\" ALT=\"Networth\"></center></td>").arg(TQString(KCodecs::base64Encode(ba))));
m_part->write("</tr>");
m_part->write("</table></div></div>");
@@ -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,
@@ -422,7 +422,7 @@ void KHomeView::showPayments(void)
}
m_part->write("<div class=\"shadow\"><div class=\"displayblock\">");
- m_part->write(TQString("<div class=\"summaryheader\">%1</div>\n").tqarg(i18n("Payments")));
+ m_part->write(TQString("<div class=\"summaryheader\">%1</div>\n").arg(i18n("Payments")));
if(overdues.count() > 0) {
m_part->write("<div class=\"gap\">&nbsp;</div>\n");
@@ -432,7 +432,7 @@ void KHomeView::showPayments(void)
TQValueList<MyMoneySchedule>::Iterator it_f;
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
- m_part->write(TQString("<tr class=\"itemtitle warningtitle\" ><td colspan=\"5\">%1</td></tr>\n").tqarg(showColoredAmount(i18n("Overdue payments"), true)));
+ m_part->write(TQString("<tr class=\"itemtitle warningtitle\" ><td colspan=\"5\">%1</td></tr>\n").arg(showColoredAmount(i18n("Overdue payments"), true)));
m_part->write("<tr class=\"item warning\">");
m_part->write("<td class=\"left\" width=\"10%\">");
m_part->write(i18n("Date"));
@@ -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
@@ -464,7 +464,7 @@ void KHomeView::showPayments(void)
break;
}
- m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
showPaymentEntry(*it, cnt);
m_part->write("</tr>");
// make sure to not repeat overdues later again
@@ -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;
}
@@ -502,7 +502,7 @@ void KHomeView::showPayments(void)
if (todays.count() > 0) {
m_part->write("<div class=\"gap\">&nbsp;</div>\n");
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
- m_part->write(TQString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").tqarg(i18n("Today's payments")));
+ m_part->write(TQString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").arg(i18n("Today's payments")));
m_part->write("<tr class=\"item\">");
m_part->write("<td class=\"left\" width=\"10%\">");
m_part->write(i18n("Date"));
@@ -522,7 +522,7 @@ void KHomeView::showPayments(void)
m_part->write("</tr>");
for(t_it = todays.begin(); t_it != todays.end(); ++t_it) {
- m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
showPaymentEntry(*t_it);
m_part->write("</tr>");
}
@@ -536,7 +536,7 @@ void KHomeView::showPayments(void)
TQValueList<MyMoneySchedule>::Iterator it;
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
- m_part->write(TQString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").tqarg(i18n("Future payments")));
+ m_part->write(TQString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").arg(i18n("Future payments")));
m_part->write("<tr class=\"item\">");
m_part->write("<td class=\"left\" width=\"10%\">");
m_part->write(i18n("Date"));
@@ -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();
@@ -585,7 +585,7 @@ void KHomeView::showPayments(void)
if(cnt > 0)
--cnt;
- m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
showPaymentEntry(*it);
m_part->write("</tr>");
@@ -602,12 +602,12 @@ void KHomeView::showPayments(void)
while(1);
if (needMoreLess) {
- m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
m_part->write("<td>");
if(m_showAllSchedules) {
- m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").tqarg("reduced")) + i18n("Less...") + linkend());
+ m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").arg("reduced")) + i18n("Less...") + linkend());
} else {
- m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").tqarg("full")) + i18n("More...") + linkend());
+ m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").arg("full")) + i18n("More...") + linkend());
}
m_part->write("</td><td></td><td></td><td></td><td></td>");
m_part->write("</tr>");
@@ -642,16 +642,16 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt)
KGlobal::locale()->formatDate(sched.adjustedNextDueDate(), true) +
"</td><td>";
if(pathEnter.length() > 0)
- tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=enter").tqarg(sched.id()), i18n("Enter schedule")) + TQString("<img src=\"file://%1\" border=\"0\"></a>").tqarg(pathEnter) + linkend();
+ tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=enter").arg(sched.id()), i18n("Enter schedule")) + TQString("<img src=\"file://%1\" border=\"0\"></a>").arg(pathEnter) + linkend();
if(pathSkip.length() > 0)
- tmp += "&nbsp;" + link(VIEW_SCHEDULE, TQString("?id=%1&mode=skip").tqarg(sched.id()), i18n("Skip schedule")) + TQString("<img src=\"file://%1\" border=\"0\"></a>").tqarg(pathSkip) + linkend();
+ tmp += "&nbsp;" + link(VIEW_SCHEDULE, TQString("?id=%1&mode=skip").arg(sched.id()), i18n("Skip schedule")) + TQString("<img src=\"file://%1\" border=\"0\"></a>").arg(pathSkip) + linkend();
tmp += TQString("&nbsp;");
- tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=edit").tqarg(sched.id()), i18n("Edit schedule")) + sched.name() + linkend();
+ tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=edit").arg(sched.id()), i18n("Edit schedule")) + sched.name() + linkend();
//show quantity of payments overdue if any
if(cnt > 1)
- tmp += i18n(" (%1 payments)").tqarg(cnt);
+ tmp += i18n(" (%1 payments)").arg(cnt);
//show account of the main split
tmp += "</td><td>";
@@ -788,7 +788,7 @@ void KHomeView::showAccounts(KHomeView::paymentTypeE type, const TQString& heade
TQMap<TQString, MyMoneyAccount>::const_iterator it_m;
for(it_m = nameIdx.begin(); it_m != nameIdx.end(); ++it_m) {
- m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
showAccountEntry(*it_m);
m_part->write("</tr>");
}
@@ -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 ||
@@ -846,10 +846,10 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney&
}
tmp = TQString("<td>") +
- link(VIEW_LEDGER, TQString("?id=%1").tqarg(acc.id())) + acc.name() + linkend() + "</td>";
+ link(VIEW_LEDGER, TQString("?id=%1").arg(acc.id())) + acc.name() + linkend() + "</td>";
//show account balance
- tmp += TQString("<td class=\"right\">%1</td>").tqarg(showColoredAmount(amount, value.isNegative()));
+ tmp += TQString("<td class=\"right\">%1</td>").arg(showColoredAmount(amount, value.isNegative()));
//show minimum balance column if requested
if(showMinBal) {
@@ -858,7 +858,7 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney&
tmp += TQString("<td class=\"right\">&nbsp;</td>");
} else {
//show minimum balance entry
- tmp += TQString("<td class=\"right\">%1</td>").tqarg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative()));
+ tmp += TQString("<td class=\"right\">%1</td>").arg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative()));
}
}
// qDebug("accountEntry = '%s'", tmp.latin1());
@@ -886,7 +886,7 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc)
val = val.convert(acc.fraction());
value += val;
} catch(MyMoneyException* e) {
- qWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").tqarg(stock.name(), e->what())).data());
+ qWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what())).data());
delete e;
}
}
@@ -906,7 +906,7 @@ void KHomeView::showFavoriteReports(void)
{
if ( (*it_report).isFavorite() ) {
if(firstTime) {
- m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").tqarg(i18n("Favorite Reports")));
+ m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").arg(i18n("Favorite Reports")));
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
m_part->write("<tr class=\"item\"><td class=\"left\" width=\"40%\">");
m_part->write(i18n("Report"));
@@ -917,11 +917,11 @@ void KHomeView::showFavoriteReports(void)
}
m_part->write(TQString("<tr class=\"row-%1\"><td>%2%3%4</td><td align=\"left\">%5</td></tr>")
- .tqarg(row++ & 0x01 ? "even" : "odd")
- .tqarg(link(VIEW_REPORTS, TQString("?id=%1").tqarg((*it_report).id())))
- .tqarg((*it_report).name())
- .tqarg(linkend())
- .tqarg((*it_report).comment())
+ .arg(row++ & 0x01 ? "even" : "odd")
+ .arg(link(VIEW_REPORTS, TQString("?id=%1").arg((*it_report).id())))
+ .arg((*it_report).name())
+ .arg(linkend())
+ .arg((*it_report).comment())
);
}
@@ -955,22 +955,22 @@ 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();
// Now output header
- m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").tqarg(i18n("%1 Day Forecast").tqarg(m_forecast.forecastDays())));
+ m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\">&nbsp;</div>\n").arg(i18n("%1 Day Forecast").arg(m_forecast.forecastDays())));
m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >");
m_part->write("<tr class=\"item\"><td class=\"left\" width=\"40%\">");
m_part->write(i18n("Account"));
m_part->write("</td>");
int colWidth = 55/ (m_forecast.forecastDays() / m_forecast.accountsCycle());
for(i = 0; (i*m_forecast.accountsCycle() + beginDay) <= m_forecast.forecastDays(); ++i) {
- m_part->write(TQString("<td width=\"%1%\" class=\"right\">").tqarg(colWidth));
+ m_part->write(TQString("<td width=\"%1%\" class=\"right\">").arg(colWidth));
- m_part->write(i18n("%1 days").tqarg(i*m_forecast.accountsCycle() + beginDay));
+ m_part->write(i18n("%1 days").arg(i*m_forecast.accountsCycle() + beginDay));
m_part->write("</td>");
colspan++;
}
@@ -983,9 +983,9 @@ void KHomeView::showForecast(void)
for(it_account = nameIdx.begin(); it_account != nameIdx.end(); ++it_account) {
//MyMoneyAccount acc = (*it_n);
- m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
m_part->write(TQString("<td width=\"40%\">") +
- link(VIEW_LEDGER, TQString("?id=%1").tqarg((*it_account).id())) + (*it_account).name() + linkend() + "</td>");
+ link(VIEW_LEDGER, TQString("?id=%1").arg((*it_account).id())) + (*it_account).name() + linkend() + "</td>");
int dropZero = -1; //account dropped below zero
int dropMinimum = -1; //account dropped below minimum balance
@@ -1003,12 +1003,12 @@ 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;");
- m_part->write(TQString("<td width=\"%1%\" align=\"right\">").tqarg(colWidth));
- m_part->write(TQString("%1</td>").tqarg(showColoredAmount(amount, forecastBalance.isNegative())));
+ m_part->write(TQString("<td width=\"%1%\" align=\"right\">").arg(colWidth));
+ m_part->write(TQString("%1</td>").arg(showColoredAmount(amount, forecastBalance.isNegative())));
}
m_part->write("</tr>");
@@ -1036,17 +1036,17 @@ void KHomeView::showForecast(void)
case -1:
break;
case 0:
- msg = i18n("The balance of %1 is below the minimum balance %2 today.").tqarg((*it_account).name()).tqarg(minBalance.formatMoney(*it_account, currency));
+ msg = i18n("The balance of %1 is below the minimum balance %2 today.").arg((*it_account).name()).arg(minBalance.formatMoney(*it_account, currency));
msg = showColoredAmount(msg, true);
break;
default:
- msg = i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").tqarg((*it_account).name()).tqarg(minBalance.formatMoney(*it_account, currency)).tqarg(dropMinimum-1);
+ msg = i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").arg((*it_account).name()).arg(minBalance.formatMoney(*it_account, currency)).arg(dropMinimum-1);
msg = showColoredAmount(msg, true);
break;
}
if(!msg.isEmpty()) {
- m_part->write(TQString("<tr class=\"warning\" style=\"font-weight: normal;\" ><td colspan=%2 align=\"center\" >%1</td></tr>").tqarg(msg).tqarg(colspan));
+ m_part->write(TQString("<tr class=\"warning\" style=\"font-weight: normal;\" ><td colspan=%2 align=\"center\" >%1</td></tr>").arg(msg).arg(colspan));
}
}
// a drop below zero is always shown
@@ -1056,28 +1056,28 @@ void KHomeView::showForecast(void)
break;
case 0:
if((*it_account).accountGroup() == MyMoneyAccount::Asset) {
- msg = i18n("The balance of %1 is below %2 today.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency));
+ msg = i18n("The balance of %1 is below %2 today.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency));
msg = showColoredAmount(msg, true);
break;
}
if((*it_account).accountGroup() == MyMoneyAccount::Liability) {
- msg = i18n("The balance of %1 is above %2 today.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency));
+ msg = i18n("The balance of %1 is above %2 today.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency));
break;
}
break;
default:
if((*it_account).accountGroup() == MyMoneyAccount::Asset) {
- msg = i18n("The balance of %1 will drop below %2 in %3 days.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)).tqarg(dropZero);
+ msg = i18n("The balance of %1 will drop below %2 in %3 days.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)).arg(dropZero);
msg = showColoredAmount(msg, true);
break;
}
if((*it_account).accountGroup() == MyMoneyAccount::Liability) {
- msg = i18n("The balance of %1 will raise above %2 in %3 days.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)).tqarg(dropZero);
+ msg = i18n("The balance of %1 will raise above %2 in %3 days.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)).arg(dropZero);
break;
}
}
if(!msg.isEmpty()) {
- m_part->write(TQString("<tr class=\"warning\"><td colspan=%2 align=\"center\" ><b>%1</b></td></tr>").tqarg(msg).tqarg(colspan));
+ m_part->write(TQString("<tr class=\"warning\"><td colspan=%2 align=\"center\" ><b>%1</b></td></tr>").arg(msg).arg(colspan));
}
}
m_part->write("</table></div></div>");
@@ -1090,9 +1090,9 @@ const TQString KHomeView::link(const TQString& view, const TQString& query, cons
TQString titlePart;
TQString title(_title);
if(!title.isEmpty())
- titlePart = TQString(" title=\"%1\"").tqarg(title.replace(" ", "&nbsp;"));
+ titlePart = TQString(" title=\"%1\"").arg(title.replace(" ", "&nbsp;"));
- return TQString("<a href=\"/%1%2\"%3>").tqarg(view, query, titlePart);
+ return TQString("<a href=\"/%1%2\"%3>").arg(view, query, titlePart);
}
const TQString KHomeView::linkend(void) const
@@ -1260,7 +1260,7 @@ void KHomeView::showAssetsLiabilities(void)
TQMap<TQString, MyMoneyAccount>::const_iterator asset_it = nameAssetsIdx.begin();
TQMap<TQString,MyMoneyAccount>::const_iterator liabilities_it = nameLiabilitiesIdx.begin();
for(; asset_it != nameAssetsIdx.end() || liabilities_it != nameLiabilitiesIdx.end();) {
- m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
//write an asset account if we still have any
if(asset_it != nameAssetsIdx.end()) {
MyMoneyMoney value;
@@ -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;
@@ -1325,23 +1325,23 @@ void KHomeView::showAssetsLiabilities(void)
amountLiabilities.replace(" ","&nbsp;");
amountNetWorth.replace(" ","&nbsp;");
- m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd"));
//print total for assets
- m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Total Assets")).tqarg(showColoredAmount(amountAssets, netAssets.isNegative())));
+ m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Total Assets")).arg(showColoredAmount(amountAssets, netAssets.isNegative())));
//leave the intermediate column empty
m_part->write("<td class=\"setcolor\"></td>");
//print total liabilities
- m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Total Liabilities")).tqarg(showColoredAmount(amountLiabilities, netLiabilities.isNegative())));
+ m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Total Liabilities")).arg(showColoredAmount(amountLiabilities, netLiabilities.isNegative())));
m_part->write("</tr>");
//print net worth
- m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd"));
m_part->write("<td></td><td></td><td class=\"setcolor\"></td>");
- m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Net Worth")).tqarg(showColoredAmount(amountNetWorth, netWorth.isNegative() )));
+ m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Net Worth")).arg(showColoredAmount(amountNetWorth, netWorth.isNegative() )));
m_part->write("</tr>");
m_part->write("</table>");
@@ -1402,9 +1402,9 @@ void KHomeView::showBudget(void)
TQString totalActualAmount = totalActualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
TQString totalBudgetDiffAmount = totalBudgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
- m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalBudgetAmount, totalBudgetValue.isNegative())));
- m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalActualAmount, totalActualValue.isNegative())));
- m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalBudgetDiffAmount, totalBudgetDiffValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalBudgetAmount, totalBudgetValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalActualAmount, totalActualValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalBudgetDiffAmount, totalBudgetDiffValue.isNegative())));
m_part->write("</tr>");
m_part->write("</table>");
@@ -1448,10 +1448,10 @@ void KHomeView::showBudget(void)
//write the outergroup if it is the first row of outergroup being shown
if(i == 0) {
m_part->write("<tr style=\"font-weight:bold;\">");
- m_part->write(TQString("<td class=\"left\" colspan=\"4\">%1</td>").tqarg(KMyMoneyUtils::accountTypeToString( rowname.accountType())));
+ m_part->write(TQString("<td class=\"left\" colspan=\"4\">%1</td>").arg(KMyMoneyUtils::accountTypeToString( rowname.accountType())));
m_part->write("</tr>");
}
- m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd"));
//get values from grid
MyMoneyMoney actualValue = it_row.data()[eActual][1];
@@ -1464,12 +1464,12 @@ void KHomeView::showBudget(void)
TQString budgetDiffAmount = budgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec);
//account name
- m_part->write(TQString("<td>") + link(VIEW_LEDGER, TQString("?id=%1").tqarg(rowname.id())) + rowname.name() + linkend() + "</td>");
+ m_part->write(TQString("<td>") + link(VIEW_LEDGER, TQString("?id=%1").arg(rowname.id())) + rowname.name() + linkend() + "</td>");
//show amounts
- m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(budgetAmount, budgetValue.isNegative())));
- m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(actualAmount, actualValue.isNegative())));
- m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(budgetDiffAmount, budgetDiffValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").arg(showColoredAmount(budgetAmount, budgetValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").arg(showColoredAmount(actualAmount, actualValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%1</td>").arg(showColoredAmount(budgetDiffAmount, budgetDiffValue.isNegative())));
m_part->write("</tr>");
}
++it_row;
@@ -1481,8 +1481,8 @@ void KHomeView::showBudget(void)
//if no negative differences are found, then inform that
if(i == 0) {
- m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd"));
- m_part->write(TQString("<td class=\"center\" colspan=\"4\">%1</td>").tqarg(i18n("No Budget Categories have been overrun")));
+ m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd"));
+ m_part->write(TQString("<td class=\"center\" colspan=\"4\">%1</td>").arg(i18n("No Budget Categories have been overrun")));
m_part->write("</tr>");
}
m_part->write("</table></div></div>");
@@ -1493,7 +1493,7 @@ TQString KHomeView::showColoredAmount(const TQString& amount, bool isNegative)
{
if(isNegative) {
//if negative, get the settings for negative numbers
- return TQString("<font color=\"%1\">%2</font>").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name(), amount);
+ return TQString("<font color=\"%1\">%2</font>").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name(), amount);
}
//if positive, return the same string
@@ -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);
@@ -1810,16 +1810,16 @@ void KHomeView::showCashFlowSummary()
m_part->write(TQString("<tr class=\"row-even\" style=\"font-weight:bold;\">"));
//print current income
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountIncome, incomeValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountIncome, incomeValue.isNegative())));
//print the scheduled income
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledIncome, scheduledIncome.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledIncome, scheduledIncome.isNegative())));
//print current expenses
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpense, expenseValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpense, expenseValue.isNegative())));
//print the scheduled expenses
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledExpense, scheduledExpense.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledExpense, scheduledExpense.isNegative())));
m_part->write("</tr>");
m_part->write("</table>");
@@ -1852,16 +1852,16 @@ void KHomeView::showCashFlowSummary()
m_part->write(TQString("<tr class=\"row-even\" style=\"font-weight:bold;\">"));
//print current liquid assets
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountLiquidAssets, liquidAssets.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountLiquidAssets, liquidAssets.isNegative())));
//print the scheduled transfers
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledLiquidTransfer, scheduledLiquidTransfer.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledLiquidTransfer, scheduledLiquidTransfer.isNegative())));
//print current liabilities
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountLiquidLiabilities, liquidLiabilities.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountLiquidLiabilities, liquidLiabilities.isNegative())));
//print the scheduled transfers
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledOtherTransfer, scheduledOtherTransfer.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledOtherTransfer, scheduledOtherTransfer.isNegative())));
m_part->write("</tr>");
@@ -1909,13 +1909,13 @@ void KHomeView::showCashFlowSummary()
m_part->write("<td>&nbsp;</td>");
//print expected assets
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpectedAsset, expectedAsset.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpectedAsset, expectedAsset.isNegative())));
//print expected liabilities
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpectedLiabilities, expectedLiabilities.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpectedLiabilities, expectedLiabilities.isNegative())));
//print expected profit
- m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountProfit, profitValue.isNegative())));
+ m_part->write(TQString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountProfit, profitValue.isNegative())));
m_part->write("</tr>");