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 --- .../wizards/newuserwizard/kaccountpagedecl.ui | 40 +++++++------ .../wizards/newuserwizard/kcurrencypagedecl.ui | 12 ++-- kmymoney2/wizards/newuserwizard/kfilepagedecl.ui | 6 +- .../wizards/newuserwizard/kgeneralpagedecl.ui | 70 +++++++++++----------- kmymoney2/wizards/newuserwizard/kintropagedecl.ui | 10 ++-- kmymoney2/wizards/newuserwizard/knewuserwizard.cpp | 62 +++++++++---------- kmymoney2/wizards/newuserwizard/knewuserwizard.h | 9 +-- kmymoney2/wizards/newuserwizard/knewuserwizard_p.h | 23 ++++--- .../wizards/newuserwizard/kpasswordpagedecl.ui | 4 +- .../wizards/newuserwizard/kpreferencepagedecl.ui | 12 ++-- 10 files changed, 130 insertions(+), 118 deletions(-) (limited to 'kmymoney2/wizards/newuserwizard') diff --git a/kmymoney2/wizards/newuserwizard/kaccountpagedecl.ui b/kmymoney2/wizards/newuserwizard/kaccountpagedecl.ui index e0e3620..9d76f0d 100644 --- a/kmymoney2/wizards/newuserwizard/kaccountpagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kaccountpagedecl.ui @@ -1,6 +1,6 @@ KAccountPageDecl - + KAccountPageDecl @@ -27,7 +27,7 @@ A typical KMyMoney user maintains a checking a account with some institution and uses it to receive money or pay bills. If this is not the case, please deselect the checkbox below and continue on the next page. - + m_haveCheckingAccountButton @@ -35,7 +35,7 @@ I have a checking account that I want to manage with KMyMoney - + m_accountDataFrame @@ -68,7 +68,7 @@ Each institution has a routing number. Enter it here. If uncertain, leave the field blank. You can modify it later. - + textLabel3 @@ -76,7 +76,7 @@ Name of the institution - + textLabel4 @@ -100,7 +100,7 @@ Enter a descriptive name that will be used by KMyMoney to identify your checking account. - + textLabel1_2 @@ -108,9 +108,9 @@ Opening date - + - layout3 + tqlayout3 @@ -134,7 +134,7 @@ Expanding - + 81 20 @@ -143,7 +143,7 @@ - + textLabel2 @@ -151,7 +151,7 @@ Number of the account - + textLabel1 @@ -159,7 +159,7 @@ Name of the account - + textLabel2_2 @@ -167,15 +167,15 @@ Opening balance - + - layout5 + tqlayout5 unnamed - + m_accountCurrencyLabel @@ -204,7 +204,7 @@ Expanding - + 200 20 @@ -236,7 +236,7 @@ Expanding - + 20 16 @@ -264,5 +264,9 @@ kActiveLabel2 kActiveLabel1 - + + kmymoney/kmymoneydateinput.h + kmymoney/kmymoneyedit.h + + diff --git a/kmymoney2/wizards/newuserwizard/kcurrencypagedecl.ui b/kmymoney2/wizards/newuserwizard/kcurrencypagedecl.ui index 579bf1e..8705796 100644 --- a/kmymoney2/wizards/newuserwizard/kcurrencypagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kcurrencypagedecl.ui @@ -1,6 +1,6 @@ KCurrencyPageDecl - + KCurrencyPageDecl @@ -27,9 +27,9 @@ KMyMoney supports multiple currencies. Your reports will be based on a default curreny which you can select here. The default for new accounts is also the currency you select here. - + - layout19 + tqlayout19 @@ -45,7 +45,7 @@ Expanding - + 61 21 @@ -67,7 +67,7 @@ Expanding - + 51 21 @@ -78,5 +78,5 @@ - + diff --git a/kmymoney2/wizards/newuserwizard/kfilepagedecl.ui b/kmymoney2/wizards/newuserwizard/kfilepagedecl.ui index dcae784..527c6eb 100644 --- a/kmymoney2/wizards/newuserwizard/kfilepagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kfilepagedecl.ui @@ -1,6 +1,6 @@ KFilePageDecl - + KFilePageDecl @@ -42,7 +42,7 @@ Expanding - + 20 30 @@ -82,5 +82,5 @@ - + diff --git a/kmymoney2/wizards/newuserwizard/kgeneralpagedecl.ui b/kmymoney2/wizards/newuserwizard/kgeneralpagedecl.ui index 916493d..d1aa51d 100644 --- a/kmymoney2/wizards/newuserwizard/kgeneralpagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kgeneralpagedecl.ui @@ -1,6 +1,6 @@ KGeneralPageDecl - + KGeneralPageDecl @@ -26,19 +26,19 @@ This information will be seen and used only by you. The information is used to personalize KMyMoney, to encrypt your file, etc. - + - layout18 + tqlayout18 unnamed - + frame8 - + 25 0 @@ -51,27 +51,27 @@ This information will be seen and used only by you. The information is used to p Plain - + - layout17 + tqlayout17 unnamed - + - layout20 + tqlayout20 unnamed - + TextLabel4 - + 100 0 @@ -81,26 +81,26 @@ This information will be seen and used only by you. The information is used to p County/State: - + m_userNameEdit - + m_countyEdit - + m_townEdit - + TextLabel2 - + 100 0 @@ -110,16 +110,16 @@ This information will be seen and used only by you. The information is used to p Street: - + m_streetEdit - + TextLabel7 - + 100 0 @@ -129,7 +129,7 @@ This information will be seen and used only by you. The information is used to p Email: - + TextLabel1 @@ -137,11 +137,11 @@ This information will be seen and used only by you. The information is used to p Your name: - + TextLabel6 - + 100 0 @@ -151,11 +151,11 @@ This information will be seen and used only by you. The information is used to p Telephone: - + TextLabel3 - + 100 0 @@ -165,16 +165,16 @@ This information will be seen and used only by you. The information is used to p Town: - + m_emailEdit - + TextLabel5 - + 100 0 @@ -184,21 +184,21 @@ This information will be seen and used only by you. The information is used to p Zip code - + m_telephoneEdit - + m_zipcodeEdit - + - layout12 + tqlayout12 @@ -222,7 +222,7 @@ This information will be seen and used only by you. The information is used to p Expanding - + 61 20 @@ -233,11 +233,11 @@ This information will be seen and used only by you. The information is used to p - + frame8_2 - + 25 0 @@ -254,5 +254,5 @@ This information will be seen and used only by you. The information is used to p - + diff --git a/kmymoney2/wizards/newuserwizard/kintropagedecl.ui b/kmymoney2/wizards/newuserwizard/kintropagedecl.ui index d9dd326..b0bed68 100644 --- a/kmymoney2/wizards/newuserwizard/kintropagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kintropagedecl.ui @@ -1,6 +1,6 @@ KIntroPageDecl - + KIntroPageDecl @@ -16,7 +16,7 @@ unnamed - + textLabel1 @@ -29,7 +29,7 @@ Welcome to KMyMoney! - + AlignCenter @@ -53,7 +53,7 @@ On the next few pages you will be guided through the steps necessary to setup th Expanding - + 20 41 @@ -62,5 +62,5 @@ On the next few pages you will be guided through the steps necessary to setup th - + diff --git a/kmymoney2/wizards/newuserwizard/knewuserwizard.cpp b/kmymoney2/wizards/newuserwizard/knewuserwizard.cpp index 608afb6..d8607fc 100644 --- a/kmymoney2/wizards/newuserwizard/knewuserwizard.cpp +++ b/kmymoney2/wizards/newuserwizard/knewuserwizard.cpp @@ -20,12 +20,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // ---------------------------------------------------------------------------- // KDE Includes @@ -68,8 +68,8 @@ using namespace NewUserWizard; static int stepCount; -NewUserWizard::Wizard::Wizard(QWidget *parent, const char *name, bool modal, WFlags flags) : - KMyMoneyWizard(parent, name, modal, flags), +NewUserWizard::Wizard::Wizard(TQWidget *tqparent, const char *name, bool modal, WFlags flags) : + KMyMoneyWizard(tqparent, name, modal, flags), m_introPage(0) { bool isFirstTime = KMyMoneyGlobalSettings::firstTimeRun(); @@ -108,7 +108,7 @@ MyMoneyPayee NewUserWizard::Wizard::user(void) const return m_generalPage->user(); } -QString NewUserWizard::Wizard::url(void) const +TQString NewUserWizard::Wizard::url(void) const { return m_filePage->m_dataFileEdit->url(); } @@ -150,7 +150,7 @@ MyMoneySecurity NewUserWizard::Wizard::baseCurrency(void) const return m_baseCurrency; } -QValueList NewUserWizard::Wizard::templates(void) const +TQValueList NewUserWizard::Wizard::templates(void) const { return m_categoriesPage->selectedTemplates(); } @@ -172,8 +172,8 @@ GeneralPage::GeneralPage(Wizard* wizard, const char* name) : { m_userNameEdit->setFocus(); KABC::StdAddressBook *ab = KABC::StdAddressBook::self(true); - connect(ab, SIGNAL(addressBookChanged(AddressBook*)), this, SLOT(slotAddressBookLoaded())); - connect(m_loadAddressButton, SIGNAL(clicked()), this, SLOT(slotLoadFromKABC())); + connect(ab, TQT_SIGNAL(addressBookChanged(AddressBook*)), this, TQT_SLOT(slotAddressBookLoaded())); + connect(m_loadAddressButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLoadFromKABC())); m_loadAddressButton->setEnabled(false); } @@ -205,10 +205,10 @@ void GeneralPage::slotLoadFromKABC(void) m_telephoneEdit->setText( phone.number() ); KABC::Address a = addr.address( KABC::Address::Home ); - QString sep; + TQString sep; if(!a.country().isEmpty() && !a.region().isEmpty()) sep = " / "; - m_countyEdit->setText(QString("%1%2%3").arg(a.country(), sep, a.region())); + m_countyEdit->setText(TQString("%1%2%3").tqarg(a.country(), sep, a.region())); m_postcodeEdit->setText( a.postalCode() ); m_townEdit->setText( a.locality() ); m_streetEdit->setText( a.street() ); @@ -223,25 +223,25 @@ CurrencyPage::CurrencyPage(Wizard* wizard, const char* name) : Currency(wizard), WizardPage(stepCount++, this, wizard, name) { - QListViewItem *first = 0; - QValueList list = MyMoneyFile::instance()->currencyList(); - QValueList::const_iterator it; + TQListViewItem *first = 0; + TQValueList list = MyMoneyFile::instance()->currencyList(); + TQValueList::const_iterator it; - QString localCurrency(localeconv()->int_curr_symbol); + TQString localCurrency(localeconv()->int_curr_symbol); localCurrency.truncate(3); - QString baseCurrency = MyMoneyFile::instance()->baseCurrency().id(); + TQString baseCurrency = MyMoneyFile::instance()->baseCurrency().id(); // construct a transparent 16x16 pixmap - QPixmap empty(16, 16); - empty.setMask(QBitmap(16, 16, true)); + TQPixmap empty(16, 16); + empty.setMask(TQBitmap(16, 16, true)); m_currencyList->clear(); for(it = list.begin(); it != list.end(); ++it) { - QListViewItem* p = insertCurrency(*it); + TQListViewItem* p = insertCurrency(*it); if((*it).id() == baseCurrency) { first = p; - p->setPixmap(0, QPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png"))); + p->setPixmap(0, TQPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png"))); } else { p->setPixmap(0, empty); } @@ -276,10 +276,10 @@ AccountPage::AccountPage(Wizard* wizard, const char* name) : WizardPage(stepCount, this, wizard, name) // don't inc. the step count here { m_mandatoryGroup->add(m_accountNameEdit); - connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged())); - connect(m_haveCheckingAccountButton, SIGNAL(toggled(bool)), object(), SIGNAL(completeStateChanged())); + connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_haveCheckingAccountButton, TQT_SIGNAL(toggled(bool)), object(), TQT_SIGNAL(completeStateChanged())); m_accountNameEdit->setFocus(); - m_openingDateEdit->setDate(QDate(QDate::currentDate().year(),1,1)); + m_openingDateEdit->setDate(TQDate(TQDate::tqcurrentDate().year(),1,1)); } KMyMoneyWizardPage* AccountPage::nextPage(void) const @@ -303,7 +303,7 @@ KMyMoneyWizardPage* CategoriesPage::nextPage(void) const return m_wizard->m_preferencePage; } -QValueList CategoriesPage::selectedTemplates(void) const +TQValueList CategoriesPage::selectedTemplates(void) const { return m_templateSelector->selectedTemplates(); } @@ -312,7 +312,7 @@ PreferencePage::PreferencePage(Wizard* wizard, const char* name) : KPreferencePageDecl(wizard), WizardPage(stepCount++, this, wizard, name) { - connect(m_openConfigButton, SIGNAL(clicked()), kmymoney2, SLOT(slotSettings())); + connect(m_openConfigButton, TQT_SIGNAL(clicked()), kmymoney2, TQT_SLOT(slotSettings())); } KMyMoneyWizardPage* PreferencePage::nextPage(void) const @@ -325,11 +325,11 @@ FilePage::FilePage(Wizard* wizard, const char* name) : WizardPage(stepCount++, this, wizard, name) { m_mandatoryGroup->add(m_dataFileEdit->lineEdit()); - connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged())); + connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged())); KUser user; m_dataFileEdit->setShowLocalProtocol(false); - m_dataFileEdit->setURL(QString("%1/%2.kmy").arg(QDir::homeDirPath(), user.loginName())); + m_dataFileEdit->setURL(TQString("%1/%2.kmy").tqarg(TQDir::homeDirPath(), user.loginName())); // allow selection of non-existing files m_dataFileEdit->setMode(KFile::File); @@ -346,7 +346,7 @@ bool FilePage::isComplete(void) const // b) the directory does exist rc = !KIO::NetAccess::exists(m_dataFileEdit->url(), false, m_wizard); if(rc) { - QRegExp exp("(.*)/(.*)"); + TQRegExp exp("(.*)/(.*)"); rc = false; if(exp.search(m_dataFileEdit->url()) != -1) { if(exp.cap(2).length() > 0) { diff --git a/kmymoney2/wizards/newuserwizard/knewuserwizard.h b/kmymoney2/wizards/newuserwizard/knewuserwizard.h index a8cd8d5..25e010f 100644 --- a/kmymoney2/wizards/newuserwizard/knewuserwizard.h +++ b/kmymoney2/wizards/newuserwizard/knewuserwizard.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QString; +class TQString; // ---------------------------------------------------------------------------- // Project Includes @@ -65,8 +65,9 @@ class Wizard : public KMyMoneyWizard friend class FilePage; Q_OBJECT + TQ_OBJECT public: - Wizard(QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); + Wizard(TQWidget* tqparent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); /** * Returns the personal information of the user (e.g. name, address, etc.) */ @@ -75,7 +76,7 @@ public: /** * Returns the URL that the user has chosen to store the file */ - QString url(void) const; + TQString url(void) const; /** * Returns the information about an institution if entered by @@ -104,7 +105,7 @@ public: /** * Returns a list of templates including accounts to be created */ - QValueList templates(void) const; + TQValueList templates(void) const; private: MyMoneySecurity m_baseCurrency; diff --git a/kmymoney2/wizards/newuserwizard/knewuserwizard_p.h b/kmymoney2/wizards/newuserwizard/knewuserwizard_p.h index aa62725..ea1910a 100644 --- a/kmymoney2/wizards/newuserwizard/knewuserwizard_p.h +++ b/kmymoney2/wizards/newuserwizard/knewuserwizard_p.h @@ -44,8 +44,9 @@ namespace NewUserWizard { class IntroPage : public KIntroPageDecl, public WizardPage { Q_OBJECT + TQ_OBJECT public: - IntroPage(Wizard* parent, const char* name = 0); + IntroPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; }; @@ -57,8 +58,9 @@ public: class GeneralPage : public UserInfo, public WizardPage { Q_OBJECT + TQ_OBJECT public: - GeneralPage(Wizard* parent, const char* name = 0); + GeneralPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; protected slots: @@ -75,8 +77,9 @@ protected slots: class CurrencyPage : public Currency, public WizardPage { Q_OBJECT + TQ_OBJECT public: - CurrencyPage(Wizard* parent, const char* name = 0); + CurrencyPage(Wizard* tqparent, const char* name = 0); void enterPage(void); KMyMoneyWizardPage* nextPage(void) const; }; @@ -87,8 +90,9 @@ public: class AccountPage : public KAccountPageDecl, public WizardPage { Q_OBJECT + TQ_OBJECT public: - AccountPage(Wizard* parent, const char* name = 0); + AccountPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; virtual bool isComplete(void) const; @@ -102,10 +106,11 @@ public: class CategoriesPage : public Accounts, public WizardPage { Q_OBJECT + TQ_OBJECT public: - CategoriesPage(Wizard* parent, const char* name = 0); + CategoriesPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; - QValueList selectedTemplates(void) const; + TQValueList selectedTemplates(void) const; }; /** @@ -116,8 +121,9 @@ public: class PreferencePage : public KPreferencePageDecl, public WizardPage { Q_OBJECT + TQ_OBJECT public: - PreferencePage(Wizard* parent, const char* name = 0); + PreferencePage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; }; @@ -129,8 +135,9 @@ public: class FilePage : public KFilePageDecl, public WizardPage { Q_OBJECT + TQ_OBJECT public: - FilePage(Wizard* parent, const char* name = 0); + FilePage(Wizard* tqparent, const char* name = 0); virtual bool isComplete(void) const; }; diff --git a/kmymoney2/wizards/newuserwizard/kpasswordpagedecl.ui b/kmymoney2/wizards/newuserwizard/kpasswordpagedecl.ui index 3d3c062..95002a3 100644 --- a/kmymoney2/wizards/newuserwizard/kpasswordpagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kpasswordpagedecl.ui @@ -1,6 +1,6 @@ KPasswordPageDecl - + KPasswordPageDecl @@ -29,5 +29,5 @@ - + diff --git a/kmymoney2/wizards/newuserwizard/kpreferencepagedecl.ui b/kmymoney2/wizards/newuserwizard/kpreferencepagedecl.ui index bfe6446..95838b7 100644 --- a/kmymoney2/wizards/newuserwizard/kpreferencepagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kpreferencepagedecl.ui @@ -1,6 +1,6 @@ KPreferencePageDecl - + KPreferencePageDecl @@ -27,9 +27,9 @@ If you would like to review or change any preference settings for KMyMoney at this time, you can do so here. If not just click <b>Next</b>. - + - layout1 + tqlayout1 @@ -45,7 +45,7 @@ Expanding - + 51 20 @@ -72,7 +72,7 @@ Expanding - + 20 31 @@ -92,5 +92,5 @@ - + -- cgit v1.2.1