summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneyscheduled.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/mymoney/mymoneyscheduled.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneyscheduled.cpp200
1 files changed, 100 insertions, 100 deletions
diff --git a/kmymoney2/mymoney/mymoneyscheduled.cpp b/kmymoney2/mymoney/mymoneyscheduled.cpp
index 88b4c7b..ef8264c 100644
--- a/kmymoney2/mymoney/mymoneyscheduled.cpp
+++ b/kmymoney2/mymoney/mymoneyscheduled.cpp
@@ -40,17 +40,17 @@ MyMoneySchedule::MyMoneySchedule() :
m_paymentType = STYPE_ANY;
m_fixed = false;
m_autoEnter = false;
- m_startDate = QDate();
- m_endDate = QDate();
- m_lastPayment = QDate();
+ m_startDate = TQDate();
+ m_endDate = TQDate();
+ m_lastPayment = TQDate();
m_weekendOption = MoveNothing;
}
-MyMoneySchedule::MyMoneySchedule(const QString& name, typeE type,
+MyMoneySchedule::MyMoneySchedule(const TQString& name, typeE type,
occurenceE occurence, int occurenceMultiplier,
paymentTypeE paymentType,
- const QDate& /* startDate */,
- const QDate& endDate,
+ const TQDate& /* startDate */,
+ const TQDate& endDate,
bool fixed, bool autoEnter) :
MyMoneyObject()
{
@@ -63,13 +63,13 @@ MyMoneySchedule::MyMoneySchedule(const QString& name, typeE type,
m_paymentType = paymentType;
m_fixed = fixed;
m_autoEnter = autoEnter;
- m_startDate = QDate();
+ m_startDate = TQDate();
m_endDate = endDate;
- m_lastPayment = QDate();
+ m_lastPayment = TQDate();
m_weekendOption = MoveNothing;
}
-MyMoneySchedule::MyMoneySchedule(const QDomElement& node) :
+MyMoneySchedule::MyMoneySchedule(const TQDomElement& node) :
MyMoneyObject(node)
{
if("SCHEDULED_TX" != node.tagName())
@@ -91,7 +91,7 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) :
m_weekendOption = static_cast<MyMoneySchedule::weekendOptionE>(node.attribute("weekendOption").toInt());
// read in the associated transaction
- QDomNodeList nodeList = node.elementsByTagName("TRANSACTION");
+ TQDomNodeList nodeList = node.elementsByTagName("TRANSACTION");
if(nodeList.count() == 0)
throw new MYMONEYEXCEPTION("SCHEDULED_TX has no TRANSACTION node");
@@ -101,8 +101,8 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) :
// in the schedule. So if this is the case, we deal with a very old transaction
// and can't use the post date field as next due date. Hence, we wipe it out here
if(m_transaction.entryDate().isValid()) {
- m_transaction.setPostDate(QDate());
- m_transaction.setEntryDate(QDate());
+ m_transaction.setPostDate(TQDate());
+ m_transaction.setEntryDate(TQDate());
}
// readin the recorded payments
@@ -119,7 +119,7 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) :
if(!nextDueDate().isValid() && !m_lastPayment.isValid()) {
m_transaction.setPostDate(m_startDate);
// clear it, because the schedule has never been used
- m_startDate = QDate();
+ m_startDate = TQDate();
}
// There are reports that lastPayment and nextDueDate are identical or
@@ -127,7 +127,7 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) :
// be caused by older versions of the application. In this case, we just
// clear out the nextDueDate and let it calculate from the lastPayment.
if(nextDueDate().isValid() && nextDueDate() <= m_lastPayment) {
- m_transaction.setPostDate(QDate());
+ m_transaction.setPostDate(TQDate());
}
if(!nextDueDate().isValid()) {
@@ -136,7 +136,7 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) :
}
}
-MyMoneySchedule::MyMoneySchedule(const QString& id, const MyMoneySchedule& right) :
+MyMoneySchedule::MyMoneySchedule(const TQString& id, const MyMoneySchedule& right) :
MyMoneyObject(id)
{
*this = right;
@@ -151,7 +151,7 @@ MyMoneySchedule::occurenceE MyMoneySchedule::occurence(void) const
return occ;
}
-void MyMoneySchedule::setStartDate(const QDate& date)
+void MyMoneySchedule::setStartDate(const TQDate& date)
{
m_startDate = date;
}
@@ -190,14 +190,14 @@ void MyMoneySchedule::setTransaction(const MyMoneyTransaction& transaction, bool
// make sure to clear out some unused information in scheduled transactions
// we need to do this for the case that the transaction passed as argument
// is a matched or imported transaction.
- QValueList<MyMoneySplit> splits = t.splits();
+ TQValueList<MyMoneySplit> splits = t.splits();
if(splits.count() > 0) {
- QValueList<MyMoneySplit>::const_iterator it_s;
+ TQValueList<MyMoneySplit>::const_iterator it_s;
for(it_s = splits.begin(); it_s != splits.end(); ++it_s) {
MyMoneySplit s = *it_s;
// clear out the bankID
if(!(*it_s).bankID().isEmpty()) {
- s.setBankID(QString());
+ s.setBankID(TQString());
t.modifySplit(s);
}
@@ -212,10 +212,10 @@ void MyMoneySchedule::setTransaction(const MyMoneyTransaction& transaction, bool
// simply skip the test
// Don't check for accounts with an id of 'Phony-ID' which is used
// internally for non-existing accounts (during creation of accounts)
- if(file->storageAttached() && s.accountId() != QString("Phony-ID")) {
+ if(file->storageAttached() && s.accountId() != TQString("Phony-ID")) {
MyMoneyAccount acc = file->account(s.accountId());
if(acc.isIncomeExpense()) {
- s.setPayeeId(QString());
+ s.setPayeeId(TQString());
t.modifySplit(s);
}
}
@@ -229,7 +229,7 @@ void MyMoneySchedule::setTransaction(const MyMoneyTransaction& transaction, bool
m_transaction.clearId();
}
-void MyMoneySchedule::setEndDate(const QDate& date)
+void MyMoneySchedule::setEndDate(const TQDate& date)
{
m_endDate = date;
}
@@ -239,27 +239,27 @@ void MyMoneySchedule::setAutoEnter(bool autoenter)
m_autoEnter = autoenter;
}
-const QDate& MyMoneySchedule::startDate(void) const
+const TQDate& MyMoneySchedule::startDate(void) const
{
if(m_startDate.isValid())
return m_startDate;
return nextDueDate();
}
-const QDate& MyMoneySchedule::nextDueDate(void) const
+const TQDate& MyMoneySchedule::nextDueDate(void) const
{
return m_transaction.postDate();
}
-QDate MyMoneySchedule::adjustedNextDueDate(void) const
+TQDate MyMoneySchedule::adjustedNextDueDate(void) const
{
if(isFinished())
- return QDate();
+ return TQDate();
return adjustedDate(nextDueDate(), weekendOption());
}
-QDate MyMoneySchedule::adjustedDate(QDate date, weekendOptionE option) const
+TQDate MyMoneySchedule::adjustedDate(TQDate date, weekendOptionE option) const
{
if (option == MyMoneySchedule::MoveNothing)
return date;
@@ -274,7 +274,7 @@ QDate MyMoneySchedule::adjustedDate(QDate date, weekendOptionE option) const
return date;
}
-void MyMoneySchedule::setNextDueDate(const QDate& date)
+void MyMoneySchedule::setNextDueDate(const TQDate& date)
{
if(date.isValid()) {
m_transaction.setPostDate(date);
@@ -282,11 +282,11 @@ void MyMoneySchedule::setNextDueDate(const QDate& date)
}
}
-void MyMoneySchedule::setLastPayment(const QDate& date)
+void MyMoneySchedule::setLastPayment(const TQDate& date)
{
// Delete all payments older than date
- QValueList<QDate>::Iterator it;
- QValueList<QDate> delList;
+ TQValueList<TQDate>::Iterator it;
+ TQValueList<TQDate> delList;
for (it=m_recordedPayments.begin(); it!=m_recordedPayments.end(); ++it)
{
@@ -304,7 +304,7 @@ void MyMoneySchedule::setLastPayment(const QDate& date)
m_startDate = date;
}
-void MyMoneySchedule::setName(const QString& nm)
+void MyMoneySchedule::setName(const TQString& nm)
{
m_name = nm;
}
@@ -373,7 +373,7 @@ void MyMoneySchedule::validate(bool id_check) const
break;
case TYPE_DEPOSIT:
- if (m_paymentType == STYPE_DIRECTDEBIT || m_paymentType == STYPE_WRITECHEQUE)
+ if (m_paymentType == STYPE_DIRECTDEBIT || m_paymentType == STYPE_WRITECHETQUE)
throw new MYMONEYEXCEPTION("Invalid payment type for deposits");
break;
@@ -391,21 +391,21 @@ void MyMoneySchedule::validate(bool id_check) const
}
}
-QDate MyMoneySchedule::adjustedNextPayment(const QDate& refDate) const
+TQDate MyMoneySchedule::adjustedNextPayment(const TQDate& refDate) const
{
- QDate date(nextPayment(refDate));
+ TQDate date(nextPayment(refDate));
return date.isValid() ? adjustedDate(date, weekendOption()) : date;
}
-QDate MyMoneySchedule::nextPayment(const QDate& refDate) const
+TQDate MyMoneySchedule::nextPayment(const TQDate& refDate) const
{
// if the enddate is valid and it is before the reference date,
// then there will be no more payments.
if(m_endDate.isValid() && m_endDate < refDate) {
- return QDate();
+ return TQDate();
}
- QDate paymentDate(nextDueDate());
+ TQDate paymentDate(nextDueDate());
if(refDate >= paymentDate) {
switch (m_occurence)
@@ -414,11 +414,11 @@ QDate MyMoneySchedule::nextPayment(const QDate& refDate) const
// if the lastPayment is already set, then there will be no more payments
// otherwise, the start date is the payment date
if(m_lastPayment.isValid())
- return QDate();
+ return TQDate();
// if the only payment should have been prior to the reference date,
// then don't show it
if(paymentDate < refDate)
- return QDate();
+ return TQDate();
break;
case OCCUR_DAILY:
@@ -461,39 +461,39 @@ QDate MyMoneySchedule::nextPayment(const QDate& refDate) const
case OCCUR_ANY:
default:
- paymentDate = QDate();
+ paymentDate = TQDate();
break;
}
}
if(paymentDate.isValid()) {
if(m_endDate.isValid() && paymentDate > m_endDate)
- paymentDate = QDate();
+ paymentDate = TQDate();
}
- if (paymentDate.isValid() && m_recordedPayments.contains(paymentDate))
+ if (paymentDate.isValid() && m_recordedPayments.tqcontains(paymentDate))
paymentDate = nextPayment(paymentDate);
return paymentDate;
}
-QValueList<QDate> MyMoneySchedule::paymentDates(const QDate& _startDate, const QDate& _endDate) const
+TQValueList<TQDate> MyMoneySchedule::paymentDates(const TQDate& _startDate, const TQDate& _endDate) const
{
- QDate paymentDate(nextDueDate());
- QValueList<QDate> theDates;
+ TQDate paymentDate(nextDueDate());
+ TQValueList<TQDate> theDates;
- QDate endDate(_endDate);
+ TQDate endDate(_endDate);
if ( willEnd() && m_endDate < endDate )
endDate = m_endDate;
weekendOptionE option(weekendOption());
- QDate start_date(adjustedDate(startDate(), option));
+ TQDate start_date(adjustedDate(startDate(), option));
// if the period specified by the parameters and the period
// defined for this schedule don't overlap, then the list remains empty
if ((willEnd() && m_endDate < _startDate)
|| start_date > endDate)
return theDates;
- QDate date(adjustedDate(paymentDate, option));
+ TQDate date(adjustedDate(paymentDate, option));
switch (m_occurence)
{
@@ -594,7 +594,7 @@ int MyMoneySchedule::transactionsRemaining(void) const
if (m_endDate.isValid())
{
- QValueList<QDate> dates = paymentDates(m_lastPayment, m_endDate);
+ TQValueList<TQDate> dates = paymentDates(m_lastPayment, m_endDate);
// Dont include the last payment so -1
counter = dates.count();
}
@@ -603,8 +603,8 @@ int MyMoneySchedule::transactionsRemaining(void) const
MyMoneyAccount MyMoneySchedule::account(int cnt) const
{
- QValueList<MyMoneySplit> splits = m_transaction.splits();
- QValueList<MyMoneySplit>::ConstIterator it;
+ TQValueList<MyMoneySplit> splits = m_transaction.splits();
+ TQValueList<MyMoneySplit>::ConstIterator it;
MyMoneyFile* file = MyMoneyFile::instance();
MyMoneyAccount acc;
@@ -627,10 +627,10 @@ MyMoneyAccount MyMoneySchedule::account(int cnt) const
return MyMoneyAccount();
}
-QDate MyMoneySchedule::dateAfter(int transactions) const
+TQDate MyMoneySchedule::dateAfter(int transactions) const
{
int counter=1;
- QDate paymentDate(startDate());
+ TQDate paymentDate(startDate());
if (transactions<=0)
return paymentDate;
@@ -680,7 +680,7 @@ bool MyMoneySchedule::isOverdue() const
if (isFinished())
return false;
- if(adjustedNextDueDate() >= QDate::currentDate())
+ if(adjustedNextDueDate() >= TQDate::tqcurrentDate())
return false;
return true;
@@ -705,19 +705,19 @@ bool MyMoneySchedule::isFinished() const
return false;
}
-bool MyMoneySchedule::hasRecordedPayment(const QDate& date) const
+bool MyMoneySchedule::hasRecordedPayment(const TQDate& date) const
{
// m_lastPayment should always be > recordedPayments()
if (m_lastPayment.isValid() && m_lastPayment >= date)
return true;
- if (m_recordedPayments.contains(date))
+ if (m_recordedPayments.tqcontains(date))
return true;
return false;
}
-void MyMoneySchedule::recordPayment(const QDate& date)
+void MyMoneySchedule::recordPayment(const TQDate& date)
{
m_recordedPayments.append(date);
}
@@ -737,19 +737,19 @@ void MyMoneySchedule::setWeekendOption(const weekendOptionE option)
}
}
-void MyMoneySchedule::fixDate(QDate& date) const
+void MyMoneySchedule::fixDate(TQDate& date) const
{
- QDate fixDate(m_startDate);
+ TQDate fixDate(m_startDate);
if(fixDate.isValid()
&& date.day() != fixDate.day()
- && QDate::isValid(date.year(), date.month(), fixDate.day())) {
+ && TQDate::isValid(date.year(), date.month(), fixDate.day())) {
date.setYMD(date.year(), date.month(), fixDate.day());
}
}
-void MyMoneySchedule::writeXML(QDomDocument& document, QDomElement& parent) const
+void MyMoneySchedule::writeXML(TQDomDocument& document, TQDomElement& tqparent) const
{
- QDomElement el = document.createElement("SCHEDULED_TX");
+ TQDomElement el = document.createElement("SCHEDULED_TX");
writeBaseXML(document, el);
@@ -766,11 +766,11 @@ void MyMoneySchedule::writeXML(QDomDocument& document, QDomElement& parent) cons
el.setAttribute("weekendOption", m_weekendOption);
//store the payment history for this scheduled task.
- QValueList<QDate> payments = recordedPayments();
- QValueList<QDate>::ConstIterator it;
- QDomElement paymentsElement = document.createElement("PAYMENTS");
+ TQValueList<TQDate> payments = recordedPayments();
+ TQValueList<TQDate>::ConstIterator it;
+ TQDomElement paymentsElement = document.createElement("PAYMENTS");
for (it=payments.begin(); it!=payments.end(); ++it) {
- QDomElement paymentEntry = document.createElement("PAYMENT");
+ TQDomElement paymentEntry = document.createElement("PAYMENT");
paymentEntry.setAttribute("date", dateToString(*it));
paymentsElement.appendChild(paymentEntry);
}
@@ -779,22 +779,22 @@ void MyMoneySchedule::writeXML(QDomDocument& document, QDomElement& parent) cons
//store the transaction data for this task.
m_transaction.writeXML(document, el);
- parent.appendChild(el);
+ tqparent.appendChild(el);
}
-bool MyMoneySchedule::hasReferenceTo(const QString& id) const
+bool MyMoneySchedule::hasReferenceTo(const TQString& id) const
{
return m_transaction.hasReferenceTo(id);
}
-QString MyMoneySchedule::occurenceToString() const
+TQString MyMoneySchedule::occurenceToString() const
{
return occurenceToString( occurenceMultiplier(), occurencePeriod() );
}
-QString MyMoneySchedule::occurenceToString(occurenceE occurence)
+TQString MyMoneySchedule::occurenceToString(occurenceE occurence)
{
- QString occurenceString = I18N_NOOP("Any");
+ TQString occurenceString = I18N_NOOP("Any");
if(occurence == MyMoneySchedule::OCCUR_ONCE)
occurenceString = I18N_NOOP("Once");
@@ -822,7 +822,7 @@ QString MyMoneySchedule::occurenceToString(occurenceE occurence)
occurenceString = I18N_NOOP("Every two months");
else if(occurence == MyMoneySchedule::OCCUR_EVERYTHREEMONTHS)
occurenceString = I18N_NOOP("Every three months");
- else if(occurence == MyMoneySchedule::OCCUR_QUARTERLY)
+ else if(occurence == MyMoneySchedule::OCCUR_TQUARTERLY)
occurenceString = I18N_NOOP("Quarterly");
else if(occurence == MyMoneySchedule::OCCUR_EVERYFOURMONTHS)
occurenceString = I18N_NOOP("Every four months");
@@ -835,22 +835,22 @@ QString MyMoneySchedule::occurenceToString(occurenceE occurence)
return occurenceString;
}
-QString MyMoneySchedule::occurenceToString(int mult, occurenceE type)
+TQString MyMoneySchedule::occurenceToString(int mult, occurenceE type)
{
- QString occurenceString = I18N_NOOP("Any");
+ TQString occurenceString = I18N_NOOP("Any");
if (type == MyMoneySchedule::OCCUR_ONCE)
switch (mult)
{
case 1: occurenceString = I18N_NOOP("Once"); break;
- default: occurenceString = I18N_NOOP(static_cast<QString>("%1 times").arg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("%1 times").tqarg(mult));
}
else if(type == MyMoneySchedule::OCCUR_DAILY)
switch (mult)
{
case 1: occurenceString = I18N_NOOP("Daily"); break;
case 30: occurenceString = I18N_NOOP("Every thirty days"); break;
- default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 days").arg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 days").tqarg(mult));
}
else if(type == MyMoneySchedule::OCCUR_WEEKLY)
switch (mult)
@@ -860,13 +860,13 @@ QString MyMoneySchedule::occurenceToString(int mult, occurenceE type)
case 3: occurenceString = I18N_NOOP("Every three weeks"); break;
case 4: occurenceString = I18N_NOOP("Every four weeks"); break;
case 8: occurenceString = I18N_NOOP("Every eight weeks"); break;
- default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 weeks").arg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 weeks").tqarg(mult));
}
else if(type == MyMoneySchedule::OCCUR_EVERYHALFMONTH)
switch (mult)
{
case 1: occurenceString = I18N_NOOP("Every half month"); break;
- default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 half months").arg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 half months").tqarg(mult));
}
else if(type == MyMoneySchedule::OCCUR_MONTHLY)
switch (mult)
@@ -876,21 +876,21 @@ QString MyMoneySchedule::occurenceToString(int mult, occurenceE type)
case 3: occurenceString = I18N_NOOP("Every three months"); break;
case 4: occurenceString = I18N_NOOP("Every four months"); break;
case 6: occurenceString = I18N_NOOP("Twice yearly"); break;
- default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 months").arg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 months").tqarg(mult));
}
else if(type == MyMoneySchedule::OCCUR_YEARLY)
switch (mult)
{
case 1: occurenceString = I18N_NOOP("Yearly"); break;
case 2: occurenceString = I18N_NOOP("Every other year"); break;
- default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 years").arg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 years").tqarg(mult));
}
return occurenceString;
}
-QString MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::occurenceE type)
+TQString MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::occurenceE type)
{
- QString occurenceString = I18N_NOOP("Any");
+ TQString occurenceString = I18N_NOOP("Any");
if(type == MyMoneySchedule::OCCUR_ONCE)
occurenceString = I18N_NOOP("Once");
@@ -907,9 +907,9 @@ QString MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::occurenceE typ
return occurenceString;
}
-QString MyMoneySchedule::scheduleTypeToString(MyMoneySchedule::typeE type)
+TQString MyMoneySchedule::scheduleTypeToString(MyMoneySchedule::typeE type)
{
- QString text;
+ TQString text;
switch (type) {
case MyMoneySchedule::TYPE_BILL:
@@ -932,9 +932,9 @@ QString MyMoneySchedule::scheduleTypeToString(MyMoneySchedule::typeE type)
}
-QString MyMoneySchedule::paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType)
+TQString MyMoneySchedule::paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType)
{
- QString text;
+ TQString text;
switch (paymentType) {
case MyMoneySchedule::STYPE_DIRECTDEBIT:
@@ -949,7 +949,7 @@ QString MyMoneySchedule::paymentMethodToString(MyMoneySchedule::paymentTypeE pay
case MyMoneySchedule::STYPE_OTHER:
text = I18N_NOOP("Other");
break;
- case MyMoneySchedule::STYPE_WRITECHEQUE:
+ case MyMoneySchedule::STYPE_WRITECHETQUE:
text = I18N_NOOP("Write check");
break;
case MyMoneySchedule::STYPE_STANDINGORDER:
@@ -965,9 +965,9 @@ QString MyMoneySchedule::paymentMethodToString(MyMoneySchedule::paymentTypeE pay
return text;
}
-QString MyMoneySchedule::weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption)
+TQString MyMoneySchedule::weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption)
{
- QString text;
+ TQString text;
switch (weekendOption) {
case MyMoneySchedule::MoveFriday:
@@ -995,7 +995,7 @@ int MyMoneySchedule::variation(void) const
if(!isFixed()) {
rc = 10;
#if 0
- QString var = value("kmm-variation");
+ TQString var = value("kmm-variation");
if(!var.isEmpty())
rc = var.toInt();
#endif
@@ -1008,7 +1008,7 @@ void MyMoneySchedule::setVariation(int var)
#if 0
deletePair("kmm-variation");
if(var != 0)
- setValue("kmm-variation", QString("%1").arg(var));
+ setValue("kmm-variation", TQString("%1").tqarg(var));
#endif
}
@@ -1049,7 +1049,7 @@ int MyMoneySchedule::eventsPerYear(MyMoneySchedule::occurenceE occurence)
rc = 6;
break;
case MyMoneySchedule::OCCUR_EVERYTHREEMONTHS:
- case MyMoneySchedule::OCCUR_QUARTERLY:
+ case MyMoneySchedule::OCCUR_TQUARTERLY:
rc = 4;
break;
case MyMoneySchedule::OCCUR_EVERYFOURMONTHS:
@@ -1107,7 +1107,7 @@ int MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::occurenceE occurence)
rc = 60;
break;
case MyMoneySchedule::OCCUR_EVERYTHREEMONTHS:
- case MyMoneySchedule::OCCUR_QUARTERLY:
+ case MyMoneySchedule::OCCUR_TQUARTERLY:
rc = 90;
break;
case MyMoneySchedule::OCCUR_EVERYFOURMONTHS:
@@ -1126,9 +1126,9 @@ int MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::occurenceE occurence)
return rc;
}
-QDate MyMoneySchedule::addHalfMonths( QDate date, int mult ) const
+TQDate MyMoneySchedule::addHalfMonths( TQDate date, int mult ) const
{
- QDate newdate = date;
+ TQDate newdate = date;
int d, dm;
if ( mult > 0 )
{
@@ -1184,10 +1184,10 @@ QDate MyMoneySchedule::addHalfMonths( QDate date, int mult ) const
return newdate;
}
-MyMoneySchedule::occurenceE MyMoneySchedule::stringToOccurence(const QString& text)
+MyMoneySchedule::occurenceE MyMoneySchedule::stringToOccurence(const TQString& text)
{
MyMoneySchedule::occurenceE occurence = MyMoneySchedule::OCCUR_ANY;
- QString tmp = text.lower();
+ TQString tmp = text.lower();
if(tmp == i18n("Once").lower())
occurence = MyMoneySchedule::OCCUR_ONCE;
@@ -1216,7 +1216,7 @@ MyMoneySchedule::occurenceE MyMoneySchedule::stringToOccurence(const QString& te
else if(tmp == i18n("Every three months").lower())
occurence = MyMoneySchedule::OCCUR_EVERYTHREEMONTHS;
else if(tmp == i18n("Quarterly").lower())
- occurence = MyMoneySchedule::OCCUR_QUARTERLY;
+ occurence = MyMoneySchedule::OCCUR_TQUARTERLY;
else if(tmp == i18n("Every four months").lower())
occurence = MyMoneySchedule::OCCUR_EVERYFOURMONTHS;
else if(tmp == i18n("Twice yearly").lower())
@@ -1279,7 +1279,7 @@ void MyMoneySchedule::simpleToCompoundOccurence(int& multiplier,occurenceE& occu
newMulti = 2;
}
else if(occurence == MyMoneySchedule::OCCUR_EVERYTHREEMONTHS ||
- occurence == MyMoneySchedule::OCCUR_QUARTERLY )
+ occurence == MyMoneySchedule::OCCUR_TQUARTERLY )
{
newOcc = MyMoneySchedule::OCCUR_MONTHLY;
newMulti = 3;