42 #ifndef QABSTRACTSLIDER_H 43 #define QABSTRACTSLIDER_H 45 #include <QtGui/qwidget.h> 83 void setRange(
int min,
int max);
85 void setSingleStep(
int);
86 int singleStep()
const;
88 void setPageStep(
int);
91 void setTracking(
bool enable);
92 bool hasTracking()
const;
94 void setSliderDown(
bool);
95 bool isSliderDown()
const;
97 void setSliderPosition(
int);
98 int sliderPosition()
const;
100 void setInvertedAppearance(
bool);
101 bool invertedAppearance()
const;
103 void setInvertedControls(
bool);
104 bool invertedControls()
const;
126 void valueChanged(
int value);
128 void sliderPressed();
130 void sliderReleased();
132 void rangeChanged(
int min,
int max);
134 void actionTriggered(
int action);
139 void setRepeatAction(
SliderAction action,
int thresholdTime = 500,
int repeatTime = 50);
152 #ifndef QT_NO_WHEELEVENT 159 inline QT3_SUPPORT
int minValue()
const {
return minimum(); }
160 inline QT3_SUPPORT
int maxValue()
const {
return maximum(); }
161 inline QT3_SUPPORT
int lineStep()
const {
return singleStep(); }
162 inline QT3_SUPPORT
void setMinValue(
int v) { setMinimum(v); }
163 inline QT3_SUPPORT
void setMaxValue(
int v) { setMaximum(v); }
164 inline QT3_SUPPORT
void setLineStep(
int v) { setSingleStep(v); }
165 inline QT3_SUPPORT
void setSteps(
int single,
int page) { setSingleStep(single); setPageStep(page); }
166 inline QT3_SUPPORT
void addPage() { triggerAction(SliderPageStepAdd); }
167 inline QT3_SUPPORT
void subtractPage() { triggerAction(SliderPageStepSub); }
168 inline QT3_SUPPORT
void addLine() { triggerAction(SliderSingleStepAdd); }
169 inline QT3_SUPPORT
void subtractLine() { triggerAction(SliderSingleStepSub); }
184 #endif // QABSTRACTSLIDER_H int value
the slider's current value
The QKeyEvent class describes a key event.
#define QT_END_NAMESPACE
This macro expands to.
bool invertedControls
whether or not the slider inverts its wheel and key events.
int singleStep
the single step.
int sliderPosition
the current slider position
The QWheelEvent class contains parameters that describe a wheel event.
virtual void timerEvent(QTimerEvent *)
This event handler can be reimplemented in a subclass to receive timer events for the object...
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
bool tracking
whether slider tracking is enabled
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
int maximum
the slider's maximum value
int minimum
the sliders's minimum value
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool invertedAppearance
whether or not a slider shows its values inverted.
The QTimerEvent class contains parameters that describe a timer event.
The QAbstractSlider class provides an integer value within a range.
#define Q_DECLARE_PRIVATE(Class)
The QEvent class is the base class of all event classes.
int pageStep
the page step.
Qt::Orientation orientation
the orientation of the slider
bool sliderDown
whether the slider is pressed down.