31 #include <tqspinbox.h>
32 #include <tdelibs_export.h>
53 TQ_PROPERTY( TQString label READ label WRITE setLabel )
60 KNumInput(TQWidget* parent=0,
const char* name=0);
88 virtual void setLabel(
const TQString & label,
int a = AlignLeft | AlignTop);
93 TQString label()
const;
107 void setSteps(
int minor,
int major);
113 TQSizePolicy sizePolicy()
const;
120 virtual TQSize sizeHint()
const;
128 void layout(
bool deep);
141 int m_colw1, m_colw2;
145 TQSize m_sizeSlider, m_sizeLabel;
153 virtual void virtual_hook(
int id,
void* data );
155 class KNumInputPrivate;
192 TQ_PROPERTY(
int value READ value WRITE setValue )
193 TQ_PROPERTY(
int minValue READ minValue WRITE setMinValue )
194 TQ_PROPERTY(
int maxValue READ maxValue WRITE setMaxValue )
195 TQ_PROPERTY(
int referencePoint READ referencePoint WRITE setReferencePoint )
196 TQ_PROPERTY(
double relativeValue READ relativeValue WRITE setRelativeValue )
197 TQ_PROPERTY( TQString suffix READ suffix WRITE setSuffix )
198 TQ_PROPERTY( TQString prefix READ prefix WRITE setPrefix )
199 TQ_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText )
219 KIntNumInput(
int value, TQWidget* parent=0,
int base = 10,
const char *name=0);
256 double relativeValue()
const;
262 int referencePoint()
const;
268 TQString suffix()
const;
273 TQString prefix()
const;
278 TQString specialValueText()
const;
286 void setRange(
int min,
int max,
int step=1,
bool slider=
true);
290 void setMinValue(
int min);
294 int minValue()
const;
298 void setMaxValue(
int max);
302 int maxValue()
const;
310 void setSpecialValueText(
const TQString& text);
312 virtual void setLabel(
const TQString & label,
int a = AlignLeft | AlignTop);
321 virtual TQSize minimumSizeHint()
const;
333 void setRelativeValue(
double);
339 void setReferencePoint(
int);
350 void setSuffix(
const TQString &suffix);
359 void setPrefix(
const TQString &prefix);
365 void setEditFocus(
bool mark =
true );
382 void spinValueChanged(
int);
383 void slotEmitRelativeValueChanged(
int);
386 virtual void doLayout();
387 void resizeEvent ( TQResizeEvent * );
393 void init(
int value,
int _base);
396 virtual void virtual_hook(
int id,
void* data );
398 class KIntNumInputPrivate;
399 KIntNumInputPrivate *d;
438 TQ_PROPERTY(
double value READ value WRITE setValue )
439 TQ_PROPERTY(
double minValue READ minValue WRITE setMinValue )
440 TQ_PROPERTY(
double maxValue READ maxValue WRITE setMaxValue )
441 TQ_PROPERTY( TQString suffix READ suffix WRITE setSuffix )
442 TQ_PROPERTY( TQString prefix READ prefix WRITE setPrefix )
443 TQ_PROPERTY( TQString specialValueText READ specialValueText WRITE setSpecialValueText )
444 TQ_PROPERTY(
int precision READ precision WRITE setPrecision )
445 TQ_PROPERTY(
double referencePoint READ referencePoint WRITE setReferencePoint )
446 TQ_PROPERTY(
double relativeValue READ relativeValue WRITE setRelativeValue )
463 KDoubleNumInput(
double value, TQWidget *parent=0,
const char *name=0) TDE_DEPRECATED;
477 KDoubleNumInput(
double lower,
double upper,
double value,
double step=0.01,
478 int precision=2, TQWidget *parent=0,
const char *name=0);
520 double lower,
double upper,
double value,
double step=0.02,
521 int precision=2, TQWidget *parent=0,
const char *name=0);
526 double value()
const;
532 TQString suffix()
const;
538 TQString prefix()
const;
544 int precision()
const;
558 void setRange(
double min,
double max,
double step=1,
bool slider=
true);
562 void setMinValue(
double min);
566 double minValue()
const;
570 void setMaxValue(
double max);
574 double maxValue()
const;
579 void setPrecision(
int precision);
585 double referencePoint()
const;
591 double relativeValue()
const;
599 void setSpecialValueText(
const TQString& text);
601 virtual void setLabel(
const TQString & label,
int a = AlignLeft | AlignTop);
602 virtual TQSize minimumSizeHint()
const;
603 virtual bool eventFilter(TQObject*, TQEvent*);
609 void setValue(
double);
615 void setRelativeValue(
double);
623 void setReferencePoint(
double ref);
632 void setSuffix(
const TQString &suffix);
640 void setPrefix(
const TQString &prefix);
658 void sliderMoved(
int);
659 void slotEmitRelativeValueChanged(
double);
662 virtual void doLayout();
663 void resizeEvent ( TQResizeEvent * );
665 virtual void resetEditBox();
671 double m_lower, m_upper, m_step;
676 friend class KDoubleLine;
678 void init(
double value,
double lower,
double upper,
679 double step,
int precision);
680 double mapSliderToSpin(
int)
const;
681 void updateLegacyMembers();
683 TQString m_specialvalue, m_prefix, m_suffix;
689 virtual void virtual_hook(
int id,
void* data );
691 class KDoubleNumInputPrivate;
692 KDoubleNumInputPrivate *d;
711 TQ_PROPERTY(
int base READ base WRITE setBase )
722 KIntSpinBox( TQWidget *parent=0,
const char *name=0);
738 KIntSpinBox(
int lower,
int upper,
int step,
int value,
int base = 10,
739 TQWidget* parent = 0,
const char* name = 0);
749 void setBase(
int base);
758 void setEditFocus(
bool mark);
766 virtual TQString mapValueToText(
int);
772 virtual int mapTextToValue(
bool*);
777 virtual void virtual_hook(
int id,
void* data );
779 class KIntSpinBoxPrivate;
780 KIntSpinBoxPrivate *d;
841 TQ_PROPERTY(
bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers )
842 TQ_OVERRIDE(
double maxValue READ maxValue WRITE setMaxValue )
843 TQ_OVERRIDE(
double minValue READ minValue WRITE setMinValue )
844 TQ_OVERRIDE(
double lineStep READ lineStep WRITE setLineStep )
845 TQ_OVERRIDE(
double value READ value WRITE setValue )
846 TQ_PROPERTY(
int precision READ precision WRITE setPrecision )
857 KDoubleSpinBox(
double lower,
double upper,
double step,
double value,
858 int precision=2, TQWidget * parent=0,
const char * name=0 );
863 bool acceptLocalizedNumbers()
const;
867 virtual void setAcceptLocalizedNumbers(
bool accept );
872 void setRange(
double lower,
double upper,
double step=0.01,
int precision=2 );
876 int precision()
const;
881 void setPrecision(
int precision );
895 virtual void setPrecision(
int precision,
bool force );
898 double value()
const;
901 double minValue()
const;
909 void setMinValue(
double value );
912 double maxValue()
const;
920 void setMaxValue(
double value );
923 double lineStep()
const;
929 void setLineStep(
double step );
932 void setValidator(
const TQValidator * );
942 virtual void setValue(
double value );
945 virtual TQString mapValueToText(
int);
946 virtual int mapTextToValue(
bool*);
949 void slotValueChanged(
int value );
952 virtual void virtual_hook(
int id,
void* data );
954 typedef TQSpinBox base;
955 void updateValidator();
956 int maxPrecision()
const;
A spin box for fractional numbers.
void valueChanged(double value)
Emitted whenever TQSpinBox::valueChanged( int ) is emitted.
A TQSpinBox with support for arbitrary base numbers.