QScrollBar Class Reference


The QScrollBar widget class provides a vertical or horizontal scroll bar. (details) (complete member list)

#include <qscrbar.h>

Inherits QRangeControl and QWidget.

Public Members

Signals

Protected Members


Detailed Description

The QScrollBar widget class provides a vertical or horizontal scroll bar.


Member Function Documentation

QScrollBar::QScrollBar (QWidget *parent=0, const char *name=0)

Constructs a vertical scroll bar.

The parent and name arguments are sent to the QWidget constructor.

QScrollBar::QScrollBar (Orientation orientation, QWidget *parent=0, const char *name=0)

Constructs a scroll bar.

The orientation must be QScrollBar::Vertical or QScrollBar::Horizontal.

The parent and name arguments are sent to the QWidget constructor.

QScrollBar::QScrollBar (long minVal, long maxVal, long lineStep, long pageStep, long value, Orientation orientation, QWidget *parent=0, const char *name=0)

Constructs a scroll bar.

Arguments:

The parent and name arguments are sent to the QWidget constructor.

void QScrollBar::keyPressEvent (QKeyEvent *)

Handles key press events for the scroll bar.

void QScrollBar::mouseMoveEvent (QMouseEvent *e)

Handles mouse move events for the scroll bar.

void QScrollBar::mousePressEvent (QMouseEvent *e)

Handles mouse press events for the scroll bar.

void QScrollBar::mouseReleaseEvent (QMouseEvent *e)

Handles mouse release events for the scroll bar.

void QScrollBar::nextLine ()

This signal is emitted when the scroll bar scrolls one line down/right.

void QScrollBar::nextPage ()

This signal is emitted when the scroll bar scrolls one page down/right.

Orientation QScrollBar::orientation () const

Returns the scroll bar orientation; QScrollBar::Vertical or QScrollBar::Horizontal.

See also: setOrientation().

void QScrollBar::paintEvent (QPaintEvent *)

Handles paint events for the scroll bar.

void QScrollBar::previousLine ()

This signal is emitted when the scroll bar scrolls one line up/left.

void QScrollBar::previousPage ()

This signal is emitted when the scroll bar scrolls one page up/left.

void QScrollBar::rangeChange ()

.

void QScrollBar::resizeEvent (QResizeEvent *)

Handles resize events for the scroll bar.

void QScrollBar::setOrientation (Orientation orientation)

Sets the scroll bar orientation. The orientation must be QScrollBar::Vertical or QScrollBar::Horizontal.

See also: orientation().

void QScrollBar::setPalette (const QPalette &p)

Reimplements the virtual function QWidget::setPalette().

Sets the background color to the mid color for Motif style scroll bars.

void QScrollBar::setTracking (bool enable)

Enables scroll bar tracking if enable is TRUE, or disables tracking if enable is FALSE.

If tracking is enabled (default), the scroll bar emits the valueChanged() signal whenever the slider is dragged. If tracking is disabled, the scroll bar emits the valueChanged() signal not before the user relases the mouse button.

See also: tracking().

void QScrollBar::sliderMoved (long value)

This signal is emitted when the slider is dragged, with the new scroll bar value as an argument.

void QScrollBar::sliderPressed ()

This signal is emitted when the user presses the slider with the mouse.

QRect QScrollBar::sliderRect () const

Returns the scroll bar slider rectangle.

See also: sliderStart().

void QScrollBar::sliderReleased ()

This signal is emitted when the user releases the slider with the mouse.

int QScrollBar::sliderStart () const

Returns the pixel position where the scroll bar slider starts.

It is equivalent to sliderRect().y() for vertical scroll bars or sliderRect().x() for horizontal scroll bars.

void QScrollBar::stepChange ()

.

void QScrollBar::timerEvent (QTimerEvent *)

Handles timer events for the scroll bar.

bool QScrollBar::tracking () const

Returns TRUE if tracking is enabled, or FALSE if tracking is disabled.

Tracking is initially enabled.

See also: setTracking().

void QScrollBar::valueChange ()

.

void QScrollBar::valueChanged (long value)

This signal is emitted when the scroll bar value is changed, with the new scroll bar value as an argument.


This file is part of the Qt toolkit, copyright 1995 Troll Tech, all rights reserved.

It was generated from the following files:


Generated at 16:17, 1995/06/30 by the webmaster at Troll Tech