-rw-r--r-- | microkde/kdeui/knuminput.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/microkde/kdeui/knuminput.h b/microkde/kdeui/knuminput.h index 123fefa..9f9e200 100644 --- a/microkde/kdeui/knuminput.h +++ b/microkde/kdeui/knuminput.h | |||
@@ -26,12 +26,17 @@ | |||
26 | 26 | ||
27 | #ifndef K_NUMINPUT_H | 27 | #ifndef K_NUMINPUT_H |
28 | #define K_NUMINPUT_H | 28 | #define K_NUMINPUT_H |
29 | 29 | ||
30 | #include <qwidget.h> | 30 | #include <qwidget.h> |
31 | #include <qspinbox.h> | 31 | #include <qspinbox.h> |
32 | #include <QLineEdit> | ||
33 | //Added by qt3to4: | ||
34 | #include <QResizeEvent> | ||
35 | #include <QLabel> | ||
36 | #include <QEvent> | ||
32 | 37 | ||
33 | class QLabel; | 38 | class QLabel; |
34 | class QSlider; | 39 | class QSlider; |
35 | class QLineEdit; | 40 | class QLineEdit; |
36 | class QLayout; | 41 | class QLayout; |
37 | class QValidator; | 42 | class QValidator; |
@@ -78,13 +83,13 @@ public: | |||
78 | * | 83 | * |
79 | * @li @p AlignTop The label is placed above the edit/slider | 84 | * @li @p AlignTop The label is placed above the edit/slider |
80 | * @li @p AlignVCenter The label is placed left beside the edit | 85 | * @li @p AlignVCenter The label is placed left beside the edit |
81 | * @li @p AlignBottom The label is placed below the edit/slider | 86 | * @li @p AlignBottom The label is placed below the edit/slider |
82 | * | 87 | * |
83 | */ | 88 | */ |
84 | virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); | 89 | virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); |
85 | 90 | ||
86 | /** | 91 | /** |
87 | * @return the text of the label. | 92 | * @return the text of the label. |
88 | */ | 93 | */ |
89 | QString label() const; | 94 | QString label() const; |
90 | 95 | ||
@@ -299,13 +304,13 @@ public: | |||
299 | */ | 304 | */ |
300 | void setSpecialValueText(const QString& text); | 305 | void setSpecialValueText(const QString& text); |
301 | 306 | ||
302 | /** | 307 | /** |
303 | * @reimplemented | 308 | * @reimplemented |
304 | */ | 309 | */ |
305 | virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); | 310 | virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); |
306 | 311 | ||
307 | /** | 312 | /** |
308 | * This method returns the minimum size necessary to display the | 313 | * This method returns the minimum size necessary to display the |
309 | * control. The minimum size is enough to show all the labels | 314 | * control. The minimum size is enough to show all the labels |
310 | * in the current font (font change may invalidate the return value). | 315 | * in the current font (font change may invalidate the return value). |
311 | * | 316 | * |
@@ -585,13 +590,13 @@ public: | |||
585 | */ | 590 | */ |
586 | void setSpecialValueText(const QString& text); | 591 | void setSpecialValueText(const QString& text); |
587 | 592 | ||
588 | /** | 593 | /** |
589 | * @reimplemented | 594 | * @reimplemented |
590 | */ | 595 | */ |
591 | virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); | 596 | virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); |
592 | /** | 597 | /** |
593 | * @reimplemented | 598 | * @reimplemented |
594 | */ | 599 | */ |
595 | virtual QSize minimumSizeHint() const; | 600 | virtual QSize minimumSizeHint() const; |
596 | /** | 601 | /** |
597 | * @reimplemented | 602 | * @reimplemented |
@@ -755,12 +760,16 @@ public: | |||
755 | /** | 760 | /** |
756 | * sets focus and optionally marks all text | 761 | * sets focus and optionally marks all text |
757 | * | 762 | * |
758 | */ | 763 | */ |
759 | void setEditFocus(bool mark); | 764 | void setEditFocus(bool mark); |
760 | 765 | ||
766 | void setValidator(const QValidator *v) { | ||
767 | lineEdit()->setValidator(v); | ||
768 | } | ||
769 | |||
761 | protected: | 770 | protected: |
762 | 771 | ||
763 | /** | 772 | /** |
764 | * Overloaded the method in QSpinBox | 773 | * Overloaded the method in QSpinBox |
765 | * to make use of the base given in the constructor. | 774 | * to make use of the base given in the constructor. |
766 | */ | 775 | */ |