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

An abstract base class for slider widgets with a scale. More...

#include <qwt_abstract_slider.h>

Inheritance diagram for QwtAbstractSlider:
QwtAbstractScale QwtDial QwtKnob QwtSlider QwtAnalogClock QwtCompass

Classes

class  PrivateData
 

Public Slots

void setValue (double value)
 Set the slider value (English only)
 

Signals

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.
 

Public Member Functions

 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 void mousePressEvent (QMouseEvent *) override
 Handle mouse press events (English only)
 
virtual void mouseReleaseEvent (QMouseEvent *) override
 Handle mouse release events (English only)
 
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)
 
virtual bool isScrollPosition (const QPoint &pos) const =0
 Determine what to do when the user presses a mouse button.
 
virtual double scrolledTo (const QPoint &pos) const =0
 Determine the value for a new position of the movable part of the slider.
 
void incrementValue (int stepCount)
 Increment the value by a number of steps (English only)
 
virtual void scaleChange () override
 Handle scale changes (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
virtual void changeEvent (QEvent *) override
 Handle change events (English only)
 
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

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
 

Detailed Description

An abstract base class for slider widgets with a scale.

Constructor & Destructor Documentation

◆ QwtAbstractSlider()

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

Constructor for QwtAbstractSlider (English only)

Constructor for QwtAbstractSlider.

◆ ~QwtAbstractSlider()

QwtAbstractSlider::~QwtAbstractSlider ( )
virtual

Destructor for QwtAbstractSlider (English only)

Destructor for QwtAbstractSlider .

Member Function Documentation

◆ incrementedValue()

double QwtAbstractSlider::incrementedValue ( double  value,
int  stepCount 
) const
protected

Calculate incremented value (English only)

Increment a value.

◆ incrementValue()

void QwtAbstractSlider::incrementValue ( int  stepCount)
protected

Increment the value by a number of steps (English only)

Increment the slider.

◆ invertedControls()

bool QwtAbstractSlider::invertedControls ( ) const

Return whether controls are inverted (English only)

Check if controls are inverted.

◆ isReadOnly()

bool QwtAbstractSlider::isReadOnly ( ) const

Return whether the slider is read-only (English only)

Check if read-only mode is enabled.

◆ isScrollPosition()

virtual bool QwtAbstractSlider::isScrollPosition ( const QPoint &  pos) const
protectedpure virtual

Determine what to do when the user presses a mouse button.

Implemented in QwtDial, QwtKnob, and QwtSlider.

◆ isTracking()

bool QwtAbstractSlider::isTracking ( ) const

Return whether tracking is enabled (English only)

Check if tracking is enabled.

◆ isValid()

bool QwtAbstractSlider::isValid ( ) const

Return whether the slider is valid (English only)

Check if the value is valid.

◆ keyPressEvent()

void QwtAbstractSlider::keyPressEvent ( QKeyEvent *  event)
overrideprotectedvirtual

Handle key press events (English only)

Handle key press events.

Reimplemented in QwtCompass.

◆ mouseMoveEvent()

void QwtAbstractSlider::mouseMoveEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Handle mouse move events (English only)

Handle mouse move events.

◆ mousePressEvent()

void QwtAbstractSlider::mousePressEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Handle mouse press events (English only)

Handle mouse press events.

Reimplemented in QwtSlider.

◆ mouseReleaseEvent()

void QwtAbstractSlider::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotectedvirtual

Handle mouse release events (English only)

Handle mouse release events.

Reimplemented in QwtSlider.

◆ pageSteps()

uint QwtAbstractSlider::pageSteps ( ) const

Return the number of page steps (English only)

Return the number of page steps.

◆ scaleChange()

void QwtAbstractSlider::scaleChange ( )
overrideprotectedvirtual

Handle scale changes (English only)

Update the slider according to modifications of the scale.

Reimplemented from QwtAbstractScale.

Reimplemented in QwtDial, and QwtSlider.

◆ scrolledTo()

virtual double QwtAbstractSlider::scrolledTo ( const QPoint &  pos) const
protectedpure virtual

Determine the value for a new position of the movable part of the slider.

Implemented in QwtDial, QwtKnob, and QwtSlider.

◆ setInvertedControls()

void QwtAbstractSlider::setInvertedControls ( bool  on)

Set whether controls are inverted (English only)

Invert wheel and key events.

◆ setPageSteps()

void QwtAbstractSlider::setPageSteps ( uint  stepCount)

Set the number of page steps (English only)

Set the number of page steps.

◆ setReadOnly()

void QwtAbstractSlider::setReadOnly ( bool  on)

Set whether the slider is read-only (English only)

Enable or disable read-only mode.

◆ setSingleSteps()

void QwtAbstractSlider::setSingleSteps ( uint  stepCount)

Set the number of single steps (English only)

Set the number of steps for a single increment.

◆ setStepAlignment()

void QwtAbstractSlider::setStepAlignment ( bool  on)

Set whether step alignment is enabled (English only)

Enable step alignment.

◆ setTotalSteps()

void QwtAbstractSlider::setTotalSteps ( uint  stepCount)

Set the total number of steps (English only)

Set the number of steps.

◆ setTracking()

void QwtAbstractSlider::setTracking ( bool  on)

Set whether tracking is enabled (English only)

Enable or disable tracking.

◆ setValid()

void QwtAbstractSlider::setValid ( bool  on)

Set whether the slider is valid (English only)

Set the value to be valid or invalid.

◆ setValue

void QwtAbstractSlider::setValue ( double  value)
slot

Set the slider value (English only)

Set the slider to the specified value.

◆ setWrapping()

void QwtAbstractSlider::setWrapping ( bool  on)

Set whether wrapping is enabled (English only)

Enable or disable wrapping.

◆ singleSteps()

uint QwtAbstractSlider::singleSteps ( ) const

Return the number of single steps (English only)

Return the number of single steps.

◆ sliderChange()

void QwtAbstractSlider::sliderChange ( )
protectedvirtual

Handle slider changes (English only)

Handle slider changes.

Reimplemented in QwtDial.

◆ sliderMoved

void QwtAbstractSlider::sliderMoved ( double  value)
signal

Signal emitted when the user moves the slider with the mouse.

◆ sliderPressed

void QwtAbstractSlider::sliderPressed ( )
signal

Signal emitted when the user presses the movable part of the slider .

◆ sliderReleased

void QwtAbstractSlider::sliderReleased ( )
signal

Signal emitted when the user releases the movable part of the slider .

◆ stepAlignment()

bool QwtAbstractSlider::stepAlignment ( ) const

Return whether step alignment is enabled (English only)

Check if step alignment is enabled.

◆ totalSteps()

uint QwtAbstractSlider::totalSteps ( ) const

Return the total number of steps (English only)

Return the number of steps.

◆ value()

double QwtAbstractSlider::value ( ) const

Return the current value (English only)

Return the current value.

◆ valueChanged

void QwtAbstractSlider::valueChanged ( double  value)
signal

Notify a change of value.

◆ wheelEvent()

void QwtAbstractSlider::wheelEvent ( QWheelEvent *  event)
overrideprotectedvirtual

Handle wheel events (English only)

Handle wheel events.

Reimplemented in QwtDial.

◆ wrapping()

bool QwtAbstractSlider::wrapping ( ) const

Return whether wrapping is enabled (English only)

Check if wrapping is enabled.


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