summaryrefslogtreecommitdiffstats
path: root/kmymoney2/reports
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/reports')
-rw-r--r--kmymoney2/reports/kreportchartview.cpp12
-rw-r--r--kmymoney2/reports/listtable.cpp6
-rw-r--r--kmymoney2/reports/objectinfotable.cpp12
-rw-r--r--kmymoney2/reports/pivotgrid.cpp4
-rw-r--r--kmymoney2/reports/pivottable.cpp224
-rw-r--r--kmymoney2/reports/pivottabletest.cpp2
-rw-r--r--kmymoney2/reports/querytable.cpp30
-rw-r--r--kmymoney2/reports/reportaccount.cpp34
-rw-r--r--kmymoney2/reports/reportstestcommon.cpp12
9 files changed, 168 insertions, 168 deletions
diff --git a/kmymoney2/reports/kreportchartview.cpp b/kmymoney2/reports/kreportchartview.cpp
index 79a5b5d..208089f 100644
--- a/kmymoney2/reports/kreportchartview.cpp
+++ b/kmymoney2/reports/kreportchartview.cpp
@@ -95,7 +95,7 @@ KReportChartView::KReportChartView( TQWidget* parent, const char* name ): KDChar
// mouse tracking on will force the mouseMoveEvent() method to be called from TQt
label->setMouseTracking( true );
label->setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised );
- label->tqsetAlignment( AlignRight );
+ label->setAlignment( AlignRight );
label->setAutoResize( true );
}
@@ -151,17 +151,17 @@ void KReportChartView::mouseMoveEvent( TQMouseEvent* event )
{
// set the tooltip text
label->setText(TQString("<h2>%1</h2><strong>%2</strong><br>(%3\%)")
- .tqarg(this->params()->legendText( dataset ))
- .tqarg(value, 0, 'f', 2)
- .tqarg(pivot_sum, 0, 'f', 2)
+ .arg(this->params()->legendText( dataset ))
+ .arg(value, 0, 'f', 2)
+ .arg(pivot_sum, 0, 'f', 2)
);
}
else // if there is only one dataset, don't show percentage
{
// set the tooltip text
label->setText(TQString("<h2>%1</h2><strong>%2</strong>")
- .tqarg(this->params()->legendText( dataset ))
- .tqarg(value, 0, 'f', 2)
+ .arg(this->params()->legendText( dataset ))
+ .arg(value, 0, 'f', 2)
);
}
diff --git a/kmymoney2/reports/listtable.cpp b/kmymoney2/reports/listtable.cpp
index 481b6b2..acfe365 100644
--- a/kmymoney2/reports/listtable.cpp
+++ b/kmymoney2/reports/listtable.cpp
@@ -21,7 +21,7 @@
// QT Includes
#include <tqvaluelist.h>
#include <tqfile.h>
-#include <tqtextstream.h>
+#include <textstream.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -157,11 +157,11 @@ namespace reports {
//actual dates of the report
result += TQString("<div class=\"subtitle\">");
if(!m_config.fromDate().isNull()) {
- result += i18n("Report date range", "%1 through %2").tqarg(KGlobal::locale()->formatDate(m_config.fromDate(), true)).tqarg(KGlobal::locale()->formatDate(m_config.toDate(), true));
+ result += i18n("Report date range", "%1 through %2").arg(KGlobal::locale()->formatDate(m_config.fromDate(), true)).arg(KGlobal::locale()->formatDate(m_config.toDate(), true));
result += TQString("</div>\n");
result += TQString("<div class=\"gap\">&nbsp;</div>\n");
- csv += i18n("Report date range", "%1 through %2").tqarg(KGlobal::locale()->formatDate(m_config.fromDate(), true)).tqarg(KGlobal::locale()->formatDate(m_config.toDate(), true));
+ csv += i18n("Report date range", "%1 through %2").arg(KGlobal::locale()->formatDate(m_config.fromDate(), true)).arg(KGlobal::locale()->formatDate(m_config.toDate(), true));
csv += TQString("\n");
}
diff --git a/kmymoney2/reports/objectinfotable.cpp b/kmymoney2/reports/objectinfotable.cpp
index 37dfecc..cd7b795 100644
--- a/kmymoney2/reports/objectinfotable.cpp
+++ b/kmymoney2/reports/objectinfotable.cpp
@@ -21,7 +21,7 @@
// QT Includes
#include <tqvaluelist.h>
#include <tqfile.h>
-#include <tqtextstream.h>
+#include <textstream.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -157,7 +157,7 @@ void ObjectInfoTable::constructScheduleTable ( void )
//convert to base currency if needed
MyMoneyMoney xr = MyMoneyMoney(1,1);
if (m_config.isConvertCurrency() && account.isForeignCurrency()) {
- xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce();
+ xr = account.baseCurrencyPrice(TQDate::currentDate()).reduce();
}
// help for sort and render functions
@@ -274,7 +274,7 @@ void ObjectInfoTable::constructAccountTable ( void )
//convert to base currency if needed
if (m_config.isConvertCurrency() && account.isForeignCurrency()) {
- MyMoneyMoney xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce();
+ MyMoneyMoney xr = account.baseCurrencyPrice(TQDate::currentDate()).reduce();
value = value * xr;
}
accountRow["currentbalance"] = value.toString();
@@ -306,7 +306,7 @@ void ObjectInfoTable::constructAccountLoanTable ( void )
//convert to base currency if needed
MyMoneyMoney xr = MyMoneyMoney(1,1);
if (m_config.isConvertCurrency() && account.isForeignCurrency()) {
- xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce();
+ xr = account.baseCurrencyPrice(TQDate::currentDate()).reduce();
}
accountRow["rank"] = "0";
@@ -321,7 +321,7 @@ void ObjectInfoTable::constructAccountLoanTable ( void )
accountRow["currencyname"] = (file->currency(account.currencyId())).name();
accountRow["payee"] = file->payee(loan.payee()).name();
accountRow["loanamount"] = (loan.loanAmount() * xr).toString();
- accountRow["interestrate"] = (loan.interestRate(TQDate::tqcurrentDate())/MyMoneyMoney(100,1)*xr).toString();
+ accountRow["interestrate"] = (loan.interestRate(TQDate::currentDate())/MyMoneyMoney(100,1)*xr).toString();
accountRow["nextinterestchange"] = loan.nextInterestChange().toString( Qt::ISODate );
accountRow["periodicpayment"] = (loan.periodicPayment() * xr).toString();
accountRow["finalpayment"] = (loan.finalPayment() * xr).toString();
@@ -357,7 +357,7 @@ MyMoneyMoney ObjectInfoTable::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;
}
}
diff --git a/kmymoney2/reports/pivotgrid.cpp b/kmymoney2/reports/pivotgrid.cpp
index 6a3f773..223b86c 100644
--- a/kmymoney2/reports/pivotgrid.cpp
+++ b/kmymoney2/reports/pivotgrid.cpp
@@ -18,11 +18,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <tqlayout.h>
+#include <layout.h>
#include <tqdatetime.h>
#include <tqregexp.h>
#include <tqdragobject.h>
-#include <tqclipboard.h>
+#include <clipboard.h>
#include <tqapplication.h>
#include <tqprinter.h>
#include <tqpainter.h>
diff --git a/kmymoney2/reports/pivottable.cpp b/kmymoney2/reports/pivottable.cpp
index bf048cb..be8c05d 100644
--- a/kmymoney2/reports/pivottable.cpp
+++ b/kmymoney2/reports/pivottable.cpp
@@ -19,11 +19,11 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <tqlayout.h>
+#include <layout.h>
#include <tqdatetime.h>
#include <tqregexp.h>
#include <tqdragobject.h>
-#include <tqclipboard.h>
+#include <clipboard.h>
#include <tqapplication.h>
#include <tqprinter.h>
#include <tqpainter.h>
@@ -193,7 +193,7 @@ void PivotTable::init(void)
qDebug("ERR: %s thrown in %s(%ld)", e->what().data(), e->file().data(), e->line());
throw e;
}
- DEBUG_OUTPUT(TQString("Found %1 matching transactions").tqarg(transactions.count()));
+ DEBUG_OUTPUT(TQString("Found %1 matching transactions").arg(transactions.count()));
// Include scheduled transactions if required
@@ -230,8 +230,8 @@ void PivotTable::init(void)
while ( it_date != paymentDates.end() )
{
//if the payment occurs in the past, enter it tomorrow
- if(TQDate::tqcurrentDate() >= *it_date) {
- tx.setPostDate(TQDate::tqcurrentDate().addDays(1));
+ if(TQDate::currentDate() >= *it_date) {
+ tx.setPostDate(TQDate::currentDate().addDays(1));
} else {
tx.setPostDate(*it_date);
}
@@ -240,7 +240,7 @@ void PivotTable::init(void)
transactions += tx;
}
- DEBUG_OUTPUT(TQString("Added transaction for schedule %1 on %2").tqarg((*it_schedule).id()).tqarg((*it_date).toString()));
+ DEBUG_OUTPUT(TQString("Added transaction for schedule %1 on %2").arg((*it_schedule).id()).arg((*it_date).toString()));
++it_date;
}
@@ -286,8 +286,8 @@ void PivotTable::init(void)
TQDate dueDate = sched.nextDueDate();
//if the payment is overdue, use current date
- if(dueDate < TQDate::tqcurrentDate())
- dueDate = TQDate::tqcurrentDate();
+ if(dueDate < TQDate::currentDate())
+ dueDate = TQDate::currentDate();
//get the balance from the file for the date
loanBalances[splitAccount.id()] = file->balance(splitAccount.id(), dueDate.addDays(-1));
@@ -468,7 +468,7 @@ void PivotTable::collapseColumns(void)
void PivotTable::accumulateColumn(unsigned destcolumn, unsigned sourcecolumn)
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
- DEBUG_OUTPUT(TQString("From Column %1 to %2").tqarg(sourcecolumn).tqarg(destcolumn));
+ DEBUG_OUTPUT(TQString("From Column %1 to %2").arg(sourcecolumn).arg(destcolumn));
// iterate over outer groups
PivotGrid::iterator it_outergroup = m_grid.begin();
@@ -483,9 +483,9 @@ void PivotTable::accumulateColumn(unsigned destcolumn, unsigned sourcecolumn)
while ( it_row != (*it_innergroup).end() )
{
if ( (*it_row)[eActual].count() <= sourcecolumn )
- throw new MYMONEYEXCEPTION(TQString("Sourcecolumn %1 out of grid range (%2) in PivotTable::accumulateColumn").tqarg(sourcecolumn).tqarg((*it_row)[eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Sourcecolumn %1 out of grid range (%2) in PivotTable::accumulateColumn").arg(sourcecolumn).arg((*it_row)[eActual].count()));
if ( (*it_row)[eActual].count() <= destcolumn )
- throw new MYMONEYEXCEPTION(TQString("Destcolumn %1 out of grid range (%2) in PivotTable::accumulateColumn").tqarg(sourcecolumn).tqarg((*it_row)[eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Destcolumn %1 out of grid range (%2) in PivotTable::accumulateColumn").arg(sourcecolumn).arg((*it_row)[eActual].count()));
(*it_row)[eActual][destcolumn] += (*it_row)[eActual][sourcecolumn];
++it_row;
@@ -500,7 +500,7 @@ void PivotTable::accumulateColumn(unsigned destcolumn, unsigned sourcecolumn)
void PivotTable::clearColumn(unsigned column)
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
- DEBUG_OUTPUT(TQString("Column %1").tqarg(column));
+ DEBUG_OUTPUT(TQString("Column %1").arg(column));
// iterate over outer groups
PivotGrid::iterator it_outergroup = m_grid.begin();
@@ -515,7 +515,7 @@ void PivotTable::clearColumn(unsigned column)
while ( it_row != (*it_innergroup).end() )
{
if ( (*it_row)[eActual].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::accumulateColumn").tqarg(column).tqarg((*it_row)[eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::accumulateColumn").arg(column).arg((*it_row)[eActual].count()));
(*it_row++)[eActual][column] = PivotCell();
}
@@ -562,10 +562,10 @@ void PivotTable::calculateColumnHeadings(void)
if (((dow % columnpitch) == 0) || (day == m_endDate))
{
m_columnHeadings.append(TQString("%1&nbsp;%2 - %3&nbsp;%4")
- .tqarg(KGlobal::locale()->calendar()->monthName(prv.month(), prv.year(), true))
- .tqarg(prv.day())
- .tqarg(KGlobal::locale()->calendar()->monthName(day.month(), day.year(), true))
- .tqarg(day.day()));
+ .arg(KGlobal::locale()->calendar()->monthName(prv.month(), prv.year(), true))
+ .arg(prv.day())
+ .arg(KGlobal::locale()->calendar()->monthName(day.month(), day.year(), true))
+ .arg(day.day()));
prv = day.addDays(1);
}
day = day.addDays(1);
@@ -626,7 +626,7 @@ void PivotTable::createAccountRows(void)
// and if the report includes this account
if ( m_config_f.includes( *it_account ) )
{
- DEBUG_OUTPUT(TQString("Includes account %1").tqarg(account.name()));
+ DEBUG_OUTPUT(TQString("Includes account %1").arg(account.name()));
// the row group is the account class (major account type)
TQString outergroup = KMyMoneyUtils::accountTypeToString(account.accountGroup());
@@ -677,13 +677,13 @@ void PivotTable::calculateOpeningBalances( void )
TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter);
//if a closed account has no transactions in that timeframe, do not include it
if(transactions.size() == 0 ) {
- DEBUG_OUTPUT(TQString("DOES NOT INCLUDE account %1").tqarg(account.name()));
+ DEBUG_OUTPUT(TQString("DOES NOT INCLUDE account %1").arg(account.name()));
++it_account;
continue;
}
}
- DEBUG_OUTPUT(TQString("Includes account %1").tqarg(account.name()));
+ DEBUG_OUTPUT(TQString("Includes account %1").arg(account.name()));
// the row group is the account class (major account type)
TQString outergroup = KMyMoneyUtils::accountTypeToString(account.accountGroup());
@@ -699,7 +699,7 @@ void PivotTable::calculateOpeningBalances( void )
}
else
{
- DEBUG_OUTPUT(TQString("DOES NOT INCLUDE account %1").tqarg(account.name()));
+ DEBUG_OUTPUT(TQString("DOES NOT INCLUDE account %1").arg(account.name()));
}
++it_account;
@@ -713,7 +713,7 @@ void PivotTable::calculateRunningSums( PivotInnerGroup::iterator& it_row)
while ( column < m_numColumns )
{
if ( it_row.data()[eActual].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateRunningSums").tqarg(column).tqarg(it_row.data()[eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateRunningSums").arg(column).arg(it_row.data()[eActual].count()));
runningsum = it_row.data()[eActual][column].calculateRunningSum(runningsum);
@@ -742,7 +742,7 @@ void PivotTable::calculateRunningSums( void )
while ( column < m_numColumns )
{
if ( it_row.data()[eActual].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateRunningSums").tqarg(column).tqarg(it_row.data()[eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateRunningSums").arg(column).arg(it_row.data()[eActual].count()));
runningsum = ( it_row.data()[eActual][column] += runningsum );
@@ -787,9 +787,9 @@ MyMoneyMoney PivotTable::cellBalance(const TQString& outergroup, const ReportAcc
TQString innergroup( row.topParentName() );
if ( m_numColumns <= _column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of m_numColumns range (%2) in PivotTable::cellBalance").tqarg(_column).tqarg(m_numColumns));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of m_numColumns range (%2) in PivotTable::cellBalance").arg(_column).arg(m_numColumns));
if ( m_grid[outergroup][innergroup][row][eActual].count() <= _column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::cellBalance").tqarg(_column).tqarg(m_grid[outergroup][innergroup][row][eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::cellBalance").arg(_column).arg(m_grid[outergroup][innergroup][row][eActual].count()));
MyMoneyMoney balance;
if ( budget )
@@ -801,7 +801,7 @@ MyMoneyMoney PivotTable::cellBalance(const TQString& outergroup, const ReportAcc
while ( column < _column)
{
if ( m_grid[outergroup][innergroup][row][eActual].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::cellBalance").tqarg(column).tqarg(m_grid[outergroup][innergroup][row][eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::cellBalance").arg(column).arg(m_grid[outergroup][innergroup][row][eActual].count()));
balance = m_grid[outergroup][innergroup][row][eActual][column].cellBalance(balance);
@@ -831,7 +831,7 @@ void PivotTable::calculateBudgetMapping( void )
TQValueList<MyMoneyBudget>::const_iterator budgets_it = budgets.begin();
while( budgets_it != budgets.end() ) {
//pick the first budget that matches the report start year
- if( (*budgets_it).budgetStart().year() == TQDate::tqcurrentDate().year() ) {
+ if( (*budgets_it).budgetStart().year() == TQDate::currentDate().year() ) {
budget = file->budget( (*budgets_it).id());
break;
}
@@ -1009,7 +1009,7 @@ void PivotTable::convertToBaseCurrency( void )
while ( column < m_numColumns )
{
if ( it_row.data()[eActual].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::convertToBaseCurrency").tqarg(column).tqarg(it_row.data()[eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::convertToBaseCurrency").arg(column).arg(it_row.data()[eActual].count()));
TQDate valuedate = columnDate(column);
@@ -1025,7 +1025,7 @@ void PivotTable::convertToBaseCurrency( void )
//convert to lowest fraction
it_row.data()[ m_rowTypeList[i] ][column] = PivotCell(value.convert(fraction));
- DEBUG_OUTPUT_IF(conversionfactor != MyMoneyMoney(1,1) ,TQString("Factor of %1, value was %2, now %3").tqarg(conversionfactor).tqarg(DEBUG_SENSITIVE(oldval)).tqarg(DEBUG_SENSITIVE(it_row.data()[m_rowTypeList[i]][column].toDouble())));
+ DEBUG_OUTPUT_IF(conversionfactor != MyMoneyMoney(1,1) ,TQString("Factor of %1, value was %2, now %3").arg(conversionfactor).arg(DEBUG_SENSITIVE(oldval)).arg(DEBUG_SENSITIVE(it_row.data()[m_rowTypeList[i]][column].toDouble())));
}
}
@@ -1058,7 +1058,7 @@ void PivotTable::convertToDeepCurrency( void )
while ( column < m_numColumns )
{
if ( it_row.data()[eActual].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::convertToDeepCurrency").tqarg(column).tqarg(it_row.data()[eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::convertToDeepCurrency").arg(column).arg(it_row.data()[eActual].count()));
TQDate valuedate = columnDate(column);
@@ -1085,7 +1085,7 @@ void PivotTable::convertToDeepCurrency( void )
it_row.data()[ePrice][column] = PivotCell(priceValue.convert(10000));
}
- DEBUG_OUTPUT_IF(conversionfactor != MyMoneyMoney(1,1) ,TQString("Factor of %1, value was %2, now %3").tqarg(conversionfactor).tqarg(DEBUG_SENSITIVE(oldval)).tqarg(DEBUG_SENSITIVE(it_row.data()[eActual][column].toDouble())));
+ DEBUG_OUTPUT_IF(conversionfactor != MyMoneyMoney(1,1) ,TQString("Factor of %1, value was %2, now %3").arg(conversionfactor).arg(DEBUG_SENSITIVE(oldval)).arg(DEBUG_SENSITIVE(it_row.data()[eActual][column].toDouble())));
++column;
}
@@ -1139,9 +1139,9 @@ void PivotTable::calculateTotals( void )
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
if ( it_row.data()[ m_rowTypeList[i] ].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, row columns").tqarg(column).tqarg(it_row.data()[ m_rowTypeList[i] ].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, row columns").arg(column).arg(it_row.data()[ m_rowTypeList[i] ].count()));
if ( (*it_innergroup).m_total[ m_rowTypeList[i] ].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, inner group totals").tqarg(column).tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, inner group totals").arg(column).arg((*it_innergroup).m_total[ m_rowTypeList[i] ].count()));
//calculate total
MyMoneyMoney value = it_row.data()[ m_rowTypeList[i] ][column];
@@ -1162,9 +1162,9 @@ void PivotTable::calculateTotals( void )
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
if ( (*it_innergroup).m_total[ m_rowTypeList[i] ].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, inner group totals").tqarg(column).tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, inner group totals").arg(column).arg((*it_innergroup).m_total[ m_rowTypeList[i] ].count()));
if ( (*it_outergroup).m_total[ m_rowTypeList[i] ].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, outer group totals").tqarg(column).tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, outer group totals").arg(column).arg((*it_innergroup).m_total[ m_rowTypeList[i] ].count()));
//calculate totals
MyMoneyMoney value = (*it_innergroup).m_total[ m_rowTypeList[i] ][column];
@@ -1187,7 +1187,7 @@ void PivotTable::calculateTotals( void )
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
if ( m_grid.m_total[ m_rowTypeList[i] ].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, grid totals").tqarg(column).tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, grid totals").arg(column).arg((*it_innergroup).m_total[ m_rowTypeList[i] ].count()));
//calculate actual totals
MyMoneyMoney value = (*it_outergroup).m_total[ m_rowTypeList[i] ][column];
@@ -1215,7 +1215,7 @@ void PivotTable::calculateTotals( void )
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
if ( m_grid.m_total[ m_rowTypeList[i] ].count() <= totalcolumn )
- throw new MYMONEYEXCEPTION(TQString("Total column %1 out of grid range (%2) in PivotTable::calculateTotals, grid totals").tqarg(totalcolumn).tqarg(m_grid.m_total[ m_rowTypeList[i] ].count()));
+ throw new MYMONEYEXCEPTION(TQString("Total column %1 out of grid range (%2) in PivotTable::calculateTotals, grid totals").arg(totalcolumn).arg(m_grid.m_total[ m_rowTypeList[i] ].count()));
//calculate actual totals
MyMoneyMoney value = m_grid.m_total[ m_rowTypeList[i] ][totalcolumn];
@@ -1228,7 +1228,7 @@ void PivotTable::calculateTotals( void )
void PivotTable::assignCell( const TQString& outergroup, const ReportAccount& _row, unsigned column, MyMoneyMoney value, bool budget, bool stockSplit )
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
- DEBUG_OUTPUT(TQString("Parameters: %1,%2,%3,%4,%5").tqarg(outergroup).tqarg(_row.debugName()).tqarg(column).tqarg(DEBUG_SENSITIVE(value.toDouble())).tqarg(budget));
+ DEBUG_OUTPUT(TQString("Parameters: %1,%2,%3,%4,%5").arg(outergroup).arg(_row.debugName()).arg(column).arg(DEBUG_SENSITIVE(value.toDouble())).arg(budget));
// for budget reports, if this is the actual value, map it to the account which
// holds its budget
@@ -1252,9 +1252,9 @@ void PivotTable::assignCell( const TQString& outergroup, const ReportAccount& _r
TQString innergroup( row.topParentName() );
if ( m_numColumns <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of m_numColumns range (%2) in PivotTable::assignCell").tqarg(column).tqarg(m_numColumns));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of m_numColumns range (%2) in PivotTable::assignCell").arg(column).arg(m_numColumns));
if ( m_grid[outergroup][innergroup][row][eActual].count() <= column )
- throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::assignCell").tqarg(column).tqarg(m_grid[outergroup][innergroup][row][eActual].count()));
+ throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::assignCell").arg(column).arg(m_grid[outergroup][innergroup][row][eActual].count()));
if(!stockSplit) {
// Determine whether the value should be inverted before being placed in the row
@@ -1281,19 +1281,19 @@ void PivotTable::createRow( const TQString& outergroup, const ReportAccount& row
if ( ! m_grid.contains(outergroup) )
{
- DEBUG_OUTPUT(TQString("Adding group [%1]").tqarg(outergroup));
+ DEBUG_OUTPUT(TQString("Adding group [%1]").arg(outergroup));
m_grid[outergroup] = PivotOuterGroup(m_numColumns);
}
if ( ! m_grid[outergroup].contains(innergroup) )
{
- DEBUG_OUTPUT(TQString("Adding group [%1][%2]").tqarg(outergroup).tqarg(innergroup));
+ DEBUG_OUTPUT(TQString("Adding group [%1][%2]").arg(outergroup).arg(innergroup));
m_grid[outergroup][innergroup] = PivotInnerGroup(m_numColumns);
}
if ( ! m_grid[outergroup][innergroup].contains(row) )
{
- DEBUG_OUTPUT(TQString("Adding row [%1][%2][%3]").tqarg(outergroup).tqarg(innergroup).tqarg(row.debugName()));
+ DEBUG_OUTPUT(TQString("Adding row [%1][%2][%3]").arg(outergroup).arg(innergroup).arg(row.debugName()));
m_grid[outergroup][innergroup][row] = PivotGridRowSet(m_numColumns);
if ( recursive && !row.isTopLevel() )
@@ -1325,11 +1325,11 @@ TQString PivotTable::renderCSV( void ) const
// Report Title
//
- TQString result = TQString("\"Report: %1\"\n").tqarg(m_config_f.name());
+ TQString result = TQString("\"Report: %1\"\n").arg(m_config_f.name());
if ( m_config_f.isConvertCurrency() )
- result += i18n("All currencies converted to %1\n").tqarg(MyMoneyFile::instance()->baseCurrency().name());
+ result += i18n("All currencies converted to %1\n").arg(MyMoneyFile::instance()->baseCurrency().name());
else
- result += i18n("All values shown in %1 unless otherwise noted\n").tqarg(MyMoneyFile::instance()->baseCurrency().name());
+ result += i18n("All values shown in %1 unless otherwise noted\n").arg(MyMoneyFile::instance()->baseCurrency().name());
//
// Table Header
@@ -1339,10 +1339,10 @@ TQString PivotTable::renderCSV( void ) const
unsigned column = 1;
while ( column < m_numColumns )
- result += TQString(",%1").tqarg(TQString(m_columnHeadings[column++]));
+ result += TQString(",%1").arg(TQString(m_columnHeadings[column++]));
if ( m_config_f.isShowingRowTotals() )
- result += TQString(",%1").tqarg(i18n("Total"));
+ result += TQString(",%1").arg(i18n("Total"));
result += "\n";
@@ -1396,14 +1396,14 @@ TQString PivotTable::renderCSV( void ) const
//show columns
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
isUsed |= it_row.data()[ m_rowTypeList[i] ][column].isUsed();
- rowdata += TQString(",\"%1\"").tqarg(it_row.data()[ m_rowTypeList[i] ][column].formatMoney(fraction, false));
+ rowdata += TQString(",\"%1\"").arg(it_row.data()[ m_rowTypeList[i] ][column].formatMoney(fraction, false));
}
column++;
}
if ( m_config_f.isShowingRowTotals() ) {
for(unsigned i = 0; i < m_rowTypeList.size(); ++i)
- rowdata += TQString(",\"%1\"").tqarg((*it_row)[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false));
+ rowdata += TQString(",\"%1\"").arg((*it_row)[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false));
}
//
@@ -1417,7 +1417,7 @@ TQString PivotTable::renderCSV( void ) const
// current row contains a foreign currency, then we append the currency
// to the name of the account
if (!m_config_f.isConvertCurrency() && rowname.isForeignCurrency() )
- innergroupdata += TQString(" (%1)").tqarg(rowname.currencyId());
+ innergroupdata += TQString(" (%1)").arg(rowname.currencyId());
innergroupdata += "\"";
@@ -1461,7 +1461,7 @@ TQString PivotTable::renderCSV( void ) const
finalRow = "\"" + TQString().fill(' ',rowname.hierarchyDepth() - 1) + rowname.name();
if (!m_config_f.isConvertCurrency() && rowname.isForeignCurrency() )
- finalRow += TQString(" (%1)").tqarg(rowname.currencyId());
+ finalRow += TQString(" (%1)").arg(rowname.currencyId());
finalRow += "\"";
}
@@ -1477,14 +1477,14 @@ TQString PivotTable::renderCSV( void ) const
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
isUsed |= (*it_innergroup).m_total[ m_rowTypeList[i] ][column].isUsed();
- finalRow += TQString(",\"%1\"").tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ][column].formatMoney(fraction, false));
+ finalRow += TQString(",\"%1\"").arg((*it_innergroup).m_total[ m_rowTypeList[i] ][column].formatMoney(fraction, false));
}
column++;
}
if ( m_config_f.isShowingRowTotals() ) {
for(unsigned i = 0; i < m_rowTypeList.size(); ++i)
- finalRow += TQString(",\"%1\"").tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false));
+ finalRow += TQString(",\"%1\"").arg((*it_innergroup).m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false));
}
finalRow += "\n";
@@ -1504,18 +1504,18 @@ TQString PivotTable::renderCSV( void ) const
if ( m_config_f.isShowingColumnTotals() )
{
- result += TQString("%1 %2").tqarg(i18n("Total")).tqarg(it_outergroup.key());
+ result += TQString("%1 %2").arg(i18n("Total")).arg(it_outergroup.key());
unsigned column = 1;
while ( column < m_numColumns ) {
for(unsigned i = 0; i < m_rowTypeList.size(); ++i)
- result += TQString(",\"%1\"").tqarg((*it_outergroup).m_total[ m_rowTypeList[i] ][column].formatMoney(fraction, false));
+ result += TQString(",\"%1\"").arg((*it_outergroup).m_total[ m_rowTypeList[i] ][column].formatMoney(fraction, false));
column++;
}
if ( m_config_f.isShowingRowTotals() ) {
for(unsigned i = 0; i < m_rowTypeList.size(); ++i)
- result += TQString(",\"%1\"").tqarg((*it_outergroup).m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false));
+ result += TQString(",\"%1\"").arg((*it_outergroup).m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false));
}
result += "\n";
@@ -1533,14 +1533,14 @@ TQString PivotTable::renderCSV( void ) const
unsigned totalcolumn = 1;
while ( totalcolumn < m_numColumns ) {
for(unsigned i = 0; i < m_rowTypeList.size(); ++i)
- result += TQString(",\"%1\"").tqarg(m_grid.m_total[ m_rowTypeList[i] ][totalcolumn].formatMoney(fraction, false));
+ result += TQString(",\"%1\"").arg(m_grid.m_total[ m_rowTypeList[i] ][totalcolumn].formatMoney(fraction, false));
totalcolumn++;
}
if ( m_config_f.isShowingRowTotals() ) {
for(unsigned i = 0; i < m_rowTypeList.size(); ++i)
- result += TQString(",\"%1\"").tqarg(m_grid.m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false));
+ result += TQString(",\"%1\"").arg(m_grid.m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false));
}
result += "\n";
@@ -1553,26 +1553,26 @@ TQString PivotTable::renderHTML( void ) const
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
- TQString colspan = TQString(" colspan=\"%1\"").tqarg(m_numColumns + 1 + (m_config_f.isShowingRowTotals() ? 1 : 0) );
+ TQString colspan = TQString(" colspan=\"%1\"").arg(m_numColumns + 1 + (m_config_f.isShowingRowTotals() ? 1 : 0) );
//
// Report Title
//
- TQString result = TQString("<h2 class=\"report\">%1</h2>\n").tqarg(m_config_f.name());
+ TQString result = TQString("<h2 class=\"report\">%1</h2>\n").arg(m_config_f.name());
//actual dates of the report
result += TQString("<div class=\"subtitle\">");
- result += i18n("Report date range", "%1 through %2").tqarg(KGlobal::locale()->formatDate(m_config_f.fromDate(), true)).tqarg(KGlobal::locale()->formatDate(m_config_f.toDate(), true));
+ result += i18n("Report date range", "%1 through %2").arg(KGlobal::locale()->formatDate(m_config_f.fromDate(), true)).arg(KGlobal::locale()->formatDate(m_config_f.toDate(), true));
result += TQString("</div>\n");
result += TQString("<div class=\"gap\">&nbsp;</div>\n");
//currency conversion message
result += TQString("<div class=\"subtitle\">");
if ( m_config_f.isConvertCurrency() )
- result += i18n("All currencies converted to %1").tqarg(MyMoneyFile::instance()->baseCurrency().name());
+ result += i18n("All currencies converted to %1").arg(MyMoneyFile::instance()->baseCurrency().name());
else
- result += i18n("All values shown in %1 unless otherwise noted").tqarg(MyMoneyFile::instance()->baseCurrency().name());
+ result += i18n("All values shown in %1 unless otherwise noted").arg(MyMoneyFile::instance()->baseCurrency().name());
result += TQString("</div>\n");
result += TQString("<div class=\"gap\">&nbsp;</div>\n");
@@ -1585,19 +1585,19 @@ TQString PivotTable::renderHTML( void ) const
// Table Header
//
result += TQString("\n\n<table class=\"report\" cellspacing=\"0\">\n"
- "<thead><tr class=\"itemheader\">\n<th>%1</th>").tqarg(i18n("Account"));
+ "<thead><tr class=\"itemheader\">\n<th>%1</th>").arg(i18n("Account"));
TQString headerspan;
int span = m_rowTypeList.size();
- headerspan = TQString(" colspan=\"%1\"").tqarg(span);
+ headerspan = TQString(" colspan=\"%1\"").arg(span);
unsigned column = 1;
while ( column < m_numColumns )
- result += TQString("<th%1>%2</th>").tqarg(headerspan,TQString(m_columnHeadings[column++]).replace(TQRegExp(" "),"<br>"));
+ result += TQString("<th%1>%2</th>").arg(headerspan,TQString(m_columnHeadings[column++]).replace(TQRegExp(" "),"<br>"));
if ( m_config_f.isShowingRowTotals() )
- result += TQString("<th%1>%2</th>").tqarg(headerspan).tqarg(i18n("Total"));
+ result += TQString("<th%1>%2</th>").arg(headerspan).arg(i18n("Total"));
result += "</tr></thead>\n";
@@ -1617,16 +1617,16 @@ TQString PivotTable::renderHTML( void ) const
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
result += TQString("<td%2>%1</td>")
- .tqarg(i18n( m_columnTypeHeaderList[i] ))
- .tqarg(i == 0 ? lb : TQString() );
+ .arg(i18n( m_columnTypeHeaderList[i] ))
+ .arg(i == 0 ? lb : TQString() );
}
column++;
}
if ( m_config_f.isShowingRowTotals() ) {
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
result += TQString("<td%2>%1</td>")
- .tqarg(i18n( m_columnTypeHeaderList[i] ))
- .tqarg(i == 0 ? leftborder : TQString() );
+ .arg(i18n( m_columnTypeHeaderList[i] ))
+ .arg(i == 0 ? leftborder : TQString() );
}
}
result += "</tr>";
@@ -1667,7 +1667,7 @@ TQString PivotTable::renderHTML( void ) const
// Outer Group Header
//
- result += TQString("<tr class=\"sectionheader\"><td class=\"left\"%1>%2</td></tr>\n").tqarg(colspan).tqarg((*it_outergroup).m_displayName);
+ result += TQString("<tr class=\"sectionheader\"><td class=\"left\"%1>%2</td></tr>\n").arg(colspan).arg((*it_outergroup).m_displayName);
// Skip the inner groups if the report only calls for outer group totals to be shown
if ( m_config_f.detailLevel() != MyMoneyReport::eDetailGroup )
@@ -1704,8 +1704,8 @@ TQString PivotTable::renderHTML( void ) const
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
rowdata += TQString("<td%2>%1</td>")
- .tqarg(coloredAmount(it_row.data()[ m_rowTypeList[i] ][column]))
- .tqarg(i == 0 ? lb : TQString());
+ .arg(coloredAmount(it_row.data()[ m_rowTypeList[i] ][column]))
+ .arg(i == 0 ? lb : TQString());
isUsed |= it_row.data()[ m_rowTypeList[i] ][column].isUsed();
}
@@ -1717,8 +1717,8 @@ TQString PivotTable::renderHTML( void ) const
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
rowdata += TQString("<td%2>%1</td>")
- .tqarg(coloredAmount(it_row.data()[ m_rowTypeList[i] ].m_total))
- .tqarg(i == 0 ? leftborder : TQString());
+ .arg(coloredAmount(it_row.data()[ m_rowTypeList[i] ].m_total))
+ .arg(i == 0 ? leftborder : TQString());
}
}
@@ -1731,12 +1731,12 @@ TQString PivotTable::renderHTML( void ) const
// don't show closed accounts if they have not been used
if(!rowname.isClosed() || isUsed) {
innergroupdata += TQString("<tr class=\"row-%1\"%2><td%3 class=\"left\" style=\"text-indent: %4.0em\">%5%6</td>")
- .tqarg(rownum & 0x01 ? "even" : "odd")
- .tqarg(rowname.isTopLevel() ? " id=\"topparent\"" : "")
- .tqarg("") //.tqarg((*it_row).m_total.isZero() ? colspan : "") // colspan the distance if this row will be blank
- .tqarg(rowname.hierarchyDepth() - 1)
- .tqarg(rowname.name().replace(TQRegExp(" "), "&nbsp;"))
- .tqarg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?TQString():TQString(" (%1)").tqarg(rowname.currency().id()));
+ .arg(rownum & 0x01 ? "even" : "odd")
+ .arg(rowname.isTopLevel() ? " id=\"topparent\"" : "")
+ .arg("") //.arg((*it_row).m_total.isZero() ? colspan : "") // colspan the distance if this row will be blank
+ .arg(rowname.hierarchyDepth() - 1)
+ .arg(rowname.name().replace(TQRegExp(" "), "&nbsp;"))
+ .arg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?TQString():TQString(" (%1)").arg(rowname.currency().id()));
// Don't print this row if it's going to be all zeros
// TODO: Uncomment this, and deal with the case where the data
@@ -1766,8 +1766,8 @@ TQString PivotTable::renderHTML( void ) const
{
// Start the TOTALS row
finalRow = TQString("<tr class=\"row-%1\" id=\"subtotal\"><td class=\"left\">&nbsp;&nbsp;%2</td>")
- .tqarg(rownum & 0x01 ? "even" : "odd")
- .tqarg(i18n("Total"));
+ .arg(rownum & 0x01 ? "even" : "odd")
+ .arg(i18n("Total"));
// don't suppress display of totals
isUsed = true;
}
@@ -1788,11 +1788,11 @@ TQString PivotTable::renderHTML( void ) const
ReportAccount rowname = (*it_innergroup).begin().key();
isUsed |= !rowname.isClosed();
finalRow = TQString("<tr class=\"row-%1\"%2><td class=\"left\" style=\"text-indent: %3.0em;\">%5%6</td>")
- .tqarg(rownum & 0x01 ? "even" : "odd")
- .tqarg( m_config_f.detailLevel() == MyMoneyReport::eDetailAll ? "id=\"solo\"" : "" )
- .tqarg(rowname.hierarchyDepth() - 1)
- .tqarg(rowname.name().replace(TQRegExp(" "), "&nbsp;"))
- .tqarg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?TQString():TQString(" (%1)").tqarg(rowname.currency().id()));
+ .arg(rownum & 0x01 ? "even" : "odd")
+ .arg( m_config_f.detailLevel() == MyMoneyReport::eDetailAll ? "id=\"solo\"" : "" )
+ .arg(rowname.hierarchyDepth() - 1)
+ .arg(rowname.name().replace(TQRegExp(" "), "&nbsp;"))
+ .arg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?TQString():TQString(" (%1)").arg(rowname.currency().id()));
}
// Finish the row started above, unless told not to
@@ -1808,8 +1808,8 @@ TQString PivotTable::renderHTML( void ) const
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
finalRow += TQString("<td%2>%1</td>")
- .tqarg(coloredAmount((*it_innergroup).m_total[ m_rowTypeList[i] ][column]))
- .tqarg(i == 0 ? lb : TQString());
+ .arg(coloredAmount((*it_innergroup).m_total[ m_rowTypeList[i] ][column]))
+ .arg(i == 0 ? lb : TQString());
isUsed |= (*it_innergroup).m_total[ m_rowTypeList[i] ][column].isUsed();
}
@@ -1820,8 +1820,8 @@ TQString PivotTable::renderHTML( void ) const
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
finalRow += TQString("<td%2>%1</td>")
- .tqarg(coloredAmount((*it_innergroup).m_total[ m_rowTypeList[i] ].m_total))
- .tqarg(i == 0 ? leftborder : TQString());
+ .arg(coloredAmount((*it_innergroup).m_total[ m_rowTypeList[i] ].m_total))
+ .arg(i == 0 ? leftborder : TQString());
}
}
@@ -1844,7 +1844,7 @@ TQString PivotTable::renderHTML( void ) const
if ( m_config_f.isShowingColumnTotals() )
{
- result += TQString("<tr class=\"sectionfooter\"><td class=\"left\">%1&nbsp;%2</td>").tqarg(i18n("Total")).tqarg((*it_outergroup).m_displayName);
+ result += TQString("<tr class=\"sectionfooter\"><td class=\"left\">%1&nbsp;%2</td>").arg(i18n("Total")).arg((*it_outergroup).m_displayName);
unsigned column = 1;
while ( column < m_numColumns )
{
@@ -1854,8 +1854,8 @@ TQString PivotTable::renderHTML( void ) const
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
result += TQString("<td%2>%1</td>")
- .tqarg(coloredAmount((*it_outergroup).m_total[ m_rowTypeList[i] ][column]))
- .tqarg(i == 0 ? lb : TQString());
+ .arg(coloredAmount((*it_outergroup).m_total[ m_rowTypeList[i] ][column]))
+ .arg(i == 0 ? lb : TQString());
}
column++;
@@ -1865,8 +1865,8 @@ TQString PivotTable::renderHTML( void ) const
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
result += TQString("<td%2>%1</td>")
- .tqarg(coloredAmount((*it_outergroup).m_total[ m_rowTypeList[i] ].m_total))
- .tqarg(i == 0 ? leftborder : TQString());
+ .arg(coloredAmount((*it_outergroup).m_total[ m_rowTypeList[i] ].m_total))
+ .arg(i == 0 ? leftborder : TQString());
}
}
result += "</tr>\n";
@@ -1885,7 +1885,7 @@ TQString PivotTable::renderHTML( void ) const
if ( m_config_f.isShowingColumnTotals() )
{
result += TQString("<tr class=\"spacer\"><td>&nbsp;</td></tr>\n");
- result += TQString("<tr class=\"reportfooter\"><td class=\"left\">%1</td>").tqarg(i18n("Grand Total"));
+ result += TQString("<tr class=\"reportfooter\"><td class=\"left\">%1</td>").arg(i18n("Grand Total"));
unsigned totalcolumn = 1;
while ( totalcolumn < m_numColumns )
{
@@ -1895,8 +1895,8 @@ TQString PivotTable::renderHTML( void ) const
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
result += TQString("<td%2>%1</td>")
- .tqarg(coloredAmount(m_grid.m_total[ m_rowTypeList[i] ][totalcolumn]))
- .tqarg(i == 0 ? lb : TQString());
+ .arg(coloredAmount(m_grid.m_total[ m_rowTypeList[i] ][totalcolumn]))
+ .arg(i == 0 ? lb : TQString());
}
totalcolumn++;
@@ -1906,8 +1906,8 @@ TQString PivotTable::renderHTML( void ) const
{
for(unsigned i = 0; i < m_rowTypeList.size(); ++i) {
result += TQString("<td%2>%1</td>")
- .tqarg(coloredAmount(m_grid.m_total[ m_rowTypeList[i] ].m_total))
- .tqarg(i == 0 ? leftborder : TQString());
+ .arg(coloredAmount(m_grid.m_total[ m_rowTypeList[i] ].m_total))
+ .arg(i == 0 ? leftborder : TQString());
}
}
@@ -2213,7 +2213,7 @@ void PivotTable::drawChart( KReportChartView& _view ) const
{
// the first column of report which represents a date in the future, or one past the
// last column if all columns are in the present day. Only relevant when accountSeries==true
- unsigned futurecolumn = columnValue(TQDate::tqcurrentDate()) - columnValue(m_beginDate) + 1;
+ unsigned futurecolumn = columnValue(TQDate::currentDate()) - columnValue(m_beginDate) + 1;
// kdDebug(2) << "futurecolumn: " << futurecolumn << endl;
// kdDebug(2) << "m_numColumns: " << m_numColumns << endl;
@@ -2275,9 +2275,9 @@ TQString PivotTable::coloredAmount(const MyMoneyMoney& amount, const TQString& c
TQString result;
if( amount.isNegative() )
result += TQString("<font color=\"rgb(%1,%2,%3)\">")
- .tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().red())
- .tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().green())
- .tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().blue());
+ .arg(KMyMoneyGlobalSettings::listNegativeValueColor().red())
+ .arg(KMyMoneyGlobalSettings::listNegativeValueColor().green())
+ .arg(KMyMoneyGlobalSettings::listNegativeValueColor().blue());
result += amount.formatMoney(currencySymbol, prec);
if( amount.isNegative() )
result += TQString("</font>");
@@ -2335,10 +2335,10 @@ void PivotTable::calculateForecast(void)
forecast.setIncludeUnusedAccounts(true);
//setup forecast dates
- if(m_endDate > TQDate::tqcurrentDate()) {
+ if(m_endDate > TQDate::currentDate()) {
forecast.setForecastEndDate(m_endDate);
- forecast.setForecastStartDate(TQDate::tqcurrentDate());
- forecast.setForecastDays(TQDate::tqcurrentDate().daysTo(m_endDate));
+ forecast.setForecastStartDate(TQDate::currentDate());
+ forecast.setForecastDays(TQDate::currentDate().daysTo(m_endDate));
} else {
forecast.setForecastStartDate(m_beginDate);
forecast.setForecastEndDate(m_endDate);
@@ -2346,7 +2346,7 @@ void PivotTable::calculateForecast(void)
}
//adjust history dates if beginning date is before today
- if(m_beginDate < TQDate::tqcurrentDate()) {
+ if(m_beginDate < TQDate::currentDate()) {
forecast.setHistoryEndDate(m_beginDate.addDays(-1));
forecast.setHistoryStartDate(forecast.historyEndDate().addDays(-forecast.accountsCycle()*forecast.forecastCycles()));
}
diff --git a/kmymoney2/reports/pivottabletest.cpp b/kmymoney2/reports/pivottabletest.cpp
index d1a6586..e9fb8b2 100644
--- a/kmymoney2/reports/pivottabletest.cpp
+++ b/kmymoney2/reports/pivottabletest.cpp
@@ -1003,7 +1003,7 @@ void PivotTableTest::testBudget(void)
// - Totals for D, D:1, D:2 show up. D:2:a and D:2:b do not
// - D actuals (only) compare against D budget
// - Ditto for D:1
- // - D:2 acutals and tqchildren compare against D:2 budget
+ // - D:2 acutals and children compare against D:2 budget
// 5. Budget on E, no transactions on E
{
diff --git a/kmymoney2/reports/querytable.cpp b/kmymoney2/reports/querytable.cpp
index 8257ce3..f296303 100644
--- a/kmymoney2/reports/querytable.cpp
+++ b/kmymoney2/reports/querytable.cpp
@@ -27,7 +27,7 @@
// QT Includes
#include <tqvaluelist.h>
#include <tqfile.h>
-#include <tqtextstream.h>
+#include <textstream.h>
// ----------------------------------------------------------------------------
// KDE Includes
@@ -59,7 +59,7 @@ namespace reports {
//
// ****************************************************************************
-TQDate CashFlowListItem::m_sToday = TQDate::tqcurrentDate();
+TQDate CashFlowListItem::m_sToday = TQDate::currentDate();
MyMoneyMoney CashFlowListItem::NPV( double _rate ) const
{
@@ -432,8 +432,8 @@ void QueryTable::constructTransactionTable(void)
qA["commodity"] = qS["commodity"] = (* it_transaction).commodity();
pd = (* it_transaction).postDate();
- qA["month"] = qS["month"] = i18n("Month of %1").tqarg(TQDate(pd.year(),pd.month(),1).toString(Qt::ISODate));
- qA["week"] = qS["week"] = i18n("Week of %1").tqarg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate));
+ qA["month"] = qS["month"] = i18n("Month of %1").arg(TQDate(pd.year(),pd.month(),1).toString(Qt::ISODate));
+ qA["week"] = qS["week"] = i18n("Week of %1").arg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate));
qA["currency"] = qS["currency"] = "";
@@ -671,7 +671,7 @@ void QueryTable::constructTransactionTable(void)
//--- default case includes all transaction details
else {
- //this is when the splits are going to be shown as tqchildren of the main split
+ //this is when the splits are going to be shown as children of the main split
if ((splits.count() > 2) && use_summary) {
qA["value"] = "";
@@ -693,8 +693,8 @@ void QueryTable::constructTransactionTable(void)
if (! splitAcc.isIncomeExpense()) {
qA["category"] = ((*it_split).shares().isNegative()) ?
- i18n("Transfer from %1").tqarg(splitAcc.fullName())
- : i18n("Transfer to %1").tqarg(splitAcc.fullName());
+ i18n("Transfer from %1").arg(splitAcc.fullName())
+ : i18n("Transfer to %1").arg(splitAcc.fullName());
qA["topcategory"] = splitAcc.topParentName();
qA["categorytype"] = i18n("Transfer");
}
@@ -735,8 +735,8 @@ void QueryTable::constructTransactionTable(void)
qS["topaccount"] = splitAcc.topParentName();
qS["category"] = ((*it_split).shares().isNegative())
- ? i18n("Transfer to %1").tqarg(a_fullname)
- : i18n("Transfer from %1").tqarg(a_fullname);
+ ? i18n("Transfer to %1").arg(a_fullname)
+ : i18n("Transfer from %1").arg(a_fullname);
qS["institution"] = institution.isEmpty()
? i18n("No Institution")
@@ -1209,8 +1209,8 @@ void QueryTable::constructSplitsTable(void)
qA["commodity"] = qS["commodity"] = (* it_transaction).commodity();
pd = (* it_transaction).postDate();
- qA["month"] = qS["month"] = i18n("Month of %1").tqarg(TQDate(pd.year(),pd.month(),1).toString(Qt::ISODate));
- qA["week"] = qS["week"] = i18n("Week of %1").tqarg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate));
+ qA["month"] = qS["month"] = i18n("Month of %1").arg(TQDate(pd.year(),pd.month(),1).toString(Qt::ISODate));
+ qA["week"] = qS["week"] = i18n("Week of %1").arg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate));
qA["currency"] = qS["currency"] = "";
@@ -1364,8 +1364,8 @@ void QueryTable::constructSplitsTable(void)
//fill in account information
if (! splitAcc.isIncomeExpense() && it_split != myBegin) {
qA["account"] = ((*it_split).shares().isNegative()) ?
- i18n("Transfer to %1").tqarg(myBeginAcc.fullName())
- : i18n("Transfer from %1").tqarg(myBeginAcc.fullName());
+ i18n("Transfer to %1").arg(myBeginAcc.fullName())
+ : i18n("Transfer from %1").arg(myBeginAcc.fullName());
} else if (it_split == myBegin ) {
//handle the main split
if((splits.count() > 2)) {
@@ -1383,8 +1383,8 @@ void QueryTable::constructSplitsTable(void)
ReportAccount tempSplitAcc = (*tempSplit).accountId();
if (! tempSplitAcc.isIncomeExpense()) {
qA["account"] = ((*it_split).shares().isNegative()) ?
- i18n("Transfer to %1").tqarg(tempSplitAcc.fullName())
- : i18n("Transfer from %1").tqarg(tempSplitAcc.fullName());
+ i18n("Transfer to %1").arg(tempSplitAcc.fullName())
+ : i18n("Transfer from %1").arg(tempSplitAcc.fullName());
} else {
qA["account"] = tempSplitAcc.fullName();
}
diff --git a/kmymoney2/reports/reportaccount.cpp b/kmymoney2/reports/reportaccount.cpp
index cdc8097..477580d 100644
--- a/kmymoney2/reports/reportaccount.cpp
+++ b/kmymoney2/reports/reportaccount.cpp
@@ -56,7 +56,7 @@ ReportAccount::ReportAccount( const TQString& accountid ):
MyMoneyAccount( MyMoneyFile::instance()->account(accountid) )
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
- DEBUG_OUTPUT(TQString("Account %1").tqarg(accountid));
+ DEBUG_OUTPUT(TQString("Account %1").arg(accountid));
calculateAccountHierarchy();
}
@@ -64,7 +64,7 @@ ReportAccount::ReportAccount( const MyMoneyAccount& account ):
MyMoneyAccount( account )
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
- DEBUG_OUTPUT(TQString("Account %1").tqarg(account.id()));
+ DEBUG_OUTPUT(TQString("Account %1").arg(account.id()));
calculateAccountHierarchy();
}
@@ -112,17 +112,17 @@ MyMoneyMoney ReportAccount::deepCurrencyPrice( const TQDate& date ) const
result = price.rate(undersecurity.tradingCurrency());
DEBUG_OUTPUT(TQString("Converting under %1 to deep %2, price on %3 is %4")
- .tqarg(undersecurity.name())
- .tqarg(file->security(undersecurity.tradingCurrency()).name())
- .tqarg(date.toString())
- .tqarg(result.toDouble()));
+ .arg(undersecurity.name())
+ .arg(file->security(undersecurity.tradingCurrency()).name())
+ .arg(date.toString())
+ .arg(result.toDouble()));
}
else
{
DEBUG_OUTPUT(TQString("No price to convert under %1 to deep %2 on %3")
- .tqarg(undersecurity.name())
- .tqarg(file->security(undersecurity.tradingCurrency()).name())
- .tqarg(date.toString()));
+ .arg(undersecurity.name())
+ .arg(file->security(undersecurity.tradingCurrency()).name())
+ .arg(date.toString()));
}
}
@@ -181,17 +181,17 @@ MyMoneyMoney ReportAccount::foreignCurrencyPrice( const TQString foreignCurrency
{
result = price.rate(tradingCurrency);
DEBUG_OUTPUT(TQString("Converting deep %1 to currency %2, price on %3 is %4")
- .tqarg(file->currency(currency().id()).name())
- .tqarg(file->currency(foreignCurrency).name())
- .tqarg(date.toString())
- .tqarg(result.toDouble()));
+ .arg(file->currency(currency().id()).name())
+ .arg(file->currency(foreignCurrency).name())
+ .arg(date.toString())
+ .arg(result.toDouble()));
}
else
{
DEBUG_OUTPUT(TQString("No price to convert deep %1 to currency %2 on %3")
- .tqarg(file->currency(currency().id()).name())
- .tqarg(file->currency(foreignCurrency).name())
- .tqarg(date.toString()));
+ .arg(file->currency(currency().id()).name())
+ .arg(file->currency(foreignCurrency).name())
+ .arg(date.toString()));
}
}
return result;
@@ -265,7 +265,7 @@ bool ReportAccount::operator<(const ReportAccount& second) const
if ( !haveresult && ( it_second != second.m_nameHierarchy.end() ) )
result = true;
-// DEBUG_OUTPUT(TQString("%1 < %2 is %3").tqarg(debugName(),second.debugName()).tqarg(result));
+// DEBUG_OUTPUT(TQString("%1 < %2 is %3").arg(debugName(),second.debugName()).arg(result));
return result;
}
diff --git a/kmymoney2/reports/reportstestcommon.cpp b/kmymoney2/reports/reportstestcommon.cpp
index eac6193..44f90df 100644
--- a/kmymoney2/reports/reportstestcommon.cpp
+++ b/kmymoney2/reports/reportstestcommon.cpp
@@ -319,7 +319,7 @@ void writeTabletoHTML( const PivotTable& table, const TQString& _filename )
TQString filename = _filename;
if ( filename.isEmpty() )
{
- filename = TQString("report-%1%2.html").tqarg((filenumber<10)?"0":"").tqarg(filenumber);
+ filename = TQString("report-%1%2.html").arg((filenumber<10)?"0":"").arg(filenumber);
++filenumber;
}
@@ -336,7 +336,7 @@ void writeTabletoHTML( const QueryTable& table, const TQString& _filename )
TQString filename = _filename;
if ( filename.isEmpty() )
{
- filename = TQString("report-%1%2.html").tqarg((filenumber<10)?"0":"").tqarg(filenumber);
+ filename = TQString("report-%1%2.html").arg((filenumber<10)?"0":"").arg(filenumber);
++filenumber;
}
@@ -352,7 +352,7 @@ void writeTabletoCSV( const PivotTable& table, const TQString& _filename )
TQString filename = _filename;
if ( filename.isEmpty() )
{
- filename = TQString("report-%1%2.csv").tqarg((filenumber<10)?"0":"").tqarg(filenumber);
+ filename = TQString("report-%1%2.csv").arg((filenumber<10)?"0":"").arg(filenumber);
++filenumber;
}
@@ -369,7 +369,7 @@ void writeTabletoCSV( const QueryTable& table, const TQString& _filename )
TQString filename = _filename;
if ( filename.isEmpty() )
{
- filename = TQString("qreport-%1%2.csv").tqarg((filenumber<10)?"0":"").tqarg(filenumber);
+ filename = TQString("qreport-%1%2.csv").arg((filenumber<10)?"0":"").arg(filenumber);
++filenumber;
}
@@ -385,7 +385,7 @@ void writeRCFtoXML( const MyMoneyReport& filter, const TQString& _filename )
static unsigned filenum = 1;
TQString filename = _filename;
if ( filename.isEmpty() ) {
- filename = TQString("report-%1%2.xml").tqarg(TQString::number(filenum).rightJustify(2, '0'));
+ filename = TQString("report-%1%2.xml").arg(TQString::number(filenum).rightJustify(2, '0'));
++filenum;
}
@@ -481,7 +481,7 @@ void XMLandback( MyMoneyReport& filter )
MyMoneyMoney searchHTML(const TQString& _html, const TQString& _search)
{
- TQRegExp re(TQString("%1[<>/td]*([\\-.0-9,]*)").tqarg(_search));
+ TQRegExp re(TQString("%1[<>/td]*([\\-.0-9,]*)").arg(_search));
re.search(_html);
TQString found = re.cap(1);
found.remove(',');