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/kmymoney2.cpp | |
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/kmymoney2.cpp')
-rw-r--r-- | kmymoney2/kmymoney2.cpp | 1408 |
1 files changed, 704 insertions, 704 deletions
diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp index 40cc1d6..b423559 100644 --- a/kmymoney2/kmymoney2.cpp +++ b/kmymoney2/kmymoney2.cpp @@ -32,16 +32,16 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdir.h> -#include <qprinter.h> -#include <qlayout.h> -#include <qsignalmapper.h> -#include <qclipboard.h> // temp for problem 1105503 -#include <qdatetime.h> // only for performance tests -#include <qtimer.h> -#include <qsqlpropertymap.h> -#include <qvbox.h> -#include <qeventloop.h> +#include <tqdir.h> +#include <tqprinter.h> +#include <tqlayout.h> +#include <tqsignalmapper.h> +#include <tqclipboard.h> // temp for problem 1105503 +#include <tqdatetime.h> // only for performance tests +#include <tqtimer.h> +#include <tqsqlpropertymap.h> +#include <tqvbox.h> +#include <tqeventloop.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -160,8 +160,8 @@ public: m_ft(0), m_moveToAccountSelector(0), statementXMLindex(0), m_collectingStatements(false) {} void unlinkStatementXML(void); - void moveInvestmentTransaction(const QString& fromId, - const QString& toId, + void moveInvestmentTransaction(const TQString& fromId, + const TQString& toId, const MyMoneyTransaction& t); MyMoneyFileTransaction* m_ft; @@ -170,12 +170,12 @@ public: KBalanceWarning* m_balanceWarning; bool m_collectingStatements; - QStringList m_statementResults; + TQStringList m_statementResults; KMyMoneyPlugin::PluginLoader* m_pluginLoader; - QString m_lastPayeeEntered; + TQString m_lastPayeeEntered; }; -KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : +KMyMoney2App::KMyMoney2App(TQWidget * /*tqparent*/ , const char* name) : KMainWindow(0, name), DCOPObject("kmymoney2app"), d(new Private), @@ -196,10 +196,10 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : updateCaption(true); - QFrame* frame = new QFrame(this); - frame->setFrameStyle(QFrame::NoFrame); + TQFrame* frame = new TQFrame(this); + frame->setFrameStyle(TQFrame::NoFrame); // values for margin (11) and spacing(6) taken from KDialog implementation - QBoxLayout* layout = new QBoxLayout(frame, QBoxLayout::TopToBottom, 2, 6); + TQBoxLayout* tqlayout = new TQBoxLayout(frame, TQBoxLayout::TopToBottom, 2, 6); ::timetrace("init statusbar"); initStatusBar(); @@ -210,8 +210,8 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : ::timetrace("create view"); myMoneyView = new KMyMoneyView(frame, "KMyMoneyView"); - layout->addWidget(myMoneyView, 10); - connect(myMoneyView, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotResetSelections())); + tqlayout->addWidget(myMoneyView, 10); + connect(myMoneyView, TQT_SIGNAL(aboutToShowPage(TQWidget*)), TQT_TQOBJECT(this), TQT_SLOT(slotResetSelections())); /////////////////////////////////////////////////////////////////// // call inits to invoke all other construction parts @@ -219,8 +219,8 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : readOptions(); #if 0 - m_pluginSignalMapper = new QSignalMapper( this ); - connect( m_pluginSignalMapper, SIGNAL( mapped( const QString& ) ), this, SLOT( slotPluginImport( const QString& ) ) ); + m_pluginSignalMapper = new TQSignalMapper( this ); + connect( m_pluginSignalMapper, TQT_SIGNAL( mapped( const TQString& ) ), TQT_TQOBJECT(this), TQT_SLOT( slotPluginImport( const TQString& ) ) ); #endif // now initialize the plugin structure @@ -232,10 +232,10 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : ::timetrace("done"); - connect(&proc,SIGNAL(processExited(KProcess *)),this,SLOT(slotProcessExited())); + connect(&proc,TQT_SIGNAL(processExited(KProcess *)),TQT_TQOBJECT(this), TQT_SLOT(slotProcessExited())); // force to show the home page if the file is closed - connect(action("view_show_transaction_detail"), SIGNAL(toggled(bool)), myMoneyView, SLOT(slotShowTransactionDetail(bool))); + connect(action("view_show_transaction_detail"), TQT_SIGNAL(toggled(bool)), myMoneyView, TQT_SLOT(slotShowTransactionDetail(bool))); m_backupState = BACKUP_IDLE; @@ -245,14 +245,14 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : m_autoSaveEnabled = KMyMoneyGlobalSettings::autoSaveFile(); m_autoSavePeriod = KMyMoneyGlobalSettings::autoSavePeriod(); - m_autoSaveTimer = new QTimer(this); - connect(m_autoSaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave())); + m_autoSaveTimer = new TQTimer(this); + connect(m_autoSaveTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotAutoSave())); // make sure, we get a note when the engine changes state - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotDataChanged())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotDataChanged())); // make sure we have a balance warning object - d->m_balanceWarning = new KBalanceWarning(this); + d->m_balanceWarning = new KBalanceWarning(TQT_TQOBJECT(this)); // kickstart date change timer slotDateChanged(); @@ -285,15 +285,15 @@ const KURL KMyMoney2App::lastOpenedURL(void) void KMyMoney2App::initDynamicMenus(void) { - QWidget* w = factory()->container("transaction_move_menu", this); - QPopupMenu *menu = dynamic_cast<QPopupMenu*>(w); + TQWidget* w = factory()->container("transaction_move_menu", this); + TQPopupMenu *menu = dynamic_cast<TQPopupMenu*>(w); if(menu) { d->m_moveToAccountSelector = new kMyMoneyAccountSelector(menu, 0, 0, false); menu->insertItem(d->m_moveToAccountSelector); - connect(d->m_moveToAccountSelector, SIGNAL(itemSelected(const QString&)), this, SLOT(slotMoveToAccount(const QString&))); - connect(this, SIGNAL(accountSelected(const MyMoneyAccount&)), this, SLOT(slotUpdateMoveToAccountMenu())); - connect(this, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotUpdateMoveToAccountMenu())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotUpdateMoveToAccountMenu())); + connect(d->m_moveToAccountSelector, TQT_SIGNAL(itemSelected(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotMoveToAccount(const TQString&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(accountSelected(const MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMoveToAccountMenu())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMoveToAccountMenu())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMoveToAccountMenu())); } } @@ -304,186 +304,186 @@ void KMyMoney2App::initActions(void) // ************* // The File menu // ************* - KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection()); - KStdAction::open(this, SLOT(slotFileOpen()), actionCollection()); - KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); - KStdAction::save(this, SLOT(slotFileSave()), actionCollection()); - KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection()); - KStdAction::close(this, SLOT(slotFileClose()), actionCollection()); - KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection()); - KStdAction::print(this, SLOT(slotPrintView()), actionCollection()); - - new KAction(i18n("Open database..."), "",0,this,SLOT(slotOpenDatabase()),actionCollection(),"open_database"); - new KAction(i18n("Save as database..."), "",0,this,SLOT(slotSaveAsDatabase()),actionCollection(),"saveas_database"); - new KAction(i18n("Backup..."), "backup",0,this,SLOT(slotFileBackup()),actionCollection(),"file_backup"); - new KAction(i18n("QIF..."), "", 0, this, SLOT(slotQifImport()), actionCollection(), "file_import_qif"); - new KAction(i18n("Gnucash..."), "", 0, this, SLOT(slotGncImport()), actionCollection(), "file_import_gnc"); - new KAction(i18n("Statement file..."), "", 0, this, SLOT(slotStatementImport()), actionCollection(), "file_import_statement"); - - new KAction(i18n("Account Template..."), "", 0, this, SLOT(slotLoadAccountTemplates()), actionCollection(), "file_import_template"); - new KAction(i18n("Account Template..."), "", 0, this, SLOT(slotSaveAccountTemplates()), actionCollection(), "file_export_template"); - new KAction(i18n("QIF..."), "", 0, this, SLOT(slotQifExport()), actionCollection(), "file_export_qif"); - new KAction(i18n("Personal Data..."), "personal_data", 0, this, SLOT(slotFileViewPersonal()), actionCollection(), "view_personal_data"); + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection()); + KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); + KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection()); + KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection()); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotFileClose()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection()); + KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrintView()), actionCollection()); + + new KAction(i18n("Open database..."), "",0,TQT_TQOBJECT(this), TQT_SLOT(slotOpenDatabase()),actionCollection(),"open_database"); + new KAction(i18n("Save as database..."), "",0,TQT_TQOBJECT(this), TQT_SLOT(slotSaveAsDatabase()),actionCollection(),"saveas_database"); + new KAction(i18n("Backup..."), "backup",0,TQT_TQOBJECT(this), TQT_SLOT(slotFileBackup()),actionCollection(),"file_backup"); + new KAction(i18n("TQIF..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotQifImport()), actionCollection(), "file_import_qif"); + new KAction(i18n("Gnucash..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGncImport()), actionCollection(), "file_import_gnc"); + new KAction(i18n("Statement file..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStatementImport()), actionCollection(), "file_import_statement"); + + new KAction(i18n("Account Template..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotLoadAccountTemplates()), actionCollection(), "file_import_template"); + new KAction(i18n("Account Template..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveAccountTemplates()), actionCollection(), "file_export_template"); + new KAction(i18n("TQIF..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotQifExport()), actionCollection(), "file_export_qif"); + new KAction(i18n("Personal Data..."), "personal_data", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileViewPersonal()), actionCollection(), "view_personal_data"); #if KMM_DEBUG - new KAction(i18n("Dump Memory"), "", 0, this, SLOT(slotFileFileInfo()), actionCollection(), "file_dump"); + new KAction(i18n("Dump Memory"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileFileInfo()), actionCollection(), "file_dump"); #endif - new KAction(i18n("File-Information..."), "info", 0, this, SLOT(slotFileInfoDialog()), actionCollection(), "view_file_info"); + new KAction(i18n("File-Information..."), "info", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileInfoDialog()), actionCollection(), "view_file_info"); // ************* // The Edit menu // ************* - new KAction(i18n("Find transaction..."), "transaction_find", KShortcut("Ctrl+F"), this, SLOT(slotFindTransaction()), actionCollection(), "edit_find_transaction"); + new KAction(i18n("Find transaction..."), "transaction_tqfind", KShortcut("Ctrl+F"), TQT_TQOBJECT(this), TQT_SLOT(slotFindTransaction()), actionCollection(), "edit_find_transaction"); // ************* // The View menu // ************* new KToggleAction(i18n("Show Transaction Detail"), KShortcut("Ctrl+T"), actionCollection(), "view_show_transaction_detail"); - new KToggleAction(i18n("Hide reconciled transactions"), "hide_reconciled", KShortcut("Ctrl+R"), this, SLOT(slotHideReconciledTransactions()), actionCollection(), "view_hide_reconciled_transactions"); - new KToggleAction(i18n("Hide unused categories"), "hide_categories", KShortcut("Ctrl+U"), this, SLOT(slotHideUnusedCategories()), actionCollection(), "view_hide_unused_categories"); - new KToggleAction(i18n("Show all accounts"), "", KShortcut("Ctrl+Shift+A"), this, SLOT(slotShowAllAccounts()), actionCollection(), "view_show_all_accounts"); + new KToggleAction(i18n("Hide reconciled transactions"), "hide_reconciled", KShortcut("Ctrl+R"), TQT_TQOBJECT(this), TQT_SLOT(slotHideReconciledTransactions()), actionCollection(), "view_hide_reconciled_transactions"); + new KToggleAction(i18n("Hide unused categories"), "hide_categories", KShortcut("Ctrl+U"), TQT_TQOBJECT(this), TQT_SLOT(slotHideUnusedCategories()), actionCollection(), "view_hide_unused_categories"); + new KToggleAction(i18n("Show all accounts"), "", KShortcut("Ctrl+Shift+A"), TQT_TQOBJECT(this), TQT_SLOT(slotShowAllAccounts()), actionCollection(), "view_show_all_accounts"); // ********************* // The institutions menu // ********************* - new KAction(i18n("New institution..."), "institution_add", 0, this, SLOT(slotInstitutionNew()), actionCollection(), "institution_new"); - new KAction(i18n("Edit institution..."), "edit", 0, this, SLOT(slotInstitutionEdit()), actionCollection(), "institution_edit"); - new KAction(i18n("Delete institution..."), "delete", 0, this, SLOT(slotInstitutionDelete()), actionCollection(), "institution_delete"); + new KAction(i18n("New institution..."), "institution_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInstitutionNew()), actionCollection(), "institution_new"); + new KAction(i18n("Edit institution..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInstitutionEdit()), actionCollection(), "institution_edit"); + new KAction(i18n("Delete institution..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInstitutionDelete()), actionCollection(), "institution_delete"); // ***************** // The accounts menu // ***************** - new KAction(i18n("New account..."), "account_add", 0, this, SLOT(slotAccountNew()), actionCollection(), "account_new"); + new KAction(i18n("New account..."), "account_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountNew()), actionCollection(), "account_new"); // note : action "category_new" is included in this menu but defined below - new KAction(i18n("Open ledger"), "ledger", 0, this, SLOT(slotAccountOpen()), actionCollection(), "account_open"); - new KAction(i18n("Reconcile..."), "reconcile", KShortcut("Ctrl+Shift+R"), this, SLOT(slotAccountReconcileStart()), actionCollection(), "account_reconcile"); - new KAction(i18n("Finish reconciliation", "Finish"), "player_end", 0, this, SLOT(slotAccountReconcileFinish()), actionCollection(), "account_reconcile_finish"); - new KAction(i18n("Postpone reconciliation", "Postpone"), "player_pause", 0, this, SLOT(slotAccountReconcilePostpone()), actionCollection(), "account_reconcile_postpone"); - new KAction(i18n("Edit account..."), "edit", 0, this, SLOT(slotAccountEdit()), actionCollection(), "account_edit"); - new KAction(i18n("Delete account..."), "delete", 0, this, SLOT(slotAccountDelete()), actionCollection(), "account_delete"); - new KAction(i18n("Close account"), "", 0, this, SLOT(slotAccountClose()), actionCollection(), "account_close"); - new KAction(i18n("Reopen account"), "", 0, this, SLOT(slotAccountReopen()), actionCollection(), "account_reopen"); - new KAction(i18n("Transaction report"), "view_info", 0, this, SLOT(slotAccountTransactionReport()), actionCollection(), "account_transaction_report"); + new KAction(i18n("Open ledger"), "ledger", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountOpen()), actionCollection(), "account_open"); + new KAction(i18n("Reconcile..."), "reconcile", KShortcut("Ctrl+Shift+R"), TQT_TQOBJECT(this), TQT_SLOT(slotAccountReconcileStart()), actionCollection(), "account_reconcile"); + new KAction(i18n("Finish reconciliation", "Finish"), "player_end", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountReconcileFinish()), actionCollection(), "account_reconcile_finish"); + new KAction(i18n("Postpone reconciliation", "Postpone"), "player_pause", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountReconcilePostpone()), actionCollection(), "account_reconcile_postpone"); + new KAction(i18n("Edit account..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountEdit()), actionCollection(), "account_edit"); + new KAction(i18n("Delete account..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountDelete()), actionCollection(), "account_delete"); + new KAction(i18n("Close account"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountClose()), actionCollection(), "account_close"); + new KAction(i18n("Reopen account"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountReopen()), actionCollection(), "account_reopen"); + new KAction(i18n("Transaction report"), "view_info", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountTransactionReport()), actionCollection(), "account_transaction_report"); #ifdef HAVE_KDCHART - new KAction(i18n("Show balance chart..."), "kchart_chrt", 0, this, SLOT(slotAccountChart()), actionCollection(), "account_chart"); + new KAction(i18n("Show balance chart..."), "kchart_chrt", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountChart()), actionCollection(), "account_chart"); #endif - new KAction(i18n("Map to online account"), "news_subscribe", 0, this, SLOT(slotAccountMapOnline()), actionCollection(), "account_online_map"); - new KAction(i18n("Unmap account"), "", 0, this, SLOT(slotAccountUnmapOnline()), actionCollection(), "account_online_unmap"); - KActionMenu* menu = new KActionMenu(i18n("Update"), QIconSet(KGlobal::iconLoader()->loadIcon("reload", KIcon::Small, + new KAction(i18n("Map to online account"), "news_subscribe", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountMapOnline()), actionCollection(), "account_online_map"); + new KAction(i18n("Unmap account"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountUnmapOnline()), actionCollection(), "account_online_unmap"); + KActionMenu* menu = new KActionMenu(i18n("Update"), TQIconSet(KGlobal::iconLoader()->loadIcon("reload", KIcon::Small, KIcon::SizeSmall)), actionCollection(), "account_online_update_menu"); // activating the menu button is the same as selecting the current account - connect( menu, SIGNAL( activated() ), this, SLOT(slotAccountUpdateOnline())); - menu->insert(new KAction(i18n("Update account..."), "", 0, this, SLOT(slotAccountUpdateOnline()), actionCollection(), "account_online_update")); - menu->insert(new KAction(i18n("Update all accounts..."), "", 0, this, SLOT(slotAccountUpdateOnlineAll()), actionCollection(), "account_online_update_all")); + connect( menu, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT(slotAccountUpdateOnline())); + menu->insert(new KAction(i18n("Update account..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountUpdateOnline()), actionCollection(), "account_online_update")); + menu->insert(new KAction(i18n("Update all accounts..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountUpdateOnlineAll()), actionCollection(), "account_online_update_all")); // ******************* // The categories menu // ******************* - new KAction(i18n("New category..."), "account_add", 0, this, SLOT(slotCategoryNew()), actionCollection(), "category_new"); - new KAction(i18n("Edit category..."), "edit", 0, this, SLOT(slotAccountEdit()), actionCollection(), "category_edit"); - new KAction(i18n("Delete category..."), "delete", 0, this, SLOT(slotAccountDelete()), actionCollection(), "category_delete"); + new KAction(i18n("New category..."), "account_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew()), actionCollection(), "category_new"); + new KAction(i18n("Edit category..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountEdit()), actionCollection(), "category_edit"); + new KAction(i18n("Delete category..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountDelete()), actionCollection(), "category_delete"); // ************** // The tools menu // ************** - new KAction(i18n("QIF Profile Editor..."), "edit", 0, this, SLOT(slotQifProfileEditor()), actionCollection(), "tools_qif_editor"); - new KAction(i18n("Securities..."), "", 0, this, SLOT(slotSecurityEditor()), actionCollection(), "tools_security_editor"); - new KAction(i18n("Currencies..."), "", 0, this, SLOT(slotCurrencyDialog()), actionCollection(), "tools_currency_editor"); - new KAction(i18n("Prices..."), "", 0, this, SLOT(slotPriceDialog()), actionCollection(), "tools_price_editor"); - new KAction(i18n("Update Stock and Currency Prices..."), "", 0, this, SLOT(slotEquityPriceUpdate()), actionCollection(), "tools_update_prices"); - new KAction(i18n("Consistency Check"), "", 0, this, SLOT(slotFileConsitencyCheck()), actionCollection(), "tools_consistency_check"); - new KAction(i18n("Performance-Test"), "fork", 0, this, SLOT(slotPerformanceTest()), actionCollection(), "tools_performancetest"); - new KAction(i18n("KCalc..."), "kcalc", 0, this, SLOT(slotToolsStartKCalc()), actionCollection(), "tools_kcalc"); + new KAction(i18n("TQIF Profile Editor..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotQifProfileEditor()), actionCollection(), "tools_qif_editor"); + new KAction(i18n("Securities..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSecurityEditor()), actionCollection(), "tools_security_editor"); + new KAction(i18n("Currencies..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCurrencyDialog()), actionCollection(), "tools_currency_editor"); + new KAction(i18n("Prices..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPriceDialog()), actionCollection(), "tools_price_editor"); + new KAction(i18n("Update Stock and Currency Prices..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEquityPriceUpdate()), actionCollection(), "tools_update_prices"); + new KAction(i18n("Consistency Check"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileConsitencyCheck()), actionCollection(), "tools_consistency_check"); + new KAction(i18n("Performance-Test"), "fork", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPerformanceTest()), actionCollection(), "tools_performancetest"); + new KAction(i18n("KCalc..."), "kcalc", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToolsStartKCalc()), actionCollection(), "tools_kcalc"); // ***************** // The settings menu // ***************** - KStdAction::preferences(this, SLOT( slotSettings() ), actionCollection()); - new KAction(i18n("Enable all messages"), "", 0, this, SLOT(slotEnableMessages()), actionCollection(), "settings_enable_messages"); - new KAction(i18n("KDE language settings..."), "", 0, this, SLOT(slotKDELanguageSettings()), actionCollection(), "settings_language"); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotSettings() ), actionCollection()); + new KAction(i18n("Enable all messages"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEnableMessages()), actionCollection(), "settings_enable_messages"); + new KAction(i18n("KDE language settings..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotKDELanguageSettings()), actionCollection(), "settings_language"); // ************* // The help menu // ************* - new KAction(i18n("&Show tip of the day"), "idea", 0, this, SLOT(slotShowTipOfTheDay()), actionCollection(), "help_show_tip"); + new KAction(i18n("&Show tip of the day"), "idea", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowTipOfTheDay()), actionCollection(), "help_show_tip"); // *************************** // Actions w/o main menu entry // *************************** - new KAction(i18n("New transaction button", "New"), "filenew", QKeySequence(Qt::CTRL | Qt::Key_Insert), this, SLOT(slotTransactionsNew()), actionCollection(), "transaction_new"); + new KAction(i18n("New transaction button", "New"), "filenew", TQKeySequence(TQt::CTRL | TQt::Key_Insert), TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsNew()), actionCollection(), "transaction_new"); // we use Return as the same shortcut for Edit and Enter. Therefore, we don't allow // to change them (The standard KDE dialog complains anyway if you want to assign // the same shortcut to two actions) - p = new KAction(i18n("Edit transaction button", "Edit"), "edit", 0, this, SLOT(slotTransactionsEdit()), actionCollection(), "transaction_edit"); + p = new KAction(i18n("Edit transaction button", "Edit"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsEdit()), actionCollection(), "transaction_edit"); p->setShortcutConfigurable(false); - p = new KAction(i18n("Enter transaction", "Enter"), "button_ok", 0, this, SLOT(slotTransactionsEnter()), actionCollection(), "transaction_enter"); + p = new KAction(i18n("Enter transaction", "Enter"), "button_ok", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsEnter()), actionCollection(), "transaction_enter"); p->setShortcutConfigurable(false); - new KAction(i18n("Edit split button", "Edit splits"), "split_transaction", 0, this, SLOT(slotTransactionsEditSplits()), actionCollection(), "transaction_editsplits"); - new KAction(i18n("Cancel transaction edit", "Cancel"), "button_cancel", 0, this, SLOT(slotTransactionsCancel()), actionCollection(), "transaction_cancel"); - new KAction(i18n("Delete transaction", "Delete"), "delete", 0, this, SLOT(slotTransactionsDelete()), actionCollection(), "transaction_delete"); - new KAction(i18n("Duplicate transaction", "Duplicate"), "editcopy", 0, this, SLOT(slotTransactionDuplicate()), actionCollection(), "transaction_duplicate"); - - new KAction(i18n("Button text for match transaction", "Match"), "stop", 0, this, SLOT(slotTransactionMatch()), actionCollection(), "transaction_match"); - new KAction(i18n("Accept 'imported' and 'matched' transaction", "Accept"), "apply", 0, this, SLOT(slotTransactionsAccept()), actionCollection(), "transaction_accept"); - - new KAction(i18n("Toggle reconciliation flag", "Toggle"), 0, KShortcut("Ctrl+Space"), this, SLOT(slotToggleReconciliationFlag()), actionCollection(), "transaction_mark_toggle"); - new KAction(i18n("Mark transaction cleared", "Cleared"), 0, KShortcut("Ctrl+Alt+Space"), this, SLOT(slotMarkTransactionCleared()), actionCollection(), "transaction_mark_cleared"); - new KAction(i18n("Mark transaction reconciled", "Reconciled"), "", KShortcut("Ctrl+Shift+Space"), this, SLOT(slotMarkTransactionReconciled()), actionCollection(), "transaction_mark_reconciled"); - new KAction(i18n("Mark transaction not reconciled", "Not reconciled"), "", 0, this, SLOT(slotMarkTransactionNotReconciled()), actionCollection(), "transaction_mark_notreconciled"); - new KAction(i18n("Select all transactions", "Select all"), 0, KShortcut("Ctrl+A"), this, SIGNAL(selectAllTransactions()), actionCollection(), "transaction_select_all"); - - new KAction(i18n("Goto account"), "goto", 0, this, SLOT(slotTransactionGotoAccount()), actionCollection(), "transaction_goto_account"); - new KAction(i18n("Goto payee"), "goto", 0, this, SLOT(slotTransactionGotoPayee()), actionCollection(), "transaction_goto_payee"); - new KAction(i18n("Create scheduled transaction..."), "bookmark_add", 0, this, SLOT(slotTransactionCreateSchedule()), actionCollection(), "transaction_create_schedule"); - new KAction(i18n("Assign next number"), "", KShortcut("Ctrl+Shift+N"), this, SLOT(slotTransactionAssignNumber()), actionCollection(), "transaction_assign_number"); - new KAction(i18n("Combine transactions", "Combine"), "", 0, this, SLOT(slotTransactionCombine()), actionCollection(), "transaction_combine"); - - new KAction(i18n("New investment"), "filenew", 0, this, SLOT(slotInvestmentNew()), actionCollection(), "investment_new"); - new KAction(i18n("Edit investment..."), "edit", 0, this, SLOT(slotInvestmentEdit()), actionCollection(), "investment_edit"); - new KAction(i18n("Delete investment..."), "delete", 0, this, SLOT(slotInvestmentDelete()), actionCollection(), "investment_delete"); - new KAction(i18n("Online price update..."), "", 0, this, SLOT(slotOnlinePriceUpdate()), actionCollection(), "investment_online_price_update"); - new KAction(i18n("Manual price update..."), "", 0, this, SLOT(slotManualPriceUpdate()), actionCollection(), "investment_manual_price_update"); - - new KAction(i18n("New scheduled transaction..."), "filenew", 0, this, SLOT(slotScheduleNew()), actionCollection(), "schedule_new"); - new KAction(i18n("Edit scheduled transaction..."), "edit", 0, this, SLOT(slotScheduleEdit()), actionCollection(), "schedule_edit"); - new KAction(i18n("Delete scheduled transaction..."), "delete", 0, this, SLOT(slotScheduleDelete()), actionCollection(), "schedule_delete"); - new KAction(i18n("Duplicate scheduled transaction"), "editcopy", 0, this, SLOT(slotScheduleDuplicate()), actionCollection(), "schedule_duplicate"); - new KAction(i18n("Enter next transaction..."), "key_enter", 0, this, SLOT(slotScheduleEnter()), actionCollection(), "schedule_enter"); - new KAction(i18n("Skip next transaction..."), "player_fwd", 0, this, SLOT(slotScheduleSkip()), actionCollection(), "schedule_skip"); - - new KAction(i18n("New payee"), "filenew", 0, this, SLOT(slotPayeeNew()), actionCollection(), "payee_new"); - new KAction(i18n("Rename payee"), "edit", 0, this, SIGNAL(payeeRename()), actionCollection(), "payee_rename"); - new KAction(i18n("Delete payee"), "delete", 0, this, SLOT(slotPayeeDelete()), actionCollection(), "payee_delete"); - - new KAction(i18n("New budget"), "filenew", 0, this, SLOT(slotBudgetNew()), actionCollection(), "budget_new"); - new KAction(i18n("Rename budget"), "edit", 0, this, SIGNAL(budgetRename()), actionCollection(), "budget_rename"); - new KAction(i18n("Delete budget"), "delete", 0, this, SLOT(slotBudgetDelete()), actionCollection(), "budget_delete"); - new KAction(i18n("Copy budget"), "editcopy", 0, this, SLOT(slotBudgetCopy()), actionCollection(), "budget_copy"); - new KAction(i18n("Change budget year"), "", 0, this, SLOT(slotBudgetChangeYear()), actionCollection(), "budget_change_year"); - new KAction(i18n("Budget based on forecast", "Forecast"), "forcast", 0, this, SLOT(slotBudgetForecast()), actionCollection(), "budget_forecast"); + new KAction(i18n("Edit split button", "Edit splits"), "split_transaction", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsEditSplits()), actionCollection(), "transaction_editsplits"); + new KAction(i18n("Cancel transaction edit", "Cancel"), "button_cancel", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsCancel()), actionCollection(), "transaction_cancel"); + new KAction(i18n("Delete transaction", "Delete"), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsDelete()), actionCollection(), "transaction_delete"); + new KAction(i18n("Duplicate transaction", "Duplicate"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionDuplicate()), actionCollection(), "transaction_duplicate"); + + new KAction(i18n("Button text for match transaction", "Match"), "stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionMatch()), actionCollection(), "transaction_match"); + new KAction(i18n("Accept 'imported' and 'matched' transaction", "Accept"), "apply", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsAccept()), actionCollection(), "transaction_accept"); + + new KAction(i18n("Toggle reconciliation flag", "Toggle"), 0, KShortcut("Ctrl+Space"), TQT_TQOBJECT(this), TQT_SLOT(slotToggleReconciliationFlag()), actionCollection(), "transaction_mark_toggle"); + new KAction(i18n("Mark transaction cleared", "Cleared"), 0, KShortcut("Ctrl+Alt+Space"), TQT_TQOBJECT(this), TQT_SLOT(slotMarkTransactionCleared()), actionCollection(), "transaction_mark_cleared"); + new KAction(i18n("Mark transaction reconciled", "Reconciled"), "", KShortcut("Ctrl+Shift+Space"), TQT_TQOBJECT(this), TQT_SLOT(slotMarkTransactionReconciled()), actionCollection(), "transaction_mark_reconciled"); + new KAction(i18n("Mark transaction not reconciled", "Not reconciled"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarkTransactionNotReconciled()), actionCollection(), "transaction_mark_notreconciled"); + new KAction(i18n("Select all transactions", "Select all"), 0, KShortcut("Ctrl+A"), TQT_TQOBJECT(this), TQT_SIGNAL(selectAllTransactions()), actionCollection(), "transaction_select_all"); + + new KAction(i18n("Goto account"), "goto", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionGotoAccount()), actionCollection(), "transaction_goto_account"); + new KAction(i18n("Goto payee"), "goto", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionGotoPayee()), actionCollection(), "transaction_goto_payee"); + new KAction(i18n("Create scheduled transaction..."), "bookmark_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionCreateSchedule()), actionCollection(), "transaction_create_schedule"); + new KAction(i18n("Assign next number"), "", KShortcut("Ctrl+Shift+N"), TQT_TQOBJECT(this), TQT_SLOT(slotTransactionAssignNumber()), actionCollection(), "transaction_assign_number"); + new KAction(i18n("Combine transactions", "Combine"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionCombine()), actionCollection(), "transaction_combine"); + + new KAction(i18n("New investment"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInvestmentNew()), actionCollection(), "investment_new"); + new KAction(i18n("Edit investment..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInvestmentEdit()), actionCollection(), "investment_edit"); + new KAction(i18n("Delete investment..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInvestmentDelete()), actionCollection(), "investment_delete"); + new KAction(i18n("Online price update..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOnlinePriceUpdate()), actionCollection(), "investment_online_price_update"); + new KAction(i18n("Manual price update..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotManualPriceUpdate()), actionCollection(), "investment_manual_price_update"); + + new KAction(i18n("New scheduled transaction..."), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleNew()), actionCollection(), "schedule_new"); + new KAction(i18n("Edit scheduled transaction..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleEdit()), actionCollection(), "schedule_edit"); + new KAction(i18n("Delete scheduled transaction..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleDelete()), actionCollection(), "schedule_delete"); + new KAction(i18n("Duplicate scheduled transaction"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleDuplicate()), actionCollection(), "schedule_duplicate"); + new KAction(i18n("Enter next transaction..."), "key_enter", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleEnter()), actionCollection(), "schedule_enter"); + new KAction(i18n("Skip next transaction..."), "player_fwd", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleSkip()), actionCollection(), "schedule_skip"); + + new KAction(i18n("New payee"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew()), actionCollection(), "payee_new"); + new KAction(i18n("Rename payee"), "edit", 0, TQT_TQOBJECT(this), TQT_SIGNAL(payeeRename()), actionCollection(), "payee_rename"); + new KAction(i18n("Delete payee"), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPayeeDelete()), actionCollection(), "payee_delete"); + + new KAction(i18n("New budget"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetNew()), actionCollection(), "budget_new"); + new KAction(i18n("Rename budget"), "edit", 0, TQT_TQOBJECT(this), TQT_SIGNAL(budgetRename()), actionCollection(), "budget_rename"); + new KAction(i18n("Delete budget"), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetDelete()), actionCollection(), "budget_delete"); + new KAction(i18n("Copy budget"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetCopy()), actionCollection(), "budget_copy"); + new KAction(i18n("Change budget year"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetChangeYear()), actionCollection(), "budget_change_year"); + new KAction(i18n("Budget based on forecast", "Forecast"), "forcast", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetForecast()), actionCollection(), "budget_forecast"); // ************************ // Currency actions // ************************ - new KAction(i18n("New currency"), "filenew", 0, this, SLOT(slotCurrencyNew()), actionCollection(), "currency_new"); - new KAction(i18n("Rename currency"), "edit", 0, this, SIGNAL(currencyRename()), actionCollection(), "currency_rename"); - new KAction(i18n("Delete currency"), "delete", 0, this, SLOT(slotCurrencyDelete()), actionCollection(), "currency_delete"); - new KAction(i18n("Select as base currency"), "kmymoney2", 0, this, SLOT(slotCurrencySetBase()), actionCollection(), "currency_setbase"); + new KAction(i18n("New currency"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCurrencyNew()), actionCollection(), "currency_new"); + new KAction(i18n("Rename currency"), "edit", 0, TQT_TQOBJECT(this), TQT_SIGNAL(currencyRename()), actionCollection(), "currency_rename"); + new KAction(i18n("Delete currency"), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCurrencyDelete()), actionCollection(), "currency_delete"); + new KAction(i18n("Select as base currency"), "kmymoney2", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCurrencySetBase()), actionCollection(), "currency_setbase"); #ifdef KMM_DEBUG - new KAction("Test new feature", "", KShortcut("Ctrl+G"), this, SLOT(slotNewFeature()), actionCollection(), "new_user_wizard"); - new KToggleAction("Debug Traces", "", 0, this, SLOT(slotToggleTraces()), actionCollection(), "debug_traces"); - new KToggleAction("Debug Timers", "", 0, this, SLOT(slotToggleTimers()), actionCollection(), "debug_timers"); + new KAction("Test new feature", "", KShortcut("Ctrl+G"), TQT_TQOBJECT(this), TQT_SLOT(slotNewFeature()), actionCollection(), "new_user_wizard"); + new KToggleAction("Debug Traces", "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTraces()), actionCollection(), "debug_traces"); + new KToggleAction("Debug Timers", "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTimers()), actionCollection(), "debug_timers"); #endif // ************************ // Currently unused actions // ************************ #if 0 - new KToolBarPopupAction(i18n("View back"), "back", 0, this, SLOT(slotShowPreviousView()), actionCollection(), "go_back"); - new KToolBarPopupAction(i18n("View forward"), "forward", 0, this, SLOT(slotShowNextView()), actionCollection(), "go_forward"); + new KToolBarPopupAction(i18n("View back"), "back", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowPreviousView()), actionCollection(), "go_back"); + new KToolBarPopupAction(i18n("View forward"), "forward", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowNextView()), actionCollection(), "go_forward"); action("go_back")->setEnabled(false); action("go_forward")->setEnabled(false); @@ -496,7 +496,7 @@ void KMyMoney2App::initActions(void) toggleAction("view_show_all_accounts")->setChecked(false); // use the absolute path to your kmymoney2ui.rc file for testing purpose in createGUI(); - // createGUI(QString::null, false); + // createGUI(TQString(), false); setupGUI(); } @@ -509,10 +509,10 @@ void KMyMoney2App::dumpActions(void) const } } -KAction* KMyMoney2App::action(const QString& actionName) const +KAction* KMyMoney2App::action(const TQString& actionName) const { static KShortcut shortcut(""); - static KAction dummyAction(QString("Dummy"), QString(), shortcut, static_cast<const QObject*>(this), 0, static_cast<KActionCollection*>(0), ""); + static KAction dummyAction(TQString("Dummy"), TQString(), shortcut, TQT_TQOBJECT_CONST(this), 0, static_cast<KActionCollection*>(0), ""); KAction* p = actionCollection()->action(actionName.latin1()); if(p) @@ -522,10 +522,10 @@ KAction* KMyMoney2App::action(const QString& actionName) const return &dummyAction; } -KToggleAction* KMyMoney2App::toggleAction(const QString& actionName) const +KToggleAction* KMyMoney2App::toggleAction(const TQString& actionName) const { static KShortcut shortcut(""); - static KToggleAction dummyAction(QString("Dummy"), QString(), shortcut, static_cast<const QObject*>(this), 0, static_cast<KActionCollection*>(0), ""); + static KToggleAction dummyAction(TQString("Dummy"), TQString(), shortcut, TQT_TQOBJECT_CONST(this), 0, static_cast<KActionCollection*>(0), ""); KAction* q = actionCollection()->action(actionName.latin1()); @@ -553,12 +553,12 @@ void KMyMoney2App::initStatusBar(void) // Initialization of progress bar taken from KDevelop ;-) progressBar = new KProgress(statusBar()); - progressBar->setFrameStyle(QFrame::NoFrame | QFrame::Plain); + progressBar->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); progressBar->setMargin(0); progressBar->setLineWidth(0); - progressBar->setBackgroundMode(QWidget::PaletteBackground); + progressBar->setBackgroundMode(TQWidget::PaletteBackground); statusBar()->addWidget(progressBar); - progressBar->setFixedHeight(progressBar->sizeHint().height() - 8); + progressBar->setFixedHeight(progressBar->tqsizeHint().height() - 8); // hide the progress bar for now slotStatusProgressBar(-1, -1); @@ -587,8 +587,8 @@ void KMyMoney2App::readOptions(void) if(p) p->loadEntries(config,"Recent Files"); - QSize defaultSize(800, 600); - QSize size=config->readSizeEntry("Geometry", &defaultSize); + TQSize defaultSize(800, 600); + TQSize size=config->readSizeEntry("Geometry", &defaultSize); if(!size.isEmpty()) { resize(size); @@ -601,7 +601,7 @@ void KMyMoney2App::readOptions(void) m_bCheckSchedules = config->readBoolEntry("CheckSchedules", true); } -void KMyMoney2App::resizeEvent(QResizeEvent* ev) +void KMyMoney2App::resizeEvent(TQResizeEvent* ev) { KMainWindow::resizeEvent(ev); updateCaption(true); @@ -632,7 +632,7 @@ bool KMyMoney2App::queryExit(void) } ///////////////////////////////////////////////////////////////////// -// SLOT IMPLEMENTATION +// TQT_SLOT IMPLEMENTATION ///////////////////////////////////////////////////////////////////// void KMyMoney2App::slotFileInfoDialog(void) { @@ -645,7 +645,7 @@ void KMyMoney2App::slotPerformanceTest(void) // dump performance report to stderr int measurement[2]; - QTime timer; + TQTime timer; MyMoneyAccount acc; qDebug("--- Starting performance tests ---"); @@ -655,7 +655,7 @@ void KMyMoney2App::slotPerformanceTest(void) measurement[0] = measurement[1] = 0; timer.start(); for(int i = 0; i < 1000; ++i) { - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; MyMoneyFile::instance()->accountList(list); measurement[i != 0] = timer.elapsed(); } @@ -722,8 +722,8 @@ void KMyMoney2App::slotPerformanceTest(void) measurement[0] = measurement[1] = 0; if(MyMoneyFile::instance()->asset().accountCount()) { MyMoneyTransactionFilter filter(MyMoneyFile::instance()->asset().accountList()[0]); - filter.setDateFilter(QDate(), QDate::currentDate()); - QValueList<MyMoneyTransaction> list; + filter.setDateFilter(TQDate(), TQDate::tqcurrentDate()); + TQValueList<MyMoneyTransaction> list; timer.start(); for(int i = 0; i < 100; ++i) { @@ -741,8 +741,8 @@ void KMyMoney2App::slotPerformanceTest(void) measurement[0] = measurement[1] = 0; if(MyMoneyFile::instance()->asset().accountCount()) { MyMoneyTransactionFilter filter(MyMoneyFile::instance()->asset().accountList()[0]); - filter.setDateFilter(QDate(), QDate::currentDate()); - QValueList<MyMoneyTransaction> list; + filter.setDateFilter(TQDate(), TQDate::tqcurrentDate()); + TQValueList<MyMoneyTransaction> list; timer.start(); for(int i = 0; i < 100; ++i) { @@ -778,7 +778,7 @@ void KMyMoney2App::slotFileNew(void) NewUserWizard::Wizard *wizard = new NewUserWizard::Wizard(); - if(wizard->exec() == QDialog::Accepted) { + if(wizard->exec() == TQDialog::Accepted) { MyMoneyFile* file = MyMoneyFile::instance(); ft.restart(); try { @@ -808,8 +808,8 @@ void KMyMoney2App::slotFileNew(void) } // import the account templates - QValueList<MyMoneyTemplate> templates = wizard->templates(); - QValueList<MyMoneyTemplate>::iterator it_t; + TQValueList<MyMoneyTemplate> templates = wizard->templates(); + TQValueList<MyMoneyTemplate>::iterator it_t; for(it_t = templates.begin(); it_t != templates.end(); ++it_t) { (*it_t).importTemplate(&progressCallback); } @@ -849,18 +849,18 @@ void KMyMoney2App::slotFileNew(void) } } -KURL KMyMoney2App::selectFile(const QString& title, const QString& _path, const QString& mask, KFile::Mode mode) +KURL KMyMoney2App::selectFile(const TQString& title, const TQString& _path, const TQString& tqmask, KFile::Mode mode) { KURL url; - QString path(_path); + TQString path(_path); if(path.isEmpty()) path = KGlobalSettings::documentPath(); - KFileDialog* dialog = new KFileDialog(path, mask, this, title, true); + KFileDialog* dialog = new KFileDialog(path, tqmask, this, title, true); dialog->setMode(mode); - if(dialog->exec() == QDialog::Accepted) { + if(dialog->exec() == TQDialog::Accepted) { url = dialog->selectedURL(); } delete dialog; @@ -874,11 +874,11 @@ void KMyMoney2App::slotFileOpen(void) KMSTATUS(i18n("Open a file.")); KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(), - i18n("%1|KMyMoney files\n%2|All files (*.*)").arg("*.kmy *.xml").arg("*"), + i18n("%1|KMyMoney files\n%2|All files (*.*)").tqarg("*.kmy *.xml").tqarg("*"), this, i18n("Open File..."), true); dialog->setMode(KFile::File | KFile::ExistingOnly); - if(dialog->exec() == QDialog::Accepted) { + if(dialog->exec() == TQDialog::Accepted) { slotFileOpenRecent(dialog->selectedURL()); } delete dialog; @@ -890,7 +890,7 @@ void KMyMoney2App::slotOpenDatabase(void) KSelectDatabaseDlg dialog; dialog.setMode(IO_ReadWrite); - if(dialog.exec() == QDialog::Accepted) { + if(dialog.exec() == TQDialog::Accepted) { slotFileOpenRecent(dialog.selectedURL()); } } @@ -900,7 +900,7 @@ bool KMyMoney2App::isImportableFile( const KURL& url ) bool result = false; // Iterate through the plugins and see if there's a loaded plugin who can handle it - QMap<QString,KMyMoneyPlugin::ImporterPlugin*>::const_iterator it_plugin = m_importerPlugins.begin(); + TQMap<TQString,KMyMoneyPlugin::ImporterPlugin*>::const_iterator it_plugin = m_importerPlugins.begin(); while ( it_plugin != m_importerPlugins.end() ) { if ( (*it_plugin)->isMyFormat(url.path()) ) @@ -918,7 +918,7 @@ bool KMyMoney2App::isImportableFile( const KURL& url ) if ( MyMoneyStatement::isStatementFile( url.path() ) ) result = true; - // Place code here to test for QIF and other locally-supported formats + // Place code here to test for TQIF and other locally-supported formats // (i.e. not a plugin). If you add them here, be sure to add it to // the webConnect function. @@ -931,13 +931,13 @@ void KMyMoney2App::slotFileOpenRecent(const KURL& url) KURL lastFile = m_fileName; // check if there are other instances which might have this file open - QValueList<QCString> list = instanceList(); - QValueList<QCString>::ConstIterator it; + TQValueList<TQCString> list = instanceList(); + TQValueList<TQCString>::ConstIterator it; bool duplicate = false; for(it = list.begin(); duplicate == false && it != list.end(); ++it) { KMyMoney2App_stub* remoteApp = new KMyMoney2App_stub(kapp->dcopClient(), (*it), "kmymoney2app"); - QString remoteFile = remoteApp->filename(); + TQString remoteFile = remoteApp->filename(); if(!remoteApp->ok()) { qDebug("DCOP error while calling app->filename()"); } else { @@ -961,7 +961,7 @@ void KMyMoney2App::slotFileOpenRecent(const KURL& url) KSelectDatabaseDlg dialog(dburl); dialog.setMode(IO_ReadWrite); - if(dialog.exec() == QDialog::Accepted) dburl = dialog.selectedURL(); + if(dialog.exec() == TQDialog::Accepted) dburl = dialog.selectedURL(); } slotFileClose(); if(!myMoneyView->fileOpen()) { @@ -988,10 +988,10 @@ void KMyMoney2App::slotFileOpenRecent(const KURL& url) } } else { slotFileClose(); - KMessageBox::sorry(this, QString("<p>")+i18n("<b>%1</b> is either an invalid filename or the file does not exist. You can open another file or create a new one.").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("File not found")); + KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> is either an invalid filename or the file does not exist. You can open another file or create a new one.").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("File not found")); } } else { - KMessageBox::sorry(this, QString("<p>")+i18n("File <b>%1</b> is already opened in another instance of KMyMoney").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Duplicate open")); + KMessageBox::sorry(this, TQString("<p>")+i18n("File <b>%1</b> is already opened in another instance of KMyMoney").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Duplicate open")); } } @@ -1021,7 +1021,7 @@ bool KMyMoney2App::slotFileSave(void) return rc; } -void KMyMoney2App::slotFileSaveAsFilterChanged(const QString& filter) +void KMyMoney2App::slotFileSaveAsFilterChanged(const TQString& filter) { if(m_saveEncrypted) { if(filter != "*.kmy") { @@ -1037,9 +1037,9 @@ void KMyMoney2App::slotManageGpgKeys(void) { KGpgKeySelectionDlg dlg(this); dlg.setKeys(m_additionalGpgKeys); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { m_additionalGpgKeys = dlg.keys(); - m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").arg(m_additionalGpgKeys.count())); + m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").tqarg(m_additionalGpgKeys.count())); } } @@ -1051,7 +1051,7 @@ void KMyMoney2App::slotKeySelected(int idx) } m_additionalKeyLabel->setEnabled(idx != 0); m_additionalKeyButton->setEnabled(idx != 0); - m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").arg(cnt)); + m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").tqarg(cnt)); } bool KMyMoney2App::slotFileSaveAs(void) @@ -1061,40 +1061,40 @@ bool KMyMoney2App::slotFileSaveAs(void) if (myMoneyView->isDatabase()) dynamic_cast<IMyMoneySerialize*> (MyMoneyFile::instance()->storage())->fillStorage(); KMSTATUS(i18n("Saving file with a new filename...")); - QString prevDir= ""; // don't prompt file name if not a native file + TQString prevDir= ""; // don't prompt file name if not a native file if (myMoneyView->isNativeFile()) prevDir = readLastUsedDir(); // fill the additional key list with the default m_additionalGpgKeys = KMyMoneyGlobalSettings::gpgRecipientList(); - QVBox* vbox = new QVBox(); + TQVBox* vbox = new TQVBox(); if(KGPGFile::GPGAvailable()) { - QHBox* keyBox = new QHBox(vbox); - new QLabel(i18n("Encryption key to be used"), keyBox); + TQHBox* keyBox = new TQHBox(vbox); + new TQLabel(i18n("Encryption key to be used"), keyBox); m_saveEncrypted = new KComboBox(keyBox); - QHBox* labelBox = new QHBox(vbox); - m_additionalKeyLabel = new QLabel(i18n("Additional encryption key(s) to be used: %1").arg(m_additionalGpgKeys.count()), labelBox); + TQHBox* labelBox = new TQHBox(vbox); + m_additionalKeyLabel = new TQLabel(i18n("Additional encryption key(s) to be used: %1").tqarg(m_additionalGpgKeys.count()), labelBox); m_additionalKeyButton = new KPushButton(i18n("Manage additional keys"), labelBox); - connect(m_additionalKeyButton, SIGNAL(clicked()), this, SLOT(slotManageGpgKeys())); - connect(m_saveEncrypted, SIGNAL(activated(int)), this, SLOT(slotKeySelected(int))); + connect(m_additionalKeyButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotManageGpgKeys())); + connect(m_saveEncrypted, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotKeySelected(int))); // fill the secret key list and combo box - QStringList keyList; + TQStringList keyList; KGPGFile::secretKeyList(keyList); m_saveEncrypted->insertItem(i18n("No encryption")); - for(QStringList::iterator it = keyList.begin(); it != keyList.end(); ++it) { - QStringList fields = QStringList::split(":", *it); + for(TQStringList::iterator it = keyList.begin(); it != keyList.end(); ++it) { + TQStringList fields = TQStringList::split(":", *it); if(fields[0] != RECOVER_KEY_ID) { - // replace parenthesis in name field with brackets - QString name = fields[1]; - name.replace('(', "["); - name.replace(')', "]"); - name = QString("%1 (0x%2)").arg(name).arg(fields[0]); + // replace tqparenthesis in name field with brackets + TQString name = fields[1]; + name.tqreplace('(', "["); + name.tqreplace(')', "]"); + name = TQString("%1 (0x%2)").tqarg(name).tqarg(fields[0]); m_saveEncrypted->insertItem(name); - if(name.contains(KMyMoneyGlobalSettings::gpgRecipient())) { + if(name.tqcontains(KMyMoneyGlobalSettings::gpgRecipient())) { m_saveEncrypted->setCurrentItem(name); } } @@ -1105,13 +1105,13 @@ bool KMyMoney2App::slotFileSaveAs(void) // adjust to our local needs (filetypes etc.) and // enhanced to show the m_saveEncrypted combo box bool specialDir = prevDir.at(0) == ':'; - KFileDialog dlg( specialDir ? prevDir : QString::null, - QString("%1|%2\n").arg("*.kmy").arg(i18n("KMyMoney (Filefilter)", "KMyMoney files")) + - QString("%1|%2\n").arg("*.xml").arg(i18n("XML (Filefilter)", "XML files")) + - QString("%1|%2\n").arg("*.anon.xml").arg(i18n("Anonymous (Filefilter)", "Anonymous files")) + - QString("%1|%2\n").arg("*").arg(i18n("All files")), + KFileDialog dlg( specialDir ? prevDir : TQString(), + TQString("%1|%2\n").tqarg("*.kmy").tqarg(i18n("KMyMoney (Filefilter)", "KMyMoney files")) + + TQString("%1|%2\n").tqarg("*.xml").tqarg(i18n("XML (Filefilter)", "XML files")) + + TQString("%1|%2\n").tqarg("*.anon.xml").tqarg(i18n("Anonymous (Filefilter)", "Anonymous files")) + + TQString("%1|%2\n").tqarg("*").tqarg(i18n("All files")), this, "filedialog", true, vbox); - connect(&dlg, SIGNAL(filterChanged(const QString&)), this, SLOT(slotFileSaveAsFilterChanged(const QString&))); + connect(&dlg, TQT_SIGNAL(filterChanged(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAsFilterChanged(const TQString&))); if ( !specialDir ) dlg.setSelection( prevDir ); // may also be a filename @@ -1119,22 +1119,22 @@ bool KMyMoney2App::slotFileSaveAs(void) dlg.setOperationMode( KFileDialog::Saving ); dlg.setCaption(i18n("Save As")); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { KURL newURL = dlg.selectedURL(); if (!newURL.isEmpty()) { - QString newName = newURL.prettyURL(0, KURL::StripFileProtocol); + TQString newName = newURL.prettyURL(0, KURL::StripFileProtocol); // end of copy // find last . delimiter - int nLoc = newName.findRev('.'); + int nLoc = newName.tqfindRev('.'); if(nLoc != -1) { - QString strExt, strTemp; + TQString strExt, strTemp; strTemp = newName.left(nLoc + 1); strExt = newName.right(newName.length() - (nLoc + 1)); - if((strExt.find("kmy", 0, FALSE) == -1) && (strExt.find("xml", 0, FALSE) == -1)) + if((strExt.tqfind("kmy", 0, FALSE) == -1) && (strExt.tqfind("xml", 0, FALSE) == -1)) { strTemp.append("kmy"); @@ -1163,9 +1163,9 @@ bool KMyMoney2App::slotFileSaveAs(void) { m_fileName = newName; - QString encryptionKeys; + TQString encryptionKeys; if(m_saveEncrypted && m_saveEncrypted->currentItem() != 0) { - QRegExp keyExp(".* \\((.*)\\)"); + TQRegExp keyExp(".* \\((.*)\\)"); if(keyExp.search(m_saveEncrypted->currentText()) != -1) { encryptionKeys = keyExp.cap(1); } @@ -1203,7 +1203,7 @@ bool KMyMoney2App::slotSaveAsDatabase(void) KURL oldUrl = m_fileName.isEmpty() ? lastOpenedURL() : m_fileName; KURL url = oldUrl; - while (oldUrl == url && dialog.exec() == QDialog::Accepted) { + while (oldUrl == url && dialog.exec() == TQDialog::Accepted) { url = dialog.selectedURL(); // If the protocol is SQL for the old and new, and the hostname and database names match // Let the user know that the current database cannot be saved on top of itself. @@ -1265,8 +1265,8 @@ void KMyMoney2App::slotFileClose(void) slotSelectInvestment(); slotSelectSchedule(); slotSelectCurrency(); - slotSelectBudget(QValueList<MyMoneyBudget>()); - slotSelectPayees(QValueList<MyMoneyPayee>()); + slotSelectBudget(TQValueList<MyMoneyBudget>()); + slotSelectPayees(TQValueList<MyMoneyPayee>()); slotSelectTransactions(KMyMoneyRegister::SelectedTransactions()); m_reconciliationAccount = MyMoneyAccount(); @@ -1278,7 +1278,7 @@ void KMyMoney2App::slotFileClose(void) // just create a new balance warning object delete d->m_balanceWarning; - d->m_balanceWarning = new KBalanceWarning(this); + d->m_balanceWarning = new KBalanceWarning(TQT_TQOBJECT(this)); emit fileLoaded(m_fileName); } @@ -1335,11 +1335,11 @@ void KMyMoney2App::slotToggleTimers(void) timersOn = toggleAction("debug_timers")->isChecked(); } -const QString KMyMoney2App::slotStatusMsg(const QString &text) +const TQString KMyMoney2App::slotStatusMsg(const TQString &text) { /////////////////////////////////////////////////////////////////// // change status message permanently - QString msg = m_statusMsg; + TQString msg = m_statusMsg; m_statusMsg = text; if(m_statusMsg.isEmpty()) @@ -1351,7 +1351,7 @@ const QString KMyMoney2App::slotStatusMsg(const QString &text) void KMyMoney2App::ready(void) { - slotStatusMsg(QString()); + slotStatusMsg(TQString()); } bool KMyMoney2App::isReady(void) @@ -1384,13 +1384,13 @@ void KMyMoney2App::slotStatusProgressBar(int current, int total) } else { // update if(current > m_nextUpdate) { progressBar->setProgress(current); - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 10); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 10); m_nextUpdate += m_progressUpdate; } } } -void KMyMoney2App::progressCallback(int current, int total, const QString& msg) +void KMyMoney2App::progressCallback(int current, int total, const TQString& msg) { if(!msg.isEmpty()) kmymoney2->slotStatusMsg(msg); @@ -1414,7 +1414,7 @@ void KMyMoney2App::slotFileViewPersonal(void) user.city(), user.state(), user.postcode(), user.telephone(), user.email(), this, "NewFileDlg", i18n("Edit Personal Data")); - if (newFileDlg.exec() == QDialog::Accepted) + if (newFileDlg.exec() == TQDialog::Accepted) { user.setName(newFileDlg.userNameText); user.setAddress(newFileDlg.userStreetText); @@ -1428,7 +1428,7 @@ void KMyMoney2App::slotFileViewPersonal(void) file->setUser(user); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to store user information: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to store user information: %1").tqarg(e->what())); delete e; } } @@ -1441,9 +1441,9 @@ void KMyMoney2App::slotFileFileInfo(void) return; } - QFile g( "kmymoney2.dump" ); + TQFile g( "kmymoney2.dump" ); g.open( IO_WriteOnly ); - QDataStream st(&g); + TQDataStream st(&g); MyMoneyStorageDump dumper; dumper.writeStream(st, dynamic_cast<IMyMoneySerialize*> (MyMoneyFile::instance()->storage())); g.close(); @@ -1455,18 +1455,18 @@ void KMyMoney2App::slotLoadAccountTemplates(void) int rc; KLoadTemplateDlg* dlg = new KLoadTemplateDlg(); - if((rc = dlg->exec()) == QDialog::Accepted) { + if((rc = dlg->exec()) == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { // import the account templates - QValueList<MyMoneyTemplate> templates = dlg->templates(); - QValueList<MyMoneyTemplate>::iterator it_t; + TQValueList<MyMoneyTemplate> templates = dlg->templates(); + TQValueList<MyMoneyTemplate>::iterator it_t; for(it_t = templates.begin(); it_t != templates.end(); ++it_t) { (*it_t).importTemplate(&progressCallback); } ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to import template(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to import template(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -1477,7 +1477,7 @@ void KMyMoney2App::slotSaveAccountTemplates(void) { KMSTATUS(i18n("Exporting account templates.")); - QString newName = KFileDialog::getSaveFileName(KGlobalSettings::documentPath(), + TQString newName = KFileDialog::getSaveFileName(KGlobalSettings::documentPath(), i18n("*.kmt|KMyMoney template files\n" "*.*|All files"), this, i18n("Save as...")); // @@ -1487,13 +1487,13 @@ void KMyMoney2App::slotSaveAccountTemplates(void) if(!newName.isEmpty()) { // find last . delimiter - int nLoc = newName.findRev('.'); + int nLoc = newName.tqfindRev('.'); if(nLoc != -1) { - QString strExt, strTemp; + TQString strExt, strTemp; strTemp = newName.left(nLoc + 1); strExt = newName.right(newName.length() - (nLoc + 1)); - if((strExt.find("kmt", 0, FALSE) == -1)) + if((strExt.tqfind("kmt", 0, FALSE) == -1)) { strTemp.append("kmt"); //append to make complete file name @@ -1527,7 +1527,7 @@ void KMyMoney2App::slotQifImport(void) // remove all kmm-statement-#.txt files d->unlinkStatementXML(); - connect(m_qifReader, SIGNAL(importFinished()), this, SLOT(slotQifImportFinished())); + connect(m_qifReader, TQT_SIGNAL(importFinished()), TQT_TQOBJECT(this), TQT_SLOT(slotQifImportFinished())); m_qifReader->setURL(dlg->filename()); @@ -1559,7 +1559,7 @@ void KMyMoney2App::slotQifImportFinished(void) KMessageBox::informationList(this, i18n("The statements have been processed with the following results:"), d->m_statementResults, i18n("Statement stats")); #if 0 - // fixme: re-enable the QIF import menu options + // fixme: re-enable the TQIF import menu options if(m_qifReader->finishImport()) { if(verifyImportedData(m_qifReader->account())) { // keep the new data set, destroy the backup copy @@ -1622,11 +1622,11 @@ void KMyMoney2App::slotGncImport(void) KMSTATUS(i18n("Importing a Gnucash file.")); KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(), - i18n("%1|Gnucash files\n%2|All files (*.*)").arg("*").arg("*"), + i18n("%1|Gnucash files\n%2|All files (*.*)").tqarg("*").tqarg("*"), this, i18n("Import Gnucash file..."), true); dialog->setMode(KFile::File | KFile::ExistingOnly); - if(dialog->exec() == QDialog::Accepted) { + if(dialog->exec() == TQDialog::Accepted) { // slotFileClose(); // if(myMoneyView->fileOpen()) // return; @@ -1665,26 +1665,26 @@ void KMyMoney2App::slotStatementImport(void) KMSTATUS(i18n("Importing an XML Statement.")); KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(), - i18n("%1|XML files\n%2|All files (*.*)").arg("*.xml").arg("*.*"), + i18n("%1|XML files\n%2|All files (*.*)").tqarg("*.xml").tqarg("*.*"), this, i18n("Import XML Statement..."), true); dialog->setMode(KFile::File | KFile::ExistingOnly); - if(dialog->exec() == QDialog::Accepted) + if(dialog->exec() == TQDialog::Accepted) { result = slotStatementImport(dialog->selectedURL().path()); -/* QFile f( dialog->selectedURL().path() ); +/* TQFile f( dialog->selectedURL().path() ); f.open( IO_ReadOnly ); - QString error = "Unable to parse file"; - QDomDocument* doc = new QDomDocument; + TQString error = "Unable to parse file"; + TQDomDocument* doc = new TQDomDocument; if(doc->setContent(&f, FALSE)) { if ( doc->doctype().name() == "KMYMONEY-STATEMENT" ) { - QDomElement rootElement = doc->documentElement(); + TQDomElement rootElement = doc->documentElement(); if(!rootElement.isNull()) { - QDomNode child = rootElement.firstChild(); + TQDomNode child = rootElement.firstChild(); if(!child.isNull() && child.isElement()) { MyMoneyStatement s; @@ -1702,7 +1702,7 @@ void KMyMoney2App::slotStatementImport(void) if ( !result ) { - QMessageBox::critical( this, i18n("Critical Error"), i18n("Unable to read file %1: %2").arg( dialog->selectedURL().path()).arg(error), QMessageBox::Ok, 0 ); + TQMessageBox::critical( this, i18n("Critical Error"), i18n("Unable to read file %1: %2").tqarg( dialog->selectedURL().path()).tqarg(error), TQMessageBox::Ok, 0 ); }*/ } @@ -1715,14 +1715,14 @@ void KMyMoney2App::slotStatementImport(void) } } -bool KMyMoney2App::slotStatementImport(const QString& url) +bool KMyMoney2App::slotStatementImport(const TQString& url) { bool result = false; MyMoneyStatement s; if ( MyMoneyStatement::readXMLFile( s, url ) ) result = slotStatementImport(s); else - KMessageBox::error(this, i18n("Error importing %1: This file is not a valid KMM statement file.").arg(url), i18n("Invalid Statement")); + KMessageBox::error(this, i18n("Error importing %1: This file is not a valid KMM statement file.").tqarg(url), i18n("Invalid Statement")); return result; } @@ -1732,7 +1732,7 @@ bool KMyMoney2App::slotStatementImport(const MyMoneyStatement& s) bool result = false; // keep a copy of the statement - MyMoneyStatement::writeXMLFile(s, QString("/home/thb/kmm-statement-%1.txt").arg(d->statementXMLindex++)); + MyMoneyStatement::writeXMLFile(s, TQString("/home/thb/kmm-statement-%1.txt").tqarg(d->statementXMLindex++)); // we use an object on the heap here, so that we can check the presence // of it during slotUpdateActions() by looking at the pointer. @@ -1743,7 +1743,7 @@ bool KMyMoney2App::slotStatementImport(const MyMoneyStatement& s) // disable all standard widgets during the import setEnabled(false); - QStringList messages; + TQStringList messages; result = m_smtReader->import(s, messages); bool transactionAdded = m_smtReader->anyTransactionAdded(); @@ -1776,7 +1776,7 @@ void KMyMoney2App::slotQifExport(void) if(dlg->exec()) { if(okToWriteFile(dlg->filename())) { MyMoneyQifWriter writer; - connect(&writer, SIGNAL(signalProgress(int, int)), this, SLOT(slotStatusProgressBar(int, int))); + connect(&writer, TQT_SIGNAL(signalProgress(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusProgressBar(int, int))); writer.write(dlg->filename(), dlg->profile(), dlg->accountId(), dlg->accountSelected(), dlg->categorySelected(), @@ -1792,7 +1792,7 @@ bool KMyMoney2App::okToWriteFile(const KURL& url) bool reallySaveFile = true; if(KIO::NetAccess::exists(url, true, this)) { - if(KMessageBox::warningYesNo(this, QString("<qt>")+i18n("The file <b>%1</b> already exists. Do you really want to override it?").arg(url.prettyURL(0, KURL::StripFileProtocol))+QString("</qt>"), i18n("File already exists")) != KMessageBox::Yes) + if(KMessageBox::warningYesNo(this, TQString("<qt>")+i18n("The file <b>%1</b> already exists. Do you really want to override it?").tqarg(url.prettyURL(0, KURL::StripFileProtocol))+TQString("</qt>"), i18n("File already exists")) != KMessageBox::Yes) reallySaveFile = false; } return reallySaveFile; @@ -1832,9 +1832,9 @@ void KMyMoney2App::slotSettings(void) dlg->addPage(forecastPage, i18n("Forecast"), "forcast"); dlg->addPage(pluginsPage, i18n("Plugins"), "connect_no"); - connect(dlg, SIGNAL(settingsChanged()), this, SLOT(slotUpdateConfiguration())); - connect(dlg, SIGNAL(okClicked()), pluginsPage, SLOT(slotSavePlugins())); - connect(dlg, SIGNAL(defaultClicked()), pluginsPage, SLOT(slotDefaultsPlugins())); + connect(dlg, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateConfiguration())); + connect(dlg, TQT_SIGNAL(okClicked()), pluginsPage, TQT_SLOT(slotSavePlugins())); + connect(dlg, TQT_SIGNAL(defaultClicked()), pluginsPage, TQT_SLOT(slotDefaultsPlugins())); dlg->show(); } @@ -1917,7 +1917,7 @@ void KMyMoney2App::slotFileBackup(void) if(!m_fileName.isLocalFile()) { KMessageBox::sorry(this, i18n("The current implementation of the backup functionality only supports local files as source files! Your current source file is '%1'.") - .arg(m_fileName.url()), + .tqarg(m_fileName.url()), i18n("Local files only")); return; @@ -1934,7 +1934,7 @@ void KMyMoney2App::slotFileBackup(void) m_mountpoint = backupDlg->txtMountPoint->text(); if (m_backupMount) { - progressCallback(0, 300, i18n("Mounting %1").arg(m_mountpoint)); + progressCallback(0, 300, i18n("Mounting %1").tqarg(m_mountpoint)); proc << "mount"; proc << m_mountpoint; proc.start(); @@ -1961,24 +1961,24 @@ void KMyMoney2App::slotProcessExited(void) if(proc.normalExit() && proc.exitStatus() == 0) { proc.clearArguments(); - QString today; + TQString today; today.sprintf("-%04d-%02d-%02d.kmy", - QDate::currentDate().year(), - QDate::currentDate().month(), - QDate::currentDate().day()); - QString backupfile = m_mountpoint + "/" + m_fileName.fileName(false); + TQDate::tqcurrentDate().year(), + TQDate::tqcurrentDate().month(), + TQDate::tqcurrentDate().day()); + TQString backupfile = m_mountpoint + "/" + m_fileName.fileName(false); KMyMoneyUtils::appendCorrectFileExt(backupfile, today); // check if file already exists and ask what to do m_backupResult = 0; - QFile f(backupfile); + TQFile f(backupfile); if (f.exists()) { int answer = KMessageBox::warningContinueCancel(this, i18n("Backup file for today exists on that device. Replace ?"), i18n("Backup"), i18n("&Replace")); if (answer == KMessageBox::Cancel) { m_backupResult = 1; if (m_backupMount) { - progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint)); + progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint)); proc.clearArguments(); proc << "umount"; proc << m_mountpoint; @@ -1986,14 +1986,14 @@ void KMyMoney2App::slotProcessExited(void) proc.start(); } else { m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); } } } if(m_backupResult == 0) { - progressCallback(50, 0, i18n("Writing %1").arg(backupfile)); + progressCallback(50, 0, i18n("Writing %1").tqarg(backupfile)); proc << "cp" << "-f" << m_fileName.path(0) << backupfile; m_backupState = BACKUP_COPYING; proc.start(); @@ -2003,7 +2003,7 @@ void KMyMoney2App::slotProcessExited(void) KMessageBox::information(this, i18n("Error mounting device"), i18n("Backup")); m_backupResult = 1; if (m_backupMount) { - progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint)); + progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint)); proc.clearArguments(); proc << "umount"; proc << m_mountpoint; @@ -2012,7 +2012,7 @@ void KMyMoney2App::slotProcessExited(void) } else { m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); } } @@ -2022,7 +2022,7 @@ void KMyMoney2App::slotProcessExited(void) if(proc.normalExit() && proc.exitStatus() == 0) { if (m_backupMount) { - progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint)); + progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint)); proc.clearArguments(); proc << "umount"; proc << m_mountpoint; @@ -2032,7 +2032,7 @@ void KMyMoney2App::slotProcessExited(void) progressCallback(300, 0, i18n("Done")); KMessageBox::information(this, i18n("File successfully backed up"), i18n("Backup")); m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); } } else { @@ -2041,7 +2041,7 @@ void KMyMoney2App::slotProcessExited(void) KMessageBox::information(this, i18n("Error copying file to device"), i18n("Backup")); if (m_backupMount) { - progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint)); + progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint)); proc.clearArguments(); proc << "umount"; proc << m_mountpoint; @@ -2051,7 +2051,7 @@ void KMyMoney2App::slotProcessExited(void) } else { m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); } } @@ -2068,13 +2068,13 @@ void KMyMoney2App::slotProcessExited(void) KMessageBox::information(this, i18n("Error unmounting device"), i18n("Backup")); } m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); break; default: qWarning("Unknown state for backup operation!"); - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); break; } @@ -2104,7 +2104,7 @@ void KMyMoney2App::slotShowNextView(void) void KMyMoney2App::slotQifProfileEditor(void) { - MyMoneyQifProfileEditor* editor = new MyMoneyQifProfileEditor(true, this, "QIF Profile Editor"); + MyMoneyQifProfileEditor* editor = new MyMoneyQifProfileEditor(true, this, "TQIF Profile Editor"); editor->exec(); @@ -2115,7 +2115,7 @@ void KMyMoney2App::slotQifProfileEditor(void) void KMyMoney2App::slotToolsStartKCalc(void) { - QString cmd = KMyMoneyGlobalSettings::externalCalculator(); + TQString cmd = KMyMoneyGlobalSettings::externalCalculator(); // if none is present, we fall back to the default if(cmd.isEmpty()) cmd = "kcalc"; @@ -2126,9 +2126,9 @@ void KMyMoney2App::slotFindTransaction(void) { if(m_searchDlg == 0) { m_searchDlg = new KFindTransactionDlg(); - connect(m_searchDlg, SIGNAL(destroyed()), this, SLOT(slotCloseSearchDialog())); - connect(m_searchDlg, SIGNAL(transactionSelected(const QString&, const QString&)), - myMoneyView, SLOT(slotLedgerSelected(const QString&, const QString&))); + connect(m_searchDlg, TQT_SIGNAL(destroyed()), TQT_TQOBJECT(this), TQT_SLOT(slotCloseSearchDialog())); + connect(m_searchDlg, TQT_SIGNAL(transactionSelected(const TQString&, const TQString&)), + myMoneyView, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&))); } m_searchDlg->show(); m_searchDlg->raise(); @@ -2153,7 +2153,7 @@ void KMyMoney2App::createInstitution(MyMoneyInstitution& institution) ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Cannot add institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Cannot add institution: %1").tqarg(e->what())); delete e; } } @@ -2195,14 +2195,14 @@ void KMyMoney2App::slotInstitutionEdit(const MyMoneyObject& obj) slotSelectInstitution(file->institution(dlg.institution().id())); } catch(MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to store institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to store institution: %1").tqarg(e->what())); delete e; } } } catch(MyMoneyException *e) { if(!obj.id().isEmpty()) - KMessageBox::information(this, i18n("Unable to edit institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to edit institution: %1").tqarg(e->what())); delete e; } } @@ -2213,7 +2213,7 @@ void KMyMoney2App::slotInstitutionDelete(void) try { MyMoneyInstitution institution = file->institution(m_selectedInstitution.id()); - if ((KMessageBox::questionYesNo(this, QString("<p>")+i18n("Do you really want to delete institution <b>%1</b> ?").arg(institution.name()))) == KMessageBox::No) + if ((KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to delete institution <b>%1</b> ?").tqarg(institution.name()))) == KMessageBox::No) return; MyMoneyFileTransaction ft; @@ -2221,54 +2221,54 @@ void KMyMoney2App::slotInstitutionDelete(void) file->removeInstitution(institution); ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to delete institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to delete institution: %1").tqarg(e->what())); delete e; } } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to delete institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to delete institution: %1").tqarg(e->what())); delete e; } } -const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const MyMoneyAccount& parent) const +const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const MyMoneyAccount& tqparent) const { static MyMoneyAccount nullAccount; MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> parents; + TQValueList<MyMoneyAccount> tqparents; try { // search by id if(!acc.id().isEmpty()) { return file->account(acc.id()); } - // collect the parents. in case parent does not have an id, we scan the all top-level accounts - if(parent.id().isEmpty()) { - parents << file->asset(); - parents << file->liability(); - parents << file->income(); - parents << file->expense(); - parents << file->equity(); + // collect the tqparents. in case tqparent does not have an id, we scan the all top-level accounts + if(tqparent.id().isEmpty()) { + tqparents << file->asset(); + tqparents << file->liability(); + tqparents << file->income(); + tqparents << file->expense(); + tqparents << file->equity(); } else { - parents << parent; + tqparents << tqparent; } - QValueList<MyMoneyAccount>::const_iterator it_p; - for(it_p = parents.begin(); it_p != parents.end(); ++it_p) { - MyMoneyAccount parentAccount = *it_p; + TQValueList<MyMoneyAccount>::const_iterator it_p; + for(it_p = tqparents.begin(); it_p != tqparents.end(); ++it_p) { + MyMoneyAccount tqparentAccount = *it_p; // search by name (allow hierarchy) int pos; // check for ':' in the name and use it as separator for a hierarchy - QString name = acc.name(); - while((pos = name.find(MyMoneyFile::AccountSeperator)) != -1) { - QString part = name.left(pos); - QString remainder = name.mid(pos+1); - const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, part); + TQString name = acc.name(); + while((pos = name.tqfind(MyMoneyFile::AccountSeperator)) != -1) { + TQString part = name.left(pos); + TQString remainder = name.mid(pos+1); + const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, part); if(existingAccount.id().isEmpty()) { return existingAccount; } - parentAccount = existingAccount; + tqparentAccount = existingAccount; name = remainder; } - const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, name); + const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, name); if(!existingAccount.id().isEmpty()) { if(acc.accountType() != MyMoneyAccount::UnknownAccountType) { if(acc.accountType() != existingAccount.accountType()) @@ -2278,13 +2278,13 @@ const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const } } } catch (MyMoneyException *e) { - KMessageBox::error(0, i18n("Unable to find account: %1").arg(e->what())); + KMessageBox::error(0, i18n("Unable to find account: %1").tqarg(e->what())); delete e; } return nullAccount; } -void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& parentAccount, MyMoneyAccount& brokerageAccount, MyMoneyMoney openingBal) +void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& tqparentAccount, MyMoneyAccount& brokerageAccount, MyMoneyMoney openingBal) { MyMoneyFile* file = MyMoneyFile::instance(); @@ -2297,19 +2297,19 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par { int pos; // check for ':' in the name and use it as separator for a hierarchy - while((pos = newAccount.name().find(MyMoneyFile::AccountSeperator)) != -1) { - QString part = newAccount.name().left(pos); - QString remainder = newAccount.name().mid(pos+1); - const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, part); + while((pos = newAccount.name().tqfind(MyMoneyFile::AccountSeperator)) != -1) { + TQString part = newAccount.name().left(pos); + TQString remainder = newAccount.name().mid(pos+1); + const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, part); if(existingAccount.id().isEmpty()) { newAccount.setName(part); - file->addAccount(newAccount, parentAccount); - parentAccount = newAccount; + file->addAccount(newAccount, tqparentAccount); + tqparentAccount = newAccount; } else { - parentAccount = existingAccount; + tqparentAccount = existingAccount; } - newAccount.setParentAccountId(QString()); // make sure, there's no parent + newAccount.setParentAccountId(TQString()); // make sure, there's no tqparent newAccount.clearId(); // and no id set for adding newAccount.removeAccountIds(); // and no sub-account ids newAccount.setName(remainder); @@ -2319,14 +2319,14 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par // Check the opening balance if (openingBal.isPositive() && newAccount.accountGroup() == MyMoneyAccount::Liability) { - QString message = i18n("This account is a liability and if the " + TQString message = i18n("This account is a liability and if the " "opening balance represents money owed, then it should be negative. " "Negate the amount?\n\n" "Please click Yes to change the opening balance to %1,\n" "Please click No to leave the amount as %2,\n" "Please click Cancel to abort the account creation.") - .arg((-openingBal).formatMoney(newAccount, sec)) - .arg(openingBal.formatMoney(newAccount, sec)); + .tqarg((-openingBal).formatMoney(newAccount, sec)) + .tqarg(openingBal.formatMoney(newAccount, sec)); int ans = KMessageBox::questionYesNoCancel(this, message); if (ans == KMessageBox::Yes) { @@ -2336,7 +2336,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par return; } - file->addAccount(newAccount, parentAccount); + file->addAccount(newAccount, tqparentAccount); // in case of a loan account, we add the initial payment if((newAccount.accountType() == MyMoneyAccount::Loan @@ -2357,7 +2357,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par b.setShares(b.value()); a.setMemo(i18n("Loan payout")); b.setMemo(i18n("Loan payout")); - t.setPostDate(QDate::fromString(acc.value("kmm-loan-payment-date"), Qt::ISODate)); + t.setPostDate(TQDate::fromString(acc.value("kmm-loan-payment-date"), Qt::ISODate)); newAccount.deletePair("kmm-loan-payment-acc"); newAccount.deletePair("kmm-loan-payment-date"); MyMoneyFile::instance()->modifyAccount(newAccount); @@ -2371,7 +2371,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par // a brokerage account } else if(newAccount.accountType() == MyMoneyAccount::Investment && !brokerageAccount.name().isEmpty()) { - file->addAccount(brokerageAccount, parentAccount); + file->addAccount(brokerageAccount, tqparentAccount); // set a link from the investment account to the brokerage account file->modifyAccount(newAccount); @@ -2384,12 +2384,12 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to add account: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to add account: %1").tqarg(e->what())); delete e; } } -void KMyMoney2App::slotCategoryNew(const QString& name, QString& id) +void KMyMoney2App::slotCategoryNew(const TQString& name, TQString& id) { MyMoneyAccount account; account.setName(name); @@ -2399,49 +2399,49 @@ void KMyMoney2App::slotCategoryNew(const QString& name, QString& id) id = account.id(); } -void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& parent) +void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& tqparent) { if(KMessageBox::questionYesNo(this, - QString("<qt>%1</qt>").arg(i18n("The category <b>%1</b> currently does not exist. Do you want to create it?<p><i>The parent account will default to <b>%2</b> but can be changed in the following dialog</i>.").arg(account.name()).arg(parent.name())), i18n("Create category"), + TQString("<qt>%1</qt>").tqarg(i18n("The category <b>%1</b> currently does not exist. Do you want to create it?<p><i>The tqparent account will default to <b>%2</b> but can be changed in the following dialog</i>.").tqarg(account.name()).tqarg(tqparent.name())), i18n("Create category"), KStdGuiItem::yes(), KStdGuiItem::no(), "CreateNewCategories") == KMessageBox::Yes) { - createCategory(account, parent); + createCategory(account, tqparent); } else { // we should not keep the 'no' setting because that can confuse people like // I have seen in some usability tests. So we just delete it right away. KConfig *kconfig = KGlobal::config(); if(kconfig) { - kconfig->setGroup(QString::fromLatin1("Notification Messages")); - kconfig->deleteEntry(QString::fromLatin1("CreateNewCategories")); + kconfig->setGroup(TQString::tqfromLatin1("Notification Messages")); + kconfig->deleteEntry(TQString::tqfromLatin1("CreateNewCategories")); } } } void KMyMoney2App::slotCategoryNew(void) { - MyMoneyAccount parent; + MyMoneyAccount tqparent; MyMoneyAccount account; - // Preselect the parent account by looking at the current selected account/category + // Preselect the tqparent account by looking at the current selected account/category if(!m_selectedAccount.id().isEmpty() && m_selectedAccount.isIncomeExpense()) { MyMoneyFile* file = MyMoneyFile::instance(); try { - parent = file->account(m_selectedAccount.id()); + tqparent = file->account(m_selectedAccount.id()); } catch(MyMoneyException *e) { delete e; } } - createCategory(account, parent); + createCategory(account, tqparent); } -void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount& parent) +void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount& tqparent) { - if(!parent.id().isEmpty()) { + if(!tqparent.id().isEmpty()) { try { - // make sure parent account exists - MyMoneyFile::instance()->account(parent.id()); - account.setParentAccountId(parent.id()); - account.setAccountType( parent.accountType() ); + // make sure tqparent account exists + MyMoneyFile::instance()->account(tqparent.id()); + account.setParentAccountId(tqparent.id()); + account.setAccountType( tqparent.accountType() ); } catch(MyMoneyException *e) { delete e; } @@ -2449,19 +2449,19 @@ void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount& KNewAccountDlg dialog(account, false, true, 0, 0, i18n("Create a new Category")); - if(dialog.exec() == QDialog::Accepted) { - MyMoneyAccount parentAccount, brokerageAccount; + if(dialog.exec() == TQDialog::Accepted) { + MyMoneyAccount tqparentAccount, brokerageAccount; account = dialog.account(); - parentAccount = dialog.parentAccount(); + tqparentAccount = dialog.tqparentAccount(); - createAccount(account, parentAccount, brokerageAccount, MyMoneyMoney(0,1)); + createAccount(account, tqparentAccount, brokerageAccount, MyMoneyMoney(0,1)); } } void KMyMoney2App::slotAccountNew(void) { MyMoneyAccount acc; - acc.setOpeningDate(QDate::currentDate()); + acc.setOpeningDate(TQDate::tqcurrentDate()); slotAccountNew(acc); } @@ -2469,22 +2469,22 @@ void KMyMoney2App::slotAccountNew(void) void KMyMoney2App::slotAccountNew(MyMoneyAccount& account) { NewAccountWizard::Wizard* wizard = new NewAccountWizard::Wizard(); - connect(wizard, SIGNAL(createInstitution(MyMoneyInstitution&)), this, SLOT(slotInstitutionNew(MyMoneyInstitution&))); - connect(wizard, SIGNAL(createAccount(MyMoneyAccount&)), this, SLOT(slotAccountNew(MyMoneyAccount&))); - connect(wizard, SIGNAL(createPayee(const QString&, QString&)), this, SLOT(slotPayeeNew(const QString&, QString&))); - connect(wizard, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(wizard, TQT_SIGNAL(createInstitution(MyMoneyInstitution&)), TQT_TQOBJECT(this), TQT_SLOT(slotInstitutionNew(MyMoneyInstitution&))); + connect(wizard, TQT_SIGNAL(createAccount(MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotAccountNew(MyMoneyAccount&))); + connect(wizard, TQT_SIGNAL(createPayee(const TQString&, TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + connect(wizard, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); wizard->setAccount(account); - if(wizard->exec() == QDialog::Accepted) { + if(wizard->exec() == TQDialog::Accepted) { MyMoneyAccount acc = wizard->account(); if(!(acc == MyMoneyAccount())) { MyMoneyFileTransaction ft; MyMoneyFile* file = MyMoneyFile::instance(); try { // create the account - MyMoneyAccount parent = wizard->parentAccount(); - file->addAccount(acc, parent); + MyMoneyAccount tqparent = wizard->tqparentAccount(); + file->addAccount(acc, tqparent); // tell the wizard about the account id which it // needs to create a possible schedule and transactions @@ -2506,7 +2506,7 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account) // create a brokerage account if selected MyMoneyAccount brokerageAccount = wizard->brokerageAccount(); if(!(brokerageAccount == MyMoneyAccount())) { - file->addAccount(brokerageAccount, parent); + file->addAccount(brokerageAccount, tqparent); } // create a possible schedule @@ -2523,24 +2523,24 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account) ft.commit(); account = acc; } catch (MyMoneyException *e) { - KMessageBox::error(this, i18n("Unable to create account: %1").arg(e->what())); + KMessageBox::error(this, i18n("Unable to create account: %1").tqarg(e->what())); } } } delete wizard; } -void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccount& parent) +void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccount& tqparent) { - QString dontShowAgain = "CreateNewInvestments"; + TQString dontShowAgain = "CreateNewInvestments"; if(KMessageBox::questionYesNo(this, - QString("<qt>")+i18n("The security <b>%1</b> currently does not exist as sub-account of <b>%2</b>. " - "Do you want to create it?").arg(account.name()).arg(parent.name())+QString("</qt>"), i18n("Create security"), + TQString("<qt>")+i18n("The security <b>%1</b> currently does not exist as sub-account of <b>%2</b>. " + "Do you want to create it?").tqarg(account.name()).tqarg(tqparent.name())+TQString("</qt>"), i18n("Create security"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain) == KMessageBox::Yes) { KNewInvestmentWizard dlg; dlg.setName(account.name()); - if(dlg.exec() == QDialog::Accepted) { - dlg.createObjects(parent.id()); + if(dlg.exec() == TQDialog::Accepted) { + dlg.createObjects(tqparent.id()); account = dlg.account(); } } else { @@ -2554,7 +2554,7 @@ void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccou void KMyMoney2App::slotInvestmentNew(void) { KNewInvestmentWizard dlg; - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { dlg.createObjects(m_selectedAccount.id()); } } @@ -2562,21 +2562,21 @@ void KMyMoney2App::slotInvestmentNew(void) void KMyMoney2App::slotInvestmentEdit(void) { KNewInvestmentWizard dlg(m_selectedInvestment); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { dlg.createObjects(m_selectedAccount.id()); } } void KMyMoney2App::slotInvestmentDelete(void) { - if(KMessageBox::questionYesNo(this, QString("<p>")+i18n("Do you really want to delete the investment <b>%1</b>?").arg(m_selectedInvestment.name()), i18n("Delete investment"), KStdGuiItem::yes(), KStdGuiItem::no(), "DeleteInvestment") == KMessageBox::Yes) { + if(KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to delete the investment <b>%1</b>?").tqarg(m_selectedInvestment.name()), i18n("Delete investment"), KStdGuiItem::yes(), KStdGuiItem::no(), "DeleteInvestment") == KMessageBox::Yes) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyFileTransaction ft; try { file->removeAccount(m_selectedInvestment); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to delete investment: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to delete investment: %1").tqarg(e->what())); delete e; } } else { @@ -2584,8 +2584,8 @@ void KMyMoney2App::slotInvestmentDelete(void) // I have seen in some usability tests. So we just delete it right away. KConfig *kconfig = KGlobal::config(); if(kconfig) { - kconfig->setGroup(QString::fromLatin1("Notification Messages")); - kconfig->deleteEntry(QString::fromLatin1("DeleteInvestment")); + kconfig->setGroup(TQString::tqfromLatin1("Notification Messages")); + kconfig->deleteEntry(TQString::tqfromLatin1("DeleteInvestment")); } } } @@ -2594,7 +2594,7 @@ void KMyMoney2App::slotOnlinePriceUpdate(void) { if(!m_selectedInvestment.id().isEmpty()) { KEquityPriceUpdateDlg dlg(0, m_selectedInvestment.currencyId()); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) dlg.storePrices(); } } @@ -2641,7 +2641,7 @@ void KMyMoney2App::createSchedule(MyMoneySchedule newSchedule, MyMoneyAccount& n // to the account pool. Note: the schedule code used to leave // this always the first split, but the loan code leaves it as // the second one. So I thought, searching is a good alternative .... - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId().isEmpty()) { MyMoneySplit s = (*it_s); @@ -2678,11 +2678,11 @@ void KMyMoney2App::createSchedule(MyMoneySchedule newSchedule, MyMoneyAccount& n } } -bool KMyMoney2App::exchangeAccountInTransaction(MyMoneyTransaction& _t, const QString& fromId, const QString& toId) +bool KMyMoney2App::exchangeAccountInTransaction(MyMoneyTransaction& _t, const TQString& fromId, const TQString& toId) { bool rc = false; MyMoneyTransaction t(_t); - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId() == fromId) { (*it_s).setAccountId(toId); @@ -2740,7 +2740,7 @@ void KMyMoney2App::slotAccountDelete(void) needAskUser = false; KCategoryReassignDlg* dlg = new KCategoryReassignDlg(this); - QString categoryId = dlg->show(m_selectedAccount); + TQString categoryId = dlg->show(m_selectedAccount); delete dlg; // and kill the dialog if (categoryId.isEmpty()) return; // the user aborted the dialog, so let's abort as well @@ -2757,8 +2757,8 @@ void KMyMoney2App::slotAccountDelete(void) // get the list of all transactions that reference the old account MyMoneyTransactionFilter filter(m_selectedAccount.id()); filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> tlist; - QValueList<MyMoneyTransaction>::iterator it_t; + TQValueList<MyMoneyTransaction> tlist; + TQValueList<MyMoneyTransaction>::iterator it_t; file->transactionList(tlist, filter); slotStatusProgressBar(0, tlist.count()); @@ -2774,8 +2774,8 @@ void KMyMoney2App::slotAccountDelete(void) // now fix all schedules { KMSTATUS(i18n("Adjusting scheduled transactions...")); - QValueList<MyMoneySchedule> slist = file->scheduleList(m_selectedAccount.id()); - QValueList<MyMoneySchedule>::iterator it_s; + TQValueList<MyMoneySchedule> slist = file->scheduleList(m_selectedAccount.id()); + TQValueList<MyMoneySchedule>::iterator it_s; int cnt = 0; slotStatusProgressBar(0, slist.count()); @@ -2792,8 +2792,8 @@ void KMyMoney2App::slotAccountDelete(void) // now fix all budgets { KMSTATUS(i18n("Adjusting budgets...")); - QValueList<MyMoneyBudget> blist = file->budgetList(); - QValueList<MyMoneyBudget>::const_iterator it_b; + TQValueList<MyMoneyBudget> blist = file->budgetList(); + TQValueList<MyMoneyBudget>::const_iterator it_b; for(it_b = blist.begin(); it_b != blist.end(); ++it_b) { if((*it_b).hasReferenceTo(m_selectedAccount.id())) { MyMoneyBudget b = (*it_b); @@ -2809,7 +2809,7 @@ void KMyMoney2App::slotAccountDelete(void) slotStatusProgressBar(blist.count(), 0); } } catch(MyMoneyException *e) { - KMessageBox::error( this, i18n("Unable to exchange category <b>%1</b> with category <b>%2</b>. Reason: %3").arg(m_selectedAccount.name()).arg(newCategory.name()).arg(e->what())); + KMessageBox::error( this, i18n("Unable to exchange category <b>%1</b> with category <b>%2</b>. Reason: %3").tqarg(m_selectedAccount.name()).tqarg(newCategory.name()).tqarg(e->what())); delete e; exit = true; } @@ -2830,14 +2830,14 @@ void KMyMoney2App::slotAccountDelete(void) // case A - only a single, unused category without subcats selected if (m_selectedAccount.accountList().isEmpty()) { - if (!needAskUser || (KMessageBox::questionYesNo(this, QString("<qt>")+i18n("Do you really want to delete category <b>%1</b>?").arg(m_selectedAccount.name())+QString("</qt>")) == KMessageBox::Yes)) { + if (!needAskUser || (KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("Do you really want to delete category <b>%1</b>?").tqarg(m_selectedAccount.name())+TQString("</qt>")) == KMessageBox::Yes)) { try { file->removeAccount(m_selectedAccount); m_selectedAccount.clearId(); slotUpdateActions(); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error( this, QString("<qt>")+i18n("Unable to delete category <b>%1</b>. Cause: %2").arg(m_selectedAccount.name()).arg(e->what())+QString("</qt>")); + KMessageBox::error( this, TQString("<qt>")+i18n("Unable to delete category <b>%1</b>. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())+TQString("</qt>")); delete e; } } @@ -2845,14 +2845,14 @@ void KMyMoney2App::slotAccountDelete(void) } // case B - we have some subcategories, maybe the user does not want to // delete them all, but just the category itself? - MyMoneyAccount parentAccount = file->account(m_selectedAccount.parentAccountId()); + MyMoneyAccount tqparentAccount = file->account(m_selectedAccount.tqparentAccountId()); - QStringList accountsToReparent; - int result = KMessageBox::questionYesNoCancel(this, QString("<qt>")+ + TQStringList accountsToRetqparent; + int result = KMessageBox::questionYesNoCancel(this, TQString("<qt>")+ i18n("Do you want to delete category <b>%1</b> with all its sub-categories or only " "the category itself? If you only delete the category itself, all its sub-categories " - "will be made sub-categories of <b>%2</b>.").arg(m_selectedAccount.name()).arg(parentAccount.name())+QString("</qt>"), - QString::null, + "will be made sub-categories of <b>%2</b>.").tqarg(m_selectedAccount.name()).tqarg(tqparentAccount.name())+TQString("</qt>"), + TQString(), KGuiItem(i18n("Delete all")), KGuiItem(i18n("Just the category"))); if (result == KMessageBox::Cancel) @@ -2861,40 +2861,40 @@ void KMyMoney2App::slotAccountDelete(void) bool need_confirmation = false; // case C - User only wants to delete the category itself if (result == KMessageBox::No) - accountsToReparent = m_selectedAccount.accountList(); + accountsToRetqparent = m_selectedAccount.accountList(); else { // case D - User wants to delete all subcategories, now check all subcats of // m_selectedAccount and remember all that cannot be deleted and // must be "reparented" - for (QStringList::const_iterator it = m_selectedAccount.accountList().begin(); + for (TQStringList::const_iterator it = m_selectedAccount.accountList().begin(); it != m_selectedAccount.accountList().end(); ++it) { // reparent account if a transaction is assigned if (file->transactionCount(*it)!=0) - accountsToReparent.push_back(*it); + accountsToRetqparent.push_back(*it); else if (!file->account(*it).accountList().isEmpty()) { // or if we have at least one sub-account that is used for transactions if (!file->hasOnlyUnusedAccounts(file->account(*it).accountList())) { - accountsToReparent.push_back(*it); + accountsToRetqparent.push_back(*it); //kdDebug() << "subaccount not empty" << endl; } } } - if (!accountsToReparent.isEmpty()) + if (!accountsToRetqparent.isEmpty()) need_confirmation = true; } - if (!accountsToReparent.isEmpty() && need_confirmation) { - if (KMessageBox::questionYesNo(this, QString("<p>")+i18n("Some sub-categories of category <b>%1</b> cannot " - "be deleted, because they are still used. They will be made sub-categories of <b>%2</b>. Proceed?").arg(m_selectedAccount.name()).arg(parentAccount.name())) != KMessageBox::Yes) { + if (!accountsToRetqparent.isEmpty() && need_confirmation) { + if (KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Some sub-categories of category <b>%1</b> cannot " + "be deleted, because they are still used. They will be made sub-categories of <b>%2</b>. Proceed?").tqarg(m_selectedAccount.name()).tqarg(tqparentAccount.name())) != KMessageBox::Yes) { return; // user gets wet feet... } } // all good, now first reparent selected sub-categories try { - MyMoneyAccount parent = file->account(m_selectedAccount.parentAccountId()); - for (QStringList::const_iterator it = accountsToReparent.begin(); it != accountsToReparent.end(); ++it) { + MyMoneyAccount tqparent = file->account(m_selectedAccount.tqparentAccountId()); + for (TQStringList::const_iterator it = accountsToRetqparent.begin(); it != accountsToRetqparent.end(); ++it) { MyMoneyAccount child = file->account(*it); - file->reparentAccount(child, parent); + file->reparentAccount(child, tqparent); } // reload the account because the sub-account list might have changed m_selectedAccount = file->account(m_selectedAccount.id()); @@ -2904,7 +2904,7 @@ void KMyMoney2App::slotAccountDelete(void) // the old account list, which is no longer valid m_selectedAccount = file->account(m_selectedAccount.id()); } catch(MyMoneyException* e) { - KMessageBox::error( this, QString("<qt>")+i18n("Unable to delete a sub-category of category <b>%1</b>. Reason: %2").arg(m_selectedAccount.name()).arg(e->what())+QString("</qt>")); + KMessageBox::error( this, TQString("<qt>")+i18n("Unable to delete a sub-category of category <b>%1</b>. Reason: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())+TQString("</qt>")); delete e; return; } @@ -2915,8 +2915,8 @@ void KMyMoney2App::slotAccountDelete(void) if (!m_selectedAccount.accountList().isEmpty()) return; // can't delete accounts which still have subaccounts - if (KMessageBox::questionYesNo(this, QString("<p>")+i18n("Do you really want to " - "delete account <b>%1</b>?").arg(m_selectedAccount.name())) != KMessageBox::Yes) { + if (KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to " + "delete account <b>%1</b>?").tqarg(m_selectedAccount.name())) != KMessageBox::Yes) { return; // ok, you don't want to? why did you click then, hmm? } } // switch; @@ -2927,7 +2927,7 @@ void KMyMoney2App::slotAccountDelete(void) slotUpdateActions(); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error( this, i18n("Unable to delete account '%1'. Cause: %2").arg(m_selectedAccount.name()).arg(e->what())); + KMessageBox::error( this, i18n("Unable to delete account '%1'. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())); delete e; } } @@ -2939,20 +2939,20 @@ void KMyMoney2App::slotAccountEdit(void) if(!file->isStandardAccount(m_selectedAccount.id())) { if(m_selectedAccount.accountType() != MyMoneyAccount::Loan && m_selectedAccount.accountType() != MyMoneyAccount::AssetLoan) { - QString caption; + TQString caption; bool category = false; switch(MyMoneyAccount::accountGroup(m_selectedAccount.accountType())) { default: - caption = i18n("Edit account '%1'").arg(m_selectedAccount.name()); + caption = i18n("Edit account '%1'").tqarg(m_selectedAccount.name()); break; case MyMoneyAccount::Expense: case MyMoneyAccount::Income: - caption = i18n("Edit category '%1'").arg(m_selectedAccount.name()); + caption = i18n("Edit category '%1'").tqarg(m_selectedAccount.name()); category = true; break; } - QString tid = file->openingBalanceTransaction(m_selectedAccount); + TQString tid = file->openingBalanceTransaction(m_selectedAccount); MyMoneyTransaction t; MyMoneySplit s0, s1; KNewAccountDlg dlg(m_selectedAccount, true, category, 0, 0, caption); @@ -2971,34 +2971,34 @@ void KMyMoney2App::slotAccountEdit(void) } } catch(MyMoneyException *e) { kdDebug(2) << "Error retrieving opening balance transaction " << tid << ": " << e->what() << "\n"; - tid = QString(); + tid = TQString(); delete e; } } } // check for online modules - QMap<QString, KMyMoneyPlugin::OnlinePlugin *>::const_iterator it_plugin = m_onlinePlugins.end(); + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin *>::const_iterator it_plugin = m_onlinePlugins.end(); const MyMoneyKeyValueContainer& kvp = m_selectedAccount.onlineBankingSettings(); if(!kvp["provider"].isEmpty()) { // if we have an online provider for this account, we need to check // that we have the corresponding plugin. If that exists, we ask it // to provide an additional tab for the account editor. - it_plugin = m_onlinePlugins.find(kvp["provider"]); + it_plugin = m_onlinePlugins.tqfind(kvp["provider"]); if(it_plugin != m_onlinePlugins.end()) { - QString name; - QWidget *w = 0; + TQString name; + TQWidget *w = 0; w = (*it_plugin)->accountConfigTab(m_selectedAccount, name); dlg.addTab(w, name); } } - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { try { MyMoneyFileTransaction ft; MyMoneyAccount account = dlg.account(); - MyMoneyAccount parent = dlg.parentAccount(); + MyMoneyAccount tqparent = dlg.tqparentAccount(); if(it_plugin != m_onlinePlugins.end()) { account.setOnlineBankingSettings((*it_plugin)->onlineBankingSettings(account.onlineBankingSettings())); } @@ -3009,8 +3009,8 @@ void KMyMoney2App::slotAccountEdit(void) // we need to modify first, as reparent would override all other changes file->modifyAccount(account); - if(account.parentAccountId() != parent.id()) { - file->reparentAccount(account, parent); + if(account.tqparentAccountId() != tqparent.id()) { + file->reparentAccount(account, tqparent); } if(!tid.isEmpty() && dlg.openingBalance().isZero()) { file->removeTransaction(t); @@ -3034,15 +3034,15 @@ void KMyMoney2App::slotAccountEdit(void) slotSelectAccount(file->account(account.id())); } catch(MyMoneyException* e) { - KMessageBox::error( this, i18n("Unable to modify account '%1'. Cause: %2").arg(m_selectedAccount.name()).arg(e->what())); + KMessageBox::error( this, i18n("Unable to modify account '%1'. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())); delete e; } } } else { KEditLoanWizard* wizard = new KEditLoanWizard(m_selectedAccount); - connect(wizard, SIGNAL(newCategory(MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&))); - connect(wizard, SIGNAL(createPayee(const QString&, QString&)), this, SLOT(slotPayeeNew(const QString&, QString&))); - if(wizard->exec() == QDialog::Accepted) { + connect(wizard, TQT_SIGNAL(newCategory(MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew(MyMoneyAccount&))); + connect(wizard, TQT_SIGNAL(createPayee(const TQString&, TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + if(wizard->exec() == TQDialog::Accepted) { MyMoneySchedule sch = file->schedule(m_selectedAccount.value("schedule").latin1()); if(!(m_selectedAccount == wizard->account()) || !(sch == wizard->schedule())) { @@ -3089,21 +3089,21 @@ void KMyMoney2App::slotAccountReconcileStart(void) try { #if 0 // check if we have overdue schedules for this account - QValueList<MyMoneySchedule> schedules = file->scheduleList(m_selectedAccount.id(), MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, QDate(), QDate(), true); + TQValueList<MyMoneySchedule> schedules = file->scheduleList(m_selectedAccount.id(), MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, TQDate(), TQDate(), true); if(schedules.count() > 0) { if(KMessageBox::questionYesNo(this, i18n("KMyMoney has detected some overdue scheduled transactions for this account. Do you want to enter those scheduled transactions now?"), i18n("Scheduled transactions found")) == KMessageBox::Yes) { - QMap<QString, bool> skipMap; + TQMap<TQString, bool> skipMap; bool processedOne; KMyMoneyUtils::EnterScheduleResultCodeE rc = KMyMoneyUtils::Enter; do { processedOne = false; - QValueList<MyMoneySchedule>::const_iterator it_sch; + TQValueList<MyMoneySchedule>::const_iterator it_sch; for(it_sch = schedules.begin(); (rc != KMyMoneyUtils::Cancel) && (it_sch != schedules.end()); ++it_sch) { MyMoneySchedule sch(*(it_sch)); // and enter it if it is not on the skip list - if(skipMap.find((*it_sch).id()) == skipMap.end()) { + if(skipMap.tqfind((*it_sch).id()) == skipMap.end()) { rc = enterSchedule(sch, false, true); if(rc == KMyMoneyUtils::Ignore) { skipMap[(*it_sch).id()] = true; @@ -3112,7 +3112,7 @@ void KMyMoney2App::slotAccountReconcileStart(void) } // reload list (maybe this schedule needs to be added again) - schedules = file->scheduleList(m_selectedAccount.id(), MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, QDate(), QDate(), true); + schedules = file->scheduleList(m_selectedAccount.id(), MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, TQDate(), TQDate(), true); } while(processedOne); } } @@ -3124,10 +3124,10 @@ void KMyMoney2App::slotAccountReconcileStart(void) delete m_endingBalanceDlg; m_endingBalanceDlg = new KEndingBalanceDlg(account, this); if(account.isAssetLiability()) { - connect(m_endingBalanceDlg, SIGNAL(createPayee(const QString&, QString&)), this, SLOT(slotPayeeNew(const QString&, QString&))); - connect(m_endingBalanceDlg, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(m_endingBalanceDlg, TQT_SIGNAL(createPayee(const TQString&, TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + connect(m_endingBalanceDlg, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); - if(m_endingBalanceDlg->exec() == QDialog::Accepted) { + if(m_endingBalanceDlg->exec() == TQDialog::Accepted) { if(myMoneyView->startReconciliation(account, m_endingBalanceDlg->statementDate(), m_endingBalanceDlg->endingBalance())) { // check if the user requests us to create interest @@ -3167,11 +3167,11 @@ void KMyMoney2App::slotAccountReconcileFinish(void) if(!m_reconciliationAccount.id().isEmpty()) { // retrieve list of all transactions that are not reconciled or cleared - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > transactionList; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > transactionList; MyMoneyTransactionFilter filter(m_reconciliationAccount.id()); filter.addState(MyMoneyTransactionFilter::cleared); filter.addState(MyMoneyTransactionFilter::notReconciled); - filter.setDateFilter(QDate(), m_endingBalanceDlg->statementDate()); + filter.setDateFilter(TQDate(), m_endingBalanceDlg->statementDate()); filter.setConsiderCategory(false); filter.setReportAllSplits(true); file->transactionList(transactionList, filter); @@ -3181,7 +3181,7 @@ void KMyMoney2App::slotAccountReconcileFinish(void) actBalance = clearedBalance = balance; // walk the list of transactions to figure out the balance(s) - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; for(it = transactionList.begin(); it != transactionList.end(); ++it) { if((*it).second.reconcileFlag() == MyMoneySplit::NotReconciled) { clearedBalance -= (*it).second.shares(); @@ -3189,7 +3189,7 @@ void KMyMoney2App::slotAccountReconcileFinish(void) } if(m_endingBalanceDlg->endingBalance() != clearedBalance) { - QString message = i18n("You are about to finish the reconciliation of this account with a difference between your bank statement and the transactions marked as cleared.\n" + TQString message = i18n("You are about to finish the reconciliation of this account with a difference between your bank statement and the transactions marked as cleared.\n" "Are you sure you want to finish the reconciliation ?"); if (KMessageBox::questionYesNo(this, message, i18n("Confirm end of reconciliation"), KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::No) return; @@ -3225,7 +3225,7 @@ void KMyMoney2App::slotAccountReconcileFinish(void) */ // walk the list of transactions/splits and mark the cleared ones as reconciled - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::iterator it; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::iterator it; for(it = transactionList.begin(); it != transactionList.end(); ++it) { MyMoneySplit sp = (*it).second; @@ -3244,7 +3244,7 @@ void KMyMoney2App::slotAccountReconcileFinish(void) file->modifyTransaction(t); // ... and the list - (*it) = qMakePair(t, sp); + (*it) = tqMakePair(t, sp); } ft.commit(); @@ -3302,7 +3302,7 @@ void KMyMoney2App::slotAccountOpen(const MyMoneyObject& obj) return; MyMoneyFile* file = MyMoneyFile::instance(); - QString id = m_selectedAccount.id(); + TQString id = m_selectedAccount.id(); // if the caller passed a non-empty object, we need to select that if(!obj.id().isEmpty()) { @@ -3328,8 +3328,8 @@ bool KMyMoney2App::canCloseAccount(const MyMoneyAccount& acc) const if(!acc.balance().isZero()) return false; - // all children must be already closed - QStringList::const_iterator it_a; + // all tqchildren must be already closed + TQStringList::const_iterator it_a; for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) { MyMoneyAccount a = MyMoneyFile::instance()->account(*it_a); if(!a.isClosed()) { @@ -3338,8 +3338,8 @@ bool KMyMoney2App::canCloseAccount(const MyMoneyAccount& acc) const } // there must be no unfinished schedule referencing the account - QValueList<MyMoneySchedule> list = MyMoneyFile::instance()->scheduleList(); - QValueList<MyMoneySchedule>::const_iterator it_l; + TQValueList<MyMoneySchedule> list = MyMoneyFile::instance()->scheduleList(); + TQValueList<MyMoneySchedule>::const_iterator it_l; for(it_l = list.begin(); it_l != list.end(); ++it_l) { if((*it_l).isFinished()) continue; @@ -3365,7 +3365,7 @@ void KMyMoney2App::slotAccountClose(void) MyMoneyFile::instance()->modifyAccount(a); ft.commit(); if(KMyMoneyGlobalSettings::hideClosedAccounts()) { - KMessageBox::information(this, QString("<qt>")+i18n("You have closed this account. It remains in the system because you have transactions which still refer to it, but is not shown in the views. You can make it visible again by going to the View menu and selecting <b>Show all accounts</b> or by unselecting the <b>Don't show closed accounts</b> setting.")+QString("</qt>"), i18n("Information"), "CloseAccountInfo"); + KMessageBox::information(this, TQString("<qt>")+i18n("You have closed this account. It remains in the system because you have transactions which still refer to it, but is not shown in the views. You can make it visible again by going to the View menu and selecting <b>Show all accounts</b> or by unselecting the <b>Don't show closed accounts</b> setting.")+TQString("</qt>"), i18n("Information"), "CloseAccountInfo"); } } catch(MyMoneyException* e) { delete e; @@ -3388,7 +3388,7 @@ void KMyMoney2App::slotAccountReopen(void) while(a.isClosed()) { a.setClosed(false); file->modifyAccount(a); - a = file->account(a.parentAccountId()); + a = file->account(a.tqparentAccountId()); } ft.commit(); } catch(MyMoneyException* e) { @@ -3396,7 +3396,7 @@ void KMyMoney2App::slotAccountReopen(void) } } -void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoneyInstitution& _dst) +void KMyMoney2App::slotRetqparentAccount(const MyMoneyAccount& _src, const MyMoneyInstitution& _dst) { MyMoneyAccount src(_src); src.setInstitutionId(_dst.id()); @@ -3405,12 +3405,12 @@ void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoney MyMoneyFile::instance()->modifyAccount(src); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, QString("<p>")+i18n("<b>%1</b> cannot be moved to institution <b>%2</b>. Reason: %3").arg(src.name()).arg(_dst.name()).arg(e->what())); + KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> cannot be moved to institution <b>%2</b>. Reason: %3").tqarg(src.name()).tqarg(_dst.name()).tqarg(e->what())); delete e; } } -void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoneyAccount& _dst) +void KMyMoney2App::slotRetqparentAccount(const MyMoneyAccount& _src, const MyMoneyAccount& _dst) { MyMoneyAccount src(_src); MyMoneyAccount dst(_dst); @@ -3419,7 +3419,7 @@ void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoney MyMoneyFile::instance()->reparentAccount(src, dst); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, QString("<p>")+i18n("<b>%1</b> cannot be moved to <b>%2</b>. Reason: %3").arg(src.name()).arg(dst.name()).arg(e->what())); + KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> cannot be moved to <b>%2</b>. Reason: %3").tqarg(src.name()).tqarg(dst.name()).tqarg(e->what())); delete e; } } @@ -3431,10 +3431,10 @@ void KMyMoney2App::slotAccountTransactionReport(void) if(!m_selectedAccount.id().isEmpty()) { MyMoneyReport report( MyMoneyReport::eAccount, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, - i18n("%1 YTD Account Transactions").arg(m_selectedAccount.name()), + i18n("%1 YTD Account Transactions").tqarg(m_selectedAccount.name()), i18n("Generated Report") ); report.setGroup(i18n("Transactions")); @@ -3467,7 +3467,7 @@ void KMyMoney2App::slotScheduleNew(const MyMoneyTransaction& _t, MyMoneySchedule KEditScheduleDlg dlg(schedule, this); TransactionEditor* transactionEditor = dlg.startEdit(); if(transactionEditor) { - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { schedule = dlg.schedule(); @@ -3475,7 +3475,7 @@ void KMyMoney2App::slotScheduleNew(const MyMoneyTransaction& _t, MyMoneySchedule ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::error(this, i18n("Unable to add scheduled transaction: %1").arg(e->what()), i18n("Add scheduled transaction")); + KMessageBox::error(this, i18n("Unable to add scheduled transaction: %1").tqarg(e->what()), i18n("Add scheduled transaction")); delete e; } } @@ -3500,7 +3500,7 @@ void KMyMoney2App::slotScheduleEdit(void) sched_dlg = new KEditScheduleDlg(schedule, this); m_transactionEditor = sched_dlg->startEdit(); if(m_transactionEditor) { - if(sched_dlg->exec() == QDialog::Accepted) { + if(sched_dlg->exec() == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { MyMoneySchedule sched = sched_dlg->schedule(); @@ -3508,15 +3508,15 @@ void KMyMoney2App::slotScheduleEdit(void) // is at or before the lastPaymentDate // If it is, ask the user whether to clear the // lastPaymentDate - const QDate& next = sched.nextDueDate(); - const QDate& last = sched.lastPayment(); + const TQDate& next = sched.nextDueDate(); + const TQDate& last = sched.lastPayment(); if ( next.isValid() && last.isValid() && next <= last ) { // Entered a date effectively no later // than previous payment. Date would be // updated automatically so we probably // want to clear it. Let's ask the user. - if(KMessageBox::questionYesNo(this, QString("<qt>")+i18n("You have entered a scheduled transaction date of <b>%1</b>. Because the scheduled transaction was last paid on <b>%2</b>, KMyMoney will automatically adjust the scheduled transaction date to the next date unless the last payment date is reset. Do you want to reset the last payment date?").arg(KGlobal::locale()->formatDate(next, true)).arg(KGlobal::locale()->formatDate(last, true))+QString("</qt>"),i18n("Reset Last Payment Date" ), KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::Yes) { - sched.setLastPayment( QDate() ); + if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered a scheduled transaction date of <b>%1</b>. Because the scheduled transaction was last paid on <b>%2</b>, KMyMoney will automatically adjust the scheduled transaction date to the next date unless the last payment date is reset. Do you want to reset the last payment date?").tqarg(KGlobal::locale()->formatDate(next, true)).tqarg(KGlobal::locale()->formatDate(last, true))+TQString("</qt>"),i18n("Reset Last Payment Date" ), KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::Yes) { + sched.setLastPayment( TQDate() ); } } MyMoneyFile::instance()->modifySchedule(sched); @@ -3525,7 +3525,7 @@ void KMyMoney2App::slotScheduleEdit(void) deleteTransactionEditor(); ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3536,16 +3536,16 @@ void KMyMoney2App::slotScheduleEdit(void) case MyMoneySchedule::TYPE_LOANPAYMENT: loan_wiz = new KEditLoanWizard(schedule.account(2)); - connect(loan_wiz, SIGNAL(newCategory(MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&))); - connect(loan_wiz, SIGNAL(createPayee(const QString&, QString&)), this, SLOT(slotPayeeNew(const QString&, QString&))); - if (loan_wiz->exec() == QDialog::Accepted) { + connect(loan_wiz, TQT_SIGNAL(newCategory(MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew(MyMoneyAccount&))); + connect(loan_wiz, TQT_SIGNAL(createPayee(const TQString&, TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + if (loan_wiz->exec() == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { MyMoneyFile::instance()->modifySchedule(loan_wiz->schedule()); MyMoneyFile::instance()->modifyAccount(loan_wiz->account()); ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3557,7 +3557,7 @@ void KMyMoney2App::slotScheduleEdit(void) } } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3569,9 +3569,9 @@ void KMyMoney2App::slotScheduleDelete(void) MyMoneyFileTransaction ft; try { MyMoneySchedule sched = MyMoneyFile::instance()->schedule(m_selectedSchedule.id()); - QString msg = QString("<p>")+i18n("Are you sure you want to delete the scheduled transaction <b>%1</b>?").arg(m_selectedSchedule.name()); + TQString msg = TQString("<p>")+i18n("Are you sure you want to delete the scheduled transaction <b>%1</b>?").tqarg(m_selectedSchedule.name()); if(sched.type() == MyMoneySchedule::TYPE_LOANPAYMENT) { - msg += QString(" "); + msg += TQString(" "); msg += i18n("In case of loan payments it is currently not possible to recreate the scheduled transaction."); } if (KMessageBox::questionYesNo(this, msg) == KMessageBox::No) @@ -3581,7 +3581,7 @@ void KMyMoney2App::slotScheduleDelete(void) ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to remove scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to remove scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3594,8 +3594,8 @@ void KMyMoney2App::slotScheduleDuplicate(void) if(kmymoney2->action("schedule_duplicate")->isEnabled()) { MyMoneySchedule sch = m_selectedSchedule; sch.clearId(); - sch.setLastPayment(QDate()); - sch.setName(i18n("Copy of scheduled transaction name", "Copy of %1").arg(sch.name())); + sch.setLastPayment(TQDate()); + sch.setName(i18n("Copy of scheduled transaction name", "Copy of %1").tqarg(sch.name())); MyMoneyFileTransaction ft; try { @@ -3607,7 +3607,7 @@ void KMyMoney2App::slotScheduleDuplicate(void) myMoneyView->slotScheduleSelected(sch.id()); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -3620,8 +3620,8 @@ void KMyMoney2App::slotScheduleSkip(void) MyMoneySchedule schedule = MyMoneyFile::instance()->schedule(m_selectedSchedule.id()); if(!schedule.isFinished()) { if(schedule.occurence() != MyMoneySchedule::OCCUR_ONCE) { - QDate next = schedule.nextDueDate(); - if(!schedule.isFinished() && (KMessageBox::questionYesNo(this, QString("<qt>")+i18n("Do you really want to skip the <b>%1</b> transaction scheduled for <b>%2</b>?").arg(schedule.name(), KGlobal::locale()->formatDate(next, true))+QString("</qt>"))) == KMessageBox::Yes) { + TQDate next = schedule.nextDueDate(); + if(!schedule.isFinished() && (KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("Do you really want to skip the <b>%1</b> transaction scheduled for <b>%2</b>?").tqarg(schedule.name(), KGlobal::locale()->formatDate(next, true))+TQString("</qt>"))) == KMessageBox::Yes) { MyMoneyFileTransaction ft; schedule.setLastPayment(next); schedule.setNextDueDate(schedule.nextPayment(next)); @@ -3631,7 +3631,7 @@ void KMyMoney2App::slotScheduleSkip(void) } } } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, QString("<qt>")+i18n("Unable to skip scheduled transaction <b>%1</b>.").arg(m_selectedSchedule.name())+QString("</qt>"), e->what()); + KMessageBox::detailedSorry(this, TQString("<qt>")+i18n("Unable to skip scheduled transaction <b>%1</b>.").tqarg(m_selectedSchedule.name())+TQString("</qt>"), e->what()); delete e; } } @@ -3644,7 +3644,7 @@ void KMyMoney2App::slotScheduleEnter(void) MyMoneySchedule schedule = MyMoneyFile::instance()->schedule(m_selectedSchedule.id()); enterSchedule(schedule); } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unknown scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unknown scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3656,7 +3656,7 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched if (!schedule.id().isEmpty()) { try { schedule = MyMoneyFile::instance()->schedule(schedule.id()); - QDate origDueDate = schedule.nextDueDate(); + TQDate origDueDate = schedule.nextDueDate(); KEnterScheduleDlg dlg(this, schedule); dlg.showExtendedKeys(extendedKeys); @@ -3674,7 +3674,7 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched if(!autoEnter || !schedule.isFixed()) { for(;;) { rc = KMyMoneyUtils::Cancel; - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { rc = dlg.resultCode(); if(rc == KMyMoneyUtils::Enter) { m_transactionEditor->createTransaction(taccepted, torig, torig.splits()[0], true); @@ -3683,7 +3683,7 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched if(torig != taccepted) { KConfirmManualEnterDlg cdlg(schedule, this); cdlg.loadTransactions(torig, taccepted); - if(cdlg.exec() == QDialog::Accepted) { + if(cdlg.exec() == TQDialog::Accepted) { action = cdlg.action(); break; } @@ -3734,8 +3734,8 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched break; } - QString newId; - connect(m_transactionEditor, SIGNAL(balanceWarning(QWidget*, const MyMoneyAccount&, const QString&)), d->m_balanceWarning, SLOT(slotShowMessage(QWidget*, const MyMoneyAccount&, const QString&))); + TQString newId; + connect(m_transactionEditor, TQT_SIGNAL(balanceWarning(TQWidget*, const MyMoneyAccount&, const TQString&)), d->m_balanceWarning, TQT_SLOT(slotShowMessage(TQWidget*, const MyMoneyAccount&, const TQString&))); if(m_transactionEditor->enterTransactions(newId, false)) { if(!newId.isEmpty()) { MyMoneyTransaction t = MyMoneyFile::instance()->transaction(newId); @@ -3751,35 +3751,35 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched ft.commit(); } } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } deleteTransactionEditor(); } } } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } return rc; } -void KMyMoney2App::slotPayeeNew(const QString& newnameBase, QString& id) +void KMyMoney2App::slotPayeeNew(const TQString& newnameBase, TQString& id) { bool doit = true; if(newnameBase != i18n("New Payee")) { // Ask the user if that is what he intended to do? - QString msg = QString("<qt>") + i18n("Do you want to add <b>%1</b> as payer/receiver ?").arg(newnameBase) + QString("</qt>"); - const QString dontAskAgain = QString::fromLatin1("NewPayee"); + TQString msg = TQString("<qt>") + i18n("Do you want to add <b>%1</b> as payer/receiver ?").tqarg(newnameBase) + TQString("</qt>"); + const TQString dontAskAgain = TQString::tqfromLatin1("NewPayee"); if(KMessageBox::questionYesNo(this, msg, i18n("New payee/receiver"), KStdGuiItem::yes(), KStdGuiItem::no(), dontAskAgain) == KMessageBox::No) { doit = false; // we should not keep the 'no' setting because that can confuse people like // I have seen in some usability tests. So we just delete it right away. KConfig *kconfig = KGlobal::config(); if(kconfig) { - kconfig->setGroup(QString::fromLatin1("Notification Messages")); + kconfig->setGroup(TQString::tqfromLatin1("Notification Messages")); kconfig->deleteEntry(dontAskAgain); } } @@ -3788,13 +3788,13 @@ void KMyMoney2App::slotPayeeNew(const QString& newnameBase, QString& id) if(doit) { MyMoneyFileTransaction ft; try { - QString newname(newnameBase); + TQString newname(newnameBase); // adjust name until a unique name has been created int count = 0; for(;;) { try { MyMoneyFile::instance()->payeeByName(newname); - newname = QString("%1 [%2]").arg(newnameBase).arg(++count); + newname = TQString("%1 [%2]").tqarg(newnameBase).tqarg(++count); } catch(MyMoneyException* e) { delete e; break; @@ -3808,7 +3808,7 @@ void KMyMoney2App::slotPayeeNew(const QString& newnameBase, QString& id) ft.commit(); } catch (MyMoneyException *e) { KMessageBox::detailedSorry(this, i18n("Unable to add payee"), - QString("%1 thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + TQString("%1 thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -3816,7 +3816,7 @@ void KMyMoney2App::slotPayeeNew(const QString& newnameBase, QString& id) void KMyMoney2App::slotPayeeNew(void) { - QString id; + TQString id; slotPayeeNew(i18n("New Payee"), id); // the callbacks should have made sure, that the payees view has been @@ -3825,10 +3825,10 @@ void KMyMoney2App::slotPayeeNew(void) emit payeeCreated(id); } -bool KMyMoney2App::payeeInList(const QValueList<MyMoneyPayee>& list, const QString& id) const +bool KMyMoney2App::payeeInList(const TQValueList<MyMoneyPayee>& list, const TQString& id) const { bool rc = false; - QValueList<MyMoneyPayee>::const_iterator it_p = list.begin(); + TQValueList<MyMoneyPayee>::const_iterator it_p = list.begin(); while(it_p != list.end()) { if((*it_p).id() == id) { rc = true; @@ -3847,10 +3847,10 @@ void KMyMoney2App::slotPayeeDelete(void) MyMoneyFile * file = MyMoneyFile::instance(); // first create list with all non-selected payees - QValueList<MyMoneyPayee> remainingPayees = file->payeeList(); - QValueList<MyMoneyPayee>::iterator it_p; + TQValueList<MyMoneyPayee> remainingPayees = file->payeeList(); + TQValueList<MyMoneyPayee>::iterator it_p; for(it_p = remainingPayees.begin(); it_p != remainingPayees.end(); ) { - if(m_selectedPayees.find(*it_p) != m_selectedPayees.end()) { + if(m_selectedPayees.tqfind(*it_p) != m_selectedPayees.end()) { it_p = remainingPayees.erase(it_p); } else { ++it_p; @@ -3858,9 +3858,9 @@ void KMyMoney2App::slotPayeeDelete(void) } // get confirmation from user - QString prompt; + TQString prompt; if (m_selectedPayees.size() == 1) - prompt = QString("<p>")+i18n("Do you really want to remove the payee <b>%1</b>?").arg(m_selectedPayees.front().name()); + prompt = TQString("<p>")+i18n("Do you really want to remove the payee <b>%1</b>?").tqarg(m_selectedPayees.front().name()); else prompt = i18n("Do you really want to remove all selected payees?"); @@ -3871,22 +3871,22 @@ void KMyMoney2App::slotPayeeDelete(void) try { // create a transaction filter that contains all payees selected for removal MyMoneyTransactionFilter f = MyMoneyTransactionFilter(); - for (QValueList<MyMoneyPayee>::const_iterator it = m_selectedPayees.begin(); + for (TQValueList<MyMoneyPayee>::const_iterator it = m_selectedPayees.begin(); it != m_selectedPayees.end(); ++it) { f.addPayee( (*it).id() ); } // request a list of all transactions that still use the payees in question - QValueList<MyMoneyTransaction> translist = file->transactionList(f); + TQValueList<MyMoneyTransaction> translist = file->transactionList(f); // kdDebug() << "[KPayeesView::slotDeletePayee] " << translist.count() << " transaction still assigned to payees" << endl; // now get a list of all schedules that make use of one of the payees - QValueList<MyMoneySchedule> all_schedules = file->scheduleList(); - QValueList<MyMoneySchedule> used_schedules; - for (QValueList<MyMoneySchedule>::ConstIterator it = all_schedules.begin(); + TQValueList<MyMoneySchedule> all_schedules = file->scheduleList(); + TQValueList<MyMoneySchedule> used_schedules; + for (TQValueList<MyMoneySchedule>::ConstIterator it = all_schedules.begin(); it != all_schedules.end(); ++it) { // loop over all splits in the transaction of the schedule - for (QValueList<MyMoneySplit>::ConstIterator s_it = (*it).transaction().splits().begin(); + for (TQValueList<MyMoneySplit>::ConstIterator s_it = (*it).transaction().splits().begin(); s_it != (*it).transaction().splits().end(); ++s_it) { // is the payee in the split to be deleted? @@ -3912,7 +3912,7 @@ void KMyMoney2App::slotPayeeDelete(void) // show transaction reassignment dialog KPayeeReassignDlg * dlg = new KPayeeReassignDlg(this); - QString payee_id = dlg->show(remainingPayees); + TQString payee_id = dlg->show(remainingPayees); addToMatchList = dlg->addToMatchList(); delete dlg; // and kill the dialog if (payee_id.isEmpty()) @@ -3923,11 +3923,11 @@ void KMyMoney2App::slotPayeeDelete(void) // TODO : check if we have a report that explicitely uses one of our payees // and issue an appropriate warning try { - QValueList<MyMoneySplit>::iterator s_it; + TQValueList<MyMoneySplit>::iterator s_it; // now loop over all transactions and reassign payee - for (QValueList<MyMoneyTransaction>::iterator it = translist.begin(); it != translist.end(); ++it) { + for (TQValueList<MyMoneyTransaction>::iterator it = translist.begin(); it != translist.end(); ++it) { // create a copy of the splits list in the transaction - QValueList<MyMoneySplit> splits = (*it).splits(); + TQValueList<MyMoneySplit> splits = (*it).splits(); // loop over all splits for (s_it = splits.begin(); s_it != splits.end(); ++s_it) { // if the split is assigned to one of the selected payees, we need to modify it @@ -3941,13 +3941,13 @@ void KMyMoney2App::slotPayeeDelete(void) } // for - Transactions // now loop over all schedules and reassign payees - for (QValueList<MyMoneySchedule>::iterator it = used_schedules.begin(); + for (TQValueList<MyMoneySchedule>::iterator it = used_schedules.begin(); it != used_schedules.end(); ++it) { // create copy of transaction in current schedule MyMoneyTransaction trans = (*it).transaction(); // create copy of lists of splits - QValueList<MyMoneySplit> splits = trans.splits(); + TQValueList<MyMoneySplit> splits = trans.splits(); for (s_it = splits.begin(); s_it != splits.end(); ++s_it) { if(payeeInList(m_selectedPayees, (*s_it).payeeId())) { (*s_it).setPayeeId(payee_id); @@ -3960,18 +3960,18 @@ void KMyMoney2App::slotPayeeDelete(void) } // for - Schedules } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to reassign payee of transaction/split"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } // if !translist.isEmpty() bool ignorecase; - QStringList payeeNames; + TQStringList payeeNames; MyMoneyPayee::payeeMatchType matchType = newPayee.matchData(ignorecase, payeeNames); - QStringList deletedPayeeNames; + TQStringList deletedPayeeNames; // now loop over all selected payees and remove them - for (QValueList<MyMoneyPayee>::iterator it = m_selectedPayees.begin(); + for (TQValueList<MyMoneyPayee>::iterator it = m_selectedPayees.begin(); it != m_selectedPayees.end(); ++it) { if(addToMatchList) { deletedPayeeNames << (*it).name(); @@ -3989,20 +3989,20 @@ void KMyMoney2App::slotPayeeDelete(void) // TODO: it would be cool to somehow shrink the list to make better use // of regular expressions at this point. For now, we leave this task // to the user himeself. - QStringList::const_iterator it_n; + TQStringList::const_iterator it_n; for(it_n = deletedPayeeNames.begin(); it_n != deletedPayeeNames.end(); ++it_n) { if(matchType == MyMoneyPayee::matchKey) { // make sure we really need it and it is not caught by an existing regexp - QStringList::const_iterator it_k; + TQStringList::const_iterator it_k; for(it_k = payeeNames.begin(); it_k != payeeNames.end(); ++it_k) { - QRegExp exp(*it_k, ignorecase); + TQRegExp exp(*it_k, ignorecase); if(exp.search(*it_n) != -1) break; } if(it_k == payeeNames.end()) - payeeNames << QRegExp::escape(*it_n); - } else if(payeeNames.contains(*it_n) == 0) - payeeNames << QRegExp::escape(*it_n); + payeeNames << TQRegExp::escape(*it_n); + } else if(payeeNames.tqcontains(*it_n) == 0) + payeeNames << TQRegExp::escape(*it_n); } // and update the payee in the engine context @@ -4013,34 +4013,34 @@ void KMyMoney2App::slotPayeeDelete(void) ft.commit(); // If we just deleted the payees, they sure don't exist anymore - slotSelectPayees(QValueList<MyMoneyPayee>()); + slotSelectPayees(TQValueList<MyMoneyPayee>()); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to remove payee(s)"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } void KMyMoney2App::slotCurrencyNew(void) { - QString sid = KInputDialog::getText(i18n("New currency"), i18n("Enter ISO 4217 code for the new currency"), QString::null, 0, 0, 0, 0, ">AAA"); + TQString sid = KInputDialog::getText(i18n("New currency"), i18n("Enter ISO 4217 code for the new currency"), TQString(), 0, 0, 0, 0, ">AAA"); if(!sid.isEmpty()) { - QString id(sid); + TQString id(sid); MyMoneySecurity currency(id, i18n("New currency")); MyMoneyFileTransaction ft; try { MyMoneyFile::instance()->addCurrency(currency); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, i18n("Cannot create new currency. %1").arg(e->what()), i18n("New currency")); + KMessageBox::sorry(this, i18n("Cannot create new currency. %1").tqarg(e->what()), i18n("New currency")); delete e; } emit currencyCreated(id); } } -void KMyMoney2App::slotCurrencyRename(QListViewItem* item, int, const QString& txt) +void KMyMoney2App::slotCurrencyRename(TQListViewItem* item, int, const TQString& txt) { MyMoneyFile* file = MyMoneyFile::instance(); KMyMoneyListViewItem* p = static_cast<KMyMoneyListViewItem *>(item); @@ -4055,12 +4055,12 @@ void KMyMoney2App::slotCurrencyRename(QListViewItem* item, int, const QString& t m_selectedCurrency = currency; ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, i18n("Cannot rename currency. %1").arg(e->what()), i18n("Rename currency")); + KMessageBox::sorry(this, i18n("Cannot rename currency. %1").tqarg(e->what()), i18n("Rename currency")); delete e; } } } catch(MyMoneyException *e) { - KMessageBox::sorry(this, i18n("Cannot rename currency. %1").arg(e->what()), i18n("Rename currency")); + KMessageBox::sorry(this, i18n("Cannot rename currency. %1").tqarg(e->what()), i18n("Rename currency")); delete e; } } @@ -4073,7 +4073,7 @@ void KMyMoney2App::slotCurrencyDelete(void) MyMoneyFile::instance()->removeCurrency(m_selectedCurrency); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, i18n("Cannot delete currency %1. %2").arg(m_selectedCurrency.name()).arg(e->what()), i18n("Delete currency")); + KMessageBox::sorry(this, i18n("Cannot delete currency %1. %2").tqarg(m_selectedCurrency.name()).tqarg(e->what()), i18n("Delete currency")); delete e; } } @@ -4088,7 +4088,7 @@ void KMyMoney2App::slotCurrencySetBase(void) MyMoneyFile::instance()->setBaseCurrency(m_selectedCurrency); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").arg(m_selectedCurrency.name()).arg(e->what()), i18n("Set base currency")); + KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(m_selectedCurrency.name()).tqarg(e->what()), i18n("Set base currency")); delete e; } } @@ -4097,9 +4097,9 @@ void KMyMoney2App::slotCurrencySetBase(void) void KMyMoney2App::slotBudgetNew(void) { - QDate date = QDate::currentDate(Qt::LocalTime); + TQDate date = TQDate::tqcurrentDate(Qt::LocalTime); date.setYMD(date.year(), 1, 1); - QString newname = i18n("Budget %1").arg(QString::number(date.year())); + TQString newname = i18n("Budget %1").tqarg(TQString::number(date.year())); MyMoneyBudget budget; @@ -4109,7 +4109,7 @@ void KMyMoney2App::slotBudgetNew(void) // Exception thrown when the name is not found while (1) { MyMoneyFile::instance()->budgetByName(newname); - newname = i18n("Budget %1 (%2)").arg(QString::number(date.year()), QString::number(i++)); + newname = i18n("Budget %1 (%2)").tqarg(TQString::number(date.year()), TQString::number(i++)); } } catch(MyMoneyException *e) { // all ok, the name is unique @@ -4124,7 +4124,7 @@ void KMyMoney2App::slotBudgetNew(void) MyMoneyFile::instance()->addBudget(budget); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4137,9 +4137,9 @@ void KMyMoney2App::slotBudgetDelete(void) MyMoneyFile * file = MyMoneyFile::instance(); // get confirmation from user - QString prompt; + TQString prompt; if (m_selectedBudgets.size() == 1) - prompt = QString("<p>")+i18n("Do you really want to remove the budget <b>%1</b>?").arg(m_selectedBudgets.front().name()); + prompt = TQString("<p>")+i18n("Do you really want to remove the budget <b>%1</b>?").tqarg(m_selectedBudgets.front().name()); else prompt = i18n("Do you really want to remove all selected budgets?"); @@ -4149,14 +4149,14 @@ void KMyMoney2App::slotBudgetDelete(void) MyMoneyFileTransaction ft; try { // now loop over all selected budgets and remove them - for (QValueList<MyMoneyBudget>::iterator it = m_selectedBudgets.begin(); + for (TQValueList<MyMoneyBudget>::iterator it = m_selectedBudgets.begin(); it != m_selectedBudgets.end(); ++it) { file->removeBudget(*it); } ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to remove budget: %1, thrown in %2:%3"). arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to remove budget: %1, thrown in %2:%3"). tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4168,12 +4168,12 @@ void KMyMoney2App::slotBudgetCopy(void) try { MyMoneyBudget budget = m_selectedBudgets[0]; budget.clearId(); - budget.setName(i18n("Copy of %1").arg(budget.name())); + budget.setName(i18n("Copy of %1").tqarg(budget.name())); MyMoneyFile::instance()->addBudget(budget); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4182,12 +4182,12 @@ void KMyMoney2App::slotBudgetCopy(void) void KMyMoney2App::slotBudgetChangeYear(void) { if(m_selectedBudgets.size() == 1) { - QStringList years; + TQStringList years; int current = 0; bool haveCurrent = false; MyMoneyBudget budget = *(m_selectedBudgets.begin()); - for(int i = (QDate::currentDate().year()-3); i < (QDate::currentDate().year()+5); ++i) { - years << QString("%1").arg(i); + for(int i = (TQDate::tqcurrentDate().year()-3); i < (TQDate::tqcurrentDate().year()+5); ++i) { + years << TQString("%1").tqarg(i); if(i == budget.budgetStart().year()) { haveCurrent = true; } @@ -4198,11 +4198,11 @@ void KMyMoney2App::slotBudgetChangeYear(void) current = 0; bool ok = false; - QString yearString = KInputDialog::getItem(i18n("Select year"), i18n("Budget year"), years, current, false, &ok, this); + TQString yearString = KInputDialog::getItem(i18n("Select year"), i18n("Budget year"), years, current, false, &ok, this); if(ok) { int year = yearString.toInt(0, 0); - QDate newYear = QDate(year, 1, 1); + TQDate newYear = TQDate(year, 1, 1); if(newYear != budget.budgetStart()) { MyMoneyFileTransaction ft; try { @@ -4210,7 +4210,7 @@ void KMyMoney2App::slotBudgetChangeYear(void) MyMoneyFile::instance()->modifyBudget(budget); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3"). arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3"). tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4231,10 +4231,10 @@ void KMyMoney2App::slotBudgetForecast(void) } if(calcBudget) { - QDate historyStart; - QDate historyEnd; - QDate budgetStart; - QDate budgetEnd; + TQDate historyStart; + TQDate historyEnd; + TQDate budgetStart; + TQDate budgetEnd; budgetStart = budget.budgetStart(); budgetEnd = budgetStart.addYears(1).addDays(-1); @@ -4248,7 +4248,7 @@ void KMyMoney2App::slotBudgetForecast(void) ft.commit(); } } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4258,9 +4258,9 @@ void KMyMoney2App::slotKDELanguageSettings(void) { KMessageBox::information(this, i18n("Please be aware that changes made in the following dialog affect all KDE applications not only KMyMoney."), i18n("Warning"), "LanguageSettingsWarning"); - QStringList args; + TQStringList args; args << "language"; - QString error; + TQString error; int pid; KApplication::kdeinitExec("kcmshell", args, &error, &pid); @@ -4289,10 +4289,10 @@ void KMyMoney2App::slotNewFeature(void) } if(calcBudget) { - QDate historyStart; - QDate historyEnd; - QDate budgetStart; - QDate budgetEnd; + TQDate historyStart; + TQDate historyEnd; + TQDate budgetStart; + TQDate budgetEnd; budgetStart = budget.budgetStart(); budgetEnd = budgetStart.addYears(1).addDays(-1); @@ -4308,7 +4308,7 @@ void KMyMoney2App::slotNewFeature(void) ft.commit(); } } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4333,11 +4333,11 @@ void KMyMoney2App::slotTransactionsDelete(void) "DeleteReconciledTransaction") == KMessageBox::Cancel) return; } - QString msg; + TQString msg; if(m_selectedTransactions.count() == 1) { msg = i18n("Do you really want to delete the selected transaction?"); } else { - msg = i18n("Do you really want to delete all %1 selected transactions?").arg(m_selectedTransactions.count()); + msg = i18n("Do you really want to delete all %1 selected transactions?").tqarg(m_selectedTransactions.count()); } if(KMessageBox::questionYesNo(this, msg, i18n("Delete transaction")) == KMessageBox::Yes) { KMSTATUS(i18n("Deleting transactions")); @@ -4362,18 +4362,18 @@ void KMyMoney2App::slotTransactionDuplicate(void) try { for(it_t = list.begin(); it_t != list.end(); ++it_t) { MyMoneyTransaction t = (*it_t).transaction(); - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; // wipe out any reconciliation information for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { (*it_s).setReconcileFlag(MyMoneySplit::NotReconciled); - (*it_s).setReconcileDate(QDate()); - (*it_s).setBankID(QString()); + (*it_s).setReconcileDate(TQDate()); + (*it_s).setBankID(TQString()); } // clear invalid data - t.setEntryDate(QDate()); + t.setEntryDate(TQDate()); t.clearId(); // and set the post date to today - t.setPostDate(QDate::currentDate()); + t.setPostDate(TQDate::tqcurrentDate()); MyMoneyFile::instance()->addTransaction(t); lt = t; @@ -4386,7 +4386,7 @@ void KMyMoney2App::slotTransactionDuplicate(void) myMoneyView->slotLedgerSelected(m_selectedAccount.id(), lt.id()); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } // switch off the progress bar @@ -4412,7 +4412,7 @@ void KMyMoney2App::doDeleteTransactions(void) } ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to delete transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to delete transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } slotStatusProgressBar(-1, -1); @@ -4435,7 +4435,7 @@ void KMyMoney2App::slotTransactionsNew(void) // close the completion list payeeEdit->setCurrentText(d->m_lastPayeeEntered); payeeEdit->completion()->slotMakeCompletion(d->m_lastPayeeEntered); - QStringList payeeId; + TQStringList payeeId; payeeEdit->selector()->selectedItems(payeeId); if(payeeId.count() == 1) { payeeEdit->setSelectedItem(payeeId[0]); @@ -4444,10 +4444,10 @@ void KMyMoney2App::slotTransactionsNew(void) payeeEdit->completion()->hide(); } if(m_transactionEditor) { - connect(m_transactionEditor, SIGNAL(statusProgress(int, int)), this, SLOT(slotStatusProgressBar(int, int))); - connect(m_transactionEditor, SIGNAL(statusMsg(const QString&)), this, SLOT(slotStatusMsg(const QString&))); - connect(m_transactionEditor, SIGNAL(scheduleTransaction(const MyMoneyTransaction&, MyMoneySchedule::occurenceE)), this, SLOT(slotScheduleNew(const MyMoneyTransaction&, MyMoneySchedule::occurenceE))); - connect(m_transactionEditor, SIGNAL(transactionDataSufficient(bool)), this, SLOT(slotUpdateActions())); + connect(m_transactionEditor, TQT_SIGNAL(statusProgress(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusProgressBar(int, int))); + connect(m_transactionEditor, TQT_SIGNAL(statusMsg(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString&))); + connect(m_transactionEditor, TQT_SIGNAL(scheduleTransaction(const MyMoneyTransaction&, MyMoneySchedule::occurenceE)), TQT_TQOBJECT(this), TQT_SLOT(slotScheduleNew(const MyMoneyTransaction&, MyMoneySchedule::occurenceE))); + connect(m_transactionEditor, TQT_SIGNAL(transactionDataSufficient(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateActions())); } slotUpdateActions(); } @@ -4461,9 +4461,9 @@ void KMyMoney2App::slotTransactionsEdit(void) // if the action is enabled if(kmymoney2->action("transaction_edit")->isEnabled()) { // as soon as we edit a transaction, we don't remember the last payee entered - d->m_lastPayeeEntered = QString(); + d->m_lastPayeeEntered = TQString(); m_transactionEditor = myMoneyView->startEdit(m_selectedTransactions); - connect(m_transactionEditor, SIGNAL(transactionDataSufficient(bool)), this, SLOT(slotUpdateActions())); + connect(m_transactionEditor, TQT_SIGNAL(transactionDataSufficient(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateActions())); slotUpdateActions(); } } @@ -4483,20 +4483,20 @@ void KMyMoney2App::slotTransactionsEditSplits(void) // if the action is enabled if(kmymoney2->action("transaction_editsplits")->isEnabled()) { // as soon as we edit a transaction, we don't remember the last payee entered - d->m_lastPayeeEntered = QString(); + d->m_lastPayeeEntered = TQString(); m_transactionEditor = myMoneyView->startEdit(m_selectedTransactions); slotUpdateActions(); if(m_transactionEditor) { - if(m_transactionEditor->slotEditSplits() == QDialog::Accepted) { + if(m_transactionEditor->slotEditSplits() == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { - QString id; - connect(m_transactionEditor, SIGNAL(balanceWarning(QWidget*, const MyMoneyAccount&, const QString&)), d->m_balanceWarning, SLOT(slotShowMessage(QWidget*, const MyMoneyAccount&, const QString&))); + TQString id; + connect(m_transactionEditor, TQT_SIGNAL(balanceWarning(TQWidget*, const MyMoneyAccount&, const TQString&)), d->m_balanceWarning, TQT_SLOT(slotShowMessage(TQWidget*, const MyMoneyAccount&, const TQString&))); m_transactionEditor->enterTransactions(id); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4526,9 +4526,9 @@ void KMyMoney2App::slotTransactionsEnter(void) if(kmymoney2->action("transaction_enter")->isEnabled()) { // qDebug("KMyMoney2App::slotTransactionsEnter"); if(m_transactionEditor) { - QString accountId = m_selectedAccount.id(); - QString newId; - connect(m_transactionEditor, SIGNAL(balanceWarning(QWidget*, const MyMoneyAccount&, const QString&)), d->m_balanceWarning, SLOT(slotShowMessage(QWidget*, const MyMoneyAccount&, const QString&))); + TQString accountId = m_selectedAccount.id(); + TQString newId; + connect(m_transactionEditor, TQT_SIGNAL(balanceWarning(TQWidget*, const MyMoneyAccount&, const TQString&)), d->m_balanceWarning, TQT_SLOT(slotShowMessage(TQWidget*, const MyMoneyAccount&, const TQString&))); if(m_transactionEditor->enterTransactions(newId)) { KMyMoneyPayeeCombo* payeeEdit = dynamic_cast<KMyMoneyPayeeCombo*>(m_transactionEditor->haveWidget("payee")); if(payeeEdit && !newId.isEmpty()) { @@ -4549,7 +4549,7 @@ void KMyMoney2App::slotTransactionsCancelOrEnter(bool& okToSelect) static bool oneTime = false; if(!oneTime) { oneTime = true; - QString dontShowAgain = "CancelOrEditTransaction"; + TQString dontShowAgain = "CancelOrEditTransaction"; // qDebug("KMyMoney2App::slotCancelOrEndEdit"); if(m_transactionEditor) { if(KMyMoneyGlobalSettings::focusChangeIsEnter() && kmymoney2->action("transaction_enter")->isEnabled()) { @@ -4558,10 +4558,10 @@ void KMyMoney2App::slotTransactionsCancelOrEnter(bool& okToSelect) // okToSelect is preset to true if a cancel of the dialog is useful and false if it is not int rc; if(okToSelect == true) { - rc = KMessageBox::warningYesNoCancel(0, QString("<p>")+i18n("Do you really want to cancel editing this transaction without saving it?<p>- <b>Yes</b> cancels editing the transaction<br>- <b>No</b> saves the transaction prior to cancelling and<br>- <b>Cancel</b> returns to the transaction editor.<p>You can also select an option to save the transaction automatically when e.g. selecting another transaction."), i18n("Cancel transaction edit"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain); + rc = KMessageBox::warningYesNoCancel(0, TQString("<p>")+i18n("Do you really want to cancel editing this transaction without saving it?<p>- <b>Yes</b> cancels editing the transaction<br>- <b>No</b> saves the transaction prior to cancelling and<br>- <b>Cancel</b> returns to the transaction editor.<p>You can also select an option to save the transaction automatically when e.g. selecting another transaction."), i18n("Cancel transaction edit"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain); } else { - rc = KMessageBox::warningYesNo(0, QString("<p>")+i18n("Do you really want to cancel editing this transaction without saving it?<p>- <b>Yes</b> cancels editing the transaction<br>- <b>No</b> saves the transaction prior to cancelling.<p>You can also select an option to save the transaction automatically when e.g. selecting another transaction."), i18n("Cancel transaction edit"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain); + rc = KMessageBox::warningYesNo(0, TQString("<p>")+i18n("Do you really want to cancel editing this transaction without saving it?<p>- <b>Yes</b> cancels editing the transaction<br>- <b>No</b> saves the transaction prior to cancelling.<p>You can also select an option to save the transaction automatically when e.g. selecting another transaction."), i18n("Cancel transaction edit"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain); } switch(rc) { @@ -4666,7 +4666,7 @@ void KMyMoney2App::markTransaction(MyMoneySplit::reconcileFlagE flag) slotStatusProgressBar(-1, -1); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4686,8 +4686,8 @@ void KMyMoney2App::slotTransactionsAccept(void) if(t.isImported()) { t.setImported(false); if(!m_selectedAccount.id().isEmpty()) { - QValueList<MyMoneySplit> list = t.splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit> list = t.splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = list.begin(); it_s != list.end(); ++it_s) { if((*it_s).accountId() == m_selectedAccount.id()) { if((*it_s).reconcileFlag() == MyMoneySplit::NotReconciled) { @@ -4711,7 +4711,7 @@ void KMyMoney2App::slotTransactionsAccept(void) slotStatusProgressBar(-1, -1); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to accept transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to accept transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4720,13 +4720,13 @@ void KMyMoney2App::slotTransactionGotoAccount(void) { if(!m_accountGoto.isEmpty()) { try { - QString transactionId; + TQString transactionId; if(m_selectedTransactions.count() == 1) { transactionId = m_selectedTransactions[0].transaction().id(); } // make sure to pass a copy, as myMoneyView->slotLedgerSelected() overrides // m_accountGoto while calling slotUpdateActions() - QString accountId = m_accountGoto; + TQString accountId = m_accountGoto; myMoneyView->slotLedgerSelected(accountId, transactionId); } catch(MyMoneyException* e) { delete e; @@ -4738,14 +4738,14 @@ void KMyMoney2App::slotTransactionGotoPayee(void) { if(!m_payeeGoto.isEmpty()) { try { - QString transactionId; + TQString transactionId; if(m_selectedTransactions.count() == 1) { transactionId = m_selectedTransactions[0].transaction().id(); } // make sure to pass copies, as myMoneyView->slotPayeeSelected() overrides // m_payeeGoto and m_selectedAccount while calling slotUpdateActions() - QString payeeId = m_payeeGoto; - QString accountId = m_selectedAccount.id(); + TQString payeeId = m_payeeGoto; + TQString accountId = m_selectedAccount.id(); myMoneyView->slotPayeeSelected(payeeId, accountId, transactionId); } catch(MyMoneyException* e) { delete e; @@ -4759,20 +4759,20 @@ void KMyMoney2App::slotTransactionCreateSchedule(void) // make sure to have the current selected split as first split in the schedule MyMoneyTransaction t = m_selectedTransactions[0].transaction(); MyMoneySplit s = m_selectedTransactions[0].split(); - QString splitId = s.id(); + TQString splitId = s.id(); s.clearId(); s.setReconcileFlag(MyMoneySplit::NotReconciled); - s.setReconcileDate(QDate()); + s.setReconcileDate(TQDate()); t.removeSplits(); t.addSplit(s); - const QValueList<MyMoneySplit>& splits = m_selectedTransactions[0].transaction().splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + const TQValueList<MyMoneySplit>& splits = m_selectedTransactions[0].transaction().splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { if((*it_s).id() != splitId) { MyMoneySplit s0 = (*it_s); s0.clearId(); s0.setReconcileFlag(MyMoneySplit::NotReconciled); - s0.setReconcileDate(QDate()); + s0.setReconcileDate(TQDate()); t.addSplit(s0); } } @@ -4791,10 +4791,10 @@ void KMyMoney2App::slotTransactionCombine(void) qDebug("slotTransactionCombine() not implemented yet"); } -void KMyMoney2App::slotMoveToAccount(const QString& id) +void KMyMoney2App::slotMoveToAccount(const TQString& id) { // close the menu, if it is still open - QWidget* w = factory()->container("transaction_move_menu", this); + TQWidget* w = factory()->container("transaction_move_menu", this); if(w) { if(w->isVisible()) { w->close(); @@ -4810,7 +4810,7 @@ void KMyMoney2App::slotMoveToAccount(const QString& id) d->moveInvestmentTransaction(m_selectedAccount.id(), id, (*it_t).transaction()); } else { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; bool changed = false; MyMoneyTransaction t = (*it_t).transaction(); for(it_s = (*it_t).transaction().splits().begin(); it_s != (*it_t).transaction().splits().end(); ++it_s) { @@ -4834,17 +4834,17 @@ void KMyMoney2App::slotMoveToAccount(const QString& id) } // move a stock transaction from one investment account to another -void KMyMoney2App::Private::moveInvestmentTransaction(const QString& fromId, - const QString& toId, +void KMyMoney2App::Private::moveInvestmentTransaction(const TQString& fromId, + const TQString& toId, const MyMoneyTransaction& tx) { MyMoneyAccount toInvAcc = MyMoneyFile::instance()->account(toId); MyMoneyTransaction t(tx); // first determine which stock we are dealing with. // fortunately, investment transactions have only one stock involved - QString stockAccountId; - QString stockSecurityId; - QValueList<MyMoneySplit>::const_iterator it_s; + TQString stockAccountId; + TQString stockSecurityId; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { stockAccountId = (*it_s).accountId(); stockSecurityId = @@ -4854,9 +4854,9 @@ void KMyMoney2App::Private::moveInvestmentTransaction(const QString& fromId, } // Now check the target investment account to see if it // contains a stock with this id - QString newStockAccountId = QString(); - QStringList accountList = toInvAcc.accountList(); - QStringList::const_iterator it_a; + TQString newStockAccountId = TQString(); + TQStringList accountList = toInvAcc.accountList(); + TQStringList::const_iterator it_a; for (it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { if (MyMoneyFile::instance()->account((*it_a)).currencyId() == stockSecurityId) { @@ -4915,7 +4915,7 @@ void KMyMoney2App::slotUpdateMoveToAccountMenu(void) // remove those accounts that we currently reference KMyMoneyRegister::SelectedTransactions::const_iterator it_t; for(it_t = m_selectedTransactions.begin(); it_t != m_selectedTransactions.end(); ++it_t) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = (*it_t).transaction().splits().begin(); it_s != (*it_t).transaction().splits().end(); ++it_s) { d->m_moveToAccountSelector->removeItem((*it_s).accountId()); } @@ -4924,8 +4924,8 @@ void KMyMoney2App::slotUpdateMoveToAccountMenu(void) // in a different currency // also remove the selected account itself //(for investments, which will not have been removed above) - QStringList list = d->m_moveToAccountSelector->accountList(); - QValueList<QString>::const_iterator it_a; + TQStringList list = d->m_moveToAccountSelector->accountList(); + TQValueList<TQString>::const_iterator it_a; for(it_a = list.begin(); it_a != list.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.currencyId() != m_selectedAccount.currencyId()) @@ -4992,7 +4992,7 @@ void KMyMoney2App::transactionMatch(void) KMergeTransactionsDlg dlg(m_selectedAccount); dlg.addTransaction(startMatchTransaction); dlg.addTransaction(endMatchTransaction); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) #endif { MyMoneyFileTransaction ft; @@ -5016,12 +5016,12 @@ void KMyMoney2App::transactionMatch(void) } -void KMyMoney2App::showContextMenu(const QString& containerName) +void KMyMoney2App::showContextMenu(const TQString& containerName) { - QWidget* w = factory()->container(containerName, this); - QPopupMenu *menu = dynamic_cast<QPopupMenu*>(w); + TQWidget* w = factory()->container(containerName, this); + TQPopupMenu *menu = dynamic_cast<TQPopupMenu*>(w); if(menu) - menu->exec(QCursor::pos()); + menu->exec(TQCursor::pos()); } void KMyMoney2App::slotShowTransactionContextMenu(void) @@ -5092,7 +5092,7 @@ void KMyMoney2App::slotPrintView(void) void KMyMoney2App::updateCaption(bool skipActions) { - QString caption; + TQString caption; caption = m_fileName.filename(false); @@ -5113,7 +5113,7 @@ void KMyMoney2App::updateCaption(bool skipActions) } #if KMM_DEBUG - caption += QString(" (%1 x %2)").arg(width()).arg(height()); + caption += TQString(" (%1 x %2)").tqarg(width()).tqarg(height()); #endif caption = kapp->makeStdCaption(caption, false, modified); @@ -5133,7 +5133,7 @@ void KMyMoney2App::slotUpdateActions(void) MyMoneyFile* file = MyMoneyFile::instance(); bool fileOpen = myMoneyView->fileOpen(); bool modified = file->dirty(); - QWidget* w; + TQWidget* w; action("open_database")->setEnabled(true); action("saveas_database")->setEnabled(fileOpen); @@ -5211,7 +5211,7 @@ void KMyMoney2App::slotUpdateActions(void) action("budget_copy")->setEnabled(false); action("budget_forecast")->setEnabled(false); - QString tooltip = i18n("Create a new transaction"); + TQString tooltip = i18n("Create a new transaction"); action("transaction_new")->setEnabled(fileOpen && myMoneyView->canCreateTransactions(KMyMoneyRegister::SelectedTransactions(), tooltip)); action("transaction_new")->setToolTip(tooltip); @@ -5348,23 +5348,23 @@ void KMyMoney2App::slotUpdateActions(void) action("transaction_assign_number")->setEnabled(m_transactionEditor->canAssignNumber()); action("transaction_new")->setEnabled(false); action("transaction_delete")->setEnabled(false); - QString reason; + TQString reason; action("transaction_enter")->setEnabled(m_transactionEditor->isComplete(reason)); action("transaction_enter")->setToolTip(reason); action("transaction_cancel")->setEnabled(true); } } - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; file->accountList(accList); - QValueList<MyMoneyAccount>::const_iterator it_a; - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p = m_onlinePlugins.end(); + TQValueList<MyMoneyAccount>::const_iterator it_a; + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p = m_onlinePlugins.end(); for(it_a = accList.begin(); (it_p == m_onlinePlugins.end()) && (it_a != accList.end()); ++it_a) { if ( !(*it_a).onlineBankingSettings().value("provider").isEmpty() ) { // check if provider is available - it_p = m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")); + it_p = m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { - QStringList protocols; + TQStringList protocols; (*it_p)->protocols(protocols); if(protocols.count() > 0) { action("account_online_update_all")->setEnabled(true); @@ -5406,10 +5406,10 @@ void KMyMoney2App::slotUpdateActions(void) if ( !m_selectedAccount.onlineBankingSettings().value("provider").isEmpty() ) { action("account_online_unmap")->setEnabled(true); // check if provider is available - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; - it_p = m_onlinePlugins.find(m_selectedAccount.onlineBankingSettings().value("provider")); + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; + it_p = m_onlinePlugins.tqfind(m_selectedAccount.onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { - QStringList protocols; + TQStringList protocols; (*it_p)->protocols(protocols); if(protocols.count() > 0) { action("account_online_update")->setEnabled(true); @@ -5516,8 +5516,8 @@ void KMyMoney2App::slotResetSelections(void) slotSelectInvestment(); slotSelectSchedule(); slotSelectCurrency(); - slotSelectPayees(QValueList<MyMoneyPayee>()); - slotSelectBudget(QValueList<MyMoneyBudget>()); + slotSelectPayees(TQValueList<MyMoneyPayee>()); + slotSelectBudget(TQValueList<MyMoneyBudget>()); slotSelectTransactions(KMyMoneyRegister::SelectedTransactions()); slotUpdateActions(); } @@ -5529,14 +5529,14 @@ void KMyMoney2App::slotSelectCurrency(const MyMoneySecurity& currency) emit currencySelected(m_selectedCurrency); } -void KMyMoney2App::slotSelectBudget(const QValueList<MyMoneyBudget>& list) +void KMyMoney2App::slotSelectBudget(const TQValueList<MyMoneyBudget>& list) { m_selectedBudgets = list; slotUpdateActions(); emit budgetSelected(m_selectedBudgets); } -void KMyMoney2App::slotSelectPayees(const QValueList<MyMoneyPayee>& list) +void KMyMoney2App::slotSelectPayees(const TQValueList<MyMoneyPayee>& list) { m_selectedPayees = list; slotUpdateActions(); @@ -5554,8 +5554,8 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa m_selectedTransactions.clear(); m_selectedSchedule = MyMoneySchedule(); - m_accountGoto = QString(); - m_payeeGoto = QString(); + m_accountGoto = TQString(); + m_payeeGoto = TQString(); if(list.count() > 0 && !list.first().isScheduled()) { m_selectedTransactions = list; if(list.count() == 1) { @@ -5565,16 +5565,16 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa MyMoneyPayee payee = MyMoneyFile::instance()->payee(sp.payeeId()); if(!payee.name().isEmpty()) { m_payeeGoto = payee.id(); - QString name = payee.name(); - name.replace(QRegExp("&(?!&)"), "&&"); - action("transaction_goto_payee")->setText(i18n("Goto '%1'").arg(name)); + TQString name = payee.name(); + name.tqreplace(TQRegExp("&(?!&)"), "&&"); + action("transaction_goto_payee")->setText(i18n("Goto '%1'").tqarg(name)); } } catch(MyMoneyException *e) { delete e; } } try { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; const MyMoneyTransaction& t = m_selectedTransactions[0].transaction(); // search the first non-income/non-expense accunt and use it for the 'goto account' const MyMoneySplit& sp = m_selectedTransactions[0].split(); @@ -5584,12 +5584,12 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa if(!acc.isIncomeExpense()) { // for stock accounts we show the portfolio account if(acc.isInvest()) { - acc = MyMoneyFile::instance()->account(acc.parentAccountId()); + acc = MyMoneyFile::instance()->account(acc.tqparentAccountId()); } m_accountGoto = acc.id(); - QString name = acc.name(); - name.replace(QRegExp("&(?!&)"), "&&"); - action("transaction_goto_account")->setText(i18n("Goto '%1'").arg(name)); + TQString name = acc.name(); + name.tqreplace(TQRegExp("&(?!&)"), "&&"); + action("transaction_goto_account")->setText(i18n("Goto '%1'").tqarg(name)); break; } } @@ -5678,12 +5678,12 @@ void KMyMoney2App::slotDataChanged(void) void KMyMoney2App::slotCurrencyDialog(void) { KCurrencyEditDlg dlg(this, "Currency Editor"); - connect(&dlg, SIGNAL(selectObject(const MyMoneySecurity&)), this, SLOT(slotSelectCurrency(const MyMoneySecurity&))); - connect(&dlg, SIGNAL(openContextMenu(const MyMoneySecurity&)), this, SLOT(slotShowCurrencyContextMenu())); - connect(this, SIGNAL(currencyRename()), &dlg, SLOT(slotStartRename())); - connect(&dlg, SIGNAL(renameCurrency(QListViewItem*, int, const QString&)), this, SLOT(slotCurrencyRename(QListViewItem*,int,const QString&))); - connect(this, SIGNAL(currencyCreated(const QString&)), &dlg, SLOT(slotSelectCurrency(const QString&))); - connect(&dlg, SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), this, SLOT(slotCurrencySetBase())); + connect(&dlg, TQT_SIGNAL(selectObject(const MyMoneySecurity&)), TQT_TQOBJECT(this), TQT_SLOT(slotSelectCurrency(const MyMoneySecurity&))); + connect(&dlg, TQT_SIGNAL(openContextMenu(const MyMoneySecurity&)), TQT_TQOBJECT(this), TQT_SLOT(slotShowCurrencyContextMenu())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(currencyRename()), &dlg, TQT_SLOT(slotStartRename())); + connect(&dlg, TQT_SIGNAL(renameCurrency(TQListViewItem*, int, const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotCurrencyRename(TQListViewItem*,int,const TQString&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(currencyCreated(const TQString&)), &dlg, TQT_SLOT(slotSelectCurrency(const TQString&))); + connect(&dlg, TQT_SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), TQT_TQOBJECT(this), TQT_SLOT(slotCurrencySetBase())); dlg.exec(); @@ -5700,13 +5700,13 @@ void KMyMoney2App::slotFileConsitencyCheck(void) { KMSTATUS(i18n("Running consistency check...")); - QStringList msg; + TQStringList msg; MyMoneyFileTransaction ft; try { msg = MyMoneyFile::instance()->consistencyCheck(); ft.commit(); } catch(MyMoneyException *e) { - msg = i18n("Consistency check failed: %1").arg(e->what()); + msg = i18n("Consistency check failed: %1").tqarg(e->what()); delete e; } @@ -5721,10 +5721,10 @@ void KMyMoney2App::slotCheckSchedules(void) KMSTATUS(i18n("Checking for overdue scheduled transactions...")); MyMoneyFile *file = MyMoneyFile::instance(); - QDate checkDate = QDate::currentDate().addDays(KMyMoneyGlobalSettings::checkSchedulePreview()); + TQDate checkDate = TQDate::tqcurrentDate().addDays(KMyMoneyGlobalSettings::checkSchedulePreview()); - QValueList<MyMoneySchedule> scheduleList = file->scheduleList(); - QValueList<MyMoneySchedule>::Iterator it; + TQValueList<MyMoneySchedule> scheduleList = file->scheduleList(); + TQValueList<MyMoneySchedule>::Iterator it; KMyMoneyUtils::EnterScheduleResultCodeE rc = KMyMoneyUtils::Enter; for (it=scheduleList.begin(); (it != scheduleList.end()) && (rc != KMyMoneyUtils::Cancel); ++it) { @@ -5748,7 +5748,7 @@ void KMyMoney2App::slotCheckSchedules(void) } } -void KMyMoney2App::writeLastUsedDir(const QString& directory) +void KMyMoney2App::writeLastUsedDir(const TQString& directory) { //get global config object for our app. KConfig *kconfig = KGlobal::config(); @@ -5761,7 +5761,7 @@ void KMyMoney2App::writeLastUsedDir(const QString& directory) } } -void KMyMoney2App::writeLastUsedFile(const QString& fileName) +void KMyMoney2App::writeLastUsedFile(const TQString& fileName) { //get global config object for our app. KConfig *kconfig = KGlobal::config(); @@ -5776,9 +5776,9 @@ void KMyMoney2App::writeLastUsedFile(const QString& fileName) } } -QString KMyMoney2App::readLastUsedDir(void) const +TQString KMyMoney2App::readLastUsedDir(void) const { - QString str; + TQString str; //get global config object for our app. KConfig *kconfig = KGlobal::config(); @@ -5796,9 +5796,9 @@ QString KMyMoney2App::readLastUsedDir(void) const return str; } -QString KMyMoney2App::readLastUsedFile(void) const +TQString KMyMoney2App::readLastUsedFile(void) const { - QString str; + TQString str; // get global config object for our app. KConfig *kconfig = KGlobal::config(); @@ -5813,22 +5813,22 @@ QString KMyMoney2App::readLastUsedFile(void) const return str; } -const QString KMyMoney2App::filename(void) const +const TQString KMyMoney2App::filename(void) const { return m_fileName.url(); } -const QValueList<QCString> KMyMoney2App::instanceList(void) const +const TQValueList<TQCString> KMyMoney2App::instanceList(void) const { - QValueList<QCString> list; - QValueList<QCString> apps = kapp->dcopClient()->registeredApplications(); - QValueList<QCString>::ConstIterator it; + TQValueList<TQCString> list; + TQValueList<TQCString> apps = kapp->dcopClient()->registeredApplications(); + TQValueList<TQCString>::ConstIterator it; for(it = apps.begin(); it != apps.end(); ++it) { // skip over myself if((*it) == kapp->dcopClient()->appId()) continue; - if((*it).find("kmymoney-") == 0) { + if((*it).tqfind("kmymoney-") == 0) { list += (*it); } } @@ -5838,11 +5838,11 @@ const QValueList<QCString> KMyMoney2App::instanceList(void) const void KMyMoney2App::slotEquityPriceUpdate(void) { KEquityPriceUpdateDlg dlg(this); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) dlg.storePrices(); } -void KMyMoney2App::webConnect(const QString& url, const QCString& asn_id) +void KMyMoney2App::webConnect(const TQString& url, const TQCString& asn_id) { // // Web connect attempts to go through the known importers and see if the file @@ -5867,15 +5867,15 @@ void KMyMoney2App::webConnect(const QString& url, const QCString& asn_id) // remove the statement files d->unlinkStatementXML(); - QMap<QString,KMyMoneyPlugin::ImporterPlugin*>::const_iterator it_plugin = m_importerPlugins.begin(); + TQMap<TQString,KMyMoneyPlugin::ImporterPlugin*>::const_iterator it_plugin = m_importerPlugins.begin(); while ( it_plugin != m_importerPlugins.end() ) { if ( (*it_plugin)->isMyFormat(url) ) { - QValueList<MyMoneyStatement> statements; + TQValueList<MyMoneyStatement> statements; if (!(*it_plugin)->import(url) ) { - KMessageBox::error( this, i18n("Unable to import %1 using %2 plugin. The plugin returned the following error: %3").arg(url,(*it_plugin)->formatName(),(*it_plugin)->lastError()), i18n("Importing error")); + KMessageBox::error( this, i18n("Unable to import %1 using %2 plugin. The plugin returned the following error: %3").tqarg(url,(*it_plugin)->formatName(),(*it_plugin)->lastError()), i18n("Importing error")); } break; @@ -5908,7 +5908,7 @@ void KMyMoney2App::slotSecurityEditor(void) void KMyMoney2App::createInterfaces(void) { // Sets up the plugin interface, and load the plugins - m_pluginInterface = new QObject( this, "_pluginInterface" ); + m_pluginInterface = new TQObject( this, "_pluginInterface" ); new KMyMoneyPlugin::KMMViewInterface(this, myMoneyView, m_pluginInterface, "view interface"); new KMyMoneyPlugin::KMMStatementInterface(this, m_pluginInterface, "statement interface"); @@ -5917,10 +5917,10 @@ void KMyMoney2App::createInterfaces(void) void KMyMoney2App::loadPlugins(void) { - d->m_pluginLoader = new KMyMoneyPlugin::PluginLoader(this); + d->m_pluginLoader = new KMyMoneyPlugin::PluginLoader(TQT_TQOBJECT(this)); - connect( d->m_pluginLoader, SIGNAL( plug(KPluginInfo*) ), this, SLOT( slotPluginPlug(KPluginInfo*) ) ); - connect( d->m_pluginLoader, SIGNAL( unplug(KPluginInfo*) ), this, SLOT( slotPluginUnplug(KPluginInfo*) ) ); + connect( d->m_pluginLoader, TQT_SIGNAL( plug(KPluginInfo*) ), TQT_TQOBJECT(this), TQT_SLOT( slotPluginPlug(KPluginInfo*) ) ); + connect( d->m_pluginLoader, TQT_SIGNAL( unplug(KPluginInfo*) ), TQT_TQOBJECT(this), TQT_SLOT( slotPluginUnplug(KPluginInfo*) ) ); d->m_pluginLoader->loadPlugins(); } @@ -5987,22 +5987,22 @@ void KMyMoney2App::slotAutoSave(void) void KMyMoney2App::slotDateChanged(void) { - QDateTime dt = QDateTime::currentDateTime(); - QDateTime nextDay( QDate(dt.date().addDays(1)), QTime(0, 0, 0) ); + TQDateTime dt = TQDateTime::tqcurrentDateTime(); + TQDateTime nextDay( TQDate(dt.date().addDays(1)), TQTime(0, 0, 0) ); - QTimer::singleShot(dt.secsTo(nextDay)*1000, this, SLOT(slotDateChanged())); + TQTimer::singleShot(dt.secsTo(nextDay)*1000, TQT_TQOBJECT(this), TQT_SLOT(slotDateChanged())); myMoneyView->slotRefreshViews(); } -const MyMoneyAccount& KMyMoney2App::account(const QString& key, const QString& value) const +const MyMoneyAccount& KMyMoney2App::account(const TQString& key, const TQString& value) const { - QValueList<MyMoneyAccount> list; - QValueList<MyMoneyAccount>::const_iterator it_a; + TQValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount>::const_iterator it_a; MyMoneyFile::instance()->accountList(list); - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; for(it_a = list.begin(); it_a != list.end(); ++it_a) { - const QString& id = (*it_a).onlineBankingSettings().value(key); - if(id.contains(value)) { + const TQString& id = (*it_a).onlineBankingSettings().value(key); + if(id.tqcontains(value)) { accList << MyMoneyFile::instance()->account((*it_a).id()); } if(id == value) { @@ -6016,7 +6016,7 @@ const MyMoneyAccount& KMyMoney2App::account(const QString& key, const QString& v } // return reference to empty element - return MyMoneyFile::instance()->account(QString()); + return MyMoneyFile::instance()->account(TQString()); } void KMyMoney2App::setAccountOnlineParameters(const MyMoneyAccount& _acc, const MyMoneyKeyValueContainer& kvps) @@ -6029,7 +6029,7 @@ void KMyMoney2App::setAccountOnlineParameters(const MyMoneyAccount& _acc, const ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Unable to setup online parameters for account ''%1'").arg(_acc.name()), e->what() ); + KMessageBox::detailedSorry(0, i18n("Unable to setup online parameters for account ''%1'").tqarg(_acc.name()), e->what() ); delete e; } } @@ -6044,7 +6044,7 @@ void KMyMoney2App::slotAccountUnmapOnline(void) if(m_selectedAccount.onlineBankingSettings().value("provider").isEmpty()) return; - if(KMessageBox::warningYesNo(this, QString("<qt>%1</qt>").arg(i18n("Do you really want to remove the mapping of account <b>%1</b> to an online account? Depending on the details of the online banking method used, this action cannot be reverted.").arg(m_selectedAccount.name())), i18n("Remove mapping to online account")) == KMessageBox::Yes) { + if(KMessageBox::warningYesNo(this, TQString("<qt>%1</qt>").tqarg(i18n("Do you really want to remove the mapping of account <b>%1</b> to an online account? Depending on the details of the online banking method used, this action cannot be reverted.").tqarg(m_selectedAccount.name())), i18n("Remove mapping to online account")) == KMessageBox::Yes) { MyMoneyFileTransaction ft; try { m_selectedAccount.setOnlineBankingSettings(MyMoneyKeyValueContainer()); @@ -6055,7 +6055,7 @@ void KMyMoney2App::slotAccountUnmapOnline(void) MyMoneyFile::instance()->modifyAccount(m_selectedAccount); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error(this, i18n("Unable to unmap account from online account: %1").arg(e->what())); + KMessageBox::error(this, i18n("Unable to unmap account from online account: %1").tqarg(e->what())); delete e; } } @@ -6072,7 +6072,7 @@ void KMyMoney2App::slotAccountMapOnline(void) return; // check if user tries to map a brokerageAccount - if(m_selectedAccount.name().contains(i18n(" (Brokerage)"))) { + if(m_selectedAccount.name().tqcontains(i18n(" (Brokerage)"))) { if(KMessageBox::warningContinueCancel(this, i18n("You try to map a brokerage account to an online account. This is usually not advisable. In general, the investment account should be mapped to the online account. Please cancel if you intended to map the investment account, continue otherwise"), i18n("Mapping brokerage account")) == KMessageBox::Cancel) { return; } @@ -6082,8 +6082,8 @@ void KMyMoney2App::slotAccountMapOnline(void) KPluginDlg dlg(this); dlg.setCaption(i18n("Select online banking plugin")); dlg.closeButton->hide(); - QString provider; - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; + TQString provider; + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; switch(m_onlinePlugins.count()) { case 0: break; @@ -6092,11 +6092,11 @@ void KMyMoney2App::slotAccountMapOnline(void) break; default: for(it_p = m_onlinePlugins.begin(); it_p != m_onlinePlugins.end(); ++it_p) { - QStringList protocolList; + TQStringList protocolList; (*it_p)->protocols(protocolList); new KListViewItem(dlg.m_listView, it_p.key(), "Loaded", protocolList.join(", ")); } - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { if(dlg.m_listView->selectedItem()) { provider = dlg.m_listView->selectedItem()->text(0); } @@ -6108,7 +6108,7 @@ void KMyMoney2App::slotAccountMapOnline(void) return; // find the provider - it_p = m_onlinePlugins.find(provider); + it_p = m_onlinePlugins.tqfind(provider); if(it_p != m_onlinePlugins.end()) { // plugin found, call it MyMoneyKeyValueContainer settings; @@ -6121,7 +6121,7 @@ void KMyMoney2App::slotAccountMapOnline(void) MyMoneyFile::instance()->modifyAccount(acc); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error(this, i18n("Unable to map account to online account: %1").arg(e->what())); + KMessageBox::error(this, i18n("Unable to map account to online account: %1").tqarg(e->what())); delete e; } } @@ -6130,10 +6130,10 @@ void KMyMoney2App::slotAccountMapOnline(void) void KMyMoney2App::slotAccountUpdateOnlineAll(void) { - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; MyMoneyFile::instance()->accountList(accList); - QValueList<MyMoneyAccount>::iterator it_a; - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; + TQValueList<MyMoneyAccount>::iterator it_a; + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; d->m_statementResults.clear(); d->m_collectingStatements = true; @@ -6141,7 +6141,7 @@ void KMyMoney2App::slotAccountUpdateOnlineAll(void) // provider is not currently present for(it_a = accList.begin(); it_a != accList.end();) { if ((*it_a).onlineBankingSettings().value("provider").isEmpty() - || m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")) == m_onlinePlugins.end() ) { + || m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")) == m_onlinePlugins.end() ) { it_a = accList.remove(it_a); } else ++it_a; @@ -6150,7 +6150,7 @@ void KMyMoney2App::slotAccountUpdateOnlineAll(void) // now work on the remaining list of accounts int cnt = accList.count() - 1; for(it_a = accList.begin(); it_a != accList.end(); ++it_a) { - it_p = m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")); + it_p = m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")); (*it_p)->updateAccount(*it_a, cnt != 0); --cnt; } @@ -6171,8 +6171,8 @@ void KMyMoney2App::slotAccountUpdateOnline(void) return; // find the provider - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; - it_p = m_onlinePlugins.find(m_selectedAccount.onlineBankingSettings().value("provider")); + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; + it_p = m_onlinePlugins.tqfind(m_selectedAccount.onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { // plugin found, call it d->m_collectingStatements = true; @@ -6184,22 +6184,22 @@ void KMyMoney2App::slotAccountUpdateOnline(void) } } -KMStatus::KMStatus (const QString &text) +KMtqStatus::KMtqStatus (const TQString &text) { m_prevText = kmymoney2->slotStatusMsg(text); } -KMStatus::~KMStatus() +KMtqStatus::~KMtqStatus() { kmymoney2->slotStatusMsg(m_prevText); } void KMyMoney2App::Private::unlinkStatementXML(void) { - QDir d("/home/thb", "kmm-statement*"); + TQDir d("/home/thb", "kmm-statement*"); for(int i=0; i < d.count(); ++i) { qDebug("Remove %s", d[i].data()); - d.remove(QString("/home/thb/%1").arg(d[i])); + d.remove(TQString("/home/thb/%1").tqarg(d[i])); } statementXMLindex = 0; } |