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

📄 qslider.3qt

📁 tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件
💻 3QT
字号:
.TH QSlider 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 NAMEQSlider \- Vertical or horizontal slider.SH SYNOPSIS.br.PP\fC#include <qslider.h>\fR.PPInherits QRangeControl and QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBTickSetting\fR { NoMarks = 0, Above = 1, Left = Above, Below = 2, Right = Below, Both = 3 }".br.ti -1c.BI "\fBQSlider\fR ( QWidget * " "parent" ", const char * " "name" "=0 )".br.ti -1c.BI "\fBQSlider\fR ( Orientation, QWidget * " "parent" ", const char * " "name" "=0 )".br.ti -1c.BI "\fBQSlider\fR ( int " "minValue" ", int " "maxValue" ", 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 "virtual void \fBsetPalette\fR ( const QPalette & )".br.ti -1c.BI "QRect \fBsliderRect\fR () const".br.ti -1c.BI "virtual QSize \fBsizeHint\fR () const".br.ti -1c.BI "virtual QSizePolicy \fBsizePolicy\fR () const".br.ti -1c.BI "virtual QSize \fBminimumSizeHint\fR () const".br.ti -1c.BI "virtual void \fBsetTickmarks\fR ( TickSetting )".br.ti -1c.BI "TickSetting \fBtickmarks\fR () const".br.ti -1c.BI "virtual void \fBsetTickInterval\fR ( int )".br.ti -1c.BI "int \fBtickInterval\fR () const".br.in -1c.SS "Public Slots".in +1c.ti -1c.BI "virtual void \fBsetValue\fR ( int )".br.ti -1c.BI "void \fBaddStep\fR ()".br.ti -1c.BI "void \fBsubtractStep\fR ()".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.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBresizeEvent\fR ( QResizeEvent * )".br.ti -1c.BI "virtual void \fBpaintEvent\fR ( QPaintEvent * )".br.ti -1c.BI "virtual void \fBkeyPressEvent\fR ( QKeyEvent * )".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 \fBwheelEvent\fR ( QWheelEvent * )".br.ti -1c.BI "virtual void \fBfocusInEvent\fR ( QFocusEvent * e )".br.ti -1c.BI "virtual void \fBfocusOutEvent\fR ( QFocusEvent * e )".br.ti -1c.BI "virtual void \fBupdateMask\fR ()".br.ti -1c.BI "virtual void \fBstyleChange\fR ( QStyle & )".br.ti -1c.BI "virtual void \fBvalueChange\fR ()".br.ti -1c.BI "virtual void \fBrangeChange\fR ()".br.ti -1c.BI "virtual void \fBpaintSlider\fR ( QPainter *, const QColorGroup &, const QRect & )".br.ti -1c.BI "void \fBdrawTicks\fR ( QPainter *, const QColorGroup &, int, int, int=1 ) const".br.ti -1c.BI "void \fBdrawWinGroove\fR ( QPainter *, QCOORD )".br.ti -1c.BI "void \fBdrawTicks\fR ( QPainter *, int, int, int=1 ) const".br.ti -1c.BI "virtual int \fBthickness\fR () const".br.in -1c.SH DESCRIPTIONThe QSlider widget provides a vertical or horizontal slider..PPThe slider is the classic widget for controlling a bounded value. It lets the user move a slider along a horizontal or vertical groove, and translates the slider's position into an integer value in the legal range..PPQSlider inherits QRangeControl, which provides the "integer" side of the slider. setRange() and value() are likely to be used by practically all slider users; see the QRangeControl documentation for information about the many other functions that class provides..PPThe main functions offered by the slider itself are tickmark and orientation control; you can use setTickmarks() to indicate where you want the tickmarks to be, setTickInterval() to indicate how many of them you want, and setOrientation() to indicate whether the slider is to e horizontal or vertical..PPA slider has a default focusPolicy() of \fITabFocus,\fR and a suitable keyboard interface..PP<img src=qslider-m.png> <img src=qslider-w.png>.PPSee also: QScrollBar, QSpinBox and GUI Design Handbook: Slider.PPExamples:.(lxform/xform.cpp.)l.SS "Member Type Documentation".SH "QSlider::TickSetting"This enum specifies where the tick marks are to be drawn, relative to the slider's groove and the handle the user moves. The possible values are \fCNoMarks\fR (no tickmarks are drawn), \fCAbove, Below, Left, Right\fR and \fCBoth.\fR.PP\fCNoMarks\fR means to not draw any tickmarks; \fCBoth\fR means to draw tickmarks on both sides of the groove. \fCAbove\fR and \fCBelow\fR mean to draw tickmarks above and below the (horizontal) slider. \fCLeft\fR and \fCRight\fR mean to draw tickmarks to the left and right of the (vertical) slider..SH MEMBER FUNCTION DOCUMENTATION.SH "<a name="8b63b2">QSlider::QSlider ( Orientation orientation, QWidget * parent, const char * name=0 )"Constructs a slider..PPThe \fIorientation\fR must be QSlider::Vertical or QSlider::Horizontal..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QSlider::QSlider ( QWidget * parent, const char * name=0 )"Constructs a vertical slider..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QSlider::QSlider ( int minValue, int maxValue, int pageStep, int value, Orientation orientation, QWidget * parent, const char * name=0 )"Constructs a slider..PPArguments:.TP\fIminValue\fR is the minimum slider value..TP\fImaxValue\fR is the maximum slider value..TP\fIstep\fR is the page step value..TP\fIvalue\fR is the initial value..TP\fIorientation\fR must be QSlider::Vertical or QSlider::Horizontal. The \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "void QSlider::addStep () \fC[slot]\fR"Moves the slider one pageStep() upwards..SH "void QSlider::drawTicks ( QPainter * p, const QColorGroup & g, int d, int w, int i=1 ) const \fC[protected]\fR"Using \fIp,\fR draws tickmarks at a distance of \fId\fR from the edge of the widget, using \fIw\fR pixels and with an interval of \fIi.\fR.PPSetting the colorgroup is useful to reuse the code to draw a mask if the slider supports transparceny..PPSee also: setAutoMask() and updateMask()..SH "void QSlider::drawTicks ( QPainter * p, int d, int w, int i=1 ) const \fC[protected]\fR"Using \fIp,\fR draws tickmarks at a distance of \fId\fR from the edge of the widget, using \fIw\fR pixels and with an interval of \fIi.\fR.PPDo not reimplement this function, it's mainly there for compatibility reasons. It simply calls.PPdrawTicks( QPainter *p, const QColorGroup& g, int d, int w, int i ) const.PPwhich is the right function to overload..PPSee also: colorGroup(), drawTicks(, QPainter, *p, const, QColorGroup&, g, int, d, int, w, int, i, ), const and paintSlider..SH "void QSlider::drawWinGroove ( QPainter * p, QCOORD c ) \fC[protected]\fR"\fBThis function is obsolete.\fR It is provided to keep old programs working. We strongly advise against using it in new code..PPDraws the "groove" on which the slider moves, using the painter \fIp. c\fR gives the distance from the top (or left) edge of the widget to the center of the groove..SH "void QSlider::focusInEvent ( QFocusEvent * ) \fC[virtual protected]\fR"Handles focus in events for the slider..PPReimplemented from QWidget..SH "void QSlider::focusOutEvent ( QFocusEvent * ) \fC[virtual protected]\fR"Handles focus out events for the slider..PPReimplemented from QWidget..SH "void QSlider::keyPressEvent ( QKeyEvent * e ) \fC[virtual protected]\fR"Handles key press events for the slider..PPReimplemented from QWidget..SH "QSize QSlider::minimumSizeHint () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QSlider::mouseMoveEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"Handles mouse move events for the slider..PPReimplemented from QWidget..SH "void QSlider::mousePressEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"Handles mouse press events for the slider..PPReimplemented from QWidget..SH "void QSlider::mouseReleaseEvent ( QMouseEvent * ) \fC[virtual protected]\fR"Handles mouse release events for the slider..PPReimplemented from QWidget..SH "Orientation QSlider::orientation () const"Returns the slider orientation; QSlider::Vertical or QSlider::Horizontal..PPSee also: setOrientation()..SH "void QSlider::paintEvent ( QPaintEvent * ) \fC[virtual protected]\fR"Handles paint events for the slider..PPReimplemented from QWidget..SH "void QSlider::paintSlider ( QPainter * p, const QColorGroup & g, const QRect & r ) \fC[virtual protected]\fR"Paints the slider button using painter \fIp\fR with size, a colorgroup and position given by \fIr.\fR Reimplement this function to change the look of the slider button..PPSetting the colorgroup is useful to reuse the code to draw a mask if the slider supports transparceny..PPSee also: setAutoMask() and updateMask()..SH "void QSlider::rangeChange () \fC[virtual protected]\fR"Implements the virtual QRangeControl function..PPReimplemented from QRangeControl..SH "void QSlider::resizeEvent ( QResizeEvent * ) \fC[virtual protected]\fR"Handles resize events for the slider..PPReimplemented from QWidget..SH "void QSlider::setOrientation ( Orientation orientation ) \fC[virtual]\fR"Sets the slider orientation. The \fIorientation\fR must be QSlider::Vertical or QSlider::Horizontal..PPSee also: orientation()..SH "void QSlider::setPalette ( const QPalette & p ) \fC[virtual]\fR"Reimplements the virtual function QWidget::setPalette()..PPSets the background color to the mid color for Motif style sliders..SH "void QSlider::setTickInterval ( int i ) \fC[virtual]\fR"Sets the interval between tickmarks to \fIi.\fR This is a value interval, not a pixel interval. If \fIi\fR is 0, the slider will choose between lineStep() and pageStep(). The initial value of tickInterval() is 0..PPSee also: tickInterval(), QRangeControl::lineStep() and QRangeControl::pageStep()..SH "void QSlider::setTickmarks ( TickSetting s ) \fC[virtual]\fR"Sets the way tickmarks are displayed by the slider. \fIs\fR can take the following values:.TP\fCNoMarks\fR.TP\fCAbove\fR.TP\fCLeft\fR.TP\fCBelow\fR.TP\fCRight\fR.TP\fCBoth\fR The initial value is \fCNoMarks.\fR.PPSee also: tickmarks() and setTickInterval()..SH "void QSlider::setTracking ( bool enable ) \fC[virtual]\fR"Enables slider tracking if \fIenable\fR is TRUE, or disables tracking if \fIenable\fR is FALSE..PPIf 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)..PPSee also: tracking()..SH "void QSlider::setValue ( int value ) \fC[virtual slot]\fR"Makes QRangeControl::setValue() available as a slot..PPExamples:.(lxform/xform.cpp.)l.SH "QSize QSlider::sizeHint () const \fC[virtual]\fR"Returns the recommended size of the slider..PPReimplemented from QWidget..SH "QSizePolicy QSlider::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 QSlider::sliderMoved ( int value ) \fC[signal]\fR"This signal is emitted when the slider is dragged, with the new slider value as an argument..SH "void QSlider::sliderPressed () \fC[signal]\fR"This signal is emitted when the user presses the slider with the mouse..SH "QRect QSlider::sliderRect () const"Returns the slider handle rectangle. (The actual moving-around thing.)..SH "void QSlider::sliderReleased () \fC[signal]\fR"This signal is emitted when the user releases the slider with the mouse..SH "void QSlider::subtractStep () \fC[slot]\fR"Moves the slider one pageStep() downwards..SH "int QSlider::thickness () const \fC[virtual protected]\fR"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..SH "int QSlider::tickInterval () const"Returns the interval between tickmarks. Returns 0 if the slider chooses between pageStep() and lineStep()..PPSee also: setTickInterval()..SH "QSlider::TickSetting QSlider::tickmarks() const"Returns the tickmark settings for this slider..PPSee also: setTickmarks()..SH "bool QSlider::tracking () const"Returns TRUE if tracking is enabled, or FALSE if tracking is disabled..PPTracking is initially enabled..PPSee also: setTracking()..SH "void QSlider::updateMask () \fC[virtual protected]\fR"Reimplementation of QWidget::updateMask(). Draws the mask of the slider when transparency is required..PPSee also: QWidget::setAutoMask()..PPReimplemented from QWidget..SH "void QSlider::valueChange () \fC[virtual protected]\fR"Implements the virtual QRangeControl function..PPReimplemented from QRangeControl..SH "void QSlider::valueChanged ( int value ) \fC[signal]\fR"This signal is emitted when the slider value is changed, with the new slider value as an argument..SH "void QSlider::wheelEvent ( QWheelEvent * e ) \fC[virtual protected]\fR"Handles wheel events for the slider..PPReimplemented from QWidget..SH "SEE ALSO".BR http://www.troll.no/qt/qslider.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 + -