📄 qwtslider.3
字号:
.TH "QwtSlider" 3 "16 Nov 2004" "Version 4.2.0" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtSlider \- .SH SYNOPSIS.br.PPInherits \fBQwtSliderBase\fP, and \fBQwtScaleIf\fP..PP.SH "Detailed Description".PP The Slider Widget. QwtSlider is a slider widget which operates on an interval of type double. QwtSlider supports different layouts as well as a scale. .PP\fBSee also:\fP.RS 4\fBQwtSliderBase\fP and \fBQwtScaleIf\fP for the descriptions of the inherited members. .RE.PP.PPDefinition at line 29 of file qwt_slider.h..SS "Public Types".in +1c.ti -1c.RI "enum \fBScalePos\fP { \fBNone\fP, \fBLeft\fP, \fBRight\fP, \fBTop\fP, \fBBottom\fP }".br.ti -1c.RI "enum \fBBGSTYLE\fP { \fBBgTrough\fP = 0x1, \fBBgSlot\fP = 0x2, \fBBgBoth\fP = BgTrough | BgSlot }".br.in -1c.SS "Public Member Functions".in +1c.ti -1c.RI "\fBQwtSlider\fP (QWidget *parent, const char *name=0, Qt::Orientation=Qt::Horizontal, \fBScalePos\fP=None, \fBBGSTYLE\fP bgStyle=BgTrough)".br.ti -1c.RI "virtual void \fBsetOrientation\fP (Qt::Orientation)".br.ti -1c.RI "void \fBsetBgStyle\fP (\fBBGSTYLE\fP st)".br.ti -1c.RI "\fBBGSTYLE\fP \fBbgStyle\fP () const".br.ti -1c.RI "void \fBsetScalePos\fP (\fBScalePos\fP s)".br.ti -1c.RI "\fBScalePos\fP \fBscalePos\fP () const".br.ti -1c.RI "void \fBsetScalePosition\fP (\fBScalePos\fP s)".br.ti -1c.RI "\fBScalePos\fP \fBscalePosition\fP () const".br.ti -1c.RI "int \fBthumbLength\fP () const".br.ti -1c.RI "int \fBthumbWidth\fP () const".br.ti -1c.RI "int \fBborderWidth\fP () const".br.ti -1c.RI "void \fBsetThumbLength\fP (int l)".br.ti -1c.RI "void \fBsetThumbWidth\fP (int w)".br.ti -1c.RI "void \fBsetBorderWidth\fP (int bw)".br.ti -1c.RI "void \fBsetMargins\fP (int x, int y)".br.ti -1c.RI "virtual QSize \fBsizeHint\fP () const".br.ti -1c.RI "virtual QSize \fBminimumSizeHint\fP () const".br.ti -1c.RI "virtual QSizePolicy \fBsizePolicy\fP () const".br.in -1c.SS "Protected Member Functions".in +1c.ti -1c.RI "virtual double \fBgetValue\fP (const QPoint &p)".br.ti -1c.RI "virtual void \fBgetScrollMode\fP (const QPoint &p, int &scrollMode, int &direction)".br.ti -1c.RI "void \fBdraw\fP (QPainter *p, const QRect &update_rect)".br.ti -1c.RI "virtual void \fBdrawSlider\fP (QPainter *p, const QRect &r)".br.ti -1c.RI "virtual void \fBdrawThumb\fP (QPainter *p, const QRect &, int pos)".br.ti -1c.RI "virtual void \fBresizeEvent\fP (QResizeEvent *e)".br.ti -1c.RI "virtual void \fBpaintEvent\fP (QPaintEvent *e)".br.ti -1c.RI "virtual void \fBvalueChange\fP ()".br.ti -1c.RI "virtual void \fBrangeChange\fP ()".br.ti -1c.RI "virtual void \fBscaleChange\fP ()".br.ti -1c.RI "virtual void \fBfontChange\fP (const QFont &oldFont)".br.ti -1c.RI "void \fBlayoutSlider\fP (bool update=TRUE)".br.ti -1c.RI "int \fBxyPosition\fP (double v) const".br.in -1c.SH "Member Enumeration Documentation".PP .SS "enum \fBQwtSlider::BGSTYLE\fP".PPBackground style. .PP\fBSee also:\fP.RS 4\fBQwtSlider::QwtSlider\fP .RE.PPDefinition at line 57 of file qwt_slider.h..SS "enum \fBQwtSlider::ScalePos\fP".PPScale position. QwtSlider tries to enforce valid combinations of its orientation and scale position:.IP "\(bu" 2Qt::Horizonal combines with None, Top and Bottom.IP "\(bu" 2Qt::Vertical combines with None, Left and Right.PP.PP\fBSee also:\fP.RS 4\fBQwtSlider::QwtSlider\fP .RE.PPDefinition at line 51 of file qwt_slider.h..PPReferenced by scalePosition()..SH "Constructor & Destructor Documentation".PP .SS "QwtSlider::QwtSlider (QWidget * parent, const char * name = \fC0\fP, Qt::Orientation orient = \fCQt::Horizontal\fP, \fBScalePos\fP scalePos = \fCNone\fP, \fBBGSTYLE\fP bgStyle = \fCBgTrough\fP)".PPConstructor. .PP\fBParameters:\fP.RS 4\fIparent\fP parent widget .br\fIname\fP The Widget's name. Default = 0. .br\fIorient\fP Orientation of the slider. Can be Qt::Horizontal or Qt::Vertical. Defaults to Horizontal. .br\fIscalePos\fP Position of the scale. Can be QwtSlider::None, QwtSlider::Left, QwtSlider::Right, QwtSlider::Top, or QwtSlider::Bottom. Defaults to QwtSlider::None. .br\fIbgStyle\fP Background style. QwtSlider::BgTrough draws the slider button in a trough, QwtSlider::BgSlot draws a slot underneath the button. An or-combination of both may also be used. The default is QwtSlider::BgTrough..RE.PPQwtSlider enforces valid combinations of its orientation and scale position. If the combination is invalid, the scale position will be set to None. Valid combinations are:.IP "\(bu" 2Qt::Horizonal with None, Top, or Bottom;.IP "\(bu" 2Qt::Vertical with None, Left, or Right. .PPDefinition at line 40 of file qwt_slider.cpp..PPReferences QwtSliderBase::orientation(), QwtScaleIf::scaleDraw(), and QwtScaleDraw::setGeometry()..SH "Member Function Documentation".PP .SS "\fBBGSTYLE\fP QwtSlider::bgStyle () const".PP\fBReturns:\fP.RS 4the background style. .RE.PPDefinition at line 72 of file qwt_slider.h..SS "int QwtSlider::borderWidth () const".PP\fBReturns:\fP.RS 4the border width. .RE.PPDefinition at line 97 of file qwt_slider.h..SS "void QwtSlider::draw (QPainter * p, const QRect & update_rect)\fC [protected]\fP".PPDraw the QwtSlider. .PPDefinition at line 402 of file qwt_slider.cpp..PPReferences QwtScaleDraw::draw(), drawSlider(), and QwtScaleIf::scaleDraw()..PPReferenced by paintEvent()..SS "void QwtSlider::drawSlider (QPainter * p, const QRect & r)\fC [protected, virtual]\fP".PPDraw the slider into the specified rectangle. .PPDefinition at line 215 of file qwt_slider.cpp..PPReferences drawThumb(), QwtSliderBase::isValid(), QwtSliderBase::orientation(), QwtDblRange::value(), and xyPosition()..PPReferenced by draw()..SS "void QwtSlider::drawThumb (QPainter * p, const QRect &, int pos)\fC [protected, virtual]\fP".PPDraw the thumb at a position. .PPDefinition at line 270 of file qwt_slider.cpp..PPReferences QwtSliderBase::orientation()..PPReferenced by drawSlider()..SS "void QwtSlider::fontChange (const QFont & oldFont)\fC [protected, virtual]\fP".PPNotify change in font. .PPDefinition at line 208 of file qwt_slider.cpp..PPReferences layoutSlider()..SS "void QwtSlider::getScrollMode (const QPoint & p, int & scrollMode, int & direction)\fC [protected, virtual]\fP".PPDetermine scrolling mode and direction. .PP\fBParameters:\fP.RS 4\fIp\fP point .br\fIscrollMode\fP Scrolling mode .br\fIdirection\fP Direction .RE.PP.PPImplements \fBQwtSliderBase\fP..PPDefinition at line 363 of file qwt_slider.cpp..PPReferences QwtDiMap::i1(), QwtDiMap::i2(), QwtSliderBase::orientation(), QwtScaleIf::scaleDraw(), QwtDblRange::value(), and xyPosition()..SS "double QwtSlider::getValue (const QPoint & p)\fC [protected, virtual]\fP".PPDetermine the value corresponding to a specified mouse location. .PPImplements \fBQwtSliderBase\fP..PPDefinition at line 326 of file qwt_slider.cpp..PPReferences QwtDiMap::d1(), QwtDiMap::d2(), QwtDiMap::i1(), QwtDiMap::i2(), QwtDiMap::invTransform(), QwtDblRange::maxValue(), QwtDblRange::minValue(), QwtSliderBase::orientation(), and QwtScaleIf::scaleDraw()..SS "void QwtSlider::layoutSlider (bool update_geometry = \fCTRUE\fP)\fC [protected]\fP".PPRecalculate the slider's geometry and layout based on the current rect and fonts. .PP\fBParameters:\fP.RS 4\fIupdate_geometry\fP notify the layout system and call update to redraw the scale .RE.PPDefinition at line 433 of file qwt_slider.cpp..PPReferences QwtScaleDraw::minBorderDist(), QwtSliderBase::orientation(), QwtScaleIf::scaleDraw(), QwtScaleDraw::setGeometry(), and QwtDiMap::setIntRange()..PPReferenced by fontChange(), rangeChange(), resizeEvent(), scaleChange(), setBorderWidth(), setMargins(), setOrientation(), setScalePosition(), setThumbLength(), and setThumbWidth()..SS "QSize QwtSlider::minimumSizeHint () const\fC [virtual]\fP".PPReturn a minimum size hint. .PP\fBWarning:\fP.RS 4The return value of \fBQwtSlider::minimumSizeHint()\fP depends on the font and the scale. .RE.PPDefinition at line 632 of file qwt_slider.cpp..PPReferences QwtScaleDraw::minBorderDist(), QwtScaleDraw::minHeight(), QwtScaleDraw::minWidth(), QwtSliderBase::orientation(), and QwtScaleIf::scaleDraw()..PPReferenced by sizeHint()..SS "void QwtSlider::paintEvent (QPaintEvent * e)\fC [protected, virtual]\fP".PPQt paint event. .PPDefinition at line 391 of file qwt_slider.cpp..PPReferences draw(), and QwtPaintBuffer::painter()..SS "void QwtSlider::rangeChange ()\fC [protected, virtual]\fP".PPNotify change of range. .PPReimplemented from \fBQwtDblRange\fP..PPDefinition at line 566 of file qwt_slider.cpp..PPReferences QwtScaleIf::hasUserScale(), layoutSlider(), QwtDblRange::maxValue(), QwtDblRange::minValue(), QwtDblRange::rangeChange(), QwtScaleIf::scaleDraw(), QwtScaleIf::scaleMaxMajor(), QwtScaleIf::scaleMaxMinor(), and QwtScaleDraw::setScale()..SS "void QwtSlider::resizeEvent (QResizeEvent * e)\fC [protected, virtual]\fP".PPQt resize event. .PPDefinition at line 422 of file qwt_slider.cpp..PPReferences layoutSlider()..SS "void QwtSlider::scaleChange ()\fC [protected, virtual]\fP".PPNotify changed scale. .PPImplements \fBQwtScaleIf\fP..PPDefinition at line 194 of file qwt_slider.cpp..PPReferences QwtScaleIf::hasUserScale(), layoutSlider(), QwtDblRange::maxValue(), QwtDblRange::minValue(), QwtScaleIf::scaleDraw(), QwtScaleIf::scaleMaxMajor(), QwtScaleIf::scaleMaxMinor(), and QwtScaleDraw::setScale()..SS "\fBScalePos\fP QwtSlider::scalePos () const".PPDeprecated. Use \fBQwtSlider::scalePosition\fP. Definition at line 81 of file qwt_slider.h..SS "\fBQwtSlider::ScalePos\fP QwtSlider::scalePosition () const".PPReturn the scale position. .PPDefinition at line 139 of file qwt_slider.cpp..PPReferences ScalePos..SS "void QwtSlider::setBgStyle (\fBBGSTYLE\fP st)".PPSet the background style. Definition at line 68 of file qwt_slider.h..SS "void QwtSlider::setBorderWidth (int bd)".PPChange the slider's border width. .PP\fBParameters:\fP.RS 4\fIbd\fP border width .RE.PPDefinition at line 148 of file qwt_slider.cpp..PPReferences layoutSlider()..SS "void QwtSlider::setMargins (int xMargin, int yMargin)".PPSet distances between the widget's border and internals. .PP\fBParameters:\fP.RS 4\fIxMargin\fP Horizontal margin .br\fIyMargin\fP Vertical margin .RE.PPDefinition at line 584 of file qwt_slider.cpp..PPReferences layoutSlider()..SS "void QwtSlider::setOrientation (Qt::Orientation o)\fC [virtual]\fP".PPSet the orientation. .PP\fBParameters:\fP.RS 4\fIo\fP Orientation. Allowed values are Qt::Horizontal and Qt::Vertical..RE.PPIf the new orientation and the old scale position are an invalid combination, the scale position will be set to None. .PP\fBSee also:\fP.RS 4\fBQwtSliderBase::orientation()\fP .RE.PPDefinition at line 99 of file qwt_slider.cpp..PPReferences layoutSlider(), and QwtSliderBase::setOrientation()..PPReferenced by setScalePosition()..SS "void QwtSlider::setScalePos (\fBScalePos\fP s)".PPDeprecated. Use \fBQwtSlider::setScalePosition\fP. Definition at line 77 of file qwt_slider.h..SS "void QwtSlider::setScalePosition (\fBScalePos\fP s)".PPChange the scale position (and slider orientation). .PP\fBParameters:\fP.RS 4\fIs\fP Position of the scale..RE.PPA valid combination of scale position and orientation is enforced:.IP "\(bu" 2if the new scale position is Left or Right, the scale orientation will become Qt::Vertical;.IP "\(bu" 2if the new scale position is Bottom or Top the scale orientation will become Qt::Horizontal;.IP "\(bu" 2if the new scale position is None, the scale orientation will not change. .PPDefinition at line 127 of file qwt_slider.cpp..PPReferences layoutSlider(), and setOrientation()..SS "void QwtSlider::setThumbLength (int thumbLength)".PPSet the slider's thumb length. .PP\fBParameters:\fP.RS 4\fIthumbLength\fP new length .RE.PPDefinition at line 164 of file qwt_slider.cpp..PPReferences layoutSlider()..SS "void QwtSlider::setThumbWidth (int w)".PPChange the width of the thumb. .PP\fBParameters:\fP.RS 4\fIw\fP new width .RE.PPDefinition at line 180 of file qwt_slider.cpp..PPReferences layoutSlider()..SS "QSize QwtSlider::sizeHint () const\fC [virtual]\fP".PP\fBReturns:\fP.RS 4\fBQwtSlider::minimumSizeHint()\fP .RE.PPDefinition at line 622 of file qwt_slider.cpp..PPReferences minimumSizeHint()..SS "QSizePolicy QwtSlider::sizePolicy () const\fC [virtual]\fP".PP\fBReturns:\fP.RS 4MinimumExpanding/Fixed for a horizontal orientation; Fixed/MinimumExpanding for a vertical orientation. .RE.PPDefinition at line 603 of file qwt_slider.cpp..PPReferences QwtSliderBase::orientation()..SS "int QwtSlider::thumbLength () const".PP\fBReturns:\fP.RS 4the thumb length. .RE.PPDefinition at line 89 of file qwt_slider.h..SS "int QwtSlider::thumbWidth () const".PP\fBReturns:\fP.RS 4the thumb width. .RE.PPDefinition at line 93 of file qwt_slider.h..SS "void QwtSlider::valueChange ()\fC [protected, virtual]\fP".PPNotify change of value. .PPReimplemented from \fBQwtSliderBase\fP..PPDefinition at line 558 of file qwt_slider.cpp..PPReferences QwtSliderBase::valueChange()..SS "int QwtSlider::xyPosition (double v) const\fC [protected]\fP".PPFind the x/y position for a given value v. .PPDefinition at line 298 of file qwt_slider.cpp..PPReferences QwtDiMap::d1(), QwtDiMap::d2(), QwtDiMap::i1(), QwtDiMap::i2(), QwtDblRange::maxValue(), QwtDblRange::minValue(), QwtSliderBase::orientation(), QwtScaleIf::scaleDraw(), and QwtDiMap::transform()..PPReferenced by drawSlider(), and getScrollMode()..SH "Author".PP Generated automatically by Doxygen for Qwt User's Guide from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -