summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/storage/mymoneystoragesql.h
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/mymoney/storage/mymoneystoragesql.h')
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragesql.h324
1 files changed, 162 insertions, 162 deletions
diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.h b/kmymoney2/mymoney/storage/mymoneystoragesql.h
index 1abe70b..4250256 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragesql.h
+++ b/kmymoney2/mymoney/storage/mymoneystoragesql.h
@@ -13,12 +13,12 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qsqldatabase.h>
-#include <qsqlquery.h>
-#include <qsqlerror.h>
-#include <qvaluestack.h>
+#include <tqsqldatabase.h>
+#include <tqsqlquery.h>
+#include <tqsqlerror.h>
+#include <tqvaluestack.h>
-class QIODevice;
+class TQIODevice;
// ----------------------------------------------------------------------------
// KDE Includes
@@ -56,7 +56,7 @@ class FilterFail {
m_storage (storage)
{}
- inline bool operator() (const QPair<QString, MyMoneyTransaction>& transactionPair)
+ inline bool operator() (const TQPair<TQString, MyMoneyTransaction>& transactionPair)
{ return (*this) (transactionPair.second); }
inline bool operator() (const MyMoneyTransaction& transaction)
@@ -87,16 +87,16 @@ typedef enum databaseTypeE { // database (driver) type
class MyMoneyStorageSql;
/**
- * The MyMoneySqlQuery class is derived from QSqlQuery to provide
+ * The MyMoneySqlQuery class is derived from TQSqlQuery to provide
* a way to adjust some queries based on databaseTypeE and make
* debugging easier by providing a place to put debug statements.
*/
-class MyMoneySqlQuery : public QSqlQuery {
+class MyMoneySqlQuery : public TQSqlQuery {
public:
MyMoneySqlQuery (MyMoneyStorageSql* db = 0);
virtual ~MyMoneySqlQuery() {}
bool exec ();
- bool prepare ( const QString & query );
+ bool prepare ( const TQString & query );
private:
const MyMoneyStorageSql* m_db;
};
@@ -108,13 +108,13 @@ class MyMoneyDbDrivers {
public:
MyMoneyDbDrivers ();
/**
- * @return a list ofsupported Qt database driver types, their qt names and useful names
+ * @return a list ofsupported TQt database driver types, their qt names and useful names
**/
- const QMap<QString, QString> driverMap() const {return (m_driverMap);};
- databaseTypeE driverToType (const QString& driver) const;
+ const TQMap<TQString, TQString> driverMap() const {return (m_driverMap);};
+ databaseTypeE driverToType (const TQString& driver) const;
bool isTested (databaseTypeE dbType) const;
private:
- QMap<QString, QString> m_driverMap;
+ TQMap<TQString, TQString> m_driverMap;
};
/**
@@ -123,11 +123,11 @@ class MyMoneyDbDrivers {
*/
class MyMoneyDbColumn : public KShared {
public:
- MyMoneyDbColumn (const QString& iname,
- const QString& itype = QString::null,
+ MyMoneyDbColumn (const TQString& iname,
+ const TQString& itype = TQString(),
const bool iprimary = false,
const bool inotnull = false,
- const QString &initVersion = "0.1"):
+ const TQString &initVersion = "0.1"):
m_name(iname),
m_type(itype),
m_isPrimary(iprimary),
@@ -147,20 +147,20 @@ class MyMoneyDbColumn : public KShared {
*
* @param dbType Database driver type
*
- * @return QString of the DDL for the column, tailored for what the driver supports.
+ * @return TQString of the DDL for the column, tailored for what the driver supports.
*/
- virtual const QString generateDDL (databaseTypeE dbType) const;
+ virtual const TQString generateDDL (databaseTypeE dbType) const;
- const QString& name(void) const {return (m_name);}
- const QString& type(void) const {return (m_type);}
+ const TQString& name(void) const {return (m_name);}
+ const TQString& type(void) const {return (m_type);}
bool isPrimaryKey(void) const {return (m_isPrimary);}
bool isNotNull(void) const {return (m_isNotNull);}
private:
- QString m_name;
- QString m_type;
+ TQString m_name;
+ TQString m_type;
bool m_isPrimary;
bool m_isNotNull;
- QString m_initVersion;
+ TQString m_initVersion;
};
/**
@@ -168,17 +168,17 @@ class MyMoneyDbColumn : public KShared {
*/
class MyMoneyDbDatetimeColumn : public MyMoneyDbColumn {
public:
- MyMoneyDbDatetimeColumn (const QString& iname,
+ MyMoneyDbDatetimeColumn (const TQString& iname,
const bool iprimary = false,
const bool inotnull = false,
- const QString &initVersion = "0.1"):
+ const TQString &initVersion = "0.1"):
MyMoneyDbColumn (iname, "", iprimary, inotnull, initVersion)
{}
virtual ~MyMoneyDbDatetimeColumn() {}
- virtual const QString generateDDL (databaseTypeE dbType) const;
+ virtual const TQString generateDDL (databaseTypeE dbType) const;
virtual MyMoneyDbDatetimeColumn* clone () const;
private:
- static const QString calcType(void);
+ static const TQString calcType(void);
};
/**
@@ -187,17 +187,17 @@ class MyMoneyDbDatetimeColumn : public MyMoneyDbColumn {
class MyMoneyDbIntColumn : public MyMoneyDbColumn {
public:
enum size {TINY, SMALL, MEDIUM, BIG};
- MyMoneyDbIntColumn (const QString& iname,
+ MyMoneyDbIntColumn (const TQString& iname,
const size type = MEDIUM,
const bool isigned = true,
const bool iprimary = false,
const bool inotnull = false,
- const QString &initVersion = "0.1"):
+ const TQString &initVersion = "0.1"):
MyMoneyDbColumn (iname, "", iprimary, inotnull, initVersion),
m_type (type),
m_isSigned (isigned) {}
virtual ~MyMoneyDbIntColumn() {}
- virtual const QString generateDDL (databaseTypeE dbType) const;
+ virtual const TQString generateDDL (databaseTypeE dbType) const;
virtual MyMoneyDbIntColumn* clone () const;
private:
size m_type;
@@ -212,15 +212,15 @@ class MyMoneyDbIntColumn : public MyMoneyDbColumn {
class MyMoneyDbTextColumn : public MyMoneyDbColumn {
public:
enum size {TINY, NORMAL, MEDIUM, LONG};
- MyMoneyDbTextColumn (const QString& iname,
+ MyMoneyDbTextColumn (const TQString& iname,
const size type = MEDIUM,
const bool iprimary = false,
const bool inotnull = false,
- const QString &initVersion = "0.1"):
+ const TQString &initVersion = "0.1"):
MyMoneyDbColumn (iname, "", iprimary, inotnull, initVersion),
m_type (type) {}
virtual ~MyMoneyDbTextColumn() {}
- virtual const QString generateDDL (databaseTypeE dbType) const;
+ virtual const TQString generateDDL (databaseTypeE dbType) const;
virtual MyMoneyDbTextColumn* clone () const;
private:
size m_type;
@@ -237,9 +237,9 @@ class MyMoneyDbTextColumn : public MyMoneyDbColumn {
*/
class MyMoneyDbIndex {
public:
- MyMoneyDbIndex (const QString& table,
- const QString& name,
- const QStringList& columns,
+ MyMoneyDbIndex (const TQString& table,
+ const TQString& name,
+ const TQStringList& columns,
bool unique = false):
m_table(table),
m_unique(unique),
@@ -247,16 +247,16 @@ class MyMoneyDbIndex {
m_columns(columns)
{}
MyMoneyDbIndex () {}
- inline const QString table () const {return m_table;}
+ inline const TQString table () const {return m_table;}
inline bool isUnique () const {return m_unique;}
- inline const QString name () const {return m_name;}
- inline const QStringList columns () const {return m_columns;}
- const QString generateDDL (databaseTypeE dbType) const;
+ inline const TQString name () const {return m_name;}
+ inline const TQStringList columns () const {return m_columns;}
+ const TQString generateDDL (databaseTypeE dbType) const;
private:
- QString m_table;
+ TQString m_table;
bool m_unique;
- QString m_name;
- QStringList m_columns;
+ TQString m_name;
+ TQStringList m_columns;
};
/**
@@ -270,20 +270,20 @@ class MyMoneyDbIndex {
*/
class MyMoneyDbTable {
public:
- MyMoneyDbTable (const QString& iname,
- const QValueList<KSharedPtr <MyMoneyDbColumn> >& ifields,
- const QString& initVersion = "1.0"):
+ MyMoneyDbTable (const TQString& iname,
+ const TQValueList<KSharedPtr <MyMoneyDbColumn> >& ifields,
+ const TQString& initVersion = "1.0"):
m_name(iname),
m_fields(ifields),
m_initVersion(initVersion) {}
MyMoneyDbTable (void) {}
- inline const QString& name(void) const {return (m_name);}
- inline const QString& insertString(void) const {return (m_insertString);};
- inline const QString selectAllString(bool terminate = true) const
- {return (terminate ? QString(m_selectAllString + ";") : m_selectAllString);};
- inline const QString& updateString(void) const {return (m_updateString);};
- inline const QString& deleteString(void) const {return (m_deleteString);};
+ inline const TQString& name(void) const {return (m_name);}
+ inline const TQString& insertString(void) const {return (m_insertString);};
+ inline const TQString selectAllString(bool terminate = true) const
+ {return (terminate ? TQString(m_selectAllString + ";") : m_selectAllString);};
+ inline const TQString& updateString(void) const {return (m_updateString);};
+ inline const TQString& deleteString(void) const {return (m_deleteString);};
/**
* This method determines the string required to drop the primary key for the table
@@ -291,15 +291,15 @@ class MyMoneyDbTable {
*
* @param dbType The driver type of the database.
*
- * @return QString for the syntax to drop the primary key.
+ * @return TQString for the syntax to drop the primary key.
*/
- const QString dropPrimaryKeyString(databaseTypeE dbType) const;
+ const TQString dropPrimaryKeyString(databaseTypeE dbType) const;
/**
* This method returns a comma-separated list of all column names in the table
*
- * @return QString column list.
+ * @return TQString column list.
*/
- const QString columnList() const;
+ const TQString columnList() const;
/**
* This method returns the string for changing a column's definition. It covers statements
* like ALTER TABLE..CHANGE COLUMN, MODIFY COLUMN, etc.
@@ -308,9 +308,9 @@ class MyMoneyDbTable {
* @param columnName The name of the column to be modified.
* @param newDef The MyMoneyColumn object of the new column definition.
*
- * @return QString containing DDL to change the column.
+ * @return TQString containing DDL to change the column.
*/
- const QString modifyColumnString(databaseTypeE dbType, const QString& columnName, const MyMoneyDbColumn& newDef) const;
+ const TQString modifyColumnString(databaseTypeE dbType, const TQString& columnName, const MyMoneyDbColumn& newDef) const;
/**
* This method builds all of the SQL strings for common operations.
@@ -322,9 +322,9 @@ class MyMoneyDbTable {
*
* @param dbType The driver type of the database.
*
- * @return QString of the DDL.
+ * @return TQString of the DDL.
*/
- const QString generateCreateSQL (databaseTypeE dbType) const;
+ const TQString generateCreateSQL (databaseTypeE dbType) const;
/**
* This method creates a MyMoneyDbIndex object and adds it to the list of indices for the table.
@@ -333,22 +333,22 @@ class MyMoneyDbTable {
* @param columns The list of the columns affected.
* @param unique Whether or not this should be a unique index.
*/
- void addIndex(const QString& name, const QStringList& columns, bool unique = false);
+ void addIndex(const TQString& name, const TQStringList& columns, bool unique = false);
- typedef QValueList<KSharedPtr <MyMoneyDbColumn> >::const_iterator field_iterator;
+ typedef TQValueList<KSharedPtr <MyMoneyDbColumn> >::const_iterator field_iterator;
inline field_iterator begin(void) const {return m_fields.constBegin();}
inline field_iterator end(void) const {return m_fields.constEnd(); }
private:
- QString m_name;
- QValueList<KSharedPtr <MyMoneyDbColumn> > m_fields;
-
- typedef QValueList<MyMoneyDbIndex>::const_iterator index_iterator;
- QValueList<MyMoneyDbIndex> m_indices;
- QString m_initVersion;
- QString m_insertString; // string to insert a record
- QString m_selectAllString; // to select all fields
- QString m_updateString; // normal string for record update
- QString m_deleteString; // string to delete 1 record
+ TQString m_name;
+ TQValueList<KSharedPtr <MyMoneyDbColumn> > m_fields;
+
+ typedef TQValueList<MyMoneyDbIndex>::const_iterator index_iterator;
+ TQValueList<MyMoneyDbIndex> m_indices;
+ TQString m_initVersion;
+ TQString m_insertString; // string to insert a record
+ TQString m_selectAllString; // to select all fields
+ TQString m_updateString; // normal string for record update
+ TQString m_deleteString; // string to delete 1 record
};
/**
@@ -360,21 +360,21 @@ class MyMoneyDbTable {
*/
class MyMoneyDbView {
public:
- MyMoneyDbView (const QString& name,
- const QString& createString,
- const QString& initVersion = "0.1")
+ MyMoneyDbView (const TQString& name,
+ const TQString& createString,
+ const TQString& initVersion = "0.1")
: m_name (name), m_createString (createString), m_initVersion (initVersion)
{}
MyMoneyDbView (void) {}
- inline const QString& name(void) const {return (m_name);}
- inline const QString createString(void) const {return (m_createString);};
+ inline const TQString& name(void) const {return (m_name);}
+ inline const TQString createString(void) const {return (m_createString);};
private:
- QString m_name;
- QString m_createString;
- QString m_initVersion;
+ TQString m_name;
+ TQString m_createString;
+ TQString m_initVersion;
};
/**
@@ -387,22 +387,22 @@ public:
MyMoneyDbDef();
~MyMoneyDbDef() {}
- const QString generateSQL (const QString& driver) const;
+ const TQString generateSQL (const TQString& driver) const;
- typedef QMap<QString, MyMoneyDbTable>::const_iterator table_iterator;
+ typedef TQMap<TQString, MyMoneyDbTable>::const_iterator table_iterator;
inline table_iterator tableBegin(void) const {return m_tables.constBegin();}
inline table_iterator tableEnd(void) const {return m_tables.constEnd();}
- typedef QMap<QString, MyMoneyDbView>::const_iterator view_iterator;
+ typedef TQMap<TQString, MyMoneyDbView>::const_iterator view_iterator;
inline view_iterator viewBegin(void) const {return m_views.constBegin();}
inline view_iterator viewEnd(void) const {return m_views.constEnd();}
inline unsigned int currentVersion() const {return (m_currentVersion);};
private:
- const QString enclose(const QString& text) const
- {return (QString("'" + text + "'"));};
- static unsigned int m_currentVersion; // The current version of the database layout
+ const TQString enclose(const TQString& text) const
+ {return (TQString("'" + text + "'"));};
+ static unsigned int m_currentVersion; // The current version of the database tqlayout
MyMoneyDbDrivers m_drivers;
#define TABLE(name) void name();
#define VIEW(name) void name();
@@ -422,8 +422,8 @@ private:
TABLE(Budgets);
VIEW(Balances);
protected:
- QMap<QString, MyMoneyDbTable> m_tables;
- QMap<QString, MyMoneyDbView> m_views;
+ TQMap<TQString, MyMoneyDbTable> m_tables;
+ TQMap<TQString, MyMoneyDbView> m_views;
};
class IMyMoneySerialize;
@@ -432,7 +432,7 @@ class IMyMoneySerialize;
* The MyMoneyDbColumn class is a base type for generic db columns.
* Derived types exist for several common column types.
*/
-class MyMoneyStorageSql : public IMyMoneyStorageFormat, public QSqlDatabase, public KShared {
+class MyMoneyStorageSql : public IMyMoneyStorageFormat, public TQSqlDatabase, public KShared {
public:
MyMoneyStorageSql (IMyMoneySerialize *storage, const KURL& = KURL());
@@ -444,7 +444,7 @@ public:
* MyMoneyStorageSql - open database file
*
* @param url pseudo-URL of database to be opened
- * @param openMode open mode, same as for QFile::open
+ * @param openMode open mode, same as for TQFile::open
* @param clear whether existing data can be deleted
* @return 0 - database successfully opened
@@ -491,7 +491,7 @@ public:
* @return : error message to be displayed
*
*/
- const QString& lastError() const {return (m_error);};
+ const TQString& lastError() const {return (m_error);};
/**
* This method is used when a database file is open, and the data is to
* be saved in a different file or format. It will ensure that all data
@@ -533,40 +533,40 @@ public:
void modifyBudget(const MyMoneyBudget& bud);
void removeBudget(const MyMoneyBudget& bud);
- unsigned long transactionCount (const QString& aid = QString()) const;
- inline const QMap<QString, unsigned long> transactionCountMap () const
+ unsigned long transactionCount (const TQString& aid = TQString()) const;
+ inline const TQMap<TQString, unsigned long> transactionCountMap () const
{return (m_transactionCountMap);};
/**
* the storage manager also needs the following read entry points
*/
- const QMap<QString, MyMoneyAccount> fetchAccounts (const QStringList& idList = QStringList (), bool forUpdate = false) const;
- const QMap<QString, MyMoneyMoney> fetchBalance(const QStringList& id, const QDate& date) const;
- const QMap<QString, MyMoneyBudget> fetchBudgets (const QStringList& idList = QStringList (), bool forUpdate = false) const;
- const QMap<QString, MyMoneySecurity> fetchCurrencies (const QStringList& idList = QStringList (), bool forUpdate = false) const;
- const QMap<QString, MyMoneyInstitution> fetchInstitutions (const QStringList& idList = QStringList (), bool forUpdate = false) const;
- const QMap<QString, MyMoneyPayee> fetchPayees (const QStringList& idList = QStringList (), bool forUpdate = false) const;
- const MyMoneyPriceList fetchPrices (const QStringList& fromIdList = QStringList (), const QStringList& toIdList = QStringList(), bool forUpdate = false) const;
- const MyMoneyPrice fetchSinglePrice (const QString& fromIdList, const QString& toIdList, const QDate& date, bool exactDate, bool forUpdate = false) const;
- const QMap<QString, MyMoneyReport> fetchReports (const QStringList& idList = QStringList (), bool forUpdate = false) const;
- const QMap<QString, MyMoneySchedule> fetchSchedules (const QStringList& idList = QStringList (), bool forUpdate = false) const;
- const QMap<QString, MyMoneySecurity> fetchSecurities (const QStringList& idList = QStringList (), bool forUpdate = false) const;
- const QMap<QString, MyMoneyTransaction> fetchTransactions (const QString& tidList = QString (), const QString& dateClause = QString(), bool forUpdate = false) const;
- const QMap<QString, MyMoneyTransaction> fetchTransactions (const MyMoneyTransactionFilter& filter) const;
- bool isReferencedByTransaction(const QString& id) const;
-
- void readPayees(const QString&);
- void readPayees(const QValueList<QString> payeeList = QValueList<QString>());
+ const TQMap<TQString, MyMoneyAccount> fetchAccounts (const TQStringList& idList = TQStringList (), bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneyMoney> fetchBalance(const TQStringList& id, const TQDate& date) const;
+ const TQMap<TQString, MyMoneyBudget> fetchBudgets (const TQStringList& idList = TQStringList (), bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneySecurity> fetchCurrencies (const TQStringList& idList = TQStringList (), bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneyInstitution> fetchInstitutions (const TQStringList& idList = TQStringList (), bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneyPayee> fetchPayees (const TQStringList& idList = TQStringList (), bool forUpdate = false) const;
+ const MyMoneyPriceList fetchPrices (const TQStringList& fromIdList = TQStringList (), const TQStringList& toIdList = TQStringList(), bool forUpdate = false) const;
+ const MyMoneyPrice fetchSinglePrice (const TQString& fromIdList, const TQString& toIdList, const TQDate& date, bool exactDate, bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneyReport> fetchReports (const TQStringList& idList = TQStringList (), bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneySchedule> fetchSchedules (const TQStringList& idList = TQStringList (), bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneySecurity> fetchSecurities (const TQStringList& idList = TQStringList (), bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneyTransaction> fetchTransactions (const TQString& tidList = TQString (), const TQString& dateClause = TQString(), bool forUpdate = false) const;
+ const TQMap<TQString, MyMoneyTransaction> fetchTransactions (const MyMoneyTransactionFilter& filter) const;
+ bool isReferencedByTransaction(const TQString& id) const;
+
+ void readPayees(const TQString&);
+ void readPayees(const TQValueList<TQString> payeeList = TQValueList<TQString>());
void readTransactions(const MyMoneyTransactionFilter& filter);
- void setProgressCallback(void(*callback)(int, int, const QString&));
+ void setProgressCallback(void(*callback)(int, int, const TQString&));
- virtual void readFile(QIODevice* s, IMyMoneySerialize* storage) { Q_UNUSED(s); Q_UNUSED(storage) };
- virtual void writeFile(QIODevice* s, IMyMoneySerialize* storage){ Q_UNUSED(s); Q_UNUSED(storage) };
+ virtual void readFile(TQIODevice* s, IMyMoneySerialize* storage) { Q_UNUSED(s); Q_UNUSED(storage) };
+ virtual void writeFile(TQIODevice* s, IMyMoneySerialize* storage){ Q_UNUSED(s); Q_UNUSED(storage) };
- void startCommitUnit (const QString& callingFunction);
- bool endCommitUnit (const QString& callingFunction);
- void cancelCommitUnit (const QString& callingFunction);
+ void startCommitUnit (const TQString& callingFunction);
+ bool endCommitUnit (const TQString& callingFunction);
+ void cancelCommitUnit (const TQString& callingFunction);
- long unsigned getRecCount(const QString& table) const;
+ long unsigned getRecCount(const TQString& table) const;
long unsigned getNextBudgetId() const;
long unsigned getNextAccountId() const;
long unsigned getNextInstitutionId() const;
@@ -596,7 +596,7 @@ public:
private:
// a function to build a comprehensive error message
- QString& buildError (const QSqlQuery& q, const QString& function, const QString& message) const;
+ TQString& buildError (const TQSqlQuery& q, const TQString& function, const TQString& message) const;
// write routines
void writeUserInformation(void);
void writeInstitutions(void);
@@ -614,9 +614,9 @@ private:
void writeInstitution(const MyMoneyInstitution& i, MyMoneySqlQuery& q);
void writePayee(const MyMoneyPayee& p, MyMoneySqlQuery& q, bool isUserInfo = false);
void writeAccount (const MyMoneyAccount& a, MyMoneySqlQuery& q);
- void writeTransaction(const QString& txId, const MyMoneyTransaction& tx, MyMoneySqlQuery& q, const QString& type);
- void writeSplits(const QString& txId, const QString& type, const QValueList<MyMoneySplit>& splitList);
- void writeSplit(const QString& txId, const MyMoneySplit& split, const QString& type, const int splitId, MyMoneySqlQuery& q);
+ void writeTransaction(const TQString& txId, const MyMoneyTransaction& tx, MyMoneySqlQuery& q, const TQString& type);
+ void writeSplits(const TQString& txId, const TQString& type, const TQValueList<MyMoneySplit>& splitList);
+ void writeSplit(const TQString& txId, const MyMoneySplit& split, const TQString& type, const int splitId, MyMoneySqlQuery& q);
void writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuery& q, bool insert);
void writeSecurity(const MyMoneySecurity& security, MyMoneySqlQuery& q);
void writePricePair ( const MyMoneyPriceEntries& p);
@@ -624,21 +624,21 @@ private:
void writeCurrency(const MyMoneySecurity& currency, MyMoneySqlQuery& q);
void writeReport (const MyMoneyReport& rep, MyMoneySqlQuery& q);
void writeBudget (const MyMoneyBudget& bud, MyMoneySqlQuery& q);
- void writeKeyValuePairs(const QString& kvpType, const QString& kvpId, const QMap<QString, QString>& pairs);
- void writeKeyValuePair(const QString& kvpType, const QString& kvpId,
- const QString& kvpKey, const QString& kvpData);
+ void writeKeyValuePairs(const TQString& kvpType, const TQString& kvpId, const TQMap<TQString, TQString>& pairs);
+ void writeKeyValuePair(const TQString& kvpType, const TQString& kvpId,
+ const TQString& kvpKey, const TQString& kvpData);
// read routines
void readFileInfo(void);
void readLogonData(void);
void readUserInformation(void);
void readInstitutions(void);
void readAccounts(void);
- void readTransaction(const QString id);
- void readTransactions(const QString& tidList = QString(), const QString& dateClause = QString());
- void readTransaction(MyMoneyTransaction &tx, const QString& tid);
+ void readTransaction(const TQString id);
+ void readTransactions(const TQString& tidList = TQString(), const TQString& dateClause = TQString());
+ void readTransaction(MyMoneyTransaction &tx, const TQString& tid);
void readSplit (MyMoneySplit& s, const MyMoneySqlQuery& q, const MyMoneyDbTable& t) const;
- const MyMoneyKeyValueContainer readKeyValuePairs (const QString& kvpType, const QString& kvpId) const;
- const QMap<QString, MyMoneyKeyValueContainer> readKeyValuePairs (const QString& kvpType, const QStringList& kvpIdList) const;
+ const MyMoneyKeyValueContainer readKeyValuePairs (const TQString& kvpType, const TQString& kvpId) const;
+ const TQMap<TQString, MyMoneyKeyValueContainer> readKeyValuePairs (const TQString& kvpType, const TQStringList& kvpIdList) const;
void readSchedules(void);
void readSecurities(void);
void readPrices(void);
@@ -646,27 +646,27 @@ private:
void readReports(void);
void readBudgets(void);
- void deleteTransaction(const QString& id);
- void deleteSchedule(const QString& id);
- void deleteKeyValuePairs(const QString& kvpType, const QString& kvpId);
- long unsigned calcHighId (const long unsigned&, const QString&);
+ void deleteTransaction(const TQString& id);
+ void deleteSchedule(const TQString& id);
+ void deleteKeyValuePairs(const TQString& kvpType, const TQString& kvpId);
+ long unsigned calcHighId (const long unsigned&, const TQString&);
- void setVersion (const QString& version);
+ void setVersion (const TQString& version);
- void signalProgress(int current, int total, const QString& = "") const;
- void (*m_progressCallback)(int, int, const QString&);
+ void signalProgress(int current, int total, const TQString& = "") const;
+ void (*m_progressCallback)(int, int, const TQString&);
- //void startCommitUnit (const QString& callingFunction);
- //void endCommitUnit (const QString& callingFunction);
- //void cancelCommitUnit (const QString& callingFunction);
+ //void startCommitUnit (const TQString& callingFunction);
+ //void endCommitUnit (const TQString& callingFunction);
+ //void cancelCommitUnit (const TQString& callingFunction);
int splitState(const MyMoneyTransactionFilter::stateOptionE& state) const;
- inline const QDate getDate (const QString& date) const {
- return (date.isNull() ? QDate() : QDate::fromString(date, Qt::ISODate));
+ inline const TQDate getDate (const TQString& date) const {
+ return (date.isNull() ? TQDate() : TQDate::fromString(date, Qt::ISODate));
}
- inline const QDateTime getDateTime (const QString& date) const {
- return (date.isNull() ? QDateTime() : QDateTime::fromString(date, Qt::ISODate));
+ inline const TQDateTime getDateTime (const TQString& date) const {
+ return (date.isNull() ? TQDateTime() : TQDateTime::fromString(date, Qt::ISODate));
}
// open routines
@@ -690,16 +690,16 @@ private:
bool sqliteAlterTable(const MyMoneyDbTable& t);
bool addColumn(const MyMoneyDbTable& t,
const MyMoneyDbColumn& c,
- const QString& after = QString());
- bool addColumn(const QString& table,
- const QString& column,
- const QString& after = QString());
+ const TQString& after = TQString());
+ bool addColumn(const TQString& table,
+ const TQString& column,
+ const TQString& after = TQString());
bool dropColumn(const MyMoneyDbTable& t,
- const QString& c);
- bool dropColumn(const QString& table,
- const QString& column);
+ const TQString& c);
+ bool dropColumn(const TQString& table,
+ const TQString& column);
-// long long unsigned getRecCount(const QString& table);
+// long long unsigned getRecCount(const TQString& table);
int createTables();
void createTable(const MyMoneyDbTable& t);
void clean ();
@@ -716,7 +716,7 @@ private:
bool m_loadAll; // preload all data
bool m_override; // override open if already in use
// error message
- QString m_error;
+ TQString m_error;
// record counts
long unsigned m_institutions;
long unsigned m_accounts;
@@ -740,14 +740,14 @@ private:
long unsigned m_hiIdReports;
long unsigned m_hiIdBudgets;
// encrypt option - usage TBD
- QString m_encryptData;
+ TQString m_encryptData;
/**
* This variable is used to suppress status messages except during
* initial data load and final write
*/
- bool m_displayStatus;
+ bool m_displaytqStatus;
/**
* On occasions, e.g. after a complex transaction search, or for populating a
* payee popup list, it becomes necessary to load all data into memory. The
@@ -760,19 +760,19 @@ private:
* This member variable holds a list of those accounts for which all
* transactions are in memory, thus saving reading them again
*/
-// QValueList<QString> m_accountsLoaded;
+// TQValueList<TQString> m_accountsLoaded;
/**
* This member variable is used when loading transactions to list all
* referenced payees, which can then be read into memory (if not already there)
*/
-// QValueList<QString> m_payeeList;
+// TQValueList<TQString> m_payeeList;
- void alert(QString s) const {qDebug("%s", s.ascii());}; // FIXME: remove...
+ void alert(TQString s) const {qDebug("%s", s.ascii());}; // FIXME: remove...
/** The following keeps track of commitment units (known as transactions in SQL
* though it would be confusing to use that term within KMM). It is implemented
* as a stack for debug purposes. Long term, probably a count would suffice
*/
- QValueStack<QString> m_commitUnitStack;
+ TQValueStack<TQString> m_commitUnitStack;
/**
* This member variable is used to preload transactions for preferred accounts
*/
@@ -790,13 +790,13 @@ private:
* probably be moved into the MyMoneyAccount object; maybe we will do that once
* the database code has been properly checked out
*/
- QMap<QString, unsigned long> m_transactionCountMap;
+ TQMap<TQString, unsigned long> m_transactionCountMap;
/**
* These member variables hold the user name and date/time of logon
*/
- QString m_logonUser;
- QDateTime m_logonAt;
- QDateTime m_txPostDate; // FIXME: remove when Tom puts date into split object
+ TQString m_logonUser;
+ TQDateTime m_logonAt;
+ TQDateTime m_txPostDate; // FIXME: remove when Tom puts date into split object
//Disable copying
MyMoneyStorageSql (const MyMoneyStorageSql& rhs);