diff options
Diffstat (limited to 'kmymoney2/widgets/kmymoneyedit.h')
-rw-r--r-- | kmymoney2/widgets/kmymoneyedit.h | 70 |
1 files changed, 36 insertions, 34 deletions
diff --git a/kmymoney2/widgets/kmymoneyedit.h b/kmymoney2/widgets/kmymoneyedit.h index 6415a0c..6df557d 100644 --- a/kmymoney2/widgets/kmymoneyedit.h +++ b/kmymoney2/widgets/kmymoneyedit.h @@ -22,11 +22,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qhbox.h> -#include <qvalidator.h> +#include <tqhbox.h> +#include <tqvalidator.h> -class QVBox; -class QWidget; +class TQVBox; +class TQWidget; // ---------------------------------------------------------------------------- // KDE Includes @@ -43,7 +43,7 @@ class MyMoneyMoney; class kMyMoneyCalculator; #if KDE_VERSION <= KDE_MAKE_VERSION(3,1,0) - #define KDoubleValidator QDoubleValidator + #define KDoubleValidator TQDoubleValidator #endif /** @@ -53,31 +53,32 @@ class kMyMoneyCalculator; * * @author Thomas Baumgart */ -class kMyMoneyMoneyValidator : public QDoubleValidator +class kMyMoneyMoneyValidator : public TQDoubleValidator { Q_OBJECT + TQ_OBJECT public: /** * Constuct a locale-aware KDoubleValidator with default range - * (whatever QDoubleValidator uses for that) and parent @p - * parent + * (whatever TQDoubleValidator uses for that) and tqparent @p + * tqparent */ - kMyMoneyMoneyValidator( QObject * parent, const char * name=0 ); + kMyMoneyMoneyValidator( TQObject * tqparent, const char * name=0 ); /** * Constuct a locale-aware KDoubleValidator for range [@p bottom,@p * top] and a precision of @p decimals decimals after the decimal * point. */ kMyMoneyMoneyValidator( double bottom, double top, int decimals, - QObject * parent, const char * name=0 ); + TQObject * tqparent, const char * name=0 ); /** * Destructs the validator. */ virtual ~kMyMoneyMoneyValidator() {} /** Overloaded for internal reasons. The API is not affected. */ - virtual QValidator::State validate( QString & input, int & pos ) const; + virtual TQValidator::State validate( TQString & input, int & pos ) const; }; /** @@ -88,19 +89,20 @@ public: * * @author Michael Edwardes, Thomas Baumgart */ -class kMyMoneyEdit : public QHBox +class kMyMoneyEdit : public TQHBox { Q_OBJECT - Q_PROPERTY(bool calculatorButtonVisibility READ isCalculatorButtonVisible WRITE setCalculatorButtonVisible); - Q_PROPERTY(bool resetButtonVisibility READ isResetButtonVisible WRITE setResetButtonVisible); - Q_PROPERTY(bool allowEmpty READ isEmptyAllowed WRITE setAllowEmpty); - Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly ) + TQ_OBJECT + TQ_PROPERTY(bool calculatorButtonVisibility READ isCalculatorButtonVisible WRITE setCalculatorButtonVisible); + TQ_PROPERTY(bool resetButtonVisibility READ isResetButtonVisible WRITE setResetButtonVisible); + TQ_PROPERTY(bool allowEmpty READ isEmptyAllowed WRITE setAllowEmpty); + TQ_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly ) private: - QString previousText; // keep track of what has been typed - QString m_text; // keep track of what was the original value + TQString previousText; // keep track of what has been typed + TQString m_text; // keep track of what was the original value kMyMoneyCalculator* m_calculator; - QVBox* m_calculatorFrame; + TQVBox* m_calculatorFrame; kMyMoneyLineEdit* m_edit; KPushButton* m_calcButton; KPushButton* m_resetButton; @@ -112,7 +114,7 @@ private: /** * Internal helper function for value() and ensureFractionalPart(void). */ - void ensureFractionalPart(QString& txt) const; + void ensureFractionalPart(TQString& txt) const; protected: /** @@ -126,9 +128,9 @@ protected: * event pointed to by @p ev. If @p ev is 0, then no key * event is replayed. * - * @param ev pointer to QKeyEvent that started the calculator. + * @param ev pointer to TQKeyEvent that started the calculator. */ - void calculatorOpen(QKeyEvent* ev); + void calculatorOpen(TQKeyEvent* ev); /** * Helper method for constructors. @@ -136,13 +138,13 @@ protected: void init(void); protected slots: - void theTextChanged(const QString & text); + void theTextChanged(const TQString & text); void slotCalculatorResult(void); void slotCalculatorOpen(void); public: - kMyMoneyEdit(QWidget *parent=0, const char *name=0, const int prec = -2); - kMyMoneyEdit(const MyMoneySecurity& eq, QWidget *parent=0, const char *name=0); + kMyMoneyEdit(TQWidget *tqparent=0, const char *name=0, const int prec = -2); + kMyMoneyEdit(const MyMoneySecurity& eq, TQWidget *tqparent=0, const char *name=0); ~kMyMoneyEdit(); /** @@ -156,13 +158,13 @@ public: bool isValid(void) const; - virtual bool eventFilter(QObject * , QEvent * ); + virtual bool eventFilter(TQObject * , TQEvent * ); /** * This method returns the value of the edit field in "numerator/denominator" format. * If you want to get the text of the edit field, use lineedit()->text() instead. */ - QString text(void) const { return value().toString(); }; + TQString text(void) const { return value().toString(); }; void setMinimumWidth(int w) { m_edit->setMinimumWidth(w); }; @@ -182,7 +184,7 @@ public: */ int precision(void) { return m_prec; }; - QWidget* focusWidget(void) const; + TQWidget* tqfocusWidget(void) const; /** * This method allows to modify the behavior of the widget @@ -196,7 +198,7 @@ public: void setAllowEmpty(bool allowed = true); /** Overloaded for internal reasons. The API is not affected. */ - void setValidator(const QValidator* v); + void setValidator(const TQValidator* v); bool isCalculatorButtonVisible(void) const; @@ -206,16 +208,16 @@ public: KLineEdit* lineedit(void) const; - void setHint(const QString& hint) const; + void setHint(const TQString& hint) const; bool isReadOnly(void) const; public slots: - void loadText(const QString& text); + void loadText(const TQString& text); void resetText(void); void clearText(void); - void setText(const QString& txt) { setValue(MyMoneyMoney(txt)); }; + void setText(const TQString& txt) { setValue(MyMoneyMoney(txt)); }; /** * This method allows to show/hide the calculator button of the widget. @@ -235,9 +237,9 @@ signals: // Signals * This signal is sent, when the focus leaves this widget and * the amount has been changed by user during this session. */ - void valueChanged(const QString& text); + void valueChanged(const TQString& text); - void textChanged(const QString& text); + void textChanged(const TQString& text); }; #endif |