⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qscrollbar.3qt

📁 tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件
💻 3QT
字号:
.TH QScrollBar 3qt "6 July 1999" "Troll Tech AS" \" -*- nroff -*-.\" Copyright 1992-1999 Troll Tech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQScrollBar \- Vertical or horizontal scroll bar.SH SYNOPSIS.br.PP\fC#include <qscrollbar.h>\fR.PPInherits QRangeControl and QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQScrollBar\fR ( QWidget * " "parent" ", const char * " "name" "=0 )".br.ti -1c.BI "\fBQScrollBar\fR ( Orientation, QWidget * " "parent" ", const char * " "name" "=0 )".br.ti -1c.BI "\fBQScrollBar\fR ( int " "minValue" ", int " "maxValue" ", int " "LineStep" ", int " "PageStep" ", int " "value" ", Orientation, QWidget * " "parent" ", const char * " "name" "=0 )".br.ti -1c.BI "virtual void \fBsetOrientation\fR ( Orientation )".br.ti -1c.BI "Orientation \fBorientation\fR () const".br.ti -1c.BI "virtual void \fBsetTracking\fR ( bool enable )".br.ti -1c.BI "bool \fBtracking\fR () const".br.ti -1c.BI "bool \fBdraggingSlider\fR () const".br.ti -1c.BI "virtual void \fBsetPalette\fR ( const QPalette & )".br.ti -1c.BI "virtual QSize \fBsizeHint\fR () const".br.ti -1c.BI "virtual QSizePolicy \fBsizePolicy\fR () const".br.in -1c.SS "Signals".in +1c.ti -1c.BI "void \fBvalueChanged\fR ( int value )".br.ti -1c.BI "void \fBsliderPressed\fR ()".br.ti -1c.BI "void \fBsliderMoved\fR ( int value )".br.ti -1c.BI "void \fBsliderReleased\fR ()".br.ti -1c.BI "void \fBnextLine\fR ()".br.ti -1c.BI "void \fBprevLine\fR ()".br.ti -1c.BI "void \fBnextPage\fR ()".br.ti -1c.BI "void \fBprevPage\fR ()".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBwheelEvent\fR ( QWheelEvent * )".br.ti -1c.BI "virtual void \fBkeyPressEvent\fR ( QKeyEvent * )".br.ti -1c.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * )".br.ti -1c.BI "virtual void \fBpaintEvent\fR ( QPaintEvent * )".br.ti -1c.BI "virtual void \fBmousePressEvent\fR ( QMouseEvent * )".br.ti -1c.BI "virtual void \fBmouseReleaseEvent\fR ( QMouseEvent * )".br.ti -1c.BI "virtual void \fBmouseMoveEvent\fR ( QMouseEvent * )".br.ti -1c.BI "virtual void \fBvalueChange\fR ()".br.ti -1c.BI "virtual void \fBstepChange\fR ()".br.ti -1c.BI "virtual void \fBrangeChange\fR ()".br.ti -1c.BI "int \fBsliderStart\fR () const".br.ti -1c.BI "QRect \fBsliderRect\fR () const".br.ti -1c.BI "virtual void \fBstyleChange\fR ( QStyle & )".br.in -1c.SH DESCRIPTIONThe QScrollBar widget provides a vertical or horizontal scroll bar..PPA scroll bar is used to let the user control a value within a program-definable range, and to give the user visible indication of the current value of a range control..PPScroll bars include four separate controls, in order: .TPThe \fIline-up\fR control is a little triangle with which the user can move one line up. The meaning of line is configurable. In e.g. editors and list boxes means one line of text. .TPThe \fIslider\fR is the handle that indicates the current value of the scroll bar, and which the user can drag to change the value. .TPThe \fIpage-up/down\fR control is the area on which the slider slides (the scroll bar's background). Clicking here moves the scroll bar up or down one page. The meaning of page too is configurable - in editors and list boxes it means as many lines as there is space for in the widget..TPFinally, the line-down control is the arrow on the other end of the scroll bar. Clicking there moves the scroll bar down/rightwards one line..PPQScrollBar has not much of an API of its own; it mostly relies on QRangeControl. The most useful functions are setValue() to set the scrollbar directly to some value; addPage(), addLine(), subPage() and subLine() to simulate the effects of clicking (neat for accelerator keys; setSteps() to define the values of pageStep() and lineStep(); and last but NOT least setRange() to set the minValue() and maxValue() of the scrollbar. (QScrollBar has a convenience constructor with which you can set most of that.).PPSome GUI styles, for example the provided Windows and Motif styles, also use the pageStep() value to calculate the size of the sliding thumb (scroll indicator)..PPIn addition to the access functions from QRangeControl, QScrollBar has a comprehensive set of signals: .IP.TPvalueChanged() - emitted when the scroll bar's value has changed..IP.TPsliderPressed() - emitted when the user starts to drag the slider.IP.TPsliderMoved() - emitted when the user drags the slider.IP.TPsliderReleased() - emitted when the user releases the slider.IP.TPnextLine() - emitted when the scroll bar has moved one line down/rightwards. Line is defined in QRangeControl..IP.TPprevLine() - emitted when the scroll bar has moved one line up/leftwards..IP.TPnextPage() - emitted when the scroll bar has moved one page down/rightwards..IP.TPprevPage() - emitted when the scroll bar has moved one page up/leftwards..IP.PPQScrollBar only offers integer ranges, and the current implementation has problems when the range is greater than a million or so. (A million is more than sufficient for today's display sizes, however.).PPA scroll bar can be controlled by the keyboard, but it has a default focusPolicy() of \fCNoFocus.\fR Use setFocusPolicy() to enable keyboard focus..PP<img src=qscrbar-m.png> <img src=qscrbar-w.png>.PPSee also: QSlider, QSpinBox and GUI Design Handbook: Scroll Bar.SH MEMBER FUNCTION DOCUMENTATION.SH "QScrollBar::QScrollBar ( Orientation orientation, QWidget * parent, const char * name=0 )"Constructs a scroll bar..PPThe \fIorientation\fR must be QScrollBar::Vertical or QScrollBar::Horizontal..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QScrollBar::QScrollBar ( QWidget * parent, const char * name=0 )"Constructs a vertical scroll bar..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QScrollBar::QScrollBar ( int minValue, int maxValue, int lineStep, int pageStep, int value, Orientation orientation, QWidget * parent, const char * name=0 )"Constructs a scroll bar..PPArguments:.TP\fIminValue\fR is the minimum scroll bar value..TP\fImaxValue\fR is the maximum scroll bar value..TP\fIlineStep\fR is the line step value..TP\fIpageStep\fR is the page step value. It is also used to calculate the size of the sliding thumb (scroll indicator)..TP\fIvalue\fR is the initial value..TP\fIorientation\fR must be QScrollBar::Vertical or QScrollBar::Horizontal. The \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "bool QScrollBar::draggingSlider () const"Returns TRUE if the user has clicked the mouse on the slider and is currently dragging it, or FALSE if not..SH "void QScrollBar::keyPressEvent ( QKeyEvent * e ) \fC[virtual protected]\fR"Handles key press events for the scroll bar..PPReimplemented from QWidget..SH "void QScrollBar::mouseMoveEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"Handles mouse move events for the scroll bar..PPReimplemented from QWidget..SH "void QScrollBar::mousePressEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"Handles mouse press events for the scroll bar..PPReimplemented from QWidget..SH "void QScrollBar::mouseReleaseEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"Handles mouse release events for the scroll bar..PPReimplemented from QWidget..SH "void QScrollBar::nextLine () \fC[signal]\fR"This signal is emitted when the scroll bar scrolls one line down/right..SH "void QScrollBar::nextPage () \fC[signal]\fR"This signal is emitted when the scroll bar scrolls one page down/right..SH "Orientation QScrollBar::orientation () const"Returns the scroll bar orientation; QScrollBar::Vertical or QScrollBar::Horizontal..PPSee also: setOrientation()..SH "void QScrollBar::paintEvent ( QPaintEvent * ) \fC[virtual protected]\fR"Handles paint events for the scroll bar..PPReimplemented from QWidget..SH "void QScrollBar::prevLine () \fC[signal]\fR"This signal is emitted when the scroll bar scrolls one line up/left..SH "void QScrollBar::prevPage () \fC[signal]\fR"This signal is emitted when the scroll bar scrolls one page up/left..SH "void QScrollBar::rangeChange () \fC[virtual protected]\fR"For internal use only..PPReimplemented from QRangeControl..SH "void QScrollBar::resizeEvent ( QResizeEvent * ) \fC[virtual protected]\fR"Handles resize events for the scroll bar..PPReimplemented from QWidget..SH "void QScrollBar::setOrientation ( Orientation orientation ) \fC[virtual]\fR"Sets the scroll bar orientation. The \fIorientation\fR must be QScrollBar::Vertical or QScrollBar::Horizontal..PPSee also: orientation()..SH "void QScrollBar::setPalette ( const QPalette & p ) \fC[virtual]\fR"Reimplements the virtual function QWidget::setPalette()..PPSets the background color to the mid color for Motif style scroll bars..SH "void QScrollBar::setTracking ( bool enable ) \fC[virtual]\fR"Enables scroll bar tracking if \fIenable\fR is TRUE, or disables tracking if \fIenable\fR is FALSE..PPIf tracking is enabled (default), the scroll bar emits the valueChanged() signal whenever the slider is being dragged. If tracking is disabled, the scroll bar emits the valueChanged() signal when the user releases the mouse button (unless the value happens to be the same as before)..PPSee also: tracking()..SH "QSize QScrollBar::sizeHint () const \fC[virtual]\fR"Returns a size hint for this scroll bar..PPReimplemented from QWidget..SH "QSizePolicy QScrollBar::sizePolicy () const \fC[virtual]\fR"Specifies that this widget can use more, but is able to survive on less, space in the orientation() direction; and is fixed in the other direction..PPReimplemented from QWidget..SH "void QScrollBar::sliderMoved ( int value ) \fC[signal]\fR"This signal is emitted when the slider is moved by the user, with the new scroll bar value as an argument..PPThis signal is emitted even when tracking is turned off..PPSee also: tracking(), valueChanged(), nextLine(), prevLine(), nextPage() and prevPage()..SH "void QScrollBar::sliderPressed () \fC[signal]\fR"This signal is emitted when the user presses the slider with the mouse..SH "QRect QScrollBar::sliderRect () const \fC[protected]\fR"Returns the scroll bar slider rectangle..PPSee also: sliderStart()..SH "void QScrollBar::sliderReleased () \fC[signal]\fR"This signal is emitted when the user releases the slider with the mouse..SH "int QScrollBar::sliderStart () const \fC[protected]\fR"Returns the pixel position where the scroll bar slider starts..PPIt is equivalent to sliderRect().y() for vertical scroll bars or sliderRect().x() for horizontal scroll bars..SH "void QScrollBar::stepChange () \fC[virtual protected]\fR"For internal use only..PPReimplemented from QRangeControl..SH "void QScrollBar::styleChange ( QStyle & old ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "bool QScrollBar::tracking () const"Returns TRUE if tracking is enabled, or FALSE if tracking is disabled..PPTracking is initially enabled..PPSee also: setTracking()..SH "void QScrollBar::valueChange () \fC[virtual protected]\fR"For internal use only..PPReimplemented from QRangeControl..SH "void QScrollBar::valueChanged ( int value ) \fC[signal]\fR"This signal is emitted when the scroll bar value is changed, with the new scroll bar value as an argument..SH "void QScrollBar::wheelEvent ( QWheelEvent * e ) \fC[virtual protected]\fR"Handles wheel events for the scroll bar..PPReimplemented from QWidget..SH "SEE ALSO".BR http://www.troll.no/qt/qscrollbar.html.SH COPYRIGHTCopyright 1992-1999 Troll Tech AS.  See the license file included inthe distribution for a complete license statement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -