summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter/mymoneygncreader.h
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/converter/mymoneygncreader.h')
-rw-r--r--kmymoney2/converter/mymoneygncreader.h326
1 files changed, 163 insertions, 163 deletions
diff --git a/kmymoney2/converter/mymoneygncreader.h b/kmymoney2/converter/mymoneygncreader.h
index df08913..fcda8ea 100644
--- a/kmymoney2/converter/mymoneygncreader.h
+++ b/kmymoney2/converter/mymoneygncreader.h
@@ -24,7 +24,7 @@ The main class of this module, MyMoneyGncReader, contains only a readFile()
function, which controls the import of data from an XML file created by the
current GnuCash version (1.8.8).
-The XML is processed in class XmlReader, which is an implementation of the Qt
+The XML is processed in class XmlReader, which is an implementation of the TQt
SAX2 reader class.
Data in the input file is processed as a set of objects which fortunately,
@@ -48,7 +48,7 @@ the 'container' elements are ignored.
XmlReader
-This is an implementation of the Qt QXmlDefaultHandler class, which provides
+This is an implementation of the TQt TQXmlDefaultHandler class, which provides
three main function calls in addition to start and end of document. The
startElement() and endElement() calls are self-explanatory, the characters()
function provides data strings. Thus in the above example, the sequence of calls
@@ -96,14 +96,14 @@ element name which started the current object. If so, the object's terminate()
function is called. If the object represents a similar KMM object, this will
normally result in a call to a conversion routine in the main
(MyMoneyGncReader) class to convert the data to native format and place it in
-storage. The stack is then popped, and the parent (now current) object notified
+storage. The stack is then popped, and the tqparent (now current) object notified
by a call to its endSubEl() function. Again depending on the type of object,
this will either delete the instance, or save it in its own storage for later
processing.
For example, a GncSplit object makes little sense outside the context of its
transaction, so will be saved by the transaction. A GncTransaction object on the
other hand will be converted, along with its attendant splits, and then deleted
-by its parent.
+by its tqparent.
Since at any one time an object will only be processing either a subobject or a
data element, a single object variable, m_state, is used to determine the actual
@@ -149,15 +149,15 @@ allow us to test the structure, if not the data content, of the file.
// ----------------------------------------------------------------------------
// QT Includes
-#include <qdatastream.h>
-class QIODevice;
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qxml.h>
-#include <qdatetime.h>
-#include <qtextcodec.h>
+#include <tqdatastream.h>
+class TQIODevice;
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqxml.h>
+#include <tqdatetime.h>
+#include <tqtextcodec.h>
// ----------------------------------------------------------------------------
// Project Includes
@@ -175,11 +175,11 @@ class QIODevice;
#define VERSION_0_61_XML 0x10000011 // use 8 bytes for MyMoneyMoney objects
#define GNUCASH_ID_KEY "GNUCASH_ID"
-typedef QMap<QString, QString> map_accountIds;
+typedef TQMap<TQString, TQString> map_accountIds;
typedef map_accountIds::iterator map_accountIds_iter;
typedef map_accountIds::const_iterator map_accountIds_citer;
-typedef QMap<QString, QStringList> map_elementVersions;
+typedef TQMap<TQString, TQStringList> map_elementVersions;
class MyMoneyGncReader;
@@ -199,29 +199,29 @@ protected:
friend class MyMoneyGncReader;
// check for sub object element; if it is, create the object
- GncObject *isSubElement (const QString &elName, const QXmlAttributes& elAttrs);
+ GncObject *isSubElement (const TQString &elName, const TQXmlAttributes& elAttrs);
// check for data element; if so, set data pointer
- bool isDataElement (const QString &elName, const QXmlAttributes& elAttrs);
+ bool isDataElement (const TQString &elName, const TQXmlAttributes& elAttrs);
// process start element for 'this'; normally for attribute checking; other initialization done in constructor
- virtual void initiate (const QString&, const QXmlAttributes&) { return ;};
+ virtual void initiate (const TQString&, const TQXmlAttributes&) { return ;};
// a sub object has completed; process the data it gathered
virtual void endSubEl(GncObject *) {m_dataPtr = 0; return ;};
// store data for data element
- void storeData (const QString& pData) // NB - data MAY come in chunks, and may need to be anonymized
+ void storeData (const TQString& pData) // NB - data MAY come in chunks, and may need to be anonymized
{if (m_dataPtr != 0)
m_dataPtr->append (hide (pData, m_anonClass)); return ;}
// following is provided only for a future file anonymizer
- QString getData () const { return ((m_dataPtr != 0) ? *m_dataPtr : "");};
+ TQString getData () const { return ((m_dataPtr != 0) ? *m_dataPtr : "");};
void resetDataPtr() {m_dataPtr = 0;};
// process end element for 'this'; usually to convert to KMM format
virtual void terminate() { return ;};
- void setVersion (const QString& v) {m_version = v; return; };
- QString version() const {return (m_version);};
+ void setVersion (const TQString& v) {m_version = v; return; };
+ TQString version() const {return (m_version);};
// some gnucash elements have version attribute; check it
- void checkVersion (const QString&, const QXmlAttributes&, const map_elementVersions&);
+ void checkVersion (const TQString&, const TQXmlAttributes&, const map_elementVersions&);
// get name of element processed by 'this'
- QString getElName () const { return (m_elementName);};
+ TQString getElName () const { return (m_elementName);};
// pass 'main' pointer to object
void setPm (MyMoneyGncReader *pM) {pMain = pM;};
// debug only
@@ -230,24 +230,24 @@ protected:
// called by isSubElement to create appropriate sub object
virtual GncObject *startSubEl() { return (0);};
// called by isDataElement to set variable pointer
- virtual void dataEl(const QXmlAttributes&) {m_dataPtr = m_v.at(m_state); m_anonClass = m_anonClassList[m_state];};
+ virtual void dataEl(const TQXmlAttributes&) {m_dataPtr = m_v.at(m_state); m_anonClass = m_anonClassList[m_state];};
// return gnucash data string variable pointer
- virtual QString var (int i) const;
+ virtual TQString var (int i) const;
// anonymize data
- virtual QString hide (QString, unsigned int);
+ virtual TQString hide (TQString, unsigned int);
MyMoneyGncReader *pMain; // pointer to 'main' class
// used at start of each transaction so same money hide factor is applied to all splits
void adjustHideFactor();
- QString m_elementName; // save 'this' element's name
- QString m_version; // and it's gnucash version
- const QString *m_subElementList; // list of sub object element names for 'this'
+ TQString m_elementName; // save 'this' element's name
+ TQString m_version; // and it's gnucash version
+ const TQString *m_subElementList; // list of sub object element names for 'this'
unsigned int m_subElementListCount; // count of above
- const QString *m_dataElementList; // ditto for data elements
+ const TQString *m_dataElementList; // ditto for data elements
unsigned int m_dataElementListCount;
- QString *m_dataPtr; // pointer to m_v variable for current data item
- mutable QPtrList<QString> m_v; // storage for variable pointers
+ TQString *m_dataPtr; // pointer to m_v variable for current data item
+ mutable TQPtrList<TQString> m_v; // storage for variable pointers
unsigned int m_state; // effectively, the index to subElementList or dataElementList, whichever is currently in use
@@ -283,13 +283,13 @@ public:
protected:
friend class MyMoneyGncReader;
friend class GncTransaction;
- bool isCurrency() const { return (*m_v.at(CMDTYSPC) == QString("ISO4217"));};
- QString id() const { return (*m_v.at(CMDTYID));};
- QString space() const { return (*m_v.at(CMDTYSPC));};
+ bool isCurrency() const { return (*m_v.at(CMDTYSPC) == TQString("ISO4217"));};
+ TQString id() const { return (*m_v.at(CMDTYID));};
+ TQString space() const { return (*m_v.at(CMDTYSPC));};
private:
// data elements
enum CmdtySpecDataEls {CMDTYSPC, CMDTYID, END_CmdtySpec_DELS};
- virtual QString hide (QString, unsigned int);
+ virtual TQString hide (TQString, unsigned int);
};
// *********************************************************************
// date; maybe one of two types, ts:date which is date/time, gdate which is date only
@@ -305,11 +305,11 @@ protected:
friend class GncSplit;
friend class GncSchedule;
friend class GncRecurrence;
- const QDate date() const { return (QDate::fromString(m_v.at(TSDATE)->section(' ', 0, 0), Qt::ISODate));};
+ const TQDate date() const { return (TQDate::fromString(m_v.at(TSDATE)->section(' ', 0, 0), Qt::ISODate));};
private:
// data elements
enum DateDataEls {TSDATE, GDATE, END_Date_DELS};
- virtual void dataEl(const QXmlAttributes&) {m_dataPtr = m_v.at(TSDATE); m_anonClass = GncObject::ASIS;}
+ virtual void dataEl(const TQXmlAttributes&) {m_dataPtr = m_v.at(TSDATE); m_anonClass = GncObject::ASIS;}
; // treat both date types the same
};
// ************* GncKvp********************************************
@@ -324,9 +324,9 @@ public:
protected:
friend class MyMoneyGncReader;
- QString key() const { return (var(KEY));};
- QString value() const { return (var(VALUE));};
- QString type() const { return (m_kvpType);};
+ TQString key() const { return (var(KEY));};
+ TQString value() const { return (var(VALUE));};
+ TQString type() const { return (m_kvpType);};
unsigned int kvpCount() const { return (m_kvpList.count());};
const GncKvp *getKvp(unsigned int i) const { return (static_cast<GncKvp *>(m_kvpList.at(i)));};
private:
@@ -336,9 +336,9 @@ private:
virtual void endSubEl(GncObject *);
// data elements
enum KvpDataEls {KEY, VALUE, END_Kvp_DELS };
- virtual void dataEl (const QXmlAttributes&);
- mutable QPtrList<GncObject> m_kvpList;
- QString m_kvpType; // type is an XML attribute
+ virtual void dataEl (const TQXmlAttributes&);
+ mutable TQPtrList<GncObject> m_kvpList;
+ TQString m_kvpType; // type is an XML attribute
};
// ************* GncLot********************************************
// KMM doesn't have support for lots as yet
@@ -361,9 +361,9 @@ public:
GncCountData ();
~GncCountData ();
private:
- virtual void initiate (const QString&, const QXmlAttributes&);
+ virtual void initiate (const TQString&, const TQXmlAttributes&);
virtual void terminate();
- QString m_countType; // type of element being counted
+ TQString m_countType; // type of element being counted
};
//********************************************************************
class GncCommodity : public GncObject {
@@ -373,11 +373,11 @@ public:
protected:
friend class MyMoneyGncReader;
// access data values
- bool isCurrency() const { return (var(SPACE) == QString("ISO4217"));};
- QString space() const { return (var(SPACE));};
- QString id() const { return (var(ID));};
- QString name() const { return (var(NAME));};
- QString fraction() const { return (var(FRACTION));};
+ bool isCurrency() const { return (var(SPACE) == TQString("ISO4217"));};
+ TQString space() const { return (var(SPACE));};
+ TQString id() const { return (var(ID));};
+ TQString name() const { return (var(NAME));};
+ TQString fraction() const { return (var(FRACTION));};
private:
virtual void terminate();
// data elements
@@ -393,8 +393,8 @@ protected:
// access data values
const GncCmdtySpec *commodity() const { return (m_vpCommodity);};
const GncCmdtySpec *currency() const { return (m_vpCurrency);};
- QString value() const { return (var(VALUE));};
- QDate priceDate () const { return (m_vpPriceDate->date());};
+ TQString value() const { return (var(VALUE));};
+ TQDate priceDate () const { return (m_vpPriceDate->date());};
private:
virtual void terminate();
// sub object elements
@@ -415,11 +415,11 @@ protected:
friend class MyMoneyGncReader;
// access data values
GncCmdtySpec *commodity() const { return (m_vpCommodity);};
- QString id () const { return (var(ID));};
- QString name () const { return (var(NAME));};
- QString desc () const { return (var(DESC));};
- QString type () const { return (var(TYPE));};
- QString parent () const { return (var(PARENT));};
+ TQString id () const { return (var(ID));};
+ TQString name () const { return (var(NAME));};
+ TQString desc () const { return (var(DESC));};
+ TQString type () const { return (var(TYPE));};
+ TQString tqparent () const { return (var(PARENT));};
private:
// subsidiary objects/elements
enum AccountSubEls {CMDTY, KVP, LOTS, END_Account_SELS };
@@ -429,7 +429,7 @@ private:
// data elements
enum AccountDataEls {ID, NAME, DESC, TYPE, PARENT, END_Account_DELS };
GncCmdtySpec *m_vpCommodity;
- QPtrList<GncObject> m_kvpList;
+ TQPtrList<GncObject> m_kvpList;
};
// ************* GncSplit********************************************
class GncSplit : public GncObject {
@@ -439,20 +439,20 @@ public:
protected:
friend class MyMoneyGncReader;
// access data values
- QString id() const { return (var(ID));};
- QString memo() const { return (var(MEMO));};
- QString recon() const { return (var(RECON));};
- QString value() const { return (var(VALUE));};
- QString qty() const { return (var(QTY));};
- QString acct() const { return (var(ACCT));};
-const QDate reconDate() const {QDate x = QDate(); return (m_vpDateReconciled == NULL ? x : m_vpDateReconciled->date());};
+ TQString id() const { return (var(ID));};
+ TQString memo() const { return (var(MEMO));};
+ TQString recon() const { return (var(RECON));};
+ TQString value() const { return (var(VALUE));};
+ TQString qty() const { return (var(TQTY));};
+ TQString acct() const { return (var(ACCT));};
+const TQDate reconDate() const {TQDate x = TQDate(); return (m_vpDateReconciled == NULL ? x : m_vpDateReconciled->date());};
private:
// subsidiary objects/elements
enum TransactionSubEls {RECDATE, END_Split_SELS };
virtual GncObject *startSubEl();
virtual void endSubEl(GncObject *);
// data elements
- enum SplitDataEls {ID, MEMO, RECON, VALUE, QTY, ACCT, END_Split_DELS };
+ enum SplitDataEls {ID, MEMO, RECON, VALUE, TQTY, ACCT, END_Split_DELS };
GncDate *m_vpDateReconciled;
};
// ************* GncTransaction********************************************
@@ -463,12 +463,12 @@ public:
protected:
friend class MyMoneyGncReader;
// access data values
- QString id() const { return (var(ID));};
- QString no() const { return (var(NO));};
- QString desc() const { return (var(DESC));};
- QString currency() const { return (m_vpCurrency == NULL ? QString () : m_vpCurrency->id());};
- QDate dateEntered() const { return (m_vpDateEntered->date());};
- QDate datePosted() const { return (m_vpDatePosted->date());};
+ TQString id() const { return (var(ID));};
+ TQString no() const { return (var(NO));};
+ TQString desc() const { return (var(DESC));};
+ TQString currency() const { return (m_vpCurrency == NULL ? TQString () : m_vpCurrency->id());};
+ TQDate dateEntered() const { return (m_vpDateEntered->date());};
+ TQDate datePosted() const { return (m_vpDatePosted->date());};
bool isTemplate() const { return (m_template);};
unsigned int splitCount() const { return (m_splitList.count());};
unsigned int kvpCount() const { return (m_kvpList.count());};
@@ -484,9 +484,9 @@ private:
enum TransactionDataEls {ID, NO, DESC, END_Transaction_DELS };
GncCmdtySpec *m_vpCurrency;
GncDate *m_vpDateEntered, *m_vpDatePosted;
- mutable QPtrList<GncObject> m_splitList;
+ mutable TQPtrList<GncObject> m_splitList;
bool m_template; // true if this is a template for scheduled transaction
- mutable QPtrList<GncObject> m_kvpList;
+ mutable TQPtrList<GncObject> m_kvpList;
};
// ************* GncTemplateSplit********************************************
@@ -497,12 +497,12 @@ public:
protected:
friend class MyMoneyGncReader;
// access data values
- QString id() const { return (var(ID));};
- QString memo() const { return (var(MEMO));};
- QString recon() const { return (var(RECON));};
- QString value() const { return (var(VALUE));};
- QString qty() const { return (var(QTY));};
- QString acct() const { return (var(ACCT));};
+ TQString id() const { return (var(ID));};
+ TQString memo() const { return (var(MEMO));};
+ TQString recon() const { return (var(RECON));};
+ TQString value() const { return (var(VALUE));};
+ TQString qty() const { return (var(TQTY));};
+ TQString acct() const { return (var(ACCT));};
unsigned int kvpCount() const { return (m_kvpList.count());};
const GncKvp *getKvp(unsigned int i) const { return (static_cast<GncKvp *>(m_kvpList.at(i)));};
private:
@@ -511,8 +511,8 @@ private:
virtual GncObject *startSubEl();
virtual void endSubEl(GncObject *);
// data elements
- enum TemplateSplitDataEls {ID, MEMO, RECON, VALUE, QTY, ACCT, END_TemplateSplit_DELS };
- mutable QPtrList<GncObject> m_kvpList;
+ enum TemplateSplitDataEls {ID, MEMO, RECON, VALUE, TQTY, ACCT, END_TemplateSplit_DELS };
+ mutable TQPtrList<GncObject> m_kvpList;
};
// ************* GncSchedule********************************************
class GncFreqSpec;
@@ -525,23 +525,23 @@ public:
protected:
friend class MyMoneyGncReader;
// access data values
- QString name() const { return (var(NAME));};
- QString enabled() const {return var(ENABLED);};
- QString autoCreate() const { return (var(AUTOC));};
- QString autoCrNotify() const { return (var(AUTOCN));};
- QString autoCrDays() const { return (var(AUTOCD));};
- QString advCrDays() const { return (var(ADVCD));};
- QString advCrRemindDays() const { return (var(ADVRD));};
- QString instanceCount() const { return (var(INSTC));};
- QString numOccurs() const { return (var(NUMOCC));};
- QString remOccurs() const { return (var(REMOCC));};
- QString templId() const { return (var(TEMPLID));};
- QDate startDate () const
- {QDate x = QDate(); return (m_vpStartDate == NULL ? x : m_vpStartDate->date());};
- QDate lastDate () const
- {QDate x = QDate(); return (m_vpLastDate == NULL ? x : m_vpLastDate->date());};
- QDate endDate() const
- {QDate x = QDate(); return (m_vpEndDate == NULL ? x : m_vpEndDate->date());};
+ TQString name() const { return (var(NAME));};
+ TQString enabled() const {return var(ENABLED);};
+ TQString autoCreate() const { return (var(AUTOC));};
+ TQString autoCrNotify() const { return (var(AUTOCN));};
+ TQString autoCrDays() const { return (var(AUTOCD));};
+ TQString advCrDays() const { return (var(ADVCD));};
+ TQString advCrRemindDays() const { return (var(ADVRD));};
+ TQString instanceCount() const { return (var(INSTC));};
+ TQString numOccurs() const { return (var(NUTQMOCC));};
+ TQString remOccurs() const { return (var(RETQMOCC));};
+ TQString templId() const { return (var(TEMPLID));};
+ TQDate startDate () const
+ {TQDate x = TQDate(); return (m_vpStartDate == NULL ? x : m_vpStartDate->date());};
+ TQDate lastDate () const
+ {TQDate x = TQDate(); return (m_vpLastDate == NULL ? x : m_vpLastDate->date());};
+ TQDate endDate() const
+ {TQDate x = TQDate(); return (m_vpEndDate == NULL ? x : m_vpEndDate->date());};
const GncFreqSpec *getFreqSpec() const { return (m_vpFreqSpec);};
const GncSchedDef *getSchedDef() const { return (m_vpSchedDef);};
private:
@@ -552,10 +552,10 @@ private:
virtual void terminate();
// data elements
enum ScheduleDataEls {NAME, ENABLED, AUTOC, AUTOCN, AUTOCD, ADVCD, ADVRD, INSTC,
- NUMOCC, REMOCC, TEMPLID, END_Schedule_DELS };
+ NUTQMOCC, RETQMOCC, TEMPLID, END_Schedule_DELS };
GncDate *m_vpStartDate, *m_vpLastDate, *m_vpEndDate;
GncFreqSpec *m_vpFreqSpec;
- mutable QPtrList<GncRecurrence> m_vpRecurrence; // gnc handles multiple occurrences
+ mutable TQPtrList<GncRecurrence> m_vpRecurrence; // gnc handles multiple occurrences
GncSchedDef *m_vpSchedDef;
};
// ************* GncFreqSpec********************************************
@@ -566,7 +566,7 @@ public:
protected:
friend class MyMoneyGncReader;
// access data values (only interval type used at present)
- QString intervalType() const { return (var(INTVT));};
+ TQString intervalType() const { return (var(INTVT));};
private:
// subsidiary objects/elements
enum FreqSpecSubEls {COMPO, END_FreqSpec_SELS };
@@ -575,7 +575,7 @@ private:
// data elements
enum FreqSpecDataEls {INTVT, MONTHLY, DAILY, WEEKLY, INTVI, INTVO, INTVD, END_FreqSpec_DELS};
virtual void terminate();
- mutable QPtrList<GncObject> m_fsList;
+ mutable TQPtrList<GncObject> m_fsList;
};
// ************* GncRecurrence********************************************
@@ -587,11 +587,11 @@ public:
protected:
friend class MyMoneyGncReader;
// access data values
- QDate startDate () const
- {QDate x = QDate(); return (m_vpStartDate == NULL ? x : m_vpStartDate->date());};
- QString mult() const {return (var(MULT));};
- QString periodType() const {return (var(PERIODTYPE));};
- QString getFrequency() const;
+ TQDate startDate () const
+ {TQDate x = TQDate(); return (m_vpStartDate == NULL ? x : m_vpStartDate->date());};
+ TQString mult() const {return (var(MULT));};
+ TQString periodType() const {return (var(PERIODTYPE));};
+ TQString getFrequency() const;
private:
// subsidiary objects/elements
enum RecurrenceSubEls {STARTDATE, END_Recurrence_SELS };
@@ -618,25 +618,25 @@ class GncSchedDef : public GncObject {
// ****************************************************************************************
/**
XML Reader
- The XML reader is an implementation of the Qt SAX2 XML parser. It determines the type
+ The XML reader is an implementation of the TQt SAX2 XML parser. It determines the type
of object represented by the XMl, and calls the appropriate object functions
*/
// *****************************************************************************************
-class XmlReader : public QXmlDefaultHandler {
+class XmlReader : public TQXmlDefaultHandler {
protected:
friend class MyMoneyGncReader;
XmlReader (MyMoneyGncReader *pM) : pMain(pM) {} // keep pointer to 'main'
- void processFile (QIODevice*); // main entry point of reader
+ void processFile (TQIODevice*); // main entry point of reader
// define xml content handler functions
bool startDocument ();
- bool startElement (const QString&, const QString&, const QString&, const QXmlAttributes&);
- bool endElement (const QString&, const QString&, const QString&);
- bool characters (const QString &);
+ bool startElement (const TQString&, const TQString&, const TQString&, const TQXmlAttributes&);
+ bool endElement (const TQString&, const TQString&, const TQString&);
+ bool characters (const TQString &);
bool endDocument();
private:
- QXmlInputSource *m_source;
- QXmlSimpleReader *m_reader;
- QPtrStack<GncObject> m_os; // stack of sub objects
+ TQXmlInputSource *m_source;
+ TQXmlSimpleReader *m_reader;
+ TQPtrStack<GncObject> m_os; // stack of sub objects
GncObject *m_co; // current object, for ease of coding (=== m_os.top)
MyMoneyGncReader *pMain; // the 'main' pointer, to pass on to objects
bool m_headerFound; // check for gnc-v2 header
@@ -652,21 +652,21 @@ private:
class GncMessageArgs {
protected:
friend class MyMoneyGncReader;
- QString source; // 'type of message
+ TQString source; // 'type of message
unsigned int code; // to identify actual message
- QValueList<QString> args; // variable arguments
+ TQValueList<TQString> args; // variable arguments
};
class GncMessages {
protected:
friend class MyMoneyGncReader;
- static QString text (const QString, const unsigned int); // returns text of identified message
- static unsigned int argCount (const QString, const unsigned int); // returns no. of args required
+ static TQString text (const TQString, const unsigned int); // returns text of identified message
+ static unsigned int argCount (const TQString, const unsigned int); // returns no. of args required
private:
typedef struct {
- const QString source;
+ const TQString source;
const unsigned int code;
- QString text;
+ TQString text;
}
messText;
static messText texts [];
@@ -695,12 +695,12 @@ public:
*
*/
#ifndef _GNCFILEANON
- void readFile (QIODevice* pDevice, IMyMoneySerialize* storage); // main entry point, IODevice is gnucash file
- void writeFile (QIODevice*, IMyMoneySerialize*) { return ;}; // dummy entry needed by kmymoneywiew. we will not be writing
+ void readFile (TQIODevice* pDevice, IMyMoneySerialize* storage); // main entry point, IODevice is gnucash file
+ void writeFile (TQIODevice*, IMyMoneySerialize*) { return ;}; // dummy entry needed by kmymoneywiew. we will not be writing
#else
- void readFile (QString, QString);
+ void readFile (TQString, TQString);
#endif // _GNCFILEANON
- QTextCodec *m_decoder;
+ TQTextCodec *m_decoder;
protected:
friend class GncObject; // pity we can't just say GncObject. And compiler doesn't like multiple friends on one line...
friend class GncFile; // there must be a better way...
@@ -743,12 +743,12 @@ protected:
void convertFreqSpec (const GncFreqSpec *) {return;};
#endif // _GNCFILEANON
/** to post messages for final report */
- void postMessage (const QString&, const unsigned int, const char *);
- void postMessage (const QString&, const unsigned int, const char *, const char *);
- void postMessage (const QString&, const unsigned int, const char *, const char *, const char *);
- void postMessage (const QString&, const unsigned int, const QStringList&);
- void setProgressCallback (void(*callback)(int, int, const QString&));
- void signalProgress (int current, int total, const QString& = "");
+ void postMessage (const TQString&, const unsigned int, const char *);
+ void postMessage (const TQString&, const unsigned int, const char *, const char *);
+ void postMessage (const TQString&, const unsigned int, const char *, const char *, const char *);
+ void postMessage (const TQString&, const unsigned int, const TQStringList&);
+ void setProgressCallback (void(*callback)(int, int, const TQString&));
+ void signalProgress (int current, int total, const TQString& = "");
/** user options */
/**
Scheduled Transactions
@@ -809,24 +809,24 @@ private:
void setOptions (); // to set user options from dialog
void setFileHideFactor ();
// the following handles the gnucash indicator for a bad value (-1/0) which causes us probs
- QString convBadValue (QString gncValue) const {return (gncValue == "-1/0" ? "0/1" : gncValue); };
+ TQString convBadValue (TQString gncValue) const {return (gncValue == "-1/0" ? "0/1" : gncValue); };
#ifndef _GNCFILEANON
- MyMoneyTransaction convertTemplateTransaction (const QString&, const GncTransaction *);
- void convertTemplateSplit (const QString&, const GncTemplateSplit *);
+ MyMoneyTransaction convertTemplateTransaction (const TQString&, const GncTransaction *);
+ void convertTemplateSplit (const TQString&, const GncTemplateSplit *);
#endif // _GNCFILEANON
// wind up when all done
void terminate();
- QString buildReportSection (const QString&);
- bool writeReportToFile (const QValueList<QString>&);
+ TQString buildReportSection (const TQString&);
+ bool writeReportToFile (const TQValueList<TQString>&);
// main storage
#ifndef _GNCFILEANON
IMyMoneyStorage *m_storage;
#else
- QTextStream oStream;
+ TQTextStream oStream;
#endif // _GNCFILEANON
XmlReader *m_xr;
/** to hold the callback pointer for the progress bar */
- void (*m_progressCallback)(int, int, const QString&);
+ void (*m_progressCallback)(int, int, const TQString&);
// a map of which versions of the various elements (objects) we can import
map_elementVersions m_versionList;
// counters holding count data from the Gnc 'count-data' section
@@ -851,53 +851,53 @@ private:
// counters for error reporting
int m_ccCount, m_orCount, m_scCount;
// currency counter
- QMap<QString, unsigned int> m_currencyCount;
+ TQMap<TQString, unsigned int> m_currencyCount;
/**
* Map gnucash vs. Kmm ids for accounts, equities, schedules, price sources
*/
- QMap<QString, QString> m_mapIds;
- QString m_rootId; // save the root id for terminate()
- QMap<QString, QString> m_mapEquities;
- QMap<QString, QString> m_mapSchedules;
- QMap<QString, QString> m_mapSources;
+ TQMap<TQString, TQString> m_mapIds;
+ TQString m_rootId; // save the root id for terminate()
+ TQMap<TQString, TQString> m_mapEquities;
+ TQMap<TQString, TQString> m_mapSchedules;
+ TQMap<TQString, TQString> m_mapSources;
/**
* A list of stock accounts (gnc ids) which will be held till the end
so we can implement the user's investment option
*/
- QValueList<QString> m_stockList;
+ TQValueList<TQString> m_stockList;
/**
* Temporary storage areas for transaction processing
*/
- QString m_txCommodity; // save commodity for current transaction
- QString m_txPayeeId; // gnc has payee at tx level, we need it at split level
- QDate m_txDatePosted; // ditto for post date
- QString m_txChequeNo; // ditto for cheque number
+ TQString m_txCommodity; // save commodity for current transaction
+ TQString m_txPayeeId; // gnc has payee at tx level, we need it at split level
+ TQDate m_txDatePosted; // ditto for post date
+ TQString m_txChequeNo; // ditto for cheque number
/** In kmm, the order of splits is critical to some operations. These
* areas will hold the splits until we've read them all */
- QValueList<MyMoneySplit> m_splitList, m_liabilitySplitList, m_otherSplitList;
+ TQValueList<MyMoneySplit> m_splitList, m_liabilitySplitList, m_otherSplitList;
bool m_potentialTransfer; // to determine whether this might be a transfer
/** Schedules are processed through 3 different functions, any of which may set this flag */
bool m_suspectSchedule;
/**
* A holding area for template txs while we're waiting for the schedules
*/
- QPtrList<GncTransaction> m_templateList;
+ TQPtrList<GncTransaction> m_templateList;
/** Hold a list of suspect schedule ids for later processing? */
- QValueList<QString> m_suspectList;
+ TQValueList<TQString> m_suspectList;
/**
* To hold message data till final report
*/
- QPtrList<GncMessageArgs> m_messageList;
+ TQPtrList<GncMessageArgs> m_messageList;
GncMessages *m_messageTexts;
/**
* Internal utility functions
*/
- QString createPayee (const QString&); // create a payee and return it's id
- QString createOrphanAccount (const QString&); // create unknown account and return the id
- QDate incrDate (QDate lastDate, unsigned char interval, unsigned int intervalCount); // for date calculations
- MyMoneyAccount checkConsistency (MyMoneyAccount& parent, MyMoneyAccount& child); // gnucash is sometimes TOO flexible
- void checkInvestmentOption (QString stockId); // implement user investment option
- void getPriceSource (MyMoneySecurity stock, QString gncSource);
+ TQString createPayee (const TQString&); // create a payee and return it's id
+ TQString createOrphanAccount (const TQString&); // create unknown account and return the id
+ TQDate incrDate (TQDate lastDate, unsigned char interval, unsigned int intervalCount); // for date calculations
+ MyMoneyAccount checkConsistency (MyMoneyAccount& tqparent, MyMoneyAccount& child); // gnucash is sometimes TOO flexible
+ void checkInvestmentOption (TQString stockId); // implement user investment option
+ void getPriceSource (MyMoneySecurity stock, TQString gncSource);
#endif // _GNCFILEANON
};