|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
The Slider Widget. More...
#include <qwt_slider.h>
Classes | |
| class | PrivateData |
Public Types | |
| enum | ScalePosition { NoScale , LeadingScale , TrailingScale } |
| Position of the scale. More... | |
Public Member Functions | |
| 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 Member Functions inherited from 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 Member Functions inherited from QwtAbstractScale | |
| QwtAbstractScale (QWidget *parent=nullptr) | |
| Constructor for QwtAbstractScale. | |
| virtual | ~QwtAbstractScale () |
| Destructor for QwtAbstractScale . | |
| void | setScale (double lowerBound, double upperBound) |
| Specify a scale by interval bounds. | |
| void | setScale (const QwtInterval &) |
| Specify a scale by interval. | |
| void | setScale (const QwtScaleDiv &) |
| Specify a scale by scale division. | |
| const QwtScaleDiv & | scaleDiv () const |
| Return the scale division. | |
| void | setLowerBound (double value) |
| Set the lower bound of the scale. | |
| double | lowerBound () const |
| Return the lower bound of the scale. | |
| void | setUpperBound (double value) |
| Set the upper bound of the scale. | |
| double | upperBound () const |
| Return the upper bound of the scale. | |
| void | setScaleStepSize (double stepSize) |
| Set the step size used for calculating scale division. | |
| double | scaleStepSize () const |
| Return the step size hint. | |
| void | setScaleMaxMajor (int ticks) |
| Set the maximum number of major tick intervals. | |
| int | scaleMaxMinor () const |
| Return the maximum number of minor tick intervals. | |
| void | setScaleMaxMinor (int ticks) |
| Set the maximum number of minor tick intervals. | |
| int | scaleMaxMajor () const |
| Return the maximum number of major tick intervals. | |
| void | setScaleEngine (QwtScaleEngine *) |
| Set the scale engine. | |
| const QwtScaleEngine * | scaleEngine () const |
| Return the scale engine (const version) | |
| QwtScaleEngine * | scaleEngine () |
| Return the scale engine (non-const version) | |
| int | transform (double) const |
| Transform a scale value to widget coordinates. | |
| double | invTransform (int) const |
| Transform a widget coordinate to scale value. | |
| bool | isInverted () const |
| Check if scale is inverted. | |
| double | minimum () const |
| Return the minimum boundary. | |
| double | maximum () const |
| Return the maximum boundary. | |
| const QwtScaleMap & | scaleMap () const |
| Return the scale map. | |
Protected Member Functions | |
| 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 Member Functions inherited from 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 Member Functions inherited from 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) | |
Properties | |
| Qt::Orientation | orientation |
| ScalePosition | scalePosition |
| bool | trough |
| bool | groove |
| QSize | handleSize |
| int | borderWidth |
| int | spacing |
Properties inherited from QwtAbstractSlider | |
| double | value |
| uint | totalSteps |
| uint | singleSteps |
| uint | pageSteps |
| bool | stepAlignment |
| bool | readOnly |
| bool | tracking |
| bool | wrapping |
| bool | invertedControls |
Properties inherited from QwtAbstractScale | |
| double | lowerBound |
| double | upperBound |
| int | scaleMaxMajor |
| int | scaleMaxMinor |
| double | scaleStepSize |
Additional Inherited Members | |
Public Slots inherited from QwtAbstractSlider | |
| void | setValue (double value) |
| Set the slider value (English only) | |
Signals inherited from QwtAbstractSlider | |
| void | valueChanged (double value) |
| Notify a change of value. | |
| void | sliderPressed () |
| Signal emitted when the user presses the movable part of the slider . | |
| void | sliderReleased () |
| Signal emitted when the user releases the movable part of the slider . | |
| void | sliderMoved (double value) |
| Signal emitted when the user moves the slider with the mouse. | |
The Slider Widget.
|
explicit |
Constructor.
Construct vertical slider in QwtSlider::Trough style.
|
explicit |
Constructor with orientation.
Construct a slider in QwtSlider::Trough style.
|
virtual |
Destructor.
| int QwtSlider::borderWidth | ( | ) | const |
Return border width.
Return the border width.
|
overrideprotectedvirtual |
Change event.
Reimplemented from QwtAbstractScale.
| QSize QwtSlider::handleSize | ( | ) | const |
Return handle size.
Return size of the handle.
| bool QwtSlider::hasGroove | ( | ) | const |
Check if has groove.
Return true when the groove is visible.
| bool QwtSlider::hasTrough | ( | ) | const |
Check if has trough.
Return true when the trough is visible.
|
overrideprotectedvirtual |
Check if position is scroll position.
Implements QwtAbstractSlider.
|
overridevirtual |
Return minimum size hint.
|
overrideprotectedvirtual |
Mouse press event.
Reimplemented from QwtAbstractSlider.
|
overrideprotectedvirtual |
Mouse release event.
Reimplemented from QwtAbstractSlider.
| Qt::Orientation QwtSlider::orientation | ( | ) | const |
Return orientation.
|
overrideprotectedvirtual |
Scale change notification.
Reimplemented from QwtAbstractSlider.
| const QwtScaleDraw * QwtSlider::scaleDraw | ( | ) | const |
Return scale draw (const version)
Return the scale draw of the slider (const version)
| QwtSlider::ScalePosition QwtSlider::scalePosition | ( | ) | const |
Return scale position.
Return position of the scale.
|
overrideprotectedvirtual |
Calculate scrolled position.
Implements QwtAbstractSlider.
| void QwtSlider::setBorderWidth | ( | int | width | ) |
Set border width.
Change the slider's border width.
| void QwtSlider::setGroove | ( | bool | on | ) |
Enable/disable groove.
En/Disable the groove.
| void QwtSlider::setHandleSize | ( | const QSize & | size | ) |
Set handle size.
Set the slider's handle size.
| void QwtSlider::setOrientation | ( | Qt::Orientation | orientation | ) |
Set orientation.
Set the orientation.
| void QwtSlider::setScaleDraw | ( | QwtScaleDraw * | scaleDraw | ) |
Set scale draw.
Set a scale draw.
| void QwtSlider::setScalePosition | ( | ScalePosition | scalePosition | ) |
Set scale position.
Change the position of the scale.
| void QwtSlider::setSpacing | ( | int | spacing | ) |
Set spacing.
Change the spacing between trough and scale.
| void QwtSlider::setTrough | ( | bool | on | ) |
Enable/disable trough.
En/Disable the trough.
| void QwtSlider::setUpdateInterval | ( | int | interval | ) |
Set update interval.
Specify the update interval for automatic scrolling.
|
overridevirtual |
Return size hint.
| int QwtSlider::spacing | ( | ) | const |
Return spacing.
Return number of pixels between slider and scale.
| int QwtSlider::updateInterval | ( | ) | const |
Return update interval.
Return update interval in milliseconds for automatic scrolling.