QAbstractSlider Class ReferenceThe QAbstractSlider class provides an integer value within a range. Далее... #include <QAbstractSlider> Унаследован от: QWidget. Inherited by: QDial, QScrollBar, and QSlider. Открытые типы
Свойства
Открытые функции
Открытые слоты
Сигналы
Защищённые типы
Защищенные функции
Переопределённые защищённые функции
Дополнительные унаследованные члены
Подробное описаниеThe QAbstractSlider class provides an integer value within a range. The class is designed as a common super class for widgets like QScrollBar, QSlider and QDial. Here are the main properties of the class:
Unity (1) may be viewed as a third step size. setValue() lets you set the current value to any integer in the allowed range, not just minimum() + n * singleStep() for integer values of n. Some widgets may allow the user to set any value at all; others may just provide multiples of singleStep() or pageStep(). QAbstractSlider emits a comprehensive set of signals:
QAbstractSlider provides a virtual sliderChange() function that is well suited for updating the on-screen representation of sliders. By calling triggerAction(), subclasses trigger slider actions. Two helper functions QStyle::sliderPositionFromValue() and QStyle::sliderValueFromPosition() help subclasses and styles to map screen coordinates to logical range values. See also QAbstractSpinBox, QSlider, QDial, QScrollBar, and Sliders Example. Описание типов-членовenum QAbstractSlider::SliderAction
enum QAbstractSlider::SliderChange
Описание свойствinvertedAppearance : boolThis property holds whether or not a slider shows its values inverted. If this property is false (the default), the minimum and maximum will be shown in its classic position for the inherited widget. If the value is true, the minimum and maximum appear at their opposite location. Note: This property makes most sense for sliders and dials. For scroll bars, the visual effect of the scroll bar subcontrols depends on whether or not the styles understand inverted appearance; most styles ignore this property for scroll bars. Функции доступа:
invertedControls : boolThis property holds whether or not the slider inverts its wheel and key events. If this property is false, scrolling the mouse wheel "up" and using keys like page up will increase the slider's value towards its maximum. Otherwise pressing page up will move value towards the slider's minimum. Функции доступа:
maximum : intThis property holds the slider's maximum value. When setting this property, the minimum is adjusted if necessary to ensure that the range remains valid. Also the slider's current value is adjusted to be within the new range. Функции доступа:
minimum : intThis property holds the sliders's minimum value. When setting this property, the maximum is adjusted if necessary to ensure that the range remains valid. Also the slider's current value is adjusted to be within the new range. Функции доступа:
orientation : Qt::OrientationThis property holds the orientation of the slider. The orientation must be Qt::Vertical (the default) or Qt::Horizontal. Функции доступа:
pageStep : intThis property holds the page step. The larger of two natural steps that an abstract slider provides and typically corresponds to the user pressing PageUp or PageDown. Функции доступа:
See also singleStep. singleStep : intThis property holds the single step. The smaller of two natural steps that an abstract sliders provides and typically corresponds to the user pressing an arrow key. If the property is modified during an auto repeating key event, behavior is undefined. Функции доступа:
See also pageStep. sliderDown : boolThis property holds whether the slider is pressed down. The property is set by subclasses in order to let the abstract slider know whether or not tracking has any effect. Changing the slider down property emits the sliderPressed() and sliderReleased() signals. Функции доступа:
sliderPosition : intThis property holds the current slider position. If tracking is enabled (the default), this is identical to value. Функции доступа:
Уведомляющий сигнал:
tracking : boolThis property holds whether slider tracking is enabled. If tracking is enabled (the default), the slider emits the valueChanged() signal while the slider is being dragged. If tracking is disabled, the slider emits the valueChanged() signal only when the user releases the slider. Функции доступа:
See also sliderDown. value : intThis property holds the slider's current value. Ползунок приводит значение в разрешённый диапазон: minimum <= value <= maximum. Changing the value also changes the sliderPosition. Функции доступа:
Уведомляющий сигнал:
Описание функций-членовQAbstractSlider::QAbstractSlider ( QWidget * parent = 0 )Constructs an abstract slider. The parent argument is sent to the QWidget constructor. The minimum defaults to 0, the maximum to 99, with a singleStep size of 1 and a pageStep size of 10, and an initial value of 0. QAbstractSlider::~QAbstractSlider ()Destroys the slider. void QAbstractSlider::actionTriggered ( int action ) [signal]This signal is emitted when the slider action action is triggered. Actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove. When the signal is emitted, the sliderPosition has been adjusted according to the action, but the value has not yet been propagated (meaning the valueChanged() signal was not yet emitted), and the visual display has not been updated. In slots connected to this signal you can thus safely adjust any action by calling setSliderPosition() yourself, based on both the action and the slider's value. See also triggerAction(). void QAbstractSlider::changeEvent ( QEvent * ev ) [virtual protected]Переопределено от QWidget::changeEvent(). bool QAbstractSlider::event ( QEvent * e ) [virtual protected]Переопределено от QObject::event(). void QAbstractSlider::keyPressEvent ( QKeyEvent * ev ) [virtual protected]Переопределено от QWidget::keyPressEvent(). void QAbstractSlider::rangeChanged ( int min, int max ) [signal]This signal is emitted when the slider range has changed, with min being the new minimum, and max being the new maximum. SliderAction QAbstractSlider::repeatAction () const [protected]Returns the current repeat action. See also setRepeatAction(). void QAbstractSlider::setRange ( int min, int max )Sets the slider's minimum to min and its maximum to max. If max is smaller than min, min becomes the only legal value. void QAbstractSlider::setRepeatAction ( SliderAction action, int thresholdTime = 500, int repeatTime = 50 ) [protected]Sets action action to be triggered repetitively in intervals of repeatTime, after an initial delay of thresholdTime. See also triggerAction() and repeatAction(). void QAbstractSlider::sliderChange ( SliderChange change ) [virtual protected]Reimplement this virtual function to track slider changes such as SliderRangeChange, SliderOrientationChange, SliderStepsChange, or SliderValueChange. The default implementation only updates the display and ignores the change parameter. void QAbstractSlider::sliderMoved ( int value ) [signal]This signal is emitted when sliderDown is true and the slider moves. This usually happens when the user is dragging the slider. The value is the new slider position. This signal is emitted even when tracking is turned off. See also setTracking(), valueChanged(), isSliderDown(), sliderPressed(), and sliderReleased(). void QAbstractSlider::sliderPressed () [signal]This signal is emitted when the user presses the slider with the mouse, or programmatically when setSliderDown(true) is called. See also sliderReleased(), sliderMoved(), and isSliderDown(). void QAbstractSlider::sliderReleased () [signal]This signal is emitted when the user releases the slider with the mouse, or programmatically when setSliderDown(false) is called. See also sliderPressed(), sliderMoved(), and sliderDown. void QAbstractSlider::timerEvent ( QTimerEvent * e ) [virtual protected]Переопределено из QObject::timerEvent(). void QAbstractSlider::triggerAction ( SliderAction action )Triggers a slider action. Possible actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove. See also actionTriggered(). void QAbstractSlider::valueChanged ( int value ) [signal]This signal is emitted when the slider value has changed, with the new slider value as argument. void QAbstractSlider::wheelEvent ( QWheelEvent * e ) [virtual protected]Переопределено из QWidget::wheelEvent(). |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |