From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: 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 --- kmymoney2/dialogs/knewinvestmentwizard.cpp | 66 +++++++++++++++--------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'kmymoney2/dialogs/knewinvestmentwizard.cpp') diff --git a/kmymoney2/dialogs/knewinvestmentwizard.cpp b/kmymoney2/dialogs/knewinvestmentwizard.cpp index d0c9046..a1e2e9e 100644 --- a/kmymoney2/dialogs/knewinvestmentwizard.cpp +++ b/kmymoney2/dialogs/knewinvestmentwizard.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include -#include +#include +#include // ---------------------------------------------------------------------------- // KDE Includes @@ -45,18 +45,18 @@ #include "../converter/webpricequote.h" #include "../kmymoneyutils.h" -KNewInvestmentWizard::KNewInvestmentWizard( QWidget *parent, const char *name ) : - KNewInvestmentWizardDecl( parent, name ) +KNewInvestmentWizard::KNewInvestmentWizard( TQWidget *tqparent, const char *name ) : + KNewInvestmentWizardDecl( tqparent, name ) { init1(); - slotCheckPage(QString()); + slotCheckPage(TQString()); m_investmentSymbol->setFocus(); - connect(m_investmentSymbol, SIGNAL(lineChanged(const QString&)), this, SLOT(slotCheckForExistingSymbol(const QString&))); + connect(m_investmentSymbol, TQT_SIGNAL(lineChanged(const TQString&)), this, TQT_SLOT(slotCheckForExistingSymbol(const TQString&))); } -KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneyAccount& acc, QWidget *parent, const char *name ) : - KNewInvestmentWizardDecl( parent, name ), +KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneyAccount& acc, TQWidget *tqparent, const char *name ) : + KNewInvestmentWizardDecl( tqparent, name ), m_account(acc) { setCaption(i18n("Investment detail wizard")); @@ -75,8 +75,8 @@ KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneyAccount& acc, QWidget * } -KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneySecurity& security, QWidget *parent, const char *name ) : - KNewInvestmentWizardDecl( parent, name ), +KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneySecurity& security, TQWidget *tqparent, const char *name ) : + KNewInvestmentWizardDecl( tqparent, name ), m_security(security) { setCaption(i18n("Security detail wizard")); @@ -102,7 +102,7 @@ void KNewInvestmentWizard::init1(void) m_fraction->setPrecision(0); m_fraction->setValue(MyMoneyMoney(100, 1)); - kMyMoneyMoneyValidator* fractionValidator = new kMyMoneyMoneyValidator(1, 100000, 0, this); + kMyMoneyMoneyValidator* fractionValidator = new kMyMoneyMoneyValidator(1, 100000, 0, TQT_TQOBJECT(this)); m_fraction->setValidator(fractionValidator); // load the price mode combo @@ -111,16 +111,16 @@ void KNewInvestmentWizard::init1(void) m_priceMode->insertItem(i18n("Total for all shares"), 2); // load the widget with the available currencies - m_tradingCurrencyEdit->update(QString()); + m_tradingCurrencyEdit->update(TQString()); - connect(helpButton(),SIGNAL(clicked()), this, SLOT(slotHelp(void))); - connect(m_investmentName, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_investmentSymbol, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_fraction, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_investmentIdentification, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_onlineFactor, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_onlineSourceCombo, SIGNAL(activated(const QString&)), this, SLOT(slotCheckPage(const QString&))); - connect(m_useFinanceQuote, SIGNAL(toggled(bool)), this, SLOT(slotSourceChanged(bool))); + connect(helpButton(),TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp(void))); + connect(m_investmentName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_investmentSymbol, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_fraction, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_investmentIdentification, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_onlineFactor, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_onlineSourceCombo, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotCheckPage(const TQString&))); + connect(m_useFinanceQuote, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSourceChanged(bool))); m_createAccount = true; @@ -161,7 +161,7 @@ KNewInvestmentWizard::~KNewInvestmentWizard() { } -void KNewInvestmentWizard::setName(const QString& name) +void KNewInvestmentWizard::setName(const TQString& name) { m_investmentName->setText(name); } @@ -172,11 +172,11 @@ void KNewInvestmentWizard::next(void) slotCheckPage(); } -void KNewInvestmentWizard::slotCheckForExistingSymbol(const QString& symbol) +void KNewInvestmentWizard::slotCheckForExistingSymbol(const TQString& symbol) { if(m_investmentName->text().isEmpty()) { - QValueList list = MyMoneyFile::instance()->securityList(); - QValueList::const_iterator it_s; + TQValueList list = MyMoneyFile::instance()->securityList(); + TQValueList::const_iterator it_s; MyMoneySecurity::eSECURITYTYPE type = KMyMoneyUtils::stringToSecurity(m_securityType->currentText()); for(it_s = list.begin(); it_s != list.end(); ++it_s) { @@ -197,7 +197,7 @@ void KNewInvestmentWizard::slotCheckForExistingSymbol(const QString& symbol) void KNewInvestmentWizard::slotSourceChanged(bool useFQ) { m_onlineSourceCombo->clear(); - m_onlineSourceCombo->insertItem(QString(), 0); + m_onlineSourceCombo->insertItem(TQString(), 0); if (useFQ) { m_onlineSourceCombo->insertStringList( WebPriceQuote::quoteSources( WebPriceQuote::FinanceQuote ) ); } else { @@ -205,7 +205,7 @@ void KNewInvestmentWizard::slotSourceChanged(bool useFQ) } } -void KNewInvestmentWizard::slotCheckPage(const QString& txt) +void KNewInvestmentWizard::slotCheckPage(const TQString& txt) { m_onlineFactor->setEnabled(!txt.isEmpty()); } @@ -232,12 +232,12 @@ void KNewInvestmentWizard::slotHelp(void) kapp->invokeHelp("details.investments.newinvestmentwizard"); } -void KNewInvestmentWizard::createObjects(const QString& parentId) +void KNewInvestmentWizard::createObjects(const TQString& tqparentId) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList list = MyMoneyFile::instance()->securityList(); - QValueList::ConstIterator it; + TQValueList list = MyMoneyFile::instance()->securityList(); + TQValueList::ConstIterator it; MyMoneySecurity::eSECURITYTYPE type = KMyMoneyUtils::stringToSecurity(m_securityType->currentText()); MyMoneyFileTransaction ft; @@ -294,19 +294,19 @@ void KNewInvestmentWizard::createObjects(const QString& parentId) break; case 1: case 2: - m_account.setValue("priceMode", QString("%1").arg(m_priceMode->currentItem())); + m_account.setValue("priceMode", TQString("%1").tqarg(m_priceMode->currentItem())); break; } if(m_account.id().isEmpty()) { - MyMoneyAccount parent = file->account(parentId); - file->addAccount(m_account, parent); + MyMoneyAccount tqparent = file->account(tqparentId); + file->addAccount(m_account, tqparent); } else file->modifyAccount(m_account); } ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Unable to create all objects for the investment"), QString("%1 caugt in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Unable to create all objects for the investment"), TQString("%1 caugt in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } -- cgit v1.2.1