QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Properties | List of all members
QwtSlider Class Reference

The Slider Widget. More...

#include <qwt_slider.h>

Inheritance diagram for QwtSlider:
QwtAbstractSlider QwtAbstractScale

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 QwtScaleDrawscaleDraw () 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 QwtScaleDivscaleDiv () 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 QwtScaleEnginescaleEngine () const
 Return the scale engine (const version)
 
QwtScaleEnginescaleEngine ()
 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 QwtScaleMapscaleMap () 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 QwtAbstractScaleDrawabstractScaleDraw () const
 Return the scale draw (const version) (English only)
 
QwtAbstractScaleDrawabstractScaleDraw ()
 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.
 

Detailed Description

The Slider Widget.

Member Enumeration Documentation

◆ ScalePosition

Position of the scale.

Enumerator
NoScale 

The slider has no scale.

LeadingScale 

The scale is right of a vertical or below a horizontal slider.

TrailingScale 

The scale is left of a vertical or above a horizontal slider.

Constructor & Destructor Documentation

◆ QwtSlider() [1/2]

QwtSlider::QwtSlider ( QWidget *  parent = nullptr)
explicit

Constructor.

Construct vertical slider in QwtSlider::Trough style.

◆ QwtSlider() [2/2]

QwtSlider::QwtSlider ( Qt::Orientation  orientation,
QWidget *  parent = nullptr 
)
explicit

Constructor with orientation.

Construct a slider in QwtSlider::Trough style.

◆ ~QwtSlider()

QwtSlider::~QwtSlider ( )
virtual

Destructor.

Member Function Documentation

◆ borderWidth()

int QwtSlider::borderWidth ( ) const

Return border width.

Return the border width.

◆ changeEvent()

void QwtSlider::changeEvent ( QEvent *  event)
overrideprotectedvirtual

Change event.

Reimplemented from QwtAbstractScale.

◆ handleSize()

QSize QwtSlider::handleSize ( ) const

Return handle size.

Return size of the handle.

◆ hasGroove()

bool QwtSlider::hasGroove ( ) const

Check if has groove.

Return true when the groove is visible.

◆ hasTrough()

bool QwtSlider::hasTrough ( ) const

Check if has trough.

Return true when the trough is visible.

◆ isScrollPosition()

bool QwtSlider::isScrollPosition ( const QPoint &  pos) const
overrideprotectedvirtual

Check if position is scroll position.

Implements QwtAbstractSlider.

◆ minimumSizeHint()

QSize QwtSlider::minimumSizeHint ( ) const
overridevirtual

Return minimum size hint.

◆ mousePressEvent()

void QwtSlider::mousePressEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Mouse press event.

Reimplemented from QwtAbstractSlider.

◆ mouseReleaseEvent()

void QwtSlider::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Mouse release event.

Reimplemented from QwtAbstractSlider.

◆ orientation()

Qt::Orientation QwtSlider::orientation ( ) const

Return orientation.

◆ scaleChange()

void QwtSlider::scaleChange ( )
overrideprotectedvirtual

Scale change notification.

Reimplemented from QwtAbstractSlider.

◆ scaleDraw()

const QwtScaleDraw * QwtSlider::scaleDraw ( ) const

Return scale draw (const version)

Return the scale draw of the slider (const version)

◆ scalePosition()

QwtSlider::ScalePosition QwtSlider::scalePosition ( ) const

Return scale position.

Return position of the scale.

◆ scrolledTo()

double QwtSlider::scrolledTo ( const QPoint &  pos) const
overrideprotectedvirtual

Calculate scrolled position.

Implements QwtAbstractSlider.

◆ setBorderWidth()

void QwtSlider::setBorderWidth ( int  width)

Set border width.

Change the slider's border width.

◆ setGroove()

void QwtSlider::setGroove ( bool  on)

Enable/disable groove.

En/Disable the groove.

◆ setHandleSize()

void QwtSlider::setHandleSize ( const QSize &  size)

Set handle size.

Set the slider's handle size.

◆ setOrientation()

void QwtSlider::setOrientation ( Qt::Orientation  orientation)

Set orientation.

Set the orientation.

◆ setScaleDraw()

void QwtSlider::setScaleDraw ( QwtScaleDraw scaleDraw)

Set scale draw.

Set a scale draw.

◆ setScalePosition()

void QwtSlider::setScalePosition ( ScalePosition  scalePosition)

Set scale position.

Change the position of the scale.

◆ setSpacing()

void QwtSlider::setSpacing ( int  spacing)

Set spacing.

Change the spacing between trough and scale.

◆ setTrough()

void QwtSlider::setTrough ( bool  on)

Enable/disable trough.

En/Disable the trough.

◆ setUpdateInterval()

void QwtSlider::setUpdateInterval ( int  interval)

Set update interval.

Specify the update interval for automatic scrolling.

◆ sizeHint()

QSize QwtSlider::sizeHint ( ) const
overridevirtual

Return size hint.

◆ spacing()

int QwtSlider::spacing ( ) const

Return spacing.

Return number of pixels between slider and scale.

◆ updateInterval()

int QwtSlider::updateInterval ( ) const

Return update interval.

Return update interval in milliseconds for automatic scrolling.


The documentation for this class was generated from the following files: