summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneytransactionfilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/mymoney/mymoneytransactionfilter.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneytransactionfilter.cpp260
1 files changed, 130 insertions, 130 deletions
diff --git a/kmymoney2/mymoney/mymoneytransactionfilter.cpp b/kmymoney2/mymoney/mymoneytransactionfilter.cpp
index 317400d..d6f4b6a 100644
--- a/kmymoney2/mymoney/mymoneytransactionfilter.cpp
+++ b/kmymoney2/mymoney/mymoneytransactionfilter.cpp
@@ -40,7 +40,7 @@ MyMoneyTransactionFilter::MyMoneyTransactionFilter()
m_invertText = false;
}
-MyMoneyTransactionFilter::MyMoneyTransactionFilter(const QString& id)
+MyMoneyTransactionFilter::MyMoneyTransactionFilter(const TQString& id)
{
m_filterSet.allFilter = 0;
m_reportAllSplits = false;
@@ -66,8 +66,8 @@ void MyMoneyTransactionFilter::clear(void)
m_states.clear();
m_validity.clear();
m_matchingSplits.clear();
- m_fromDate = QDate();
- m_toDate = QDate();
+ m_fromDate = TQDate();
+ m_toDate = TQDate();
}
void MyMoneyTransactionFilter::clearAccountFilter(void)
@@ -76,26 +76,26 @@ void MyMoneyTransactionFilter::clearAccountFilter(void)
m_accounts.clear();
}
-void MyMoneyTransactionFilter::setTextFilter(const QRegExp& text, bool invert)
+void MyMoneyTransactionFilter::setTextFilter(const TQRegExp& text, bool invert)
{
m_filterSet.singleFilter.textFilter = 1;
m_invertText = invert;
m_text = text;
}
-void MyMoneyTransactionFilter::addAccount(const QStringList& ids)
+void MyMoneyTransactionFilter::addAccount(const TQStringList& ids)
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
m_filterSet.singleFilter.accountFilter = 1;
for(it = ids.begin(); it != ids.end(); ++it)
addAccount(*it);
}
-void MyMoneyTransactionFilter::addAccount(const QString& id)
+void MyMoneyTransactionFilter::addAccount(const TQString& id)
{
if(!m_accounts.isEmpty() && !id.isEmpty()) {
- if(m_accounts.find(id) != 0)
+ if(m_accounts.tqfind(id) != 0)
return;
}
if(m_accounts.count() >= m_accounts.size()*2) {
@@ -106,19 +106,19 @@ void MyMoneyTransactionFilter::addAccount(const QString& id)
m_accounts.insert(id, "");
}
-void MyMoneyTransactionFilter::addCategory(const QStringList& ids)
+void MyMoneyTransactionFilter::addCategory(const TQStringList& ids)
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
m_filterSet.singleFilter.categoryFilter = 1;
for(it = ids.begin(); it != ids.end(); ++it)
addCategory(*it);
}
-void MyMoneyTransactionFilter::addCategory(const QString& id)
+void MyMoneyTransactionFilter::addCategory(const TQString& id)
{
if(!m_categories.isEmpty() && !id.isEmpty()) {
- if(m_categories.find(id) != 0)
+ if(m_categories.tqfind(id) != 0)
return;
}
if(m_categories.count() >= m_categories.size()*2) {
@@ -129,7 +129,7 @@ void MyMoneyTransactionFilter::addCategory(const QString& id)
m_categories.insert(id, "");
}
-void MyMoneyTransactionFilter::setDateFilter(const QDate& from, const QDate& to)
+void MyMoneyTransactionFilter::setDateFilter(const TQDate& from, const TQDate& to)
{
m_filterSet.singleFilter.dateFilter = from.isValid() | to.isValid();
m_fromDate = from;
@@ -150,10 +150,10 @@ void MyMoneyTransactionFilter::setAmountFilter(const MyMoneyMoney& from, const M
}
}
-void MyMoneyTransactionFilter::addPayee(const QString& id)
+void MyMoneyTransactionFilter::addPayee(const TQString& id)
{
if(!m_payees.isEmpty() && !id.isEmpty()) {
- if(m_payees.find(id) != 0)
+ if(m_payees.tqfind(id) != 0)
return;
}
if(m_payees.count() >= m_payees.size()*2) {
@@ -167,11 +167,11 @@ void MyMoneyTransactionFilter::addPayee(const QString& id)
void MyMoneyTransactionFilter::addType(const int type)
{
if(!m_types.isEmpty()) {
- if(m_types.find(type) != 0)
+ if(m_types.tqfind(type) != 0)
return;
}
// we don't have more than 4 or 5 types, so we don't worry about
- // the size of the QIntDict object.
+ // the size of the TQIntDict object.
m_filterSet.singleFilter.typeFilter = 1;
m_types.insert(type, "");
}
@@ -179,11 +179,11 @@ void MyMoneyTransactionFilter::addType(const int type)
void MyMoneyTransactionFilter::addState(const int state)
{
if(!m_states.isEmpty()) {
- if(m_states.find(state) != 0)
+ if(m_states.tqfind(state) != 0)
return;
}
// we don't have more than 4 or 5 states, so we don't worry about
- // the size of the QIntDict object.
+ // the size of the TQIntDict object.
m_filterSet.singleFilter.stateFilter = 1;
m_states.insert(state, "");
}
@@ -191,16 +191,16 @@ void MyMoneyTransactionFilter::addState(const int state)
void MyMoneyTransactionFilter::addValidity(const int type)
{
if(!m_validity.isEmpty()) {
- if(m_validity.find(type) != 0)
+ if(m_validity.tqfind(type) != 0)
return;
}
// we don't have more than 4 or 5 states, so we don't worry about
- // the size of the QIntDict object.
+ // the size of the TQIntDict object.
m_filterSet.singleFilter.validityFilter = 1;
m_validity.insert(type, "");
}
-void MyMoneyTransactionFilter::setNumberFilter(const QString& from, const QString& to)
+void MyMoneyTransactionFilter::setNumberFilter(const TQString& from, const TQString& to)
{
m_filterSet.singleFilter.nrFilter = 1;
m_fromNr = from;
@@ -217,7 +217,7 @@ void MyMoneyTransactionFilter::setConsiderCategory(const bool check)
m_considerCategory = check;
}
-const QValueList<MyMoneySplit>& MyMoneyTransactionFilter::matchingSplits(void) const
+const TQValueList<MyMoneySplit>& MyMoneyTransactionFilter::matchingSplits(void) const
{
return m_matchingSplits;
}
@@ -230,18 +230,18 @@ bool MyMoneyTransactionFilter::matchText(const MyMoneySplit * const sp) const
MyMoneyFile* file = MyMoneyFile::instance();
const MyMoneyAccount& acc = file->account(sp->accountId());
const MyMoneySecurity& sec = file->security(acc.currencyId());
- if(sp->memo().contains(m_text)
- || sp->shares().formatMoney(acc.fraction(sec)).contains(m_text)
- || sp->value().formatMoney(acc.fraction(sec)).contains(m_text)
- || sp->number().contains(m_text))
+ if(sp->memo().tqcontains(m_text)
+ || sp->shares().formatMoney(acc.fraction(sec)).tqcontains(m_text)
+ || sp->value().formatMoney(acc.fraction(sec)).tqcontains(m_text)
+ || sp->number().tqcontains(m_text))
return !m_invertText;
- if(acc.name().contains(m_text))
+ if(acc.name().tqcontains(m_text))
return !m_invertText;
if(!sp->payeeId().isEmpty()) {
const MyMoneyPayee& payee = file->payee(sp->payeeId());
- if(payee.name().contains(m_text))
+ if(payee.name().tqcontains(m_text))
return !m_invertText;
}
return m_invertText;
@@ -268,7 +268,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneySplit * const sp) const
bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
{
MyMoneyFile* file = MyMoneyFile::instance();
- QValueList<MyMoneySplit>::ConstIterator it;
+ TQValueList<MyMoneySplit>::ConstIterator it;
m_matchingSplits.clear();
@@ -286,12 +286,12 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the date range
if(m_filterSet.singleFilter.dateFilter) {
- if(m_fromDate != QDate()) {
+ if(m_fromDate != TQDate()) {
if(transaction.postDate() < m_fromDate)
return false;
}
- if(m_toDate != QDate()) {
+ if(m_toDate != TQDate()) {
if(transaction.postDate() > m_toDate)
return false;
}
@@ -300,7 +300,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// construct a local list of pointers to all splits and
// remove the ones that do not match account and/or categories.
- QPtrList<MyMoneySplit> matchingSplits;
+ TQPtrList<MyMoneySplit> matchingSplits;
for(it = transaction.splits().begin(); it != transaction.splits().end(); ++it) {
matchingSplits.append(&(*it));
}
@@ -312,7 +312,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the transaction's validity
if(m_filterSet.singleFilter.validityFilter) {
if(m_validity.count() > 0) {
- if(!m_validity.find(validTransaction(transaction)))
+ if(!m_validity.tqfind(validTransaction(transaction)))
return false;
}
}
@@ -332,7 +332,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check if the split references one of the categories in the list
if(m_filterSet.singleFilter.categoryFilter) {
if(m_categories.count() > 0) {
- if(m_categories.find(sp->accountId())) {
+ if(m_categories.tqfind(sp->accountId())) {
categoryMatched = true;
removeSplit = 0;
}
@@ -347,7 +347,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check if the split references one of the accounts in the list
if(m_filterSet.singleFilter.accountFilter) {
if(m_accounts.count() > 0) {
- if(m_accounts.find(sp->accountId())) {
+ if(m_accounts.tqfind(sp->accountId())) {
accountMatched = true;
removeSplit = 0;
}
@@ -361,7 +361,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
} else {
if(m_filterSet.singleFilter.accountFilter) {
if(m_accounts.count() > 0) {
- if(m_accounts.find(sp->accountId())) {
+ if(m_accounts.tqfind(sp->accountId())) {
accountMatched = true;
removeSplit = 0;
}
@@ -420,7 +420,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the payee list
if(!removeSplit && m_filterSet.singleFilter.payeeFilter) {
if(m_payees.count() > 0) {
- if(sp->payeeId().isEmpty() || !m_payees.find(sp->payeeId()))
+ if(sp->payeeId().isEmpty() || !m_payees.tqfind(sp->payeeId()))
removeSplit = sp;
} else if(!sp->payeeId().isEmpty())
removeSplit = sp;
@@ -429,7 +429,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the type list
if(!removeSplit && m_filterSet.singleFilter.typeFilter) {
if(m_types.count() > 0) {
- if(!m_types.find(splitType(transaction, *sp)))
+ if(!m_types.tqfind(splitType(transaction, *sp)))
removeSplit = sp;
}
}
@@ -437,7 +437,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the state list
if(!removeSplit && m_filterSet.singleFilter.stateFilter) {
if(m_states.count() > 0) {
- if(!m_states.find(splitState(*sp)))
+ if(!m_states.tqfind(splitState(*sp)))
removeSplit = sp;
}
}
@@ -512,7 +512,7 @@ int MyMoneyTransactionFilter::splitType(const MyMoneyTransaction& t, const MyMon
return allTypes;
if(t.splitCount() == 2) {
- QString ida, idb;
+ TQString ida, idb;
ida = t.splits()[0].accountId();
idb = t.splits()[1].accountId();
@@ -533,7 +533,7 @@ int MyMoneyTransactionFilter::splitType(const MyMoneyTransaction& t, const MyMon
MyMoneyTransactionFilter::validityOptionE MyMoneyTransactionFilter::validTransaction(const MyMoneyTransaction& t) const
{
- QValueList<MyMoneySplit>::ConstIterator it_s;
+ TQValueList<MyMoneySplit>::ConstIterator it_s;
MyMoneyMoney val;
for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) {
@@ -542,22 +542,22 @@ MyMoneyTransactionFilter::validityOptionE MyMoneyTransactionFilter::validTransac
return (val == MyMoneyMoney(0,1)) ? valid : invalid;
}
-bool MyMoneyTransactionFilter::includesCategory( const QString& cat ) const
+bool MyMoneyTransactionFilter::includesCategory( const TQString& cat ) const
{
- return (! m_filterSet.singleFilter.categoryFilter) || m_categories.find( cat );
+ return (! m_filterSet.singleFilter.categoryFilter) || m_categories.tqfind( cat );
}
-bool MyMoneyTransactionFilter::includesAccount( const QString& acc ) const
+bool MyMoneyTransactionFilter::includesAccount( const TQString& acc ) const
{
- return (! m_filterSet.singleFilter.accountFilter) || m_accounts.find( acc );
+ return (! m_filterSet.singleFilter.accountFilter) || m_accounts.tqfind( acc );
}
-bool MyMoneyTransactionFilter::includesPayee( const QString& pye ) const
+bool MyMoneyTransactionFilter::includesPayee( const TQString& pye ) const
{
- return (! m_filterSet.singleFilter.payeeFilter) || m_payees.find( pye );
+ return (! m_filterSet.singleFilter.payeeFilter) || m_payees.tqfind( pye );
}
-bool MyMoneyTransactionFilter::dateFilter( QDate& from, QDate& to ) const
+bool MyMoneyTransactionFilter::dateFilter( TQDate& from, TQDate& to ) const
{
from = m_fromDate;
to = m_toDate;
@@ -571,20 +571,20 @@ bool MyMoneyTransactionFilter::amountFilter( MyMoneyMoney& from, MyMoneyMoney& t
return m_filterSet.singleFilter.amountFilter==1;
}
-bool MyMoneyTransactionFilter::numberFilter( QString& from, QString& to ) const
+bool MyMoneyTransactionFilter::numberFilter( TQString& from, TQString& to ) const
{
from = m_fromNr;
to = m_toNr;
return m_filterSet.singleFilter.nrFilter==1;
}
-bool MyMoneyTransactionFilter::payees(QStringList& list) const
+bool MyMoneyTransactionFilter::payees(TQStringList& list) const
{
bool result = m_filterSet.singleFilter.payeeFilter;
if ( result )
{
- QAsciiDictIterator<char> it_payee( m_payees );
+ TQAsciiDictIterator<char> it_payee( m_payees );
while ( it_payee.current() )
{
list += it_payee.currentKey();
@@ -594,16 +594,16 @@ bool MyMoneyTransactionFilter::payees(QStringList& list) const
return result;
}
-bool MyMoneyTransactionFilter::accounts(QStringList& list) const
+bool MyMoneyTransactionFilter::accounts(TQStringList& list) const
{
bool result = m_filterSet.singleFilter.accountFilter;
if ( result )
{
- QAsciiDictIterator<char> it_account( m_accounts );
+ TQAsciiDictIterator<char> it_account( m_accounts );
while ( it_account.current() )
{
- QString account = it_account.currentKey();
+ TQString account = it_account.currentKey();
list += account;
++it_account;
}
@@ -611,13 +611,13 @@ bool MyMoneyTransactionFilter::accounts(QStringList& list) const
return result;
}
-bool MyMoneyTransactionFilter::categories(QStringList& list) const
+bool MyMoneyTransactionFilter::categories(TQStringList& list) const
{
bool result = m_filterSet.singleFilter.categoryFilter;
if ( result )
{
- QAsciiDictIterator<char> it_category( m_categories );
+ TQAsciiDictIterator<char> it_category( m_categories );
while ( it_category.current() )
{
list += it_category.currentKey();
@@ -627,13 +627,13 @@ bool MyMoneyTransactionFilter::categories(QStringList& list) const
return result;
}
-bool MyMoneyTransactionFilter::types(QValueList<int>& list) const
+bool MyMoneyTransactionFilter::types(TQValueList<int>& list) const
{
bool result = m_filterSet.singleFilter.typeFilter;
if ( result )
{
- QIntDictIterator<char> it_type( m_types );
+ TQIntDictIterator<char> it_type( m_types );
while ( it_type.current() )
{
list += it_type.currentKey();
@@ -643,13 +643,13 @@ bool MyMoneyTransactionFilter::types(QValueList<int>& list) const
return result;
}
-bool MyMoneyTransactionFilter::states(QValueList<int>& list) const
+bool MyMoneyTransactionFilter::states(TQValueList<int>& list) const
{
bool result = m_filterSet.singleFilter.stateFilter;
if ( result )
{
- QIntDictIterator<char> it_state( m_states );
+ TQIntDictIterator<char> it_state( m_states );
while ( it_state.current() )
{
list += it_state.currentKey();
@@ -665,7 +665,7 @@ bool MyMoneyTransactionFilter::firstType(int&i) const
if ( result )
{
- QIntDictIterator<char> it_type( m_types );
+ TQIntDictIterator<char> it_type( m_types );
if ( it_type.current() )
i = it_type.currentKey();
}
@@ -678,14 +678,14 @@ bool MyMoneyTransactionFilter::firstState(int&i) const
if ( result )
{
- QIntDictIterator<char> it_state( m_states );
+ TQIntDictIterator<char> it_state( m_states );
if ( it_state.current() )
i = it_state.currentKey();
}
return result;
}
-bool MyMoneyTransactionFilter::textFilter(QRegExp& exp) const
+bool MyMoneyTransactionFilter::textFilter(TQRegExp& exp) const
{
exp = m_text;
return m_filterSet.singleFilter.textFilter == 1;
@@ -693,7 +693,7 @@ bool MyMoneyTransactionFilter::textFilter(QRegExp& exp) const
void MyMoneyTransactionFilter::setDateFilter(dateOptionE range)
{
- QDate from, to;
+ TQDate from, to;
if ( translateDateRange(range,from,to) )
setDateFilter(from,to);
}
@@ -707,132 +707,132 @@ void MyMoneyTransactionFilter::setFiscalYearStart(int firstMonth, int firstDay)
fiscalYearStartDay = firstDay;
}
-bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, QDate& start, QDate& end)
+bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, TQDate& start, TQDate& end)
{
bool rc = true;
int yr, mon, day;
- yr = QDate::currentDate().year();
- mon = QDate::currentDate().month();
- day = QDate::currentDate().day();
- QDate tmp;
+ yr = TQDate::tqcurrentDate().year();
+ mon = TQDate::tqcurrentDate().month();
+ day = TQDate::tqcurrentDate().day();
+ TQDate tmp;
switch(id) {
case MyMoneyTransactionFilter::allDates:
- start = QDate();
- end = QDate();
+ start = TQDate();
+ end = TQDate();
break;
case MyMoneyTransactionFilter::asOfToday:
- start = QDate();
- end = QDate::currentDate();
+ start = TQDate();
+ end = TQDate::tqcurrentDate();
break;
case MyMoneyTransactionFilter::currentMonth:
- start = QDate(yr,mon,1);
- end = QDate(yr,mon,1).addMonths(1).addDays(-1);
+ start = TQDate(yr,mon,1);
+ end = TQDate(yr,mon,1).addMonths(1).addDays(-1);
break;
case MyMoneyTransactionFilter::currentYear:
- start = QDate(yr,1,1);
- end = QDate(yr,12,31);
+ start = TQDate(yr,1,1);
+ end = TQDate(yr,12,31);
break;
case MyMoneyTransactionFilter::monthToDate:
- start = QDate(yr,mon,1);
- end = QDate::currentDate();
+ start = TQDate(yr,mon,1);
+ end = TQDate::tqcurrentDate();
break;
case MyMoneyTransactionFilter::yearToDate:
- start = QDate(yr,1,1);
- end = QDate::currentDate();
+ start = TQDate(yr,1,1);
+ end = TQDate::tqcurrentDate();
break;
case MyMoneyTransactionFilter::yearToMonth:
- start = QDate(yr,1,1);
- end = QDate(yr,mon,1).addDays(-1);
+ start = TQDate(yr,1,1);
+ end = TQDate(yr,mon,1).addDays(-1);
break;
case MyMoneyTransactionFilter::lastMonth:
- start = QDate(yr,mon,1).addMonths(-1);
- end = QDate(yr,mon,1).addDays(-1);
+ start = TQDate(yr,mon,1).addMonths(-1);
+ end = TQDate(yr,mon,1).addDays(-1);
break;
case MyMoneyTransactionFilter::lastYear:
- start = QDate(yr,1,1).addYears(-1);
- end = QDate(yr,12,31).addYears(-1);
+ start = TQDate(yr,1,1).addYears(-1);
+ end = TQDate(yr,12,31).addYears(-1);
break;
case MyMoneyTransactionFilter::last7Days:
- start = QDate::currentDate().addDays(-7);
- end = QDate::currentDate();
+ start = TQDate::tqcurrentDate().addDays(-7);
+ end = TQDate::tqcurrentDate();
break;
case MyMoneyTransactionFilter::last30Days:
- start = QDate::currentDate().addDays(-30);
- end = QDate::currentDate();
+ start = TQDate::tqcurrentDate().addDays(-30);
+ end = TQDate::tqcurrentDate();
break;
case MyMoneyTransactionFilter::last3Months:
- start = QDate::currentDate().addMonths(-3);
- end = QDate::currentDate();
+ start = TQDate::tqcurrentDate().addMonths(-3);
+ end = TQDate::tqcurrentDate();
break;
case MyMoneyTransactionFilter::last6Months:
- start = QDate::currentDate().addMonths(-6);
- end = QDate::currentDate();
+ start = TQDate::tqcurrentDate().addMonths(-6);
+ end = TQDate::tqcurrentDate();
break;
case MyMoneyTransactionFilter::last11Months:
- start = QDate(yr,mon,1).addMonths(-12);
- end = QDate(yr,mon,1).addDays(-1);
+ start = TQDate(yr,mon,1).addMonths(-12);
+ end = TQDate(yr,mon,1).addDays(-1);
break;
case MyMoneyTransactionFilter::last12Months:
- start = QDate::currentDate().addMonths(-12);
- end = QDate::currentDate();
+ start = TQDate::tqcurrentDate().addMonths(-12);
+ end = TQDate::tqcurrentDate();
break;
case MyMoneyTransactionFilter::next7Days:
- start = QDate::currentDate();
- end = QDate::currentDate().addDays(7);
+ start = TQDate::tqcurrentDate();
+ end = TQDate::tqcurrentDate().addDays(7);
break;
case MyMoneyTransactionFilter::next30Days:
- start = QDate::currentDate();
- end = QDate::currentDate().addDays(30);
+ start = TQDate::tqcurrentDate();
+ end = TQDate::tqcurrentDate().addDays(30);
break;
case MyMoneyTransactionFilter::next3Months:
- start = QDate::currentDate();
- end = QDate::currentDate().addMonths(3);
+ start = TQDate::tqcurrentDate();
+ end = TQDate::tqcurrentDate().addMonths(3);
break;
case MyMoneyTransactionFilter::next6Months:
- start = QDate::currentDate();
- end = QDate::currentDate().addMonths(6);
+ start = TQDate::tqcurrentDate();
+ end = TQDate::tqcurrentDate().addMonths(6);
break;
case MyMoneyTransactionFilter::next12Months:
- start = QDate::currentDate();
- end = QDate::currentDate().addMonths(12);
+ start = TQDate::tqcurrentDate();
+ end = TQDate::tqcurrentDate().addMonths(12);
break;
case MyMoneyTransactionFilter::userDefined:
- start = QDate();
- end = QDate();
+ start = TQDate();
+ end = TQDate();
break;
case MyMoneyTransactionFilter::last3ToNext3Months:
- start = QDate::currentDate().addMonths(-3);
- end = QDate::currentDate().addMonths(3);
+ start = TQDate::tqcurrentDate().addMonths(-3);
+ end = TQDate::tqcurrentDate().addMonths(3);
break;
case MyMoneyTransactionFilter::currentQuarter:
- start = QDate(yr, mon - ((mon-1) % 3), 1);
+ start = TQDate(yr, mon - ((mon-1) % 3), 1);
end = start.addMonths(3).addDays(-1);
break;
case MyMoneyTransactionFilter::lastQuarter:
- start = QDate(yr, mon - ((mon-1) % 3), 1).addMonths(-3);
+ start = TQDate(yr, mon - ((mon-1) % 3), 1).addMonths(-3);
end = start.addMonths(3).addDays(-1);
break;
case MyMoneyTransactionFilter::nextQuarter:
- start = QDate(yr, mon - ((mon-1) % 3), 1).addMonths(3);
+ start = TQDate(yr, mon - ((mon-1) % 3), 1).addMonths(3);
end = start.addMonths(3).addDays(-1);
break;
case MyMoneyTransactionFilter::currentFiscalYear:
- start = QDate(QDate::currentDate().year(), fiscalYearStartMonth, fiscalYearStartDay);
- if(QDate::currentDate() < start)
+ start = TQDate(TQDate::tqcurrentDate().year(), fiscalYearStartMonth, fiscalYearStartDay);
+ if(TQDate::tqcurrentDate() < start)
start = start.addYears(-1);
end = start.addYears(1).addDays(-1);
break;
case MyMoneyTransactionFilter::lastFiscalYear:
- start = QDate(QDate::currentDate().year(), fiscalYearStartMonth, fiscalYearStartDay);
- if(QDate::currentDate() < start)
+ start = TQDate(TQDate::tqcurrentDate().year(), fiscalYearStartMonth, fiscalYearStartDay);
+ if(TQDate::tqcurrentDate() < start)
start = start.addYears(-1);
start = start.addYears(-1);
end = start.addYears(1).addDays(-1);
break;
case MyMoneyTransactionFilter::today:
- start = QDate::currentDate();
- end = QDate::currentDate();
+ start = TQDate::tqcurrentDate();
+ end = TQDate::tqcurrentDate();
break;
default:
qFatal("Unknown date identifier %d in MyMoneyTransactionFilter::translateDateRange()", id);
@@ -842,16 +842,16 @@ bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, QDate& start,
return rc;
}
-void MyMoneyTransactionFilter::removeReference(const QString& id)
+void MyMoneyTransactionFilter::removeReference(const TQString& id)
{
- if(m_accounts.find(id)) {
- qDebug("%s", (QString("Remove account '%1' from report").arg(id)).data());
+ if(m_accounts.tqfind(id)) {
+ qDebug("%s", (TQString("Remove account '%1' from report").tqarg(id)).data());
m_accounts.remove(id);
- } else if(m_categories.find(id)) {
- qDebug("%s", (QString("Remove category '%1' from report").arg(id)).data());
+ } else if(m_categories.tqfind(id)) {
+ qDebug("%s", (TQString("Remove category '%1' from report").tqarg(id)).data());
m_categories.remove(id);
- } else if(m_payees.find(id)) {
- qDebug("%s", (QString("Remove payee '%1' from report").arg(id)).data());
+ } else if(m_payees.tqfind(id)) {
+ qDebug("%s", (TQString("Remove payee '%1' from report").tqarg(id)).data());
m_payees.remove(id);
}
}