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/dialogs/kselecttransactionsdlg.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/dialogs/kselecttransactionsdlg.cpp')
-rw-r--r-- | kmymoney2/dialogs/kselecttransactionsdlg.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kmymoney2/dialogs/kselecttransactionsdlg.cpp b/kmymoney2/dialogs/kselecttransactionsdlg.cpp index 7a87dc8..1b21089 100644 --- a/kmymoney2/dialogs/kselecttransactionsdlg.cpp +++ b/kmymoney2/dialogs/kselecttransactionsdlg.cpp @@ -36,8 +36,8 @@ #include "kmergetransactionsdlg.h" -KSelectTransactionsDlg::KSelectTransactionsDlg(const MyMoneyAccount& _account, QWidget* parent, const char* name) : - KSelectTransactionsDlgDecl(parent, name), +KSelectTransactionsDlg::KSelectTransactionsDlg(const MyMoneyAccount& _account, TQWidget* tqparent, const char* name) : + KSelectTransactionsDlgDecl(tqparent, name), m_account(_account) { // setup descriptive texts @@ -48,11 +48,11 @@ KSelectTransactionsDlg::KSelectTransactionsDlg(const MyMoneyAccount& _account, Q m_register->clear(); // no selection possible - m_register->setSelectionMode(QTable::Single); + m_register->setSelectionMode(TQTable::Single); // setup header font - QFont font = KMyMoneyGlobalSettings::listHeaderFont(); - QFontMetrics fm( font ); + TQFont font = KMyMoneyGlobalSettings::listHeaderFont(); + TQFontMetrics fm( font ); int height = fm.lineSpacing()+6; m_register->horizontalHeader()->setMinimumHeight(height); m_register->horizontalHeader()->setMaximumHeight(height); @@ -76,10 +76,10 @@ KSelectTransactionsDlg::KSelectTransactionsDlg(const MyMoneyAccount& _account, Q // catch some events from the register m_register->installEventFilter(this); - connect(m_register, SIGNAL(selectionChanged(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotEnableOk(const KMyMoneyRegister::SelectedTransactions&))); - connect(m_register, SIGNAL(editTransaction()), this, SLOT(accept())); + connect(m_register, TQT_SIGNAL(selectionChanged(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SLOT(slotEnableOk(const KMyMoneyRegister::SelectedTransactions&))); + connect(m_register, TQT_SIGNAL(editTransaction()), this, TQT_SLOT(accept())); - connect(m_helpButton, SIGNAL(clicked()), this, SLOT(slotHelp())); + connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); } void KSelectTransactionsDlg::slotEnableOk(const KMyMoneyRegister::SelectedTransactions& list) @@ -89,7 +89,7 @@ void KSelectTransactionsDlg::slotEnableOk(const KMyMoneyRegister::SelectedTransa void KSelectTransactionsDlg::addTransaction(const MyMoneyTransaction& t) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId() == m_account.id()) { KMyMoneyRegister::Transaction* tr = KMyMoneyRegister::Register::transactionFactory(m_register, t, (*it_s), 0); @@ -121,7 +121,7 @@ void KSelectTransactionsDlg::show(void) m_register->resize(KMyMoneyRegister::DetailColumn); } -void KSelectTransactionsDlg::resizeEvent(QResizeEvent* ev) +void KSelectTransactionsDlg::resizeEvent(TQResizeEvent* ev) { // don't forget the resizer KSelectTransactionsDlgDecl::resizeEvent(ev); @@ -134,7 +134,7 @@ MyMoneyTransaction KSelectTransactionsDlg::transaction(void) const { MyMoneyTransaction t; - QValueList<KMyMoneyRegister::RegisterItem*> list; + TQValueList<KMyMoneyRegister::RegisterItem*> list; list = m_register->selectedItems(); if(list.count()) { KMyMoneyRegister::Transaction* _t = dynamic_cast<KMyMoneyRegister::Transaction*>(list[0]); @@ -144,19 +144,19 @@ MyMoneyTransaction KSelectTransactionsDlg::transaction(void) const return t; } -bool KSelectTransactionsDlg::eventFilter(QObject* o, QEvent* e) +bool KSelectTransactionsDlg::eventFilter(TQObject* o, TQEvent* e) { bool rc = false; - QKeyEvent* k; + TQKeyEvent* k; - if(o == m_register) { + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_register)) { switch(e->type()) { - case QEvent::KeyPress: - k = dynamic_cast<QKeyEvent*>(e); - if((k->state() & Qt::KeyButtonMask) == 0) { + case TQEvent::KeyPress: + k = dynamic_cast<TQKeyEvent*>(e); + if((k->state() & TQt::KeyButtonMask) == 0) { switch(k->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: if(buttonOk->isEnabled()) { accept(); rc = true; |