45 #include <QtGui/qabstractspinbox.h> 72 QT3_SUPPORT_CONSTRUCTOR
QSpinBox(
int min,
int max,
int step,
QWidget *parent,
73 const char *
name = 0);
79 void setPrefix(
const QString &prefix);
82 void setSuffix(
const QString &suffix);
86 int singleStep()
const;
87 void setSingleStep(
int val);
90 void setMinimum(
int min);
93 void setMaximum(
int max);
95 void setRange(
int min,
int max);
98 inline QT3_SUPPORT
void setLineStep(
int step) { setSingleStep(step); }
99 inline QT3_SUPPORT
void setMaxValue(
int val) { setMaximum(val); }
100 inline QT3_SUPPORT
void setMinValue(
int val) { setMinimum(val); }
101 inline QT3_SUPPORT
int maxValue()
const {
return maximum(); }
102 inline QT3_SUPPORT
int minValue()
const {
return minimum(); }
108 virtual int valueFromText(
const QString &
text)
const;
109 virtual QString textFromValue(
int val)
const;
114 void setValue(
int val);
117 void valueChanged(
int);
118 void valueChanged(
const QString &);
141 double value()
const;
144 void setPrefix(
const QString &prefix);
147 void setSuffix(
const QString &suffix);
151 double singleStep()
const;
152 void setSingleStep(
double val);
154 double minimum()
const;
155 void setMinimum(
double min);
157 double maximum()
const;
158 void setMaximum(
double max);
160 void setRange(
double min,
double max);
162 int decimals()
const;
163 void setDecimals(
int prec);
166 virtual double valueFromText(
const QString &
text)
const;
167 virtual QString textFromValue(
double val)
const;
171 void setValue(
double val);
174 void valueChanged(
double);
175 void valueChanged(
const QString &);
182 #endif // QT_NO_SPINBOX virtual void fixup(QString &input) const
This virtual function is called by the QAbstractSpinBox if the input is not validated to QValidator::...
QString suffix
the suffix of the spin box
#define QT_END_NAMESPACE
This macro expands to.
QString prefix
the spin box's prefix
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
QString cleanText
the text of the spin box excluding any prefix, suffix, or leading or trailing whitespace.
int singleStep
the step value
The QString class provides a Unicode character string.
double value
the value of the spin box
double minimum
the minimum value of the spin box
int decimals
the precision of the spin box, in decimals
#define QT_BEGIN_NAMESPACE
This macro expands to.
double maximum
the maximum value of the spin box
int maximum
the maximum value of the spin box
The QAbstractSpinBox class provides a spinbox and a line edit to display values.
virtual QValidator::State validate(QString &input, int &pos) const
This virtual function is called by the QAbstractSpinBox to determine whether input is valid...
int value
the value of the spin box
QString prefix
the spin box's prefix
The QDoubleSpinBox class provides a spin box widget that takes doubles.
State
This enum type defines the states in which a validated string can exist.
The QSpinBox class provides a spin box widget.
QString suffix
the suffix of the spin box
#define Q_DECLARE_PRIVATE(Class)
bool event(QEvent *event)
Reimplemented Function
int minimum
the minimum value of the spin box
The QEvent class is the base class of all event classes.
QString cleanText
the text of the spin box excluding any prefix, suffix, or leading or trailing whitespace.
double singleStep
the step value