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/converter/mymoneyqifreader.h | 89 +++++++++++++++++----------------- 1 file changed, 45 insertions(+), 44 deletions(-) (limited to 'kmymoney2/converter/mymoneyqifreader.h') diff --git a/kmymoney2/converter/mymoneyqifreader.h b/kmymoney2/converter/mymoneyqifreader.h index 77bf5ad..385b1ff 100644 --- a/kmymoney2/converter/mymoneyqifreader.h +++ b/kmymoney2/converter/mymoneyqifreader.h @@ -20,15 +20,15 @@ * * ***************************************************************************/ -#ifndef MYMONEYQIFREADER_H -#define MYMONEYQIFREADER_H +#ifndef MYMONEYTQIFREADER_H +#define MYMONEYTQIFREADER_H // ---------------------------------------------------------------------------- // QT Headers -#include -#include -#include +#include +#include +#include // ---------------------------------------------------------------------------- // KDE Headers @@ -49,9 +49,10 @@ class MyMoneyFileTransaction; /** * @author Thomas Baumgart */ -class MyMoneyQifReader : public QObject +class MyMoneyQifReader : public TQObject { Q_OBJECT + TQ_OBJECT friend class Private; private: @@ -71,9 +72,9 @@ private: struct qSplit { - QString m_strCategoryName; - QString m_strMemo; - QString m_amount; + TQString m_strCategoryName; + TQString m_strMemo; + TQString m_amount; }; @@ -99,16 +100,16 @@ public: * the file is send through this filter and the result * is stored in the m_tempFile file. * - * @param name QString reference to the name of the profile + * @param name TQString reference to the name of the profile */ - void setProfile(const QString& name); + void setProfile(const TQString& name); /** * This method actually starts the import of data from the selected file * into the MyMoney engine. * * This method also starts the user defined import filter program - * defined in the QIF profile. If none is defined, the file is read + * defined in the TQIF profile. If none is defined, the file is read * as is (actually the UNIX command 'cat -' is used as the filter). * * If data from the filter program is available, the slot @@ -138,7 +139,7 @@ public: const MyMoneyAccount& account() const { return m_account; }; - void setProgressCallback(void(*callback)(int, int, const QString&)); + void setProgressCallback(void(*callback)(int, int, const TQString&)); private: /** @@ -147,11 +148,11 @@ private: * * For a parameter description see KMyMoneyView::progressCallback(). */ - void signalProgress(int current, int total, const QString& = ""); + void signalProgress(int current, int total, const TQString& = ""); /** * This method scans a transaction contained in - * a QIF file formatted as an account record. This + * a TQIF file formatted as an account record. This * format is used by MS-Money. If the specific data * is not found, then the data in the entry is treated * as a transaction. In this case, the user will be asked to @@ -174,7 +175,7 @@ private: * * The id of the account will be returned. */ - QString processAccountEntry(bool resetAccountId = true); + TQString processAccountEntry(bool resetAccountId = true); /** * This method scans the m_qifEntry object as a category record specified @@ -217,15 +218,15 @@ private: /** * This method process a line starting with an exclamation mark */ - void processQifSpecial(const QString& _line); + void processQifSpecial(const TQString& _line); /** * This method is used to get the account id of the split for - * a transaction from the text found in the QIF $ or L record. + * a transaction from the text found in the TQIF $ or L record. * If an account with the name is not found, the user is asked * if it should be created. * - * @param name name of account as found in the QIF file + * @param name name of account as found in the TQIF file * @param value value found in the T record * @param value2 value found in the $ record for splitted transactions * @@ -233,27 +234,27 @@ private: * or the account was not found and not created the * return value will be "". */ - QString checkCategory(const QString& name, const MyMoneyMoney value, const MyMoneyMoney value2); + TQString checkCategory(const TQString& name, const MyMoneyMoney value, const MyMoneyMoney value2); /** * This method extracts the line beginning with the letter @p id - * from the lines contained in the QStringList object @p m_qifEntry. - * An empty QString is returned, if the line is not found. + * from the lines contained in the TQStringList object @p m_qifEntry. + * An empty TQString is returned, if the line is not found. * - * @param id QChar containing the letter to be found + * @param id TQChar containing the letter to be found * @param cnt return cnt'th of occurance of id in lines. cnt defaults to 1. * - * @return QString with the remainder of the line or empty if + * @return TQString with the remainder of the line or empty if * @p id is not found in @p lines */ - const QString extractLine(const QChar id, int cnt = 1); + const TQString extractLine(const TQChar id, int cnt = 1); /** - * This method examines each line in the QStringList object @p m_qifEntry, + * This method examines each line in the TQStringList object @p m_qifEntry, * searching for split entries, which it extracts into a struct qSplit and * stores all splits found in @p listqSplits . */ - void extractSplits(QValueList& listqSplits) const; + void extractSplits(TQValueList& listqSplits) const; enum SelectCreateMode { Create = 0, @@ -303,9 +304,9 @@ private: * @p searchname as a name, and returns the id if the newly created account * * @param searchname The name of the account to find or create - * @return QString id of the found or created account + * @return TQString id of the found or created account */ - static const QString findOrCreateIncomeAccount(const QString& searchname); + static const TQString findOrCreateIncomeAccount(const TQString& searchname); /** * This method looks up the @p searchname account by name and returns its id @@ -313,9 +314,9 @@ private: * @p searchname as a name, and returns the id if the newly created account * * @param searchname The name of the account to find or create - * @return QString id of the found or created account + * @return TQString id of the found or created account */ - static const QString findOrCreateExpenseAccount(const QString& searchname); + static const TQString findOrCreateExpenseAccount(const TQString& searchname); /** * This method returns the account id for a given account @a name. In @@ -323,7 +324,7 @@ private: * (the default), the id of the corresponding brokerage account will be * returned. In case an account is not existant, it will be created. */ - QString transferAccount(QString name, bool useBrokerage = true); + TQString transferAccount(TQString name, bool useBrokerage = true); // void processQifLine(void); void createOpeningBalance(MyMoneyAccount::_accountTypeE accType = MyMoneyAccount::Checkings); @@ -356,22 +357,22 @@ private: Private* const d; KProcess m_filter; - QString m_filename; + TQString m_filename; KURL m_url; MyMoneyQifProfile m_qifProfile; MyMoneyAccount m_account; unsigned long m_transactionsSkipped; unsigned long m_transactionsProcessed; - QStringList m_dontAskAgain; - QMap m_accountTranslation; - QMap m_investmentMap; - QFile *m_file; + TQStringList m_dontAskAgain; + TQMap m_accountTranslation; + TQMap m_investmentMap; + TQFile *m_file; char m_buffer[1024]; - QCString m_lineBuffer; - QStringList m_qifEntry; + TQCString m_lineBuffer; + TQStringList m_qifEntry; int m_extractedLine; - QString m_qifLine; - QStringList m_qifLines; + TQString m_qifLine; + TQStringList m_qifLines; QifEntryTypeE m_entryType; bool m_skipAccount; bool m_processingData; @@ -382,11 +383,11 @@ private: bool m_warnedInvestment; bool m_warnedSecurity; bool m_warnedPrice; - QValueList m_transactionCache; + TQValueList m_transactionCache; - QValueList m_data; + TQValueList m_data; - void (*m_progressCallback)(int, int, const QString&); + void (*m_progressCallback)(int, int, const TQString&); MyMoneyFileTransaction* m_ft; }; -- cgit v1.2.1