diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:37:08 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-06 03:55:16 +0200 |
commit | 1de308fd3b1aacec7769d867a6eeaa98af69c61c (patch) | |
tree | 0a6433c4fe72a4e70d7686c84dcf9848ff8b7284 /kmymoney2/reports/pivottable.cpp | |
parent | e0d4ece30d7c0095bfdd9a81364b66fe18a0f2cb (diff) | |
download | kmymoney-1de308fd3b1aacec7769d867a6eeaa98af69c61c.tar.gz kmymoney-1de308fd3b1aacec7769d867a6eeaa98af69c61c.zip |
Remove additional unneeded tq method conversions
(cherry picked from commit c70e40bd3f54a2c4d9ef57a36f19c996f4e00ed6)
Diffstat (limited to 'kmymoney2/reports/pivottable.cpp')
-rw-r--r-- | kmymoney2/reports/pivottable.cpp | 200 |
1 files changed, 100 insertions, 100 deletions
diff --git a/kmymoney2/reports/pivottable.cpp b/kmymoney2/reports/pivottable.cpp index 5acac5b..db73062 100644 --- a/kmymoney2/reports/pivottable.cpp +++ b/kmymoney2/reports/pivottable.cpp @@ -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 @@ -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; } @@ -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 %2 - %3 %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); @@ -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\"> </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\"> </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(" "), " ")) - .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(" "), " ")) + .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\"> %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(" "), " ")) - .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(" "), " ")) + .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 %2</td>").tqarg(i18n("Total")).tqarg((*it_outergroup).m_displayName); + result += TQString("<tr class=\"sectionfooter\"><td class=\"left\">%1 %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> </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()); } } @@ -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>"); |