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/widgets/kmymoneywizard.h | |
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/widgets/kmymoneywizard.h')
-rw-r--r-- | kmymoney2/widgets/kmymoneywizard.h | 107 |
1 files changed, 55 insertions, 52 deletions
diff --git a/kmymoney2/widgets/kmymoneywizard.h b/kmymoney2/widgets/kmymoneywizard.h index 21b57b4..d46563e 100644 --- a/kmymoney2/widgets/kmymoneywizard.h +++ b/kmymoney2/widgets/kmymoneywizard.h @@ -20,13 +20,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdialog.h> -#include <qvaluelist.h> -#include <qpalette.h> -class QVBoxLayout; -class QHBoxLayout; -class QLabel; -class QFrame; +#include <tqdialog.h> +#include <tqvaluelist.h> +#include <tqpalette.h> +class TQVBoxLayout; +class TQHBoxLayout; +class TQLabel; +class TQFrame; // ---------------------------------------------------------------------------- // KDE Includes @@ -56,7 +56,7 @@ class kMandatoryFieldGroup; * necessary functionality to work in concert with KMyMoneyWizard. * * Therefore, few steps are necessary to use this class. They seem to - * be awkward at some stage, but I wanted to be able to use Qt designer + * be awkward at some stage, but I wanted to be able to use TQt designer * to actually design the widget for the page. That's why some things * aren't implemented in a more straight fashion than one would * normally do this. @@ -70,7 +70,7 @@ class kMandatoryFieldGroup; * class KNewUserPage : public KMyMoneyWizardPage * { * public: - * KNewUserPage(unsigned int step, QWidget* widget, KNewUserWizard* parent, const char* name); + * KNewUserPage(unsigned int step, TQWidget* widget, KNewUserWizard* tqparent, const char* name); * * protected: * KNewUserWizard* m_wizard; @@ -80,15 +80,15 @@ class kMandatoryFieldGroup; * The implementation of this class is rather straight-forward: * * @code - * KNewUserPage::KNewUserPage(unsigned int step, QWidget* widget, KNewUserWizard* parent, const char* name) : + * KNewUserPage::KNewUserPage(unsigned int step, TQWidget* widget, KNewUserWizard* tqparent, const char* name) : * KMyMoneyWizardPage(step, widget, name), - * m_wizard(parent) + * m_wizard(tqparent) * { * } * @endcode * * For each page of the wizard, you will have to create a @p ui file with - * Qt designer. + * TQt designer. * Let's assume we call the first page of the wizard 'General' and go * from there. * We also assume, that the wizard has more than one page. @@ -100,8 +100,9 @@ class kMandatoryFieldGroup; * class KNewUserGeneral : public KNewUserGeneralDecl, public KNewUserPage * { * Q_OBJECT + TQ_OBJECT * public: - * KNewUserGeneral(KNewUserWizard* parent, const char* name = 0); + * KNewUserGeneral(KNewUserWizard* tqparent, const char* name = 0); * KMyMoneyWizardPage* nextPage(void); * bool isLastPage(void) { return false; } * @@ -114,13 +115,13 @@ class kMandatoryFieldGroup; * fill some widgets, it could be as simple as: * * @code - * KNewUserGeneral::KNewUserGeneral(KNewUserWizard* parent, const char* name) : - * KNewUserGeneralDecl(parent), - * KNewUserPage(1, this, parent, name) + * KNewUserGeneral::KNewUserGeneral(KNewUserWizard* tqparent, const char* name) : + * KNewUserGeneralDecl(tqparent), + * KNewUserPage(1, this, tqparent, name) * { * kMandatoryFieldGroup* mandatoryGroup = new kMandatoryFieldGroup(this); * mandatoryGroup->add(m_userName); - * connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged())); + * connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged())); * } * * KMyMoneyWizardPage* KNewUserGeneral::nextPage(void) @@ -205,16 +206,16 @@ public: * * @return pointer to widget of page */ - QWidget* widget(void) const { return m_widget; } + TQWidget* widget(void) const { return m_widget; } /** - * This method returns a pointer to the QObject used for + * This method returns a pointer to the TQObject used for * the signal/slot mechanism. * It is required by the KMyMoneyWizard and can be used * by application code for signal/slot connections as well. * Other use is not foreseen. */ - QObject* object(void) const; + TQObject* object(void) const; /** * This method returns a pointer to the widget which should @@ -223,7 +224,7 @@ public: * @return pointer to widget or 0 if none is to be selected * The default implementation returns 0 */ - virtual QWidget* initialFocusWidget(void) const { return 0; } + virtual TQWidget* initialFocusWidget(void) const { return 0; } virtual KMyMoneyWizard* wizard(void) const = 0; @@ -231,14 +232,14 @@ public: * This method returns a specific help context for the page shown * The default returns an empty string. */ - virtual const QString& helpContext(void) const; + virtual const TQString& helpContext(void) const; virtual ~KMyMoneyWizardPage() {} protected: /** * Constructor (kept protected, so that one cannot create such an object directly) */ - KMyMoneyWizardPage(unsigned int step, QWidget* widget, const char* name = 0); + KMyMoneyWizardPage(unsigned int step, TQWidget* widget, const char* name = 0); /** * This method must be called by the implementation when the @@ -255,7 +256,7 @@ protected: private: unsigned int m_step; - QWidget* m_widget; + TQWidget* m_widget; KMyMoneyWizardPagePrivate* const d; }; @@ -269,10 +270,10 @@ template <class T> class WizardPage : public KMyMoneyWizardPage { public: - WizardPage(unsigned int step, QWidget* widget, T* parent, const char* name) : + WizardPage(unsigned int step, TQWidget* widget, T* tqparent, const char* name) : KMyMoneyWizardPage(step, widget, name), - m_wizard(parent), - m_wizardBase(parent) + m_wizard(tqparent), + m_wizardBase(tqparent) { } virtual ~WizardPage() {} @@ -288,7 +289,7 @@ protected: * @author Thomas Baumgart (C) 2006 * * This is a base class for implementation of the KMyMoneyWizard. It provides - * the following layout of a wizard: + * the following tqlayout of a wizard: * * @code * +-wizardLayout-----------------------------------------------+ @@ -334,8 +335,9 @@ protected: * class KNewUserWizard : public KMyMoneyWizard * { * Q_OBJECT + TQ_OBJECT * public: - * KNewUserWizard(QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); + * KNewUserWizard(TQWidget* tqparent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); * * private: * KNewUserGeneral* m_generalPage; @@ -353,8 +355,8 @@ protected: * The implementation is also easy and looks like this: * * @code - * KNewUserWizard::KNewUserWizard(QWidget* parent, const char* name, bool modal, WFlags flags) : - * KMyMoneyWizard(parent, name, modal, flags) + * KNewUserWizard::KNewUserWizard(TQWidget* tqparent, const char* name, bool modal, WFlags flags) : + * KMyMoneyWizard(tqparent, name, modal, flags) * { * setTitle("KMyMoney New User Setup"); * addStep("General Data"); @@ -378,33 +380,34 @@ protected: * int rc = wizard->exec(); * @endcode * - * The return code of exec() is either @p QDialog::Accepted or - * @p QDialog::Rejected. + * The return code of exec() is either @p TQDialog::Accepted or + * @p TQDialog::Rejected. * * @note The implementation of this class is heavily based on ideas found at * http://doc.trolltech.com/4.1/dialogs-complexwizard.html */ -class KMyMoneyWizard : public QDialog +class KMyMoneyWizard : public TQDialog { friend class KMyMoneyWizardPage; Q_OBJECT + TQ_OBJECT public: /** * Modify the title of the wizard to be @p txt. * * @param txt The text that should be used as title */ - void setTitle(const QString& txt); + void setTitle(const TQString& txt); /** * Add step @p text to the wizard * * @param text Text to be shown for this step */ - void addStep(const QString& text); + void addStep(const TQString& text); - QValueList<KMyMoneyWizardPage*> historyPages(void) const { return m_history; } + TQValueList<KMyMoneyWizardPage*> historyPages(void) const { return m_history; } /** * This method repeats selection of the current step in the @@ -420,7 +423,7 @@ public: * * @sa KMyMoneyWizardPage::helpContext() */ - void setHelpContext(const QString& ctx) { m_helpContext = ctx; } + void setHelpContext(const TQString& ctx) { m_helpContext = ctx; } virtual ~KMyMoneyWizard(){} @@ -432,7 +435,7 @@ signals: * @param txt The name of the payee to be created * @param id A connected slot should store the id of the created object in this variable */ - void createPayee(const QString& txt, QString& id); + void createPayee(const TQString& txt, TQString& id); /** * This signal is sent out, when a new category needs to be created @@ -441,13 +444,13 @@ signals: * @param txt The name of the category to be created * @param id A connected slot should store the id of the created object in this variable */ - void createCategory(const QString& txt, QString& id); + void createCategory(const TQString& txt, TQString& id); protected: /** * Constructor (kept protected, so that one cannot create such an object directly) */ - KMyMoneyWizard(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); + KMyMoneyWizard(TQWidget *tqparent = 0, const char *name = 0, bool modal = false, WFlags f = 0); /** * This method sets up the first page after creation of the object @@ -504,21 +507,21 @@ private: void selectStep(unsigned int step); /* - * The layouts + * The tqlayouts */ - QVBoxLayout* m_wizardLayout; - QVBoxLayout* m_stepLayout; - QVBoxLayout* m_pageLayout; - QHBoxLayout* m_buttonLayout; + TQVBoxLayout* m_wizardLayout; + TQVBoxLayout* m_stepLayout; + TQVBoxLayout* m_pageLayout; + TQHBoxLayout* m_buttonLayout; /* * Some misc. widgets required */ - QFrame* m_stepFrame; - QLabel* m_stepLabel; - QPalette m_stepPalette; + TQFrame* m_stepFrame; + TQLabel* m_stepLabel; + TQPalette m_stepPalette; - QValueList<QLabel*> m_steps; // the list of step labels + TQValueList<TQLabel*> m_steps; // the list of step labels int m_step; // the currently selected step /* @@ -529,9 +532,9 @@ private: /* * The history stack */ - QValueList<KMyMoneyWizardPage*> m_history; + TQValueList<KMyMoneyWizardPage*> m_history; - QString m_helpContext; + TQString m_helpContext; }; |