QSlider Class ReferenceThe QSlider widget provides a vertical or horizontal slider. Далее... #include <QSlider> Inherits: QAbstractSlider. Открытые типы
Свойства
Открытые функции
Переопределённые открытые функции
Защищенные функции
Переопределённые защищённые функции
Дополнительные унаследованные члены
Подробное описаниеThe QSlider widget provides a vertical or horizontal slider. The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal or vertical groove and translates the handle's position into an integer value within the legal range. QSlider has very few of its own functions; most of the functionality is in QAbstractSlider. The most useful functions are setValue() to set the slider directly to some value; triggerAction() to simulate the effects of clicking (useful for shortcut keys); setSingleStep(), setPageStep() to set the steps; and setMinimum() and setMaximum() to define the range of the scroll bar. QSlider provides methods for controlling tickmarks. You can use setTickPosition() to indicate where you want the tickmarks to be, setTickInterval() to indicate how many of them you want. the currently set tick position and interval can be queried using the tickPosition() and tickInterval() functions, respectively. QSlider inherits a comprehensive set of signals:
QSlider only provides integer ranges. Note that although QSlider handles very large numbers, it becomes difficult for users to use a slider accurately for very large ranges. A slider accepts focus on Tab and provides both a mouse wheel and a keyboard interface. The keyboard interface is the following:
See also QScrollBar, QSpinBox, QDial, GUI Design Handbook: Slider, and Sliders Example. Описание типов-членовenum QSlider::TickPositionThis enum specifies where the tick marks are to be drawn relative to the slider's groove and the handle the user moves.
Описание свойствtickInterval : intThis property holds the interval between tickmarks. This is a value interval, not a pixel interval. If it is 0, the slider will choose between singleStep() and pageStep(). Значение по умолчанию равно 0. Функции доступа:
See also tickPosition, lineStep(), and pageStep(). tickPosition : TickPositionThis property holds the tickmark position for this slider. The valid values are described by the QSlider::TickPosition enum. The default value is QSlider::NoTicks. Функции доступа:
See also tickInterval. Описание функций-членовQSlider::QSlider ( QWidget * parent = 0 )Constructs a vertical slider with the given parent. QSlider::QSlider ( Qt::Orientation orientation, QWidget * parent = 0 )Constructs a slider with the given parent. The orientation parameter determines whether the slider is horizontal or vertical; the valid values are Qt::Vertical and Qt::Horizontal. QSlider::~QSlider ()Destroys this slider. bool QSlider::event ( QEvent * event ) [virtual]Переопределено от QObject::event(). void QSlider::initStyleOption ( QStyleOptionSlider * option ) const [protected]Initialize option with the values from this QSlider. This method is useful for subclasses when they need a QStyleOptionSlider, but don't want to fill in all the information themselves. Смотрите также QStyleOption::initFrom(). QSize QSlider::minimumSizeHint () const [virtual]Переопределено от QWidget::minimumSizeHint(). void QSlider::mouseMoveEvent ( QMouseEvent * ev ) [virtual protected]Переопределено из QWidget::mouseMoveEvent(). void QSlider::mousePressEvent ( QMouseEvent * ev ) [virtual protected]Переопределено из QWidget::mousePressEvent(). void QSlider::mouseReleaseEvent ( QMouseEvent * ev ) [virtual protected]Переопределено из QWidget::mouseReleaseEvent(). void QSlider::paintEvent ( QPaintEvent * ev ) [virtual protected]Переопределено от QWidget::paintEvent(). QSize QSlider::sizeHint () const [virtual]Переопределено от QWidget::sizeHint(). |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |