From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: TQt4 port kmymoney This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/mymoney/mymoneyscheduled.h | 138 +++++++++++++++++------------------ 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'kmymoney2/mymoney/mymoneyscheduled.h') diff --git a/kmymoney2/mymoney/mymoneyscheduled.h b/kmymoney2/mymoney/mymoneyscheduled.h index 46303b2..cc92b1d 100644 --- a/kmymoney2/mymoney/mymoneyscheduled.h +++ b/kmymoney2/mymoney/mymoneyscheduled.h @@ -26,9 +26,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include -#include -#include +#include +#include +#include // ---------------------------------------------------------------------------- @@ -68,7 +68,7 @@ public: OCCUR_MONTHLY=32, OCCUR_EVERYFOURWEEKS=64, OCCUR_EVERYEIGHTWEEKS=126, OCCUR_EVERYOTHERMONTH=128, OCCUR_EVERYTHREEMONTHS=256, - OCCUR_TWICEYEARLY=1024, OCCUR_EVERYOTHERYEAR=2048, OCCUR_QUARTERLY=4096, + OCCUR_TWICEYEARLY=1024, OCCUR_EVERYOTHERYEAR=2048, OCCUR_TQUARTERLY=4096, OCCUR_EVERYFOURMONTHS=8192, OCCUR_YEARLY=16384 }; @@ -82,7 +82,7 @@ public: */ enum paymentTypeE { STYPE_ANY=0, STYPE_DIRECTDEBIT=1, STYPE_DIRECTDEPOSIT=2, STYPE_MANUALDEPOSIT=4, STYPE_OTHER=8, - STYPE_WRITECHEQUE=16, + STYPE_WRITECHETQUE=16, STYPE_STANDINGORDER=32, STYPE_BANKTRANSFER=64 }; @@ -105,14 +105,14 @@ public: * Please note that the optional fields are not set and the transaction * MUST be set before it can be used. * - * @a startDate is not used anymore and internally set to QDate() + * @a startDate is not used anymore and internally set to TQDate() */ - MyMoneySchedule(const QString& name, typeE type, occurenceE occurence, int occurenceMultiplier, - paymentTypeE paymentType, const QDate& startDate, const QDate& endDate, bool fixed, bool autoEnter); + MyMoneySchedule(const TQString& name, typeE type, occurenceE occurence, int occurenceMultiplier, + paymentTypeE paymentType, const TQDate& startDate, const TQDate& endDate, bool fixed, bool autoEnter); - MyMoneySchedule(const QDomElement& node); + MyMoneySchedule(const TQDomElement& node); - MyMoneySchedule(const QString& id, const MyMoneySchedule& right); + MyMoneySchedule(const TQString& id, const MyMoneySchedule& right); /** * Standard destructor @@ -155,9 +155,9 @@ public: * execution is returned. Otherwise, the next due date is * returned. * - * @return reference to QDate containing the start date. + * @return reference to TQDate containing the start date. */ - const QDate& startDate(void) const; + const TQDate& startDate(void) const; /** * Simple get method that returns the schedule paymentType. @@ -191,9 +191,9 @@ public: /** * Simple get method that returns the schedule end date. * - * @return QDate The end date for the instance. + * @return TQDate The end date for the instance. */ - const QDate& endDate(void) const { return m_endDate; } + const TQDate& endDate(void) const { return m_endDate; } /** * Simple get method that returns true if the transaction should be @@ -212,43 +212,43 @@ public: /** * Simple method that returns the schedules last payment. If the - * schedule has never been executed, QDate() will be returned. + * schedule has never been executed, TQDate() will be returned. * - * @return QDate The last payment for the schedule. + * @return TQDate The last payment for the schedule. */ - const QDate& lastPayment(void) const { return m_lastPayment; } + const TQDate& lastPayment(void) const { return m_lastPayment; } /** * Simple method that returns the next due date for the schedule. * - * @return reference to QDate containing the next due date. + * @return reference to TQDate containing the next due date. * * @note The date returned can represent a value that is past * a possible end of the schedule. Make sure to consider * the return value of isFinished() when using the value returned. */ - const QDate& nextDueDate(void) const; + const TQDate& nextDueDate(void) const; /** * This method adjusts returns the next due date adjusted * according to the rules specified by the schedule's weekend option. * - * @return QDate containing the adjusted next due date. If the + * @return TQDate containing the adjusted next due date. If the * schedule is finished (@sa isFinished()) then the method - * returns an invalid QDate. + * returns an invalid TQDate. * * @sa weekendOption() * @sa adjustedDate() */ - QDate adjustedNextDueDate(void) const; + TQDate adjustedNextDueDate(void) const; /** * This method adjusts returns the date adjusted according to the * rules specified by the schedule's weekend option. * - * @return QDate containing the adjusted date. + * @return TQDate containing the adjusted date. */ - QDate adjustedDate(QDate date, weekendOptionE option) const; + TQDate adjustedDate(TQDate date, weekendOptionE option) const; /** * Get the weekendOption that determines how the schedule check code @@ -296,7 +296,7 @@ public: * @param date The new start date. * @return none */ - void setStartDate(const QDate& date); + void setStartDate(const TQDate& date); /** * Simple method that sets the payment type for the schedule. @@ -330,7 +330,7 @@ public: * @param date The new end date. * @return none */ - void setEndDate(const QDate& date); + void setEndDate(const TQDate& date); /** * Simple set method to set whether this transaction should be automatically @@ -348,7 +348,7 @@ public: * @param date The next payment date. * @return none */ - void setNextDueDate(const QDate& date); + void setNextDueDate(const TQDate& date); /** * Simple set method to set the schedule's last payment. If @@ -360,7 +360,7 @@ public: * @param date The last payment date. * @return none */ - void setLastPayment(const QDate& date); + void setLastPayment(const TQDate& date); /** * Set the weekendOption that determines how the schedule check code @@ -404,12 +404,12 @@ public: * @param refDate The reference date from which the next payment * date will be calculated (defaults to current date) * - * @return QDate The adjusted date the next payment is due. This date is + * @return TQDate The adjusted date the next payment is due. This date is * always past @a refDate. In case of an error or if there - * are no more payments then an empty/invalid QDate() will + * are no more payments then an empty/invalid TQDate() will * be returned. */ - QDate adjustedNextPayment(const QDate& refDate = QDate::currentDate()) const; + TQDate adjustedNextPayment(const TQDate& refDate = TQDate::tqcurrentDate()) const; /** * Calculates the date of the next payment. @@ -417,12 +417,12 @@ public: * @param refDate The reference date from which the next payment * date will be calculated (defaults to current date) * - * @return QDate The date the next payment is due. This date is + * @return TQDate The date the next payment is due. This date is * always past @a refDate. In case of an error or - * if there is no more payments then an empty/invalid QDate() + * if there is no more payments then an empty/invalid TQDate() * will be returned. */ - QDate nextPayment(const QDate& refDate = QDate::currentDate()) const; + TQDate nextPayment(const TQDate& refDate = TQDate::tqcurrentDate()) const; /** * Calculates the dates of the payment over a certain period of time. @@ -431,16 +431,16 @@ public: * * @param startDate The start date for the range calculations * @param endDate The end date for the range calculations. - * @return QValueList The dates on which the payments are due. + * @return TQValueList The dates on which the payments are due. */ - QValueList paymentDates(const QDate& startDate, const QDate& endDate) const; + TQValueList paymentDates(const TQDate& startDate, const TQDate& endDate) const; /** * Returns the instances name * * @return The name */ - const QString& name(void) const { return m_name; } + const TQString& name(void) const { return m_name; } /** * Changes the instance name @@ -448,7 +448,7 @@ public: * @param nm The new name * @return none */ - void setName(const QString& nm); + void setName(const TQString& nm); bool operator ==(const MyMoneySchedule& right) const; bool operator !=(const MyMoneySchedule& right) const { return ! operator==(right); } @@ -457,15 +457,15 @@ public: MyMoneyAccount account(int cnt = 1) const; MyMoneyAccount transferAccount(void) const { return account(2); }; - QDate dateAfter(int transactions) const; + TQDate dateAfter(int transactions) const; bool isOverdue() const; bool isFinished() const; - bool hasRecordedPayment(const QDate&) const; - void recordPayment(const QDate&); - QValueList recordedPayments(void) const { return m_recordedPayments; } + bool hasRecordedPayment(const TQDate&) const; + void recordPayment(const TQDate&); + TQValueList recordedPayments(void) const { return m_recordedPayments; } - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -476,14 +476,14 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; /** * Returns the human-readable format of Schedule's occurence * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - QString occurenceToString() const; + TQString occurenceToString() const; /** * This method is used to convert the occurence type from it's @@ -492,9 +492,9 @@ public: * @param type numerical representation of the MyMoneySchedule * occurence type * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString occurenceToString(occurenceE type); + static TQString occurenceToString(occurenceE type); /** * This method is used to convert a multiplier and base occurence type @@ -505,9 +505,9 @@ public: * @param mult occurence multiplier * @param type occurence period * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString occurenceToString(int mult, occurenceE type); + static TQString occurenceToString(int mult, occurenceE type); /** * This method is used to convert an occurence period from @@ -516,9 +516,9 @@ public: * @param type numerical representation of the MyMoneySchedule * occurence type * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString occurencePeriodToString(occurenceE type); + static TQString occurencePeriodToString(occurenceE type); /** * This method is used to convert the payment type from it's @@ -527,9 +527,9 @@ public: * @param paymentType numerical representation of the MyMoneySchedule * payment type * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType); + static TQString paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType); /** * This method is used to convert the schedule weekend option from it's @@ -538,9 +538,9 @@ public: * @param weekendOption numerical representation of the MyMoneySchedule * weekend option * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption); + static TQString weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption); /** * This method is used to convert the schedule type from it's @@ -549,9 +549,9 @@ public: * @param type numerical representation of the MyMoneySchedule * schedule type * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString scheduleTypeToString(MyMoneySchedule::typeE type); + static TQString scheduleTypeToString(MyMoneySchedule::typeE type); int variation(void) const; void setVariation(int var); @@ -600,10 +600,10 @@ public: * This method is used to convert the occurence type from the * human readable form into it's internal representation. * - * @param text reference to QString representing the human readable format + * @param text reference to TQString representing the human readable format * @return numerical representation of the occurence */ - static MyMoneySchedule::occurenceE stringToOccurence(const QString& text); + static MyMoneySchedule::occurenceE stringToOccurence(const TQString& text); private: /** @@ -612,9 +612,9 @@ private: * in m_startDate. It is internally used when calculating * the payment dates over several periods. * - * @param date reference to QDate object to be checked and adjusted + * @param date reference to TQDate object to be checked and adjusted */ - void fixDate(QDate& date) const; + void fixDate(TQDate& date) const; /** * Simple method that sets the transaction for the schedule. @@ -648,9 +648,9 @@ private: * @param date The date * @param mult The number of half months to add. Default is 1. * - * @return QDate date with mult half months added + * @return TQDate date with mult half months added */ - QDate addHalfMonths( QDate date, int mult = 1 ) const; + TQDate addHalfMonths( TQDate date, int mult = 1 ) const; private: /// Its occurence @@ -663,7 +663,7 @@ private: typeE m_type; /// The date the schedule commences - QDate m_startDate; + TQDate m_startDate; /// The payment type paymentTypeE m_paymentType; @@ -675,19 +675,19 @@ private: MyMoneyTransaction m_transaction; /// The last transaction date if the schedule does end at a fixed date - QDate m_endDate; + TQDate m_endDate; /// Enter the transaction into the register automatically bool m_autoEnter; /// Internal date used for calculations - QDate m_lastPayment; + TQDate m_lastPayment; /// The name - QString m_name; + TQString m_name; /// The recorded payments - QValueList m_recordedPayments; + TQValueList m_recordedPayments; /// The weekend option weekendOptionE m_weekendOption; -- cgit v1.2.1