|
QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
|
滑块控件 更多...
#include <qwt_slider.h>
类 | |
| class | PrivateData |
Public 类型 | |
| enum | ScalePosition { NoScale , LeadingScale , TrailingScale } |
| 刻度位置 更多... | |
Public 成员函数 | |
| QwtSlider (QWidget *parent=nullptr) | |
| Constructor | |
| QwtSlider (Qt::Orientation, QWidget *parent=nullptr) | |
| Constructor with orientation | |
| virtual | ~QwtSlider () |
| Destructor | |
| void | setOrientation (Qt::Orientation) |
| Set orientation | |
| Qt::Orientation | orientation () const |
| Return orientation | |
| void | setScalePosition (ScalePosition) |
| Set scale position | |
| ScalePosition | scalePosition () const |
| Return scale position | |
| void | setTrough (bool) |
| Enable/disable trough | |
| bool | hasTrough () const |
| Check if has trough | |
| void | setGroove (bool) |
| Enable/disable groove | |
| bool | hasGroove () const |
| Check if has groove | |
| void | setHandleSize (const QSize &) |
| Set handle size | |
| QSize | handleSize () const |
| Return handle size | |
| void | setBorderWidth (int) |
| Set border width | |
| int | borderWidth () const |
| Return border width | |
| void | setSpacing (int) |
| Set spacing | |
| int | spacing () const |
| Return spacing | |
| virtual QSize | sizeHint () const override |
| Return size hint | |
| virtual QSize | minimumSizeHint () const override |
| Return minimum size hint | |
| void | setScaleDraw (QwtScaleDraw *) |
| Set scale draw | |
| const QwtScaleDraw * | scaleDraw () const |
| Return scale draw (const version) | |
| void | setUpdateInterval (int) |
| Set update interval | |
| int | updateInterval () const |
| Return update interval | |
Public 成员函数 继承自 QwtAbstractSlider | |
| QwtAbstractSlider (QWidget *parent=nullptr) | |
| Constructor for QwtAbstractSlider (English only) | |
| virtual | ~QwtAbstractSlider () |
| Destructor for QwtAbstractSlider (English only) | |
| void | setValid (bool) |
| Set whether the slider is valid (English only) | |
| bool | isValid () const |
| Return whether the slider is valid (English only) | |
| double | value () const |
| Return the current value (English only) | |
| void | setWrapping (bool) |
| Set whether wrapping is enabled (English only) | |
| bool | wrapping () const |
| Return whether wrapping is enabled (English only) | |
| void | setTotalSteps (uint) |
| Set the total number of steps (English only) | |
| uint | totalSteps () const |
| Return the total number of steps (English only) | |
| void | setSingleSteps (uint) |
| Set the number of single steps (English only) | |
| uint | singleSteps () const |
| Return the number of single steps (English only) | |
| void | setPageSteps (uint) |
| Set the number of page steps (English only) | |
| uint | pageSteps () const |
| Return the number of page steps (English only) | |
| void | setStepAlignment (bool) |
| Set whether step alignment is enabled (English only) | |
| bool | stepAlignment () const |
| Return whether step alignment is enabled (English only) | |
| void | setTracking (bool) |
| Set whether tracking is enabled (English only) | |
| bool | isTracking () const |
| Return whether tracking is enabled (English only) | |
| void | setReadOnly (bool) |
| Set whether the slider is read-only (English only) | |
| bool | isReadOnly () const |
| Return whether the slider is read-only (English only) | |
| void | setInvertedControls (bool) |
| Set whether controls are inverted (English only) | |
| bool | invertedControls () const |
| Return whether controls are inverted (English only) | |
Public 成员函数 继承自 QwtAbstractScale | |
| QwtAbstractScale (QWidget *parent=nullptr) | |
| QwtAbstractScale 构造函数 | |
| virtual | ~QwtAbstractScale () |
| QwtAbstractScale 析构函数 | |
| void | setScale (double lowerBound, double upperBound) |
| 通过区间边界指定刻度 | |
| void | setScale (const QwtInterval &) |
| 通过区间对象指定刻度 | |
| void | setScale (const QwtScaleDiv &) |
| 通过刻度划分指定刻度 | |
| const QwtScaleDiv & | scaleDiv () const |
| 返回刻度划分 | |
| void | setLowerBound (double value) |
| 设置刻度的下界 | |
| double | lowerBound () const |
| 返回刻度的下界 | |
| void | setUpperBound (double value) |
| 设置刻度的上界 | |
| double | upperBound () const |
| 返回刻度的上界 | |
| void | setScaleStepSize (double stepSize) |
| 设置用于计算刻度划分的步长 | |
| double | scaleStepSize () const |
| 返回步长提示值 | |
| void | setScaleMaxMajor (int ticks) |
| 设置主刻度间隔的最大数量 | |
| int | scaleMaxMinor () const |
| 返回次刻度间隔的最大数量 | |
| void | setScaleMaxMinor (int ticks) |
| 设置次刻度间隔的最大数量 | |
| int | scaleMaxMajor () const |
| 返回主刻度间隔的最大数量 | |
| void | setScaleEngine (QwtScaleEngine *) |
| 设置刻度引擎 | |
| const QwtScaleEngine * | scaleEngine () const |
| 返回刻度引擎(常量版本) | |
| QwtScaleEngine * | scaleEngine () |
| 返回刻度引擎(非常量版本) | |
| int | transform (double) const |
| 将刻度值转换为控件坐标 | |
| double | invTransform (int) const |
| 将控件坐标转换为刻度值 | |
| bool | isInverted () const |
| 检查刻度是否反向 | |
| double | minimum () const |
| 返回最小边界 | |
| double | maximum () const |
| 返回最大边界 | |
| const QwtScaleMap & | scaleMap () const |
| 返回刻度映射 | |
Protected 成员函数 | |
| virtual double | scrolledTo (const QPoint &) const override |
| Calculate scrolled position | |
| virtual bool | isScrollPosition (const QPoint &) const override |
| Check if position is scroll position | |
| virtual void | drawSlider (QPainter *, const QRect &) const |
| Draw slider | |
| virtual void | drawHandle (QPainter *, const QRect &, int pos) const |
| Draw handle | |
| virtual void | mousePressEvent (QMouseEvent *) override |
| Mouse press event | |
| virtual void | mouseReleaseEvent (QMouseEvent *) override |
| Mouse release event | |
| virtual void | resizeEvent (QResizeEvent *) override |
| Resize event | |
| virtual void | paintEvent (QPaintEvent *) override |
| Paint event | |
| virtual void | changeEvent (QEvent *) override |
| Change event | |
| virtual void | timerEvent (QTimerEvent *) override |
| Timer event | |
| virtual bool | event (QEvent *) override |
| Event handler | |
| virtual void | scaleChange () override |
| Scale change notification | |
| QRect | sliderRect () const |
| Return slider rectangle | |
| QRect | handleRect () const |
| Return handle rectangle | |
Protected 成员函数 继承自 QwtAbstractSlider | |
| virtual void | mouseMoveEvent (QMouseEvent *) override |
| Handle mouse move events (English only) | |
| virtual void | keyPressEvent (QKeyEvent *) override |
| Handle key press events (English only) | |
| virtual void | wheelEvent (QWheelEvent *) override |
| Handle wheel events (English only) | |
| void | incrementValue (int stepCount) |
| Increment the value by a number of steps (English only) | |
| virtual void | sliderChange () |
| Handle slider changes (English only) | |
| double | incrementedValue (double value, int stepCount) const |
| Calculate incremented value (English only) | |
Protected 成员函数 继承自 QwtAbstractScale | |
| void | rescale (double lowerBound, double upperBound, double stepSize) |
| Recalculate scale and update scale draw (English only) | |
| void | setAbstractScaleDraw (QwtAbstractScaleDraw *) |
| Set the scale draw object (English only) | |
| const QwtAbstractScaleDraw * | abstractScaleDraw () const |
| Return the scale draw (const version) (English only) | |
| QwtAbstractScaleDraw * | abstractScaleDraw () |
| Return the scale draw (non-const version) (English only) | |
| void | updateScaleDraw () |
| Update the scale draw (English only) | |
属性 | |
| Qt::Orientation | orientation |
| ScalePosition | scalePosition |
| bool | trough |
| bool | groove |
| QSize | handleSize |
| int | borderWidth |
| int | spacing |
属性 继承自 QwtAbstractSlider | |
| double | value |
| uint | totalSteps |
| uint | singleSteps |
| uint | pageSteps |
| bool | stepAlignment |
| bool | readOnly |
| bool | tracking |
| bool | wrapping |
| bool | invertedControls |
属性 继承自 QwtAbstractScale | |
| double | lowerBound |
| double | upperBound |
| int | scaleMaxMajor |
| int | scaleMaxMinor |
| double | scaleStepSize |
额外继承的成员函数 | |
Public 槽 继承自 QwtAbstractSlider | |
| void | setValue (double value) |
| Set the slider value (English only) | |
信号 继承自 QwtAbstractSlider | |
| void | valueChanged (double value) |
| 通知值变化 | |
| void | sliderPressed () |
| 当用户按下滑块的可移动部分时发出的信号 | |
| void | sliderReleased () |
| 当用户释放滑块的可移动部分时发出的信号 | |
| void | sliderMoved (double value) |
| 当用户用鼠标移动滑块时发出的信号 | |
滑块控件
|
explicit |
Constructor
构造垂直滑块 (QwtSlider::Trough 样式)
|
explicit |
Constructor with orientation
构造滑块 (QwtSlider::Trough 样式)
|
virtual |
Destructor
析构函数
| int QwtSlider::borderWidth | ( | ) | const |
Return border width
返回边框宽度
|
overrideprotectedvirtual |
Change event
重载 QwtAbstractScale .
| QSize QwtSlider::handleSize | ( | ) | const |
Return handle size
返回手柄大小
| bool QwtSlider::hasGroove | ( | ) | const |
Check if has groove
当凹槽可见时返回 true
| bool QwtSlider::hasTrough | ( | ) | const |
Check if has trough
当槽可见时返回 true
|
overrideprotectedvirtual |
Check if position is scroll position
实现了 QwtAbstractSlider.
|
overridevirtual |
Return minimum size hint
返回最小大小提示
|
overrideprotectedvirtual |
Mouse press event
重载 QwtAbstractSlider .
|
overrideprotectedvirtual |
Mouse release event
重载 QwtAbstractSlider .
| Qt::Orientation QwtSlider::orientation | ( | ) | const |
Return orientation
返回方向
|
overrideprotectedvirtual |
Scale change notification
重载 QwtAbstractSlider .
| const QwtScaleDraw * QwtSlider::scaleDraw | ( | ) | const |
Return scale draw (const version)
返回滑块的刻度绘制器 (const 版本)
| QwtSlider::ScalePosition QwtSlider::scalePosition | ( | ) | const |
Return scale position
返回刻度位置
|
overrideprotectedvirtual |
Calculate scrolled position
实现了 QwtAbstractSlider.
| void QwtSlider::setBorderWidth | ( | int | width | ) |
Set border width
更改滑块的边框宽度
| void QwtSlider::setGroove | ( | bool | on | ) |
Enable/disable groove
启用/禁用凹槽
| void QwtSlider::setHandleSize | ( | const QSize & | size | ) |
Set handle size
设置滑块手柄大小
| void QwtSlider::setOrientation | ( | Qt::Orientation | orientation | ) |
Set orientation
设置方向
| void QwtSlider::setScaleDraw | ( | QwtScaleDraw * | scaleDraw | ) |
Set scale draw
设置刻度绘制器
| void QwtSlider::setScalePosition | ( | ScalePosition | scalePosition | ) |
Set scale position
更改刻度位置
| void QwtSlider::setSpacing | ( | int | spacing | ) |
Set spacing
更改槽和刻度之间的间距
| void QwtSlider::setTrough | ( | bool | on | ) |
Enable/disable trough
启用/禁用槽
| void QwtSlider::setUpdateInterval | ( | int | interval | ) |
Set update interval
指定自动刷新的更新间隔
|
overridevirtual |
Return size hint
返回大小提示
| int QwtSlider::spacing | ( | ) | const |
Return spacing
返回滑块和刻度之间的像素数
| int QwtSlider::updateInterval | ( | ) | const |
Return update interval
返回自动刷新的更新间隔 (毫秒)