summaryrefslogtreecommitdiffstats
path: root/kmymoney2/reports/reportaccount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/reports/reportaccount.cpp')
-rw-r--r--kmymoney2/reports/reportaccount.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/kmymoney2/reports/reportaccount.cpp b/kmymoney2/reports/reportaccount.cpp
index 5f7e7f8..d38727d 100644
--- a/kmymoney2/reports/reportaccount.cpp
+++ b/kmymoney2/reports/reportaccount.cpp
@@ -52,11 +52,11 @@ ReportAccount::ReportAccount( const ReportAccount& copy ):
DEBUG_ENTER(__PRETTY_FUNCTION__);
}
-ReportAccount::ReportAccount( const QString& accountid ):
+ReportAccount::ReportAccount( const TQString& accountid ):
MyMoneyAccount( MyMoneyFile::instance()->account(accountid) )
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
- DEBUG_OUTPUT(QString("Account %1").arg(accountid));
+ DEBUG_OUTPUT(TQString("Account %1").tqarg(accountid));
calculateAccountHierarchy();
}
@@ -64,7 +64,7 @@ ReportAccount::ReportAccount( const MyMoneyAccount& account ):
MyMoneyAccount( account )
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
- DEBUG_OUTPUT(QString("Account %1").arg(account.id()));
+ DEBUG_OUTPUT(TQString("Account %1").tqarg(account.id()));
calculateAccountHierarchy();
}
@@ -73,21 +73,21 @@ void ReportAccount::calculateAccountHierarchy( void )
DEBUG_ENTER(__PRETTY_FUNCTION__);
MyMoneyFile* file = MyMoneyFile::instance();
- QString resultid = id();
- QString parentid = parentAccountId();
+ TQString resultid = id();
+ TQString tqparentid = tqparentAccountId();
#ifdef DEBUG_HIDE_SENSITIVE
m_nameHierarchy.prepend(file->account(resultid).id());
#else
m_nameHierarchy.prepend(file->account(resultid).name());
#endif
- while (!file->isStandardAccount(parentid))
+ while (!file->isStandardAccount(tqparentid))
{
- // take on the identity of our parent
- resultid = parentid;
+ // take on the identity of our tqparent
+ resultid = tqparentid;
// and try again
- parentid = file->account(resultid).parentAccountId();
+ tqparentid = file->account(resultid).tqparentAccountId();
#ifdef DEBUG_HIDE_SENSITIVE
m_nameHierarchy.prepend(file->account(resultid).id());
#else
@@ -96,7 +96,7 @@ void ReportAccount::calculateAccountHierarchy( void )
}
}
-MyMoneyMoney ReportAccount::deepCurrencyPrice( const QDate& date ) const
+MyMoneyMoney ReportAccount::deepCurrencyPrice( const TQDate& date ) const
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
@@ -111,25 +111,25 @@ MyMoneyMoney ReportAccount::deepCurrencyPrice( const QDate& date ) const
{
result = price.rate(undersecurity.tradingCurrency());
- DEBUG_OUTPUT(QString("Converting under %1 to deep %2, price on %3 is %4")
- .arg(undersecurity.name())
- .arg(file->security(undersecurity.tradingCurrency()).name())
- .arg(date.toString())
- .arg(result.toDouble()));
+ 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()));
}
else
{
- DEBUG_OUTPUT(QString("No price to convert under %1 to deep %2 on %3")
- .arg(undersecurity.name())
- .arg(file->security(undersecurity.tradingCurrency()).name())
- .arg(date.toString()));
+ 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()));
}
}
return result;
}
-MyMoneyMoney ReportAccount::baseCurrencyPrice( const QDate& date ) const
+MyMoneyMoney ReportAccount::baseCurrencyPrice( const TQDate& date ) const
{
// Note that whether or not the user chooses to convert to base currency, all the values
// for a given account/category are converted to the currency for THAT account/category
@@ -156,7 +156,7 @@ MyMoneyMoney ReportAccount::baseCurrencyPrice( const QDate& date ) const
return result;
}
-MyMoneyMoney ReportAccount::foreignCurrencyPrice( const QString foreignCurrency, const QDate& date ) const
+MyMoneyMoney ReportAccount::foreignCurrencyPrice( const TQString foreignCurrency, const TQDate& date ) const
{
DEBUG_ENTER(__PRETTY_FUNCTION__);
@@ -166,7 +166,7 @@ MyMoneyMoney ReportAccount::foreignCurrencyPrice( const QString foreignCurrency,
MyMoneySecurity security = file->security(foreignCurrency);
//check whether it is a currency or a commodity. In the latter case case, get the trading currency
- QString tradingCurrency;
+ TQString tradingCurrency;
if(security.isCurrency()) {
tradingCurrency = foreignCurrency;
} else {
@@ -180,18 +180,18 @@ MyMoneyMoney ReportAccount::foreignCurrencyPrice( const QString foreignCurrency,
if(price.isValid())
{
result = price.rate(tradingCurrency);
- DEBUG_OUTPUT(QString("Converting deep %1 to currency %2, price on %3 is %4")
- .arg(file->currency(currency().id()).name())
- .arg(file->currency(foreignCurrency).name())
- .arg(date.toString())
- .arg(result.toDouble()));
+ 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()));
}
else
{
- DEBUG_OUTPUT(QString("No price to convert deep %1 to currency %2 on %3")
- .arg(file->currency(currency().id()).name())
- .arg(file->currency(foreignCurrency).name())
- .arg(date.toString()));
+ 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()));
}
}
return result;
@@ -232,8 +232,8 @@ bool ReportAccount::operator<(const ReportAccount& second) const
bool result = false;
bool haveresult = false;
- QStringList::const_iterator it_first = m_nameHierarchy.begin();
- QStringList::const_iterator it_second = second.m_nameHierarchy.begin();
+ TQStringList::const_iterator it_first = m_nameHierarchy.begin();
+ TQStringList::const_iterator it_second = second.m_nameHierarchy.begin();
while ( it_first != m_nameHierarchy.end() )
{
// The first string is longer than the second, but otherwise identical
@@ -265,7 +265,7 @@ bool ReportAccount::operator<(const ReportAccount& second) const
if ( !haveresult && ( it_second != second.m_nameHierarchy.end() ) )
result = true;
-// DEBUG_OUTPUT(QString("%1 < %2 is %3").arg(debugName(),second.debugName()).arg(result));
+// DEBUG_OUTPUT(TQString("%1 < %2 is %3").tqarg(debugName(),second.debugName()).tqarg(result));
return result;
}
@@ -274,21 +274,21 @@ bool ReportAccount::operator<(const ReportAccount& second) const
* method only returns the last name in the list, which is the engine name]
* of this account.
*
- * @return QString The account's name
+ * @return TQString The account's name
*/
-QString ReportAccount::name( void ) const
+TQString ReportAccount::name( void ) const
{
return m_nameHierarchy.back();
}
// MyMoneyAccount:fullHierarchyDebug()
-QString ReportAccount::debugName( void ) const
+TQString ReportAccount::debugName( void ) const
{
return m_nameHierarchy.join("|");
}
// MyMoneyAccount:fullHierarchy()
-QString ReportAccount::fullName( void ) const
+TQString ReportAccount::fullName( void ) const
{
return m_nameHierarchy.join(": ");
}
@@ -305,9 +305,9 @@ unsigned ReportAccount::hierarchyDepth( void ) const
return ( m_nameHierarchy.size() );
}
-ReportAccount ReportAccount::parent( void ) const
+ReportAccount ReportAccount::tqparent( void ) const
{
- return ReportAccount( parentAccountId() );
+ return ReportAccount( tqparentAccountId() );
}
ReportAccount ReportAccount::topParent( void ) const
@@ -315,22 +315,22 @@ ReportAccount ReportAccount::topParent( void ) const
DEBUG_ENTER(__PRETTY_FUNCTION__);
MyMoneyFile* file = MyMoneyFile::instance();
- QString resultid = id();
- QString parentid = parentAccountId();
+ TQString resultid = id();
+ TQString tqparentid = tqparentAccountId();
- while (!file->isStandardAccount(parentid))
+ while (!file->isStandardAccount(tqparentid))
{
- // take on the identity of our parent
- resultid = parentid;
+ // take on the identity of our tqparent
+ resultid = tqparentid;
// and try again
- parentid = file->account(resultid).parentAccountId();
+ tqparentid = file->account(resultid).tqparentAccountId();
}
return ReportAccount( resultid );
}
-QString ReportAccount::topParentName( void ) const
+TQString ReportAccount::topParentName( void ) const
{
return m_nameHierarchy.first();
}