The QSlider widget provides a vertical or horizontal slider. More...
#include <qslider.h>
Inherits QRangeControl and QWidget.
A slider is used to let the user control a value within a program-definable range. In contrast to a QScrollBar, the QSlider widget has a constant size slider and no arrow buttons.
QSlider only offers integer ranges.
The recommended thickness of a slider is given by sizeHint().
Tickmarks may be added using setTickmarks().
A slider has a default focusPolicy() of TabFocus.
See also: QScrollBar, QSpinBox and GUI Design Handbook: Slider
Examples: xform/xform.cpp pref/pref.cpp widgets/widgets.cpp
Constructs a vertical slider.
The parent and name arguments are sent to the QWidget constructor.
Constructs a slider.
The orientation must be QSlider::Vertical or QSlider::Horizontal.
The parent and name arguments are sent to the QWidget constructor.
Constructs a slider.
Arguments:
[slot]
Moves the slider one pageStep() upwards.
[protected]
Using p, draws tickmarks at a distance of d from the edge of the widget, using w pixels and with an interval of i.
[protected]
Draws the "groove" on which the slider moves, using the painter p. c gives the distance from the top (or left) edge of the widget to the center of the groove.
[virtual protected]
Handles focus in events for the slider.
Reimplemented from QWidget.
[virtual protected]
Handles key press events for the slider.
Reimplemented from QWidget.
[virtual protected]
Handles mouse move events for the slider.
Reimplemented from QWidget.
[virtual protected]
Handles mouse press events for the slider.
Reimplemented from QWidget.
[virtual protected]
Handles mouse release events for the slider.
Reimplemented from QWidget.
Returns the slider orientation; QSlider::Vertical or QSlider::Horizontal.
See also: setOrientation().
[virtual protected]
Handles paint events for the slider.
Reimplemented from QWidget.
[virtual protected]
Paints the slider button using painter p with size and position given by r. Reimplement this function to change the look of the slider button.
[virtual protected]
Implements the virtual QRangeControl function.
Reimplemented from QRangeControl.
[virtual protected]
Handles resize events for the slider.
Reimplemented from QWidget.
Sets the slider orientation. The orientation must be QSlider::Vertical or QSlider::Horizontal.
See also: orientation().
[virtual]
Reimplements the virtual function QWidget::setPalette().
Sets the background color to the mid color for Motif style sliders.
Reimplemented from QWidget.
[virtual]
Sets the interval between tickmarks to i. This is a value interval, not a pixel interval. If i is 0, the slider will choose between lineStep() and pageStep(). The initial value of tickInterval() is 0.
See also: tickInterval(), QRangeControl::lineStep() and QRangeControl::pageStep().
Examples: widgets/widgets.cpp
[virtual]
Sets the way tickmarks are displayed by the slider. s can take the following values:
NoMarks
Above
Left
Below
Right
Both
NoMarks.
See also: tickmarks() and setTickInterval().
Examples: widgets/widgets.cpp
Enables slider tracking if enable is TRUE, or disables tracking if enable is FALSE.
If tracking is enabled (default), the slider emits the valueChanged() signal whenever the slider is being dragged. If tracking is disabled, the slider emits the valueChanged() signal when the user releases the mouse button (unless the value happens to be the same as before).
See also: tracking().
Examples: xform/xform.cpp
[slot]
Makes QRangeControl::setValue() available as a slot.
Examples: xform/xform.cpp
[virtual]
Returns the recommended size of the slider. Only the thickness is relevant.
Examples: widgets/widgets.cpp
Reimplemented from QWidget.
[signal]
This signal is emitted when the slider is dragged, with the new slider value as an argument.
[signal]
This signal is emitted when the user presses the slider with the mouse.
Returns the slider handle rectangle. (The actual moving-around thing.).
[signal]
This signal is emitted when the user releases the slider with the mouse.
[slot]
Moves the slider one pageStep() downwards.
[virtual protected]
Returns the number of pixels to use for the business part of the slider (i.e. the non-tickmark portion). The remaining space is shared equally between the tickmark regions. This function and sizeHint() are closely related; if you change one, you almost certainly have to change the other.
Returns the interval between tickmarks. Returns 0 if the slider chooses between pageStep() and lineStep().
See also: setTickInterval().
Returns the tickmark settings for this slider.
See also: setTickmarks().
Returns TRUE if tracking is enabled, or FALSE if tracking is disabled.
Tracking is initially enabled.
See also: setTracking().
[virtual protected]
Implements the virtual QRangeControl function.
Reimplemented from QRangeControl.
[signal]
This signal is emitted when the slider value is changed, with the new slider value as an argument.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-98 Troll Tech, all rights reserved.
It was generated from the following files:
Copyright İ 1998 Troll Tech | Trademarks | Qt version 1.42
|