diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
commit | fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch) | |
tree | 6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/plugins/ofximport/dialogs | |
parent | dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff) | |
download | kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip |
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
Diffstat (limited to 'kmymoney2/plugins/ofximport/dialogs')
11 files changed, 347 insertions, 344 deletions
diff --git a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp index 3db8fbc..9248854 100644 --- a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp @@ -22,10 +22,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qdir.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqlabel.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -51,11 +51,11 @@ class KOfxDirectConnectDlg::Private { public: - QFile m_fpTrace; + TQFile m_fpTrace; }; -KOfxDirectConnectDlg::KOfxDirectConnectDlg(const MyMoneyAccount& account, QWidget *parent, const char *name) : - KOfxDirectConnectDlgDecl(parent, name), +KOfxDirectConnectDlg::KOfxDirectConnectDlg(const MyMoneyAccount& account, TQWidget *tqparent, const char *name) : + KOfxDirectConnectDlgDecl(tqparent, name), d(new Private), m_tmpfile(NULL), m_connector(account), @@ -76,19 +76,19 @@ void KOfxDirectConnectDlg::init(void) { show(); - QByteArray request = m_connector.statementRequest(); + TQByteArray request = m_connector.statementRequest(); // For debugging, dump out the request #if 0 - QFile g( "request.ofx" ); + TQFile g( "request.ofx" ); g.open( IO_WriteOnly ); - QTextStream(&g) << m_connector.url() << "\n" << QString(request); + TQTextStream(&g) << m_connector.url() << "\n" << TQString(request); g.close(); #endif - QDir homeDir(QDir::home()); + TQDir homeDir(TQDir::home()); if(homeDir.exists("ofxlog.txt")) { - d->m_fpTrace.setName(QString("%1/ofxlog.txt").arg(QDir::homeDirPath())); + d->m_fpTrace.setName(TQString("%1/ofxlog.txt").tqarg(TQDir::homeDirPath())); d->m_fpTrace.open(IO_WriteOnly | IO_Append); } @@ -98,7 +98,7 @@ void KOfxDirectConnectDlg::init(void) true ); if(d->m_fpTrace.isOpen()) { - QByteArray data = m_connector.url().utf8(); + TQByteArray data = m_connector.url().utf8(); d->m_fpTrace.writeBlock("url: ", 5); d->m_fpTrace.writeBlock(data, strlen(data)); d->m_fpTrace.writeBlock("\n", 1); @@ -109,22 +109,22 @@ void KOfxDirectConnectDlg::init(void) } m_job->addMetaData("content-type", "Content-type: application/x-ofx" ); - connect(m_job,SIGNAL(result(KIO::Job*)),this,SLOT(slotOfxFinished(KIO::Job*))); - connect(m_job,SIGNAL(data(KIO::Job*, const QByteArray&)),this,SLOT(slotOfxData(KIO::Job*,const QByteArray&))); - connect(m_job,SIGNAL(connected(KIO::Job*)),this,SLOT(slotOfxConnected(KIO::Job*))); + connect(m_job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotOfxFinished(KIO::Job*))); + connect(m_job,TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),this,TQT_SLOT(slotOfxData(KIO::Job*,const TQByteArray&))); + connect(m_job,TQT_SIGNAL(connected(KIO::Job*)),this,TQT_SLOT(slotOfxConnected(KIO::Job*))); - setStatus(QString("Contacting %1...").arg(m_connector.url())); + settqStatus(TQString("Contacting %1...").tqarg(m_connector.url())); kProgress1->setTotalSteps(3); kProgress1->setProgress(1); } -void KOfxDirectConnectDlg::setStatus(const QString& _status) +void KOfxDirectConnectDlg::settqStatus(const TQString& _status) { textLabel1->setText(_status); kdDebug(2) << "STATUS: " << _status << endl; } -void KOfxDirectConnectDlg::setDetails(const QString& _details) +void KOfxDirectConnectDlg::setDetails(const TQString& _details) { kdDebug(2) << "DETAILS: " << _details << endl; } @@ -133,34 +133,34 @@ void KOfxDirectConnectDlg::slotOfxConnected(KIO::Job*) { if ( m_tmpfile ) { -// throw new MYMONEYEXCEPTION(QString("Already connected, using %1.").arg(m_tmpfile->name())); +// throw new MYMONEYEXCEPTION(TQString("Already connected, using %1.").tqarg(m_tmpfile->name())); kdDebug(2) << "Already connected, using " << m_tmpfile->name() << endl; delete m_tmpfile; //delete otherwise we mem leak } m_tmpfile = new KTempFile(); - setStatus("Connection established, retrieving data..."); - setDetails(QString("Downloading data to %1...").arg(m_tmpfile->name())); + settqStatus("Connection established, retrieving data..."); + setDetails(TQString("Downloading data to %1...").tqarg(m_tmpfile->name())); kProgress1->advance(1); } -void KOfxDirectConnectDlg::slotOfxData(KIO::Job*,const QByteArray& _ba) +void KOfxDirectConnectDlg::slotOfxData(KIO::Job*,const TQByteArray& _ba) { if ( !m_tmpfile ) // throw new MYMONEYEXCEPTION("Not currently connected!!"); kdDebug(2) << "void ofxdcon::slotOfxData():: Not currently connected!" << endl; - *(m_tmpfile->textStream()) << QString(_ba); + *(m_tmpfile->textStream()) << TQString(_ba); if(d->m_fpTrace.isOpen()) { d->m_fpTrace.writeBlock(_ba, _ba.size()); } - setDetails(QString("Got %1 bytes").arg(_ba.size())); + setDetails(TQString("Got %1 bytes").tqarg(_ba.size())); } void KOfxDirectConnectDlg::slotOfxFinished(KIO::Job* /* e */) { kProgress1->advance(1); - setStatus("Completed."); + settqStatus("Completed."); if(d->m_fpTrace.isOpen()) { d->m_fpTrace.writeBlock("\nCompleted\n\n\n\n", 14); @@ -179,12 +179,12 @@ void KOfxDirectConnectDlg::slotOfxFinished(KIO::Job* /* e */) } else if ( m_job->isErrorPage() ) { - QString details; - QFile f( m_tmpfile->name() ); + TQString details; + TQFile f( m_tmpfile->name() ); if ( f.open( IO_ReadOnly ) ) { - QTextStream stream( &f ); - QString line; + TQTextStream stream( &f ); + TQString line; while ( !stream.atEnd() ) { details += stream.readLine(); // line of text excluding '\n' } @@ -217,7 +217,7 @@ void KOfxDirectConnectDlg::reject(void) delete m_tmpfile; m_tmpfile = NULL; } - QDialog::reject(); + TQDialog::reject(); } #include "kofxdirectconnectdlg.moc" diff --git a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.h b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.h index e5d92cd..4d165ec 100644 --- a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.h +++ b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.h @@ -49,8 +49,9 @@ class TransferJob; class KOfxDirectConnectDlg : public KOfxDirectConnectDlgDecl { Q_OBJECT + TQ_OBJECT public: - KOfxDirectConnectDlg(const MyMoneyAccount&, QWidget *parent = 0, const char *name = 0); + KOfxDirectConnectDlg(const MyMoneyAccount&, TQWidget *tqparent = 0, const char *name = 0); ~KOfxDirectConnectDlg(); void init(void); @@ -60,17 +61,17 @@ signals: * This signal is emitted when the statement is downloaded * and stored in file @a fname. */ - void statementReady(const QString& fname); + void statementReady(const TQString& fname); protected slots: void slotOfxFinished(KIO::Job*); - void slotOfxData(KIO::Job*,const QByteArray&); + void slotOfxData(KIO::Job*,const TQByteArray&); void slotOfxConnected(KIO::Job*); virtual void reject(void); protected: - void setStatus(const QString& _status); - void setDetails(const QString& _details); + void settqStatus(const TQString& _status); + void setDetails(const TQString& _details); KTempFile* m_tmpfile; MyMoneyOfxConnector m_connector; diff --git a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlgdecl.ui b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlgdecl.ui index 3937012..7315638 100644 --- a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlgdecl.ui +++ b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KOfxDirectConnectDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KOfxDirectConnectDlgDecl</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -35,9 +35,9 @@ <cstring>kProgress1</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -53,14 +53,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -84,7 +84,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>20</height> @@ -105,5 +105,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupdecl.ui b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupdecl.ui index 3ee9b6a..85cef17 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupdecl.ui +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KOnlineBankingSetupDecl</class> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>KOnlineBankingSetupDecl</cstring> </property> @@ -15,7 +15,7 @@ <property name="caption"> <string>Online Banking Account Setup</string> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>FIPage</cstring> </property> @@ -26,7 +26,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -43,7 +43,7 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_listLayout</cstring> </property> @@ -51,22 +51,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>Please select your financial institution from the list below...</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_selectionTab</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -98,7 +98,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -109,9 +109,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <grid> <property name="name"> @@ -122,7 +122,7 @@ <cstring>m_url</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -130,7 +130,7 @@ <string>Org</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_5</cstring> </property> @@ -148,7 +148,7 @@ <cstring>m_fid</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2_4</cstring> </property> @@ -168,7 +168,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>90</height> @@ -182,7 +182,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>LoginPage</cstring> </property> @@ -193,7 +193,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -210,9 +210,9 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -228,7 +228,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>120</width> <height>21</height> @@ -251,7 +251,7 @@ <cstring>m_headerVersionCombo</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -264,7 +264,7 @@ <cstring>m_applicationCombo</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -272,7 +272,7 @@ <string>Username</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1_6</cstring> </property> @@ -280,7 +280,7 @@ <string>Header Version</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_editPassword</cstring> </property> @@ -288,12 +288,12 @@ <enum>Password</enum> </property> </widget> - <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="1" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_editUsername</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_2_3</cstring> </property> @@ -301,7 +301,7 @@ <string>Identify as</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -309,7 +309,7 @@ <string>Password</string> </property> </widget> - <widget class="QTextBrowser" row="6" column="0" rowspan="1" colspan="3"> + <widget class="TQTextBrowser" row="6" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_textDetails</cstring> </property> @@ -318,7 +318,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>AccountPage</cstring> </property> @@ -329,7 +329,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -346,26 +346,26 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout29</cstring> + <cstring>tqlayout29</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> <property name="text"> <string>Please select the account from your financial institution from the list below which matches this account.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Number</string> @@ -418,7 +418,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WizardPage</cstring> </property> @@ -429,7 +429,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -446,22 +446,22 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_labelFinal</cstring> </property> <property name="text"> <string>Congratulations! You have successfully set up your bank for online banking via OFX.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -484,5 +484,5 @@ <tabstop>m_listFi</tabstop> <tabstop>m_listAccount</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp index d24f9a4..eac5079 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp @@ -22,13 +22,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtextbrowser.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qregexp.h> -#include <qcheckbox.h> -#include <qtabwidget.h> +#include <tqtextbrowser.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqregexp.h> +#include <tqcheckbox.h> +#include <tqtabwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -54,12 +54,12 @@ class KOnlineBankingSetupWizard::Private { public: - QFile m_fpTrace; - QTextStream m_trace; + TQFile m_fpTrace; + TQTextStream m_trace; }; -KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(QWidget *parent, const char *name): - KOnlineBankingSetupDecl(parent,name), +KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(TQWidget *tqparent, const char *name): + KOnlineBankingSetupDecl(tqparent,name), d(new Private), m_fDone(false), m_fInit(false), @@ -79,8 +79,8 @@ KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(QWidget *parent, const char tabLayout->insertWidget(0, new KListViewSearchLineWidget(m_listFi, tab, 0)); OfxPartner::setDirectory(locateLocal("appdata", "")); - QStringList banks = OfxPartner::BankNames(); - QStringList::const_iterator it_bank = banks.begin(); + TQStringList banks = OfxPartner::BankNames(); + TQStringList::const_iterator it_bank = banks.begin(); while (it_bank != banks.end()) { new KListViewItem( m_listFi, (*it_bank)); @@ -129,28 +129,28 @@ bool KOnlineBankingSetupWizard::finishFiPage(void) if(m_selectionTab->currentPageIndex() == 0) { // Get the fipids for the selected bank - QListViewItem* item = m_listFi->currentItem(); + TQListViewItem* item = m_listFi->currentItem(); if ( item ) { - QString bank = item->text(0); + TQString bank = item->text(0); m_textDetails->clear(); - m_textDetails->append(QString("<p>Details for %1:</p>").arg(bank)); - QStringList fipids = OfxPartner::FipidForBank(bank); - QStringList::const_iterator it_fipid = fipids.begin(); + m_textDetails->append(TQString("<p>Details for %1:</p>").tqarg(bank)); + TQStringList fipids = OfxPartner::FipidForBank(bank); + TQStringList::const_iterator it_fipid = fipids.begin(); while ( it_fipid != fipids.end() ) { // For each fipid, get the connection details info = OfxPartner::ServiceInfo(*it_fipid); // Print them to the text browser - QString message = QString("<p>Fipid: %1<br>").arg(*it_fipid); + TQString message = TQString("<p>Fipid: %1<br>").tqarg(*it_fipid); // If the bank supports retrieving statements if ( info.accountlist ) { m_bankInfo.push_back(info); - message += QString("URL: %1<br>Org: %2<br>Fid: %3<br>").arg(info.url,info.org,info.fid); + message += TQString("URL: %1<br>Org: %2<br>Fid: %3<br>").tqarg(info.url,info.org,info.fid); if ( info.statements ) message += i18n("Supports online statements<br>"); if ( info.investments ) @@ -180,12 +180,12 @@ bool KOnlineBankingSetupWizard::finishFiPage(void) } m_textDetails->clear(); - m_textDetails->append(QString("<p>Details for %1:</p>").arg(m_bankName->text())); + m_textDetails->append(TQString("<p>Details for %1:</p>").tqarg(m_bankName->text())); memset(&info, 0, sizeof(OfxFiServiceInfo)); - strncpy(info.fid, m_fid->text().data(), OFX_FID_LENGTH-1); + strncpy(info.fid, m_fid->text().ascii(), OFX_FID_LENGTH-1); strncpy(info.org, m_bankName->text().latin1(), OFX_ORG_LENGTH-1); - strncpy(info.url, m_url->url().data(), OFX_URL_LENGTH-1); + strncpy(info.url, m_url->url().ascii(), OFX_URL_LENGTH-1); info.accountlist = 1; info.statements = 1; info.billpay = 1; @@ -193,8 +193,8 @@ bool KOnlineBankingSetupWizard::finishFiPage(void) m_bankInfo.push_back(info); - QString message; - message += QString("URL: %1<br>Org: %2<br>Fid: %3<br>").arg(info.url,info.org,info.fid); + TQString message; + message += TQString("URL: %1<br>Org: %2<br>Fid: %3<br>").tqarg(info.url,info.org,info.fid); if ( info.statements ) message += i18n("Supports online statements<br>"); if ( info.investments ) @@ -211,8 +211,8 @@ bool KOnlineBankingSetupWizard::finishLoginPage(void) { bool result = true; - QString username = m_editUsername->text(); - QString password = m_editPassword->text(); + TQString username = m_editUsername->text(); + TQString password = m_editPassword->text(); m_listAccount->clear(); @@ -231,27 +231,27 @@ bool KOnlineBankingSetupWizard::finishLoginPage(void) // pretend we're Quicken 2008 // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-intuit-products/ // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-microsoft-money/ - QString appId = m_appId->appId(); - QRegExp exp("(.*):(.*)"); + TQString appId = m_appId->appId(); + TQRegExp exp("(.*):(.*)"); if(exp.search(appId) != -1) { strncpy(fi.appid, exp.cap(1).latin1(), OFX_APPID_LENGTH-1); strncpy(fi.appver, exp.cap(2).latin1(), OFX_APPVER_LENGTH-1); } else { - strncpy(fi.appid, "QWIN", OFX_APPID_LENGTH-1); + strncpy(fi.appid, "TQWIN", OFX_APPID_LENGTH-1); strncpy(fi.appver, "1700", OFX_APPVER_LENGTH-1); } - QString hver = m_headerVersion->headerVersion(); + TQString hver = m_headerVersion->headerVersion(); strncpy(fi.header_version, hver.latin1(), OFX_HEADERVERSION_LENGTH-1); #endif // who owns this memory?!?! char* request = libofx_request_accountinfo( &fi ); - KURL filename(QString("%1response.ofx").arg(locateLocal("appdata", ""))); - QByteArray req; + KURL filename(TQString("%1response.ofx").tqarg(locateLocal("appdata", ""))); + TQByteArray req; req.setRawData(request, strlen(request)); - OfxHttpsRequest("POST", (*m_it_info).url, req, QMap<QString, QString>(), filename, true); + OfxHttpsRequest("POST", (*m_it_info).url, req, TQMap<TQString, TQString>(), filename, true); req.resetRawData(request, strlen(request)); LibofxContextPtr ctx = libofx_get_new_context(); @@ -296,7 +296,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo if ( data.account_type_valid ) { - QString type; + TQString type; switch ( data.account_type ) { case OfxAccountData::OFX_CHECKING: /**< A standard checking account */ @@ -348,7 +348,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo kvps.setValue("fid",(*(pthis->m_it_info)).fid); kvps.setValue("org",(*(pthis->m_it_info)).org); kvps.setValue("fipid",""); - QListViewItem* item = pthis->m_listFi->currentItem(); + TQListViewItem* item = pthis->m_listFi->currentItem(); if ( item ) kvps.setValue("bankname",item->text(0)); @@ -360,7 +360,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo if(/* !kvps.value("bankid").isEmpty() && */ !kvps.value("uniqueId").isEmpty()) { - kvps.setValue("kmmofx-acc-ref", QString("%1-%2").arg(kvps.value("bankid"), kvps.value("uniqueId"))); + kvps.setValue("kmmofx-acc-ref", TQString("%1-%2").tqarg(kvps.value("bankid"), kvps.value("uniqueId"))); } else { qDebug("Cannot setup kmmofx-acc-ref for '%s'", kvps.value("bankname").data()); } @@ -375,15 +375,15 @@ int KOnlineBankingSetupWizard::ofxStatusCallback(struct OfxStatusData data, void { KOnlineBankingSetupWizard* pthis = reinterpret_cast<KOnlineBankingSetupWizard*>(pv); - QString message; + TQString message; if(data.code_valid==true) { - message += QString("#%1 %2: \"%3\"\n").arg(data.code).arg(data.name,data.description); + message += TQString("#%1 %2: \"%3\"\n").tqarg(data.code).tqarg(data.name,data.description); } if(data.server_message_valid==true){ - message += i18n("Server message: %1\n").arg(data.server_message); + message += i18n("Server message: %1\n").tqarg(data.server_message); } if(data.severity_valid==true){ @@ -391,10 +391,10 @@ int KOnlineBankingSetupWizard::ofxStatusCallback(struct OfxStatusData data, void case OfxStatusData::INFO : break; case OfxStatusData::WARN : - KMessageBox::detailedError( pthis, i18n("Your bank returned warnings when signing on"), i18n("WARNING %1").arg(message) ); + KMessageBox::detailedError( pthis, i18n("Your bank returned warnings when signing on"), i18n("WARNING %1").tqarg(message) ); break; case OfxStatusData::ERROR : - KMessageBox::detailedError( pthis, i18n("Error signing onto your bank"), i18n("ERROR %1").arg(message) ); + KMessageBox::detailedError( pthis, i18n("Error signing onto your bank"), i18n("ERROR %1").tqarg(message) ); break; default: break; @@ -409,17 +409,17 @@ bool KOnlineBankingSetupWizard::chosenSettings( MyMoneyKeyValueContainer& settin if ( m_fDone ) { - QListViewItem* qitem = m_listAccount->currentItem(); + TQListViewItem* qitem = m_listAccount->currentItem(); ListViewItem* item = dynamic_cast<ListViewItem*>(qitem); if ( item ) { settings = *item; settings.deletePair("appId"); settings.deletePair("kmmofx-headerVersion"); - QString appId = m_appId->appId(); + TQString appId = m_appId->appId(); if(!appId.isEmpty()) settings.setValue("appId", appId); - QString hVer = m_headerVersion->headerVersion(); + TQString hVer = m_headerVersion->headerVersion(); if(!hVer.isEmpty()) settings.setValue("kmmofx-headerVersion", hVer); result = true; @@ -429,8 +429,8 @@ bool KOnlineBankingSetupWizard::chosenSettings( MyMoneyKeyValueContainer& settin return result; } -KOnlineBankingSetupWizard::ListViewItem::ListViewItem( QListView* parent, const MyMoneyKeyValueContainer& kvps ): - MyMoneyKeyValueContainer( kvps ), QListViewItem( parent ) +KOnlineBankingSetupWizard::ListViewItem::ListViewItem( TQListView* tqparent, const MyMoneyKeyValueContainer& kvps ): + MyMoneyKeyValueContainer( kvps ), TQListViewItem( tqparent ) { setText( 0, value("accountid") ); setText( 1, value("type") ); diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h index 65a89de..4faccbc 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h @@ -26,9 +26,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qvaluelist.h> -#include <qlistview.h> +#include <tqwidget.h> +#include <tqvaluelist.h> +#include <tqlistview.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -61,15 +61,16 @@ class OfxHeaderVersion; class KOnlineBankingSetupWizard : public KOnlineBankingSetupDecl { Q_OBJECT + TQ_OBJECT public: - class ListViewItem: public MyMoneyKeyValueContainer, public QListViewItem + class ListViewItem: public MyMoneyKeyValueContainer, public TQListViewItem { public: - ListViewItem( QListView* parent, const MyMoneyKeyValueContainer& kvps ); + ListViewItem( TQListView* tqparent, const MyMoneyKeyValueContainer& kvps ); virtual void x(void); }; - KOnlineBankingSetupWizard(QWidget *parent=0, const char *name=0); + KOnlineBankingSetupWizard(TQWidget *tqparent=0, const char *name=0); ~KOnlineBankingSetupWizard(); bool chosenSettings( MyMoneyKeyValueContainer& settings ); @@ -94,8 +95,8 @@ private: /// \internal d-pointer instance. Private* const d; - QValueList<OfxFiServiceInfo> m_bankInfo; - QValueList<OfxFiServiceInfo>::const_iterator m_it_info; + TQValueList<OfxFiServiceInfo> m_bankInfo; + TQValueList<OfxFiServiceInfo>::const_iterator m_it_info; bool m_fDone; bool m_fInit; OfxAppVersion* m_appId; diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp index 6e5cef9..8ca0aac 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp @@ -26,11 +26,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qdatetimeedit.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqdatetimeedit.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -48,22 +48,22 @@ #include <libofx/libofx.h> #include "mymoneyofxconnector.h" -KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *parent, const char *name) : - KOnlineBankingStatusDecl(parent,name), +KOnlineBankingtqStatus::KOnlineBankingtqStatus(const MyMoneyAccount& acc, TQWidget *tqparent, const char *name) : + KOnlineBankingStatusDecl(tqparent,name), m_appId(0) { - m_ledOnlineStatus->off(); + m_ledOnlinetqStatus->off(); // Set up online banking settings if applicable MyMoneyKeyValueContainer settings = acc.onlineBankingSettings(); - m_textOnlineStatus->setText(i18n("Enabled & configured")); - m_ledOnlineStatus->on(); + m_textOnlinetqStatus->setText(i18n("Enabled & configured")); + m_ledOnlinetqStatus->on(); - QString account = settings.value("accountid"); - QString bank = settings.value("bankname"); - QString bankid = QString("%1 %2").arg(settings.value("bankid")).arg(settings.value("branchid")); + TQString account = settings.value("accountid"); + TQString bank = settings.value("bankname"); + TQString bankid = TQString("%1 %2").tqarg(settings.value("bankid")).tqarg(settings.value("branchid")); if ( bankid.length() > 1 ) - bank += QString(" (%1)").arg(bankid); + bank += TQString(" (%1)").tqarg(bankid); m_textBank->setText(bank); m_textOnlineAccount->setText(account); @@ -71,7 +71,7 @@ KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *p m_headerVersion = new OfxHeaderVersion(m_headerVersionCombo, settings.value("kmmofx-headerVersion")); int numDays = 60; - QString snumDays = settings.value("kmmofx-numRequestDays"); + TQString snumDays = settings.value("kmmofx-numRequestDays"); if (!snumDays.isEmpty()) numDays = snumDays.toInt(); m_numdaysSpin->setValue(numDays); @@ -79,33 +79,33 @@ KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *p m_lastUpdateRB->setChecked(!settings.value("kmmofx-lastUpdate").isEmpty() && settings.value("kmmofx-lastUpdate").toInt() != 0); m_lastUpdateTXT->setText(acc.value("lastImportedTransactionDate")); m_pickDateRB->setChecked(!settings.value("kmmofx-pickDate").isEmpty() && settings.value("kmmofx-pickDate").toInt() != 0); - QString specificDate = settings.value("kmmofx-specificDate"); + TQString specificDate = settings.value("kmmofx-specificDate"); if (!specificDate.isEmpty()) - m_specificDate->setDate(QDate::fromString(specificDate)); + m_specificDate->setDate(TQDate::fromString(specificDate)); else - m_specificDate->setDate(QDate::currentDate()); - m_specificDate->setMaxValue(QDate::currentDate()); + m_specificDate->setDate(TQDate::tqcurrentDate()); + m_specificDate->setMaxValue(TQDate::tqcurrentDate()); m_payeeidRB->setChecked(settings.value("kmmofx-preferPayeeid").isEmpty() || settings.value("kmmofx-preferPayeeid").toInt() != 0); m_nameRB->setChecked(!settings.value("kmmofx-preferName").isEmpty() && settings.value("kmmofx-preferName").toInt() != 0); } -KOnlineBankingStatus::~KOnlineBankingStatus() +KOnlineBankingtqStatus::~KOnlineBankingtqStatus() { delete m_appId; } -const QString& KOnlineBankingStatus::appId(void) const +const TQString& KOnlineBankingtqStatus::appId(void) const { if(m_appId) return m_appId->appId(); - return QString::null; + return TQString(); } -QString KOnlineBankingStatus::headerVersion(void) const +TQString KOnlineBankingtqStatus::headerVersion(void) const { if(m_headerVersion) return m_headerVersion->headerVersion(); - return QString::null; + return TQString(); } #include "konlinebankingstatus.moc" diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h index bbd62ea..75e3369 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h @@ -24,7 +24,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -41,14 +41,15 @@ class OfxHeaderVersion; * @author Thomas Baumgart */ -class KOnlineBankingStatus : public KOnlineBankingStatusDecl +class KOnlineBankingtqStatus : public KOnlineBankingStatusDecl { Q_OBJECT + TQ_OBJECT public: - KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *parent=0, const char *name=0); - ~KOnlineBankingStatus(); - const QString& appId(void) const; - QString headerVersion(void) const; + KOnlineBankingtqStatus(const MyMoneyAccount& acc, TQWidget *tqparent=0, const char *name=0); + ~KOnlineBankingtqStatus(); + const TQString& appId(void) const; + TQString headerVersion(void) const; private: OfxAppVersion* m_appId; OfxHeaderVersion* m_headerVersion; diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatusdecl.ui b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatusdecl.ui index f76f9e4..106618a 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatusdecl.ui +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatusdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KOnlineBankingStatusDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KOnlineBankingStatusDecl</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_textBank</cstring> </property> @@ -48,7 +48,7 @@ <string>&lt;Not configured&gt;</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -56,7 +56,7 @@ <string>BANK/BROKER:</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_textOnlineAccount</cstring> </property> @@ -77,9 +77,9 @@ <string>&lt;Not configured&gt;</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -87,15 +87,15 @@ </property> <widget class="KLed"> <property name="name"> - <cstring>m_ledOnlineStatus</cstring> + <cstring>m_ledOnlinetqStatus</cstring> </property> <property name="state"> <enum>Off</enum> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> - <cstring>m_textOnlineStatus</cstring> + <cstring>m_textOnlinetqStatus</cstring> </property> <property name="sizePolicy"> <sizepolicy> @@ -119,7 +119,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>21</height> @@ -128,7 +128,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -136,7 +136,7 @@ <string>ACCOUNT:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -146,7 +146,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -157,15 +157,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -188,7 +188,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>150</width> <height>21</height> @@ -200,7 +200,7 @@ <cstring>m_headerVersionCombo</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -210,7 +210,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -227,23 +227,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_todayRB</cstring> </property> @@ -254,7 +254,7 @@ <bool>true</bool> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_numdaysSpin</cstring> </property> @@ -262,7 +262,7 @@ <number>180</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -272,15 +272,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_lastUpdateRB</cstring> </property> @@ -288,7 +288,7 @@ <string>Last &update</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_lastUpdateTXT</cstring> </property> @@ -298,15 +298,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pickDateRB</cstring> </property> @@ -314,7 +314,7 @@ <string>Pi&ck date</string> </property> </widget> - <widget class="QDateEdit"> + <widget class="TQDateEdit"> <property name="name"> <cstring>m_specificDate</cstring> </property> @@ -346,7 +346,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -355,7 +355,7 @@ </spacer> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -366,15 +366,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -394,7 +394,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_payeeidRB</cstring> </property> @@ -405,7 +405,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_nameRB</cstring> </property> @@ -415,7 +415,7 @@ </widget> </vbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -435,7 +435,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>20</height> @@ -456,7 +456,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>50</height> @@ -479,5 +479,5 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp index 6e841bb..71897d2 100644 --- a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp @@ -27,8 +27,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdatetime.h> -#include <qregexp.h> +#include <tqdatetime.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,7 +46,7 @@ #include <kmymoney/mymoneykeyvaluecontainer.h> #include "mymoneyofxconnector.h" -OfxHeaderVersion::OfxHeaderVersion(KComboBox* combo, const QString& headerVersion) : +OfxHeaderVersion::OfxHeaderVersion(KComboBox* combo, const TQString& headerVersion) : m_combo(combo) { combo->clear(); @@ -66,24 +66,24 @@ OfxHeaderVersion::OfxHeaderVersion(KComboBox* combo, const QString& headerVersio #endif } -QString OfxHeaderVersion::headerVersion(void) const +TQString OfxHeaderVersion::headerVersion(void) const { return m_combo->currentText(); } -OfxAppVersion::OfxAppVersion(KComboBox* combo, const QString& appId) : +OfxAppVersion::OfxAppVersion(KComboBox* combo, const TQString& appId) : m_combo(combo) { // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-intuit-products/ // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-microsoft-money/ // Quicken - m_appMap[i18n("Quicken Windows 2003")] = "QWIN:1200"; - m_appMap[i18n("Quicken Windows 2004")] = "QWIN:1300"; - m_appMap[i18n("Quicken Windows 2005")] = "QWIN:1400"; - m_appMap[i18n("Quicken Windows 2006")] = "QWIN:1500"; - m_appMap[i18n("Quicken Windows 2007")] = "QWIN:1600"; - m_appMap[i18n("Quicken Windows 2008")] = "QWIN:1700"; + m_appMap[i18n("Quicken Windows 2003")] = "TQWIN:1200"; + m_appMap[i18n("Quicken Windows 2004")] = "TQWIN:1300"; + m_appMap[i18n("Quicken Windows 2005")] = "TQWIN:1400"; + m_appMap[i18n("Quicken Windows 2006")] = "TQWIN:1500"; + m_appMap[i18n("Quicken Windows 2007")] = "TQWIN:1600"; + m_appMap[i18n("Quicken Windows 2008")] = "TQWIN:1700"; // MS-Money m_appMap[i18n("MS-Money 2003")] = "Money:1100"; @@ -99,7 +99,7 @@ OfxAppVersion::OfxAppVersion(KComboBox* combo, const QString& appId) : combo->clear(); combo->insertStringList(m_appMap.keys()); - QMap<QString, QString>::const_iterator it_a; + TQMap<TQString, TQString>::const_iterator it_a; for(it_a = m_appMap.begin(); it_a != m_appMap.end(); ++it_a) { if(*it_a == appId) break; @@ -118,14 +118,14 @@ OfxAppVersion::OfxAppVersion(KComboBox* combo, const QString& appId) : #endif } -const QString& OfxAppVersion::appId(void) const +const TQString& OfxAppVersion::appId(void) const { - static QString defaultAppId("QWIN:1700"); + static TQString defaultAppId("TQWIN:1700"); - QString app = m_combo->currentText(); + TQString app = m_combo->currentText(); if(m_appMap[app] != defaultAppId) return m_appMap[app]; - return QString::null; + return TQString(); } MyMoneyOfxConnector::MyMoneyOfxConnector(const MyMoneyAccount& _account): @@ -134,28 +134,28 @@ MyMoneyOfxConnector::MyMoneyOfxConnector(const MyMoneyAccount& _account): m_fiSettings = m_account.onlineBankingSettings(); } -QString MyMoneyOfxConnector::iban(void) const { return m_fiSettings.value("bankid"); } -QString MyMoneyOfxConnector::fiorg(void) const { return m_fiSettings.value("org"); } -QString MyMoneyOfxConnector::fiid(void) const { return m_fiSettings.value("fid"); } -QString MyMoneyOfxConnector::username(void) const { return m_fiSettings.value("username"); } -QString MyMoneyOfxConnector::password(void) const { return m_fiSettings.value("password"); } -QString MyMoneyOfxConnector::accountnum(void) const { return m_fiSettings.value("accountid"); } -QString MyMoneyOfxConnector::url(void) const { return m_fiSettings.value("url"); } +TQString MyMoneyOfxConnector::iban(void) const { return m_fiSettings.value("bankid"); } +TQString MyMoneyOfxConnector::fiorg(void) const { return m_fiSettings.value("org"); } +TQString MyMoneyOfxConnector::fiid(void) const { return m_fiSettings.value("fid"); } +TQString MyMoneyOfxConnector::username(void) const { return m_fiSettings.value("username"); } +TQString MyMoneyOfxConnector::password(void) const { return m_fiSettings.value("password"); } +TQString MyMoneyOfxConnector::accountnum(void) const { return m_fiSettings.value("accountid"); } +TQString MyMoneyOfxConnector::url(void) const { return m_fiSettings.value("url"); } -QDate MyMoneyOfxConnector::statementStartDate(void) const { +TQDate MyMoneyOfxConnector::statementStartDate(void) const { if ((m_fiSettings.value("kmmofx-todayMinus").toInt() != 0) && !m_fiSettings.value("kmmofx-numRequestDays").isEmpty()) { - return QDate::currentDate().addDays(-m_fiSettings.value("kmmofx-numRequestDays").toInt()); + return TQDate::tqcurrentDate().addDays(-m_fiSettings.value("kmmofx-numRequestDays").toInt()); } else if ((m_fiSettings.value("kmmofx-lastUpdate").toInt() != 0) && !m_account.value("lastImportedTransactionDate").isEmpty()) { - return QDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate); + return TQDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate); } else if ((m_fiSettings.value("kmmofx-pickDate").toInt() != 0) && !m_fiSettings.value("kmmofx-specificDate").isEmpty()) { - return QDate::fromString(m_fiSettings.value("kmmofx-specificDate")); + return TQDate::fromString(m_fiSettings.value("kmmofx-specificDate")); } - return QDate::currentDate().addMonths(-2); + return TQDate::tqcurrentDate().addMonths(-2); } #if LIBOFX_IS_VERSION(0,9,0) @@ -163,7 +163,7 @@ OfxAccountData::AccountType MyMoneyOfxConnector::accounttype(void) const { OfxAccountData::AccountType result = OfxAccountData::OFX_CHECKING; - QString type = m_account.onlineBankingSettings()["type"]; + TQString type = m_account.onlineBankingSettings()["type"]; if(type == "CHECKING") result = OfxAccountData::OFX_CHECKING; else if(type == "SAVINGS") @@ -197,10 +197,10 @@ OfxAccountData::AccountType MyMoneyOfxConnector::accounttype(void) const // This is a bit of a personalized hack. Sometimes we may want to override the // ofx type for an account. For now, I will stash it in the notes! - QRegExp rexp("OFXTYPE:([A-Z]*)"); + TQRegExp rexp("OFXTYPE:([A-Z]*)"); if ( rexp.search(m_account.description()) != -1 ) { - QString override = rexp.cap(1); + TQString override = rexp.cap(1); kdDebug(2) << "MyMoneyOfxConnector::accounttype() overriding to " << result << endl; if ( override == "BANK" ) @@ -235,10 +235,10 @@ AccountType MyMoneyOfxConnector::accounttype(void) const // This is a bit of a personalized hack. Sometimes we may want to override the // ofx type for an account. For now, I will stash it in the notes! - QRegExp rexp("OFXTYPE:([A-Z]*)"); + TQRegExp rexp("OFXTYPE:([A-Z]*)"); if ( rexp.search(m_account.description()) != -1 ) { - QString override = rexp.cap(1); + TQString override = rexp.cap(1); kdDebug(2) << "MyMoneyOfxConnector::accounttype() overriding to " << result << endl; if ( override == "BANK" ) @@ -269,24 +269,24 @@ void MyMoneyOfxConnector::initRequest(OfxFiLogin* fi) const // If we don't know better, we pretend to be Quicken 2008 // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-intuit-products/ // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-microsoft-money/ - QString appId = m_account.onlineBankingSettings().value("appId"); - QRegExp exp("(.*):(.*)"); + TQString appId = m_account.onlineBankingSettings().value("appId"); + TQRegExp exp("(.*):(.*)"); if(exp.search(appId) != -1) { strncpy(fi->appid, exp.cap(1).latin1(), OFX_APPID_LENGTH-1); strncpy(fi->appver, exp.cap(2).latin1(), OFX_APPVER_LENGTH-1); } else { - strncpy(fi->appid, "QWIN", OFX_APPID_LENGTH-1); + strncpy(fi->appid, "TQWIN", OFX_APPID_LENGTH-1); strncpy(fi->appver, "1700", OFX_APPVER_LENGTH-1); } - QString headerVersion = m_account.onlineBankingSettings().value("kmmofx-headerVersion"); + TQString headerVersion = m_account.onlineBankingSettings().value("kmmofx-headerVersion"); if(!headerVersion.isEmpty()) { strncpy(fi->header_version, headerVersion.latin1(), OFX_HEADERVERSION_LENGTH-1); } #endif } -const QByteArray MyMoneyOfxConnector::statementRequest(void) const +const TQByteArray MyMoneyOfxConnector::statementRequest(void) const { OfxFiLogin fi; initRequest(&fi); @@ -313,29 +313,29 @@ const QByteArray MyMoneyOfxConnector::statementRequest(void) const account.type = accounttype(); #endif - char* szrequest = libofx_request_statement( &fi, &account, QDateTime(statementStartDate()).toTime_t() ); - QString request = szrequest; + char* szrequest = libofx_request_statement( &fi, &account, TQDateTime(statementStartDate()).toTime_t() ); + TQString request = szrequest; // remove the trailing zero - QByteArray result = request.utf8(); + TQByteArray result = request.utf8(); result.truncate(result.size()-1); free(szrequest); - QString msg(result); + TQString msg(result); return result; } #if 0 // this code is not used anymore. The logic is now // contained in KOnlineBankingSetupWizard::finishLoginPage(void) -const QByteArray MyMoneyOfxConnector::accountInfoRequest(void) const +const TQByteArray MyMoneyOfxConnector::accountInfoRequest(void) const { OfxFiLogin fi; initRequest(&fi); char* szrequest = libofx_request_accountinfo( &fi ); - QString request = szrequest; + TQString request = szrequest; // remove the trailing zero - QByteArray result = request.utf8(); + TQByteArray result = request.utf8(); result.truncate(result.size()-1); free(szrequest); @@ -345,7 +345,7 @@ const QByteArray MyMoneyOfxConnector::accountInfoRequest(void) const #if 0 -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::message(const QString& _msgType, const QString& _trnType, const Tag& _request) +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::message(const TQString& _msgType, const TQString& _trnType, const Tag& _request) { return Tag(_msgType+"MSGSRQV1") .subtag(Tag(_trnType+"TRNRQ") @@ -356,8 +356,8 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::message(const QString& _msgType, c MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentRequest(void) const { - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); return message("INVSTMT","INVSTMT",Tag("INVSTMTRQ") .subtag(Tag("INVACCTFROM").element("BROKERID", fiorg()).element("ACCTID", accountnum())) @@ -367,18 +367,18 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentRequest(void) const .element("INCBAL","Y")); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementRequest(const QDate& _dtstart) const +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementRequest(const TQDate& _dtstart) const { - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); return message("BANK","STMT",Tag("STMTRQ") .subtag(Tag("BANKACCTFROM").element("BANKID", iban()).element("ACCTID", accountnum()).element("ACCTTYPE", "CHECKING")) .subtag(Tag("INCTRAN").element("DTSTART",dtstart_string).element("INCLUDE","Y"))); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const QDate& _dtstart) const +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const TQDate& _dtstart) const { - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); return message("CREDITCARD","CCSTMT",Tag("CCSTMTRQ") .subtag(Tag("CCACCTFROM").element("ACCTID",accountnum())) @@ -387,7 +387,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const QDate& _dt MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOn(void) const { - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); Tag fi("FI"); fi.element("ORG",fiorg()); @@ -401,13 +401,13 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOn(void) const .element("USERPASS",password()) .element("LANGUAGE","ENG") .subtag(fi) - .element("APPID","QWIN") + .element("APPID","TQWIN") .element("APPVER","1100")); } -QString MyMoneyOfxConnector::header(void) +TQString MyMoneyOfxConnector::header(void) { - return QString("OFXHEADER:100\r\n" + return TQString("OFXHEADER:100\r\n" "DATA:OFXSGML\r\n" "VERSION:102\r\n" "SECURITY:NONE\r\n" @@ -416,13 +416,13 @@ QString MyMoneyOfxConnector::header(void) "COMPRESSION:NONE\r\n" "OLDFILEUID:NONE\r\n" "NEWFILEUID:%1\r\n" - "\r\n").arg(uuid()); + "\r\n").tqarg(uuid()); } -QString MyMoneyOfxConnector::uuid(void) +TQString MyMoneyOfxConnector::uuid(void) { static int id = 1; - return QDateTime::currentDateTime().toString("yyyyMMdd-hhmmsszzz-") + QString::number(id++); + return TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmsszzz-") + TQString::number(id++); } // @@ -436,9 +436,9 @@ QString MyMoneyOfxConnector::uuid(void) // the open source software community. // -const QByteArray MyMoneyOfxConnector::statementResponse(const QDate& _dtstart) const +const TQByteArray MyMoneyOfxConnector::statementResponse(const TQDate& _dtstart) const { - QString request; + TQString request; if ( accounttype()=="CC" ) request = header() + Tag("OFX").subtag(signOnResponse()).subtag(creditCardStatementResponse(_dtstart)); @@ -448,7 +448,7 @@ const QByteArray MyMoneyOfxConnector::statementResponse(const QDate& _dtstart) c request = header() + Tag("OFX").subtag(signOnResponse()).subtag(bankStatementResponse(_dtstart)); // remove the trailing zero - QByteArray result = request.utf8(); + TQByteArray result = request.utf8(); result.truncate(result.size()-1); return result; @@ -456,7 +456,7 @@ const QByteArray MyMoneyOfxConnector::statementResponse(const QDate& _dtstart) c MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOnResponse(void) const { - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); Tag sonrs("SONRS"); sonrs @@ -480,7 +480,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOnResponse(void) const return Tag("SIGNONMSGSRSV1").subtag(sonrs); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::messageResponse(const QString& _msgType, const QString& _trnType, const Tag& _response) +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::messageResponse(const TQString& _msgType, const TQString& _trnType, const Tag& _response) { return Tag(_msgType+"MSGSRSV1") .subtag(Tag(_trnType+"TRNRS") @@ -490,20 +490,20 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::messageResponse(const QString& _ms .subtag(_response)); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementResponse(const QDate& _dtstart) const +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementResponse(const TQDate& _dtstart) const { MyMoneyFile* file = MyMoneyFile::instance(); - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); - QString transactionlist; + TQString transactionlist; MyMoneyTransactionFilter filter; - filter.setDateFilter(_dtstart,QDate::currentDate()); + filter.setDateFilter(_dtstart,TQDate::tqcurrentDate()); filter.addAccount(m_account.id()); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); while ( it_transaction != transactions.end() ) { transactionlist += transaction( *it_transaction ); @@ -514,23 +514,23 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementResponse(const QDate& .element("CURDEF","USD") .subtag(Tag("BANKACCTFROM").element("BANKID", iban()).element("ACCTID", accountnum()).element("ACCTTYPE", "CHECKING")) .subtag(Tag("BANKTRANLIST").element("DTSTART",dtstart_string).element("DTEND",dtnow_string).data(transactionlist)) - .subtag(Tag("LEDGERBAL").element("BALAMT",file->balance(m_account.id()).formatMoney(QString(),2)).element("DTASOF",dtnow_string ))); + .subtag(Tag("LEDGERBAL").element("BALAMT",file->balance(m_account.id()).formatMoney(TQString(),2)).element("DTASOF",dtnow_string ))); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardStatementResponse(const QDate& _dtstart) const +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardStatementResponse(const TQDate& _dtstart) const { MyMoneyFile* file = MyMoneyFile::instance(); - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); - QString transactionlist; + TQString transactionlist; MyMoneyTransactionFilter filter; - filter.setDateFilter(_dtstart,QDate::currentDate()); + filter.setDateFilter(_dtstart,TQDate::tqcurrentDate()); filter.addAccount(m_account.id()); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); while ( it_transaction != transactions.end() ) { transactionlist += transaction( *it_transaction ); @@ -541,24 +541,24 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardStatementResponse(const .element("CURDEF","USD") .subtag(Tag("CCACCTFROM").element("ACCTID", accountnum())) .subtag(Tag("BANKTRANLIST").element("DTSTART",dtstart_string).element("DTEND",dtnow_string).data(transactionlist)) - .subtag(Tag("LEDGERBAL").element("BALAMT",file->balance(m_account.id()).formatMoney(QString(),2)).element("DTASOF",dtnow_string ))); + .subtag(Tag("LEDGERBAL").element("BALAMT",file->balance(m_account.id()).formatMoney(TQString(),2)).element("DTASOF",dtnow_string ))); } -QString MyMoneyOfxConnector::investmentStatementResponse(const QDate& _dtstart) const +TQString MyMoneyOfxConnector::investmentStatementResponse(const TQDate& _dtstart) const { MyMoneyFile* file = MyMoneyFile::instance(); - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); - QString transactionlist; + TQString transactionlist; MyMoneyTransactionFilter filter; - filter.setDateFilter(_dtstart,QDate::currentDate()); + filter.setDateFilter(_dtstart,TQDate::tqcurrentDate()); filter.addAccount(m_account.id()); filter.addAccount(m_account.accountList()); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); while ( it_transaction != transactions.end() ) { transactionlist += investmentTransaction( *it_transaction ); @@ -575,8 +575,8 @@ QString MyMoneyOfxConnector::investmentStatementResponse(const QDate& _dtstart) securitylist.subtag(Tag("STOCKINFO") .subtag(Tag("SECINFO") .subtag(Tag("SECID") - .element("UNIQUEID",equity.id()) - .element("UNIQUEIDTYPE","KMYMONEY")) + .element("UNITQUEID",equity.id()) + .element("UNITQUEIDTYPE","KMYMONEY")) .element("SECNAME",equity.name()) .element("TICKER",equity.tradingSymbol()) .element("FIID",equity.id()))); @@ -612,8 +612,8 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::transaction(const MyMoneyTransacti // This is a temporary hack. I don't use the trntype field in importing at all, // but libofx requires it to be there in order to import the file. .element("TRNTYPE","DEBIT") - .element("DTPOSTED",_t.postDate().toString(Qt::ISODate).remove(QRegExp("[^0-9]"))) - .element("TRNAMT",s.value().formatMoney(QString(),2)); + .element("DTPOSTED",_t.postDate().toString(Qt::ISODate).remove(TQRegExp("[^0-9]"))) + .element("TRNAMT",s.value().formatMoney(TQString(),2)); if ( ! _t.bankID().isEmpty() ) result.element("FITID",_t.bankID()); @@ -639,10 +639,10 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone //Use this version for inv transactions MyMoneySplit s = _t.splitByAccount( m_account.accountList(), true ); - QCString stockid = file->account(s.accountId()).currencyId(); + TQCString stockid = file->account(s.accountId()).currencyId(); Tag invtran("INVTRAN"); - invtran.element("FITID",_t.id()).element("DTTRADE",_t.postDate().toString(Qt::ISODate).remove(QRegExp("[^0-9]"))); + invtran.element("FITID",_t.id()).element("DTTRADE",_t.postDate().toString(Qt::ISODate).remove(TQRegExp("[^0-9]"))); if ( !_t.memo().isEmpty() ) invtran.element("MEMO",_t.memo()); @@ -653,10 +653,10 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone return Tag("SELLSTOCK") .subtag(Tag("INVSELL") .subtag(invtran) - .subtag(Tag("SECID").element("UNIQUEID",stockid).element("UNIQUEIDTYPE","KMYMONEY")) - .element("UNITS",QString(((s.shares())).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) - .element("UNITPRICE",QString((s.value()/s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.]"))) - .element("TOTAL",QString((-s.value()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) + .subtag(Tag("SECID").element("UNITQUEID",stockid).element("UNITQUEIDTYPE","KMYMONEY")) + .element("UNITS",TQString(((s.shares())).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) + .element("UNITPRICE",TQString((s.value()/s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.]"))) + .element("TOTAL",TQString((-s.value()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) .element("SUBACCTSEC","CASH") .element("SUBACCTFUND","CASH")) .element("SELLTYPE","SELL"); @@ -666,10 +666,10 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone return Tag("BUYSTOCK") .subtag(Tag("INVBUY") .subtag(invtran) - .subtag(Tag("SECID").element("UNIQUEID",stockid).element("UNIQUEIDTYPE","KMYMONEY")) - .element("UNITS",QString((s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) - .element("UNITPRICE",QString((s.value()/s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.]"))) - .element("TOTAL",QString((-(s.value())).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) + .subtag(Tag("SECID").element("UNITQUEID",stockid).element("UNITQUEIDTYPE","KMYMONEY")) + .element("UNITS",TQString((s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) + .element("UNITPRICE",TQString((s.value()/s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.]"))) + .element("TOTAL",TQString((-(s.value())).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) .element("SUBACCTSEC","CASH") .element("SUBACCTFUND","CASH")) .element("BUYTYPE","BUY"); @@ -682,22 +682,22 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone return Tag("REINVEST") .subtag(invtran) - .subtag(Tag("SECID").element("UNIQUEID",stockid).element("UNIQUEIDTYPE","KMYMONEY")) + .subtag(Tag("SECID").element("UNITQUEID",stockid).element("UNITQUEIDTYPE","KMYMONEY")) .element("INCOMETYPE","DIV") - .element("TOTAL",QString((-s.value()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) + .element("TOTAL",TQString((-s.value()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) .element("SUBACCTSEC","CASH") - .element("UNITS",QString((s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) - .element("UNITPRICE",QString((s.value()/s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.]"))); + .element("UNITS",TQString((s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) + .element("UNITPRICE",TQString((s.value()/s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.]"))); } else if ( s.action() == MyMoneySplit::ActionDividend ) { // find the split with the category, which has the actual amount of the dividend - QValueList<MyMoneySplit> splits = _t.splits(); - QValueList<MyMoneySplit>::const_iterator it_split = splits.begin(); + TQValueList<MyMoneySplit> splits = _t.splits(); + TQValueList<MyMoneySplit>::const_iterator it_split = splits.begin(); bool found = false; while( it_split != splits.end() ) { - QCString accid = (*it_split).accountId(); + TQCString accid = (*it_split).accountId(); MyMoneyAccount acc = file->account(accid); if ( acc.accountType() == MyMoneyAccount::Income || acc.accountType() == MyMoneyAccount::Expense ) { @@ -710,9 +710,9 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone if ( found ) return Tag("INCOME") .subtag(invtran) - .subtag(Tag("SECID").element("UNIQUEID",stockid).element("UNIQUEIDTYPE","KMYMONEY")) + .subtag(Tag("SECID").element("UNITQUEID",stockid).element("UNITQUEIDTYPE","KMYMONEY")) .element("INCOMETYPE","DIV") - .element("TOTAL",QString((-(*it_split).value()).formatMoney(QString(),2)).remove(QRegExp("[^0-9\\.\\-]"))) + .element("TOTAL",TQString((-(*it_split).value()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9\\.\\-]"))) .element("SUBACCTSEC","CASH") .element("SUBACCTFUND","CASH"); else diff --git a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h index 1091b15..56497f2 100644 --- a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h +++ b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h @@ -40,7 +40,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QDate; +class TQDate; // ---------------------------------------------------------------------------- // KDE Includes @@ -61,17 +61,17 @@ class MyMoneyTransaction; class OfxAppVersion { public: - OfxAppVersion(KComboBox* combo, const QString& appId); + OfxAppVersion(KComboBox* combo, const TQString& appId); /** * This method returns the currently selected application id * as a colon separated value consisting of the application - * and version (eg. "QWIN:1700"). If current value is the + * and version (eg. "TQWIN:1700"). If current value is the * default, an empty string is returned. */ - const QString& appId(void) const; + const TQString& appId(void) const; private: - QMap<QString, QString> m_appMap; + TQMap<TQString, TQString> m_appMap; KComboBox* m_combo; }; @@ -81,8 +81,8 @@ private: class OfxHeaderVersion { public: - OfxHeaderVersion(KComboBox* combo, const QString& headerVersion); - QString headerVersion(void) const; + OfxHeaderVersion(KComboBox* combo, const TQString& headerVersion); + TQString headerVersion(void) const; private: KComboBox* m_combo; @@ -95,25 +95,25 @@ class MyMoneyOfxConnector { public: MyMoneyOfxConnector(const MyMoneyAccount& _account); - QString url(void) const; + TQString url(void) const; /** * Constructs the request for a statement. The first date * for which transactions will be requested is determined * by statementStartDate() */ - const QByteArray statementRequest(void) const; - const QByteArray statementResponse(const QDate& _dtstart) const; + const TQByteArray statementRequest(void) const; + const TQByteArray statementResponse(const TQDate& _dtstart) const; private: void initRequest(OfxFiLogin* fi) const; - QDate statementStartDate(void) const; - QString iban(void) const; - QString fiorg(void) const; - QString fiid(void) const; - QString username(void) const; - QString password(void) const; - QString accountnum(void) const; + TQDate statementStartDate(void) const; + TQString iban(void) const; + TQString fiorg(void) const; + TQString fiid(void) const; + TQString username(void) const; + TQString password(void) const; + TQString accountnum(void) const; #if LIBOFX_IS_VERSION(0,9,0) OfxAccountData::AccountType accounttype(void) const; #else |