QwtAbstractSlider
An abstract base class for slider widgets.
- Provided by: libqwt-doc (Version: 6.0.0-1.2)
- Source: qwt
- Report a bug
An abstract base class for slider widgets.
#include <qwt_abstract_slider.h>
Inherits QwtDoubleRange.
Inherited by QwtDial, QwtKnob, QwtSlider, and QwtWheel.
enum ScrollMode { ScrNone, ScrMouse,
ScrTimer, ScrDirect, ScrPage }
virtual void setValue (double val)
virtual void fitValue (double val)
virtual void incValue (int steps)
virtual void setReadOnly (bool)
void valueChanged (double value)
void sliderPressed ()
void sliderReleased ()
void sliderMoved (double value)
QwtAbstractSlider (Qt::Orientation, QWidget *parent=NULL)
virtual ~QwtAbstractSlider ()
void setUpdateTime (int t)
void stopMoving ()
void setTracking (bool enable)
virtual void setMass (double val)
virtual double mass () const
virtual void setOrientation (Qt::Orientation o)
Qt::Orientation orientation () const
bool isReadOnly () const
bool isValid () const
void setValid (bool valid)
virtual void setPosition (const QPoint &)
virtual void valueChange ()
virtual void timerEvent (QTimerEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void keyPressEvent (QKeyEvent *e)
virtual void wheelEvent (QWheelEvent *e)
virtual double getValue (const QPoint &p)=0
virtual void getScrollMode (const QPoint &pos, ScrollMode
&scrollMode, int &direction) const =0
void setMouseOffset (double)
double mouseOffset () const
int scrollMode () const
An abstract base class for slider widgets.
QwtAbstractSlider is a base class for slider widgets. It handles mouse events and updates the slider's value accordingly. Derived classes only have to implement the getValue() and getScrollMode() members, and should react to a valueChange(), which normally requires repainting.
See also:
Enumerator:
Constructor. Parameters:
Destructor.
Set the slider's value to the nearest integer multiple of the step size. Parameters:
See also:
Reimplemented from QwtDoubleRange.
Determine what to do when the user presses a mouse button. This function is abstract and has to be implemented by derived classes. It is called on a mousePress event. The derived class can determine what should happen next in dependence of the position where the mouse was pressed by returning scrolling mode and direction.
Parameters:
Return values:
Implemented in QwtDial, QwtKnob, QwtSlider, and QwtWheel.
Determine the value corresponding to a specified poind. This is an abstract virtual function which is called when the user presses or releases a mouse button or moves the mouse. It has to be implemented by the derived class.
Parameters:
Implemented in QwtDial, QwtKnob, QwtSlider, and QwtWheel.
Increment the value by a specified number of steps. Parameters:
See also:
Reimplemented from QwtDoubleRange.
Returns:
See also:
Reimplemented from QwtDoubleRange.
Parameters:
See also:
Reimplemented in QwtCompass, and QwtDial.
See also:
Reimplemented in QwtWheel.
Parameters:
Parameters:
Parameters:
See also:
sa ScrollMode
Set the slider's mass for flywheel effect. If the slider's mass is greater then 0, it will continue to move after the mouse button has been released. Its speed decreases with time at a rate depending on the slider's mass. A large mass means that it will continue to move for a long time.
Derived widgets may overload this function to make it public.
Parameters:
See also:
Reimplemented in QwtWheel.
Set the orientation. Parameters:
Reimplemented in QwtSlider, and QwtWheel.
In read only mode the slider can't be controlled by mouse or keyboard.
Parameters:
See also:
Enables or disables tracking. If tracking is enabled, the slider emits a valueChanged() signal whenever its value changes (the default behaviour). If tracking is disabled, the value changed() signal will only be emitted if:
Tracking is enabled by default.
Parameters:
Specify the update interval for automatic scrolling. Parameters:
See also:
See also:
Reimplemented from QwtDoubleRange.
Move the slider to a specified value. This function can be used to move the slider to a value which is not an integer multiple of the step size.
Parameters:
See also:
Reimplemented from QwtDoubleRange.
Parameters:
Stop updating if automatic scrolling is active.
Parameters:
This function can be reimplemented by derived classes in order to keep track of changes, i.e. repaint the widget. The default implementation emits a valueChanged() signal if tracking is enabled.
Reimplemented from QwtDoubleRange.
Reimplemented in QwtDial, QwtSlider, and QwtWheel.
Notify a change of value. In the default setting (tracking enabled), this signal will be emitted every time the value changes ( see setTracking() ).
Parameters:
Parameters:
Generated automatically by Doxygen for Qwt User's Guide from the source code.