diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
commit | ffe8a83e053396df448e9413828527613ca3bd46 (patch) | |
tree | a73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdeui/knuminput.h | |
parent | 682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff) | |
download | tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/knuminput.h')
-rw-r--r-- | kdeui/knuminput.h | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/kdeui/knuminput.h b/kdeui/knuminput.h index 212e0e3cf..67263f900 100644 --- a/kdeui/knuminput.h +++ b/kdeui/knuminput.h @@ -27,8 +27,8 @@ #ifndef K_NUMINPUT_H #define K_NUMINPUT_H -#include <qwidget.h> -#include <qspinbox.h> +#include <tqwidget.h> +#include <tqspinbox.h> #include <kdelibs_export.h> class QLabel; @@ -49,28 +49,28 @@ class KIntSpinBox; class KDEUI_EXPORT KNumInput : public QWidget { Q_OBJECT - Q_PROPERTY( QString label READ label WRITE setLabel ) + Q_PROPERTY( TQString label READ label WRITE setLabel ) public: /** * Default constructor * @param parent If parent is 0, the new widget becomes a top-level window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted. - * @param name The name is sent to the QObject constructor. + * @param name The name is sent to the TQObject constructor. */ - KNumInput(QWidget* parent=0, const char* name=0); + KNumInput(TQWidget* parent=0, const char* name=0); /** * @param below A pointer to another KNumInput. * @param parent parent widget * @param name name of the widget */ - KNumInput(KNumInput* below, QWidget* parent=0, const char* name=0); + KNumInput(KNumInput* below, TQWidget* parent=0, const char* name=0); ~KNumInput(); /** * Sets the text and alignment of the main description label. * * @param label The text of the label. - * Use QString::null to remove an existing one. + * Use TQString::null to remove an existing one. * * @param a one of @p AlignLeft, @p AlignHCenter, YAlignRight and * @p AlignTop, @p AlignVCenter, @p AlignBottom. @@ -84,12 +84,12 @@ public: * @li @p AlignBottom The label is placed below the edit/slider * */ - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); + virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop); /** * @return the text of the label. */ - QString label() const; + TQString label() const; /** * @return if the num input has a slider. @@ -107,16 +107,16 @@ public: /** * Specifies that this widget may stretch horizontally, but is - * fixed vertically (like QSpinBox itself). + * fixed vertically (like TQSpinBox itself). */ - QSizePolicy sizePolicy() const; + TQSizePolicy sizePolicy() const; /** * Returns a size which fits the contents of the control. * * @return the preferred size necessary to show the control */ - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; protected: /** @@ -139,9 +139,9 @@ protected: KNumInput* m_prev, *m_next; int m_colw1, m_colw2; - QLabel* m_label; - QSlider* m_slider; - QSize m_sizeSlider, m_sizeLabel; + TQLabel* m_label; + TQSlider* m_slider; + TQSize m_sizeSlider, m_sizeLabel; int m_alignment; @@ -160,7 +160,7 @@ private: /** * @short An input widget for integer numbers, consisting of a spinbox and a slider. * - * KIntNumInput combines a QSpinBox and optionally a QSlider + * KIntNumInput combines a TQSpinBox and optionally a QSlider * with a label to make an easy to use control for setting some integer * parameter. This is especially nice for configuration dialogs, * which can have many such combinated controls. @@ -172,7 +172,7 @@ private: * A special feature of KIntNumInput, designed specifically for * the situation when there are several KIntNumInputs in a column, * is that you can specify what portion of the control is taken by the - * QSpinBox (the remaining portion is used by the slider). This makes + * TQSpinBox (the remaining portion is used by the slider). This makes * it very simple to have all the sliders in a column be the same size. * * It uses KIntValidator validator class. KIntNumInput enforces the @@ -192,19 +192,19 @@ class KDEUI_EXPORT KIntNumInput : public KNumInput Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue ) Q_PROPERTY( int referencePoint READ referencePoint WRITE setReferencePoint ) Q_PROPERTY( double relativeValue READ relativeValue WRITE setRelativeValue ) - Q_PROPERTY( QString suffix READ suffix WRITE setSuffix ) - Q_PROPERTY( QString prefix READ prefix WRITE setPrefix ) - Q_PROPERTY( QString specialValueText READ specialValueText WRITE setSpecialValueText ) + Q_PROPERTY( TQString suffix READ suffix WRITE setSuffix ) + Q_PROPERTY( TQString prefix READ prefix WRITE setPrefix ) + Q_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText ) public: /** * Constructs an input control for integer values * with base 10 and initial value 0. */ - KIntNumInput(QWidget *parent=0, const char *name=0); + KIntNumInput(TQWidget *parent=0, const char *name=0); /** * Constructor - * It constructs a QSpinBox that allows the input of integer numbers + * It constructs a TQSpinBox that allows the input of integer numbers * in the range of -INT_MAX to +INT_MAX. To set a descriptive label, * use setLabel(). To enforce the value being in a range and optionally to * attach a slider to it, use setRange(). @@ -214,7 +214,7 @@ public: * @param parent parent QWidget * @param name internal name for this widget */ - KIntNumInput(int value, QWidget* parent=0, int base = 10, const char *name=0); + KIntNumInput(int value, TQWidget* parent=0, int base = 10, const char *name=0); /** * Constructor @@ -233,7 +233,7 @@ public: * @param parent parent QWidget * @param name internal name for this widget */ - KIntNumInput(KNumInput* below, int value, QWidget* parent=0, int base = 10, const char *name=0); + KIntNumInput(KNumInput* below, int value, TQWidget* parent=0, int base = 10, const char *name=0); /** * Destructor @@ -263,17 +263,17 @@ public: * @return the suffix displayed behind the value. * @see setSuffix() */ - QString suffix() const; + TQString suffix() const; /** * @return the prefix displayed in front of the value. * @see setPrefix() */ - QString prefix() const; + TQString prefix() const; /** * @return the string displayed for a special value. * @see setSpecialValueText() */ - QString specialValueText() const; + TQString specialValueText() const; /** * @param min minimum value @@ -305,9 +305,9 @@ public: * value is equal to minVal(). Typically this is used for indicating * that the choice has a special (default) meaning. */ - void setSpecialValueText(const QString& text); + void setSpecialValueText(const TQString& text); - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); + virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop); /** * This method returns the minimum size necessary to display the @@ -316,7 +316,7 @@ public: * * @return the minimum size necessary to show the control */ - virtual QSize minimumSizeHint() const; + virtual TQSize minimumSizeHint() const; public slots: /** @@ -338,23 +338,23 @@ public slots: /** * Sets the suffix to @p suffix. - * Use QString::null to disable this feature. + * Use TQString::null to disable this feature. * Formatting has to be provided (e.g. a space separator between the * prepended @p value and the suffix's text has to be provided * as the first character in the suffix). * - * @see QSpinBox::setSuffix(), #setPrefix() + * @see TQSpinBox::setSuffix(), #setPrefix() */ - void setSuffix(const QString &suffix); + void setSuffix(const TQString &suffix); /** * Sets the prefix to @p prefix. - * Use QString::null to disable this feature. + * Use TQString::null to disable this feature. * Formatting has to be provided (see above). * - * @see QSpinBox::setPrefix(), #setSuffix() + * @see TQSpinBox::setPrefix(), #setSuffix() */ - void setPrefix(const QString &prefix); + void setPrefix(const TQString &prefix); /** * sets focus to the edit widget and marks all text in if mark == true @@ -382,10 +382,10 @@ private slots: protected: virtual void doLayout(); - void resizeEvent ( QResizeEvent * ); + void resizeEvent ( TQResizeEvent * ); KIntSpinBox* m_spin; - QSize m_sizeSpin; + TQSize m_sizeSpin; private: void init(int value, int _base); @@ -405,7 +405,7 @@ class KDoubleLine; /** * @short An input control for real numbers, consisting of a spinbox and a slider. * - * KDoubleNumInput combines a QSpinBox and optionally a QSlider + * KDoubleNumInput combines a TQSpinBox and optionally a QSlider * with a label to make an easy to use control for setting some float * parameter. This is especially nice for configuration dialogs, * which can have many such combinated controls. @@ -417,7 +417,7 @@ class KDoubleLine; * A special feature of KDoubleNumInput, designed specifically for * the situation when there are several instances in a column, * is that you can specify what portion of the control is taken by the - * QSpinBox (the remaining portion is used by the slider). This makes + * TQSpinBox (the remaining portion is used by the slider). This makes * it very simple to have all the sliders in a column be the same size. * * It uses the KDoubleValidator validator class. KDoubleNumInput @@ -435,9 +435,9 @@ class KDEUI_EXPORT KDoubleNumInput : public KNumInput Q_PROPERTY( double value READ value WRITE setValue ) Q_PROPERTY( double minValue READ minValue WRITE setMinValue ) Q_PROPERTY( double maxValue READ maxValue WRITE setMaxValue ) - Q_PROPERTY( QString suffix READ suffix WRITE setSuffix ) - Q_PROPERTY( QString prefix READ prefix WRITE setPrefix ) - Q_PROPERTY( QString specialValueText READ specialValueText WRITE setSpecialValueText ) + Q_PROPERTY( TQString suffix READ suffix WRITE setSuffix ) + Q_PROPERTY( TQString prefix READ prefix WRITE setPrefix ) + Q_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText ) Q_PROPERTY( int precision READ precision WRITE setPrecision ) Q_PROPERTY( double referencePoint READ referencePoint WRITE setReferencePoint ) Q_PROPERTY( double relativeValue READ relativeValue WRITE setRelativeValue ) @@ -447,7 +447,7 @@ public: * Constructs an input control for double values * with initial value 0.00. */ - KDoubleNumInput(QWidget *parent=0, const char *name=0); + KDoubleNumInput(TQWidget *parent=0, const char *name=0); /** * @deprecated (value is rounded to a multiple of 1/100) @@ -457,7 +457,7 @@ public: * @param parent parent QWidget * @param name internal name for this widget */ - KDoubleNumInput(double value, QWidget *parent=0, const char *name=0) KDE_DEPRECATED; + KDoubleNumInput(double value, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; /** * Constructor @@ -472,7 +472,7 @@ public: * @since 3.1 */ KDoubleNumInput(double lower, double upper, double value, double step=0.01, - int precision=2, QWidget *parent=0, const char *name=0); + int precision=2, TQWidget *parent=0, const char *name=0); /** * destructor @@ -490,7 +490,7 @@ public: * @param parent parent QWidget * @param name internal name for this widget **/ - KDoubleNumInput(KNumInput* below, double value, QWidget* parent=0, const char* name=0) KDE_DEPRECATED; + KDoubleNumInput(KNumInput* below, double value, TQWidget* parent=0, const char* name=0) KDE_DEPRECATED; /** * Constructor @@ -515,7 +515,7 @@ public: */ KDoubleNumInput(KNumInput* below, double lower, double upper, double value, double step=0.02, - int precision=2, QWidget *parent=0, const char *name=0); + int precision=2, TQWidget *parent=0, const char *name=0); /** * @return the current value. @@ -526,13 +526,13 @@ public: * @return the suffix. * @see setSuffix() */ - QString suffix() const; + TQString suffix() const; /** * @return the prefix. * @see setPrefix() */ - QString prefix() const; + TQString prefix() const; /** * @return the precision. @@ -544,7 +544,7 @@ public: * @return the string displayed for a special value. * @see setSpecialValueText() */ - QString specialValueText() const { return m_specialvalue; } + TQString specialValueText() const { return m_specialvalue; } /** * @param min minimum value @@ -593,11 +593,11 @@ public: * value is equal to minVal(). Typically this is used for indicating * that the choice has a special (default) meaning. */ - void setSpecialValueText(const QString& text); + void setSpecialValueText(const TQString& text); - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); - virtual QSize minimumSizeHint() const; - virtual bool eventFilter(QObject*, QEvent*); + virtual void setLabel(const TQString & label, int a = AlignLeft | AlignTop); + virtual TQSize minimumSizeHint() const; + virtual bool eventFilter(TQObject*, TQEvent*); public slots: /** @@ -620,21 +620,21 @@ public slots: void setReferencePoint(double ref); /** - * Sets the suffix to be displayed to @p suffix. Use QString::null to disable + * Sets the suffix to be displayed to @p suffix. Use TQString::null to disable * this feature. Note that the suffix is attached to the value without any * spacing. So if you prefer to display a space separator, set suffix * to something like " cm". * @see setSuffix() */ - void setSuffix(const QString &suffix); + void setSuffix(const TQString &suffix); /** - * Sets the prefix to be displayed to @p prefix. Use QString::null to disable + * Sets the prefix to be displayed to @p prefix. Use TQString::null to disable * this feature. Note that the prefix is attached to the value without any * spacing. * @see setPrefix() */ - void setPrefix(const QString &prefix); + void setPrefix(const TQString &prefix); signals: /** @@ -657,7 +657,7 @@ private slots: protected: virtual void doLayout(); - void resizeEvent ( QResizeEvent * ); + void resizeEvent ( TQResizeEvent * ); virtual void resetEditBox(); @@ -668,7 +668,7 @@ protected: double m_lower, m_upper, m_step; // ### end no longer used - QSize m_sizeEdit; + TQSize m_sizeEdit; friend class KDoubleLine; private: @@ -677,7 +677,7 @@ private: double mapSliderToSpin(int) const; void updateLegacyMembers(); // ### no longer used, remove when BIC allowed: - QString m_specialvalue, m_prefix, m_suffix; + TQString m_specialvalue, m_prefix, m_suffix; double m_value; short m_precision; // ### end remove when BIC allowed @@ -693,9 +693,9 @@ private: /* ------------------------------------------------------------------------ */ /** - * @short A QSpinBox with support for arbitrary base numbers. + * @short A TQSpinBox with support for arbitrary base numbers. * - * A QSpinBox with support for arbitrary base numbers + * A TQSpinBox with support for arbitrary base numbers * (e.g. hexadecimal). * * The class provides an easy interface to use other @@ -715,7 +715,7 @@ public: * and a slider, with minimal value 0, maximal value 99, step 1, base 10 * and initial value 0. */ - KIntSpinBox( QWidget *parent=0, const char *name=0); + KIntSpinBox( TQWidget *parent=0, const char *name=0); /** * Constructor. @@ -732,7 +732,7 @@ public: * @param name The Name of the widget. */ KIntSpinBox(int lower, int upper, int step, int value, int base = 10, - QWidget* parent = 0, const char* name = 0); + TQWidget* parent = 0, const char* name = 0); /** * Destructor. @@ -759,7 +759,7 @@ protected: * Overloaded the method in QSpinBox * to make use of the base given in the constructor. */ - virtual QString mapValueToText(int); + virtual TQString mapValueToText(int); /** * Overloaded the method in QSpinBox @@ -831,7 +831,7 @@ private: @since 3.1 **/ -class KDEUI_EXPORT KDoubleSpinBox : public QSpinBox { +class KDEUI_EXPORT KDoubleSpinBox : public TQSpinBox { Q_OBJECT Q_PROPERTY( bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers ) Q_OVERRIDE( double maxValue READ maxValue WRITE setMaxValue ) @@ -844,13 +844,13 @@ public: /** Constructs a KDoubleSpinBox with parent @p parent and default values for range and value (whatever QRangeControl uses) and precision (2). */ - KDoubleSpinBox( QWidget * parent=0, const char * name=0 ); + KDoubleSpinBox( TQWidget * parent=0, const char * name=0 ); /** Constructs a KDoubleSpinBox with parent @p parent, range [ @p lower, @p upper ], lineStep @p step, precision @p precision and initial value @p value. */ KDoubleSpinBox( double lower, double upper, double step, double value, - int precision=2, QWidget * parent=0, const char * name=0 ); + int precision=2, TQWidget * parent=0, const char * name=0 ); virtual ~KDoubleSpinBox(); @@ -924,10 +924,10 @@ public: void setLineStep( double step ); /** Overridden to ignore any setValidator() calls. */ - void setValidator( const QValidator * ); + void setValidator( const TQValidator * ); signals: - /** Emitted whenever QSpinBox::valueChanged( int ) is emitted. */ + /** Emitted whenever TQSpinBox::valueChanged( int ) is emitted. */ void valueChanged( double value ); public slots: @@ -937,7 +937,7 @@ public slots: virtual void setValue( double value ); protected: - virtual QString mapValueToText(int); + virtual TQString mapValueToText(int); virtual int mapTextToValue(bool*); protected slots: @@ -946,7 +946,7 @@ protected slots: protected: virtual void virtual_hook( int id, void* data ); private: - typedef QSpinBox base; + typedef TQSpinBox base; void updateValidator(); int maxPrecision() const; |