Logo Search packages:      
Sourcecode: pcp-gui version File versions

QwtAbstractSlider Class Reference

#include <qwt_abstract_slider.h>

Inheritance diagram for QwtAbstractSlider:

QwtDoubleRange QwtSlider QwtWheel

List of all members.


Detailed Description

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.

Definition at line 28 of file qwt_abstract_slider.h.


Public Types

enum  ScrollMode {
  ScrNone, ScrMouse, ScrTimer, ScrDirect,
  ScrPage
}

Public Slots

virtual void fitValue (double val)
 Set the slider's value to the nearest integer multiple of the step size.
virtual void incValue (int steps)
 Increment the value by a specified number of steps.
virtual void setReadOnly (bool)
virtual void setValue (double val)
 Move the slider to a specified value.

Signals

void sliderMoved (double value)
void sliderPressed ()
void sliderReleased ()
void valueChanged (double value)
 Notify a change of value.

Public Member Functions

virtual void incPages (int)
 Increment the value by a specified number of pages.
bool isReadOnly () const
bool isValid () const
virtual double mass () const
double maxValue () const
 Returns the value of the second border of the range.
double minValue () const
 Returns the value at the first border of the range.
Orientation orientation () const
int pageSize () const
 Returns the page size in steps.
bool periodic () const
 Returns true if the range is periodic.
 QwtAbstractSlider (Qt::Orientation, QWidget *parent=NULL)
 Constructor.
virtual void setMass (double val)
 Set the slider's mass for flywheel effect.
virtual void setOrientation (Orientation o)
void setPeriodic (bool tf)
 Make the range periodic.
void setRange (double vmin, double vmax, double vstep=0.0, int pagesize=1)
 Specify range and step size.
void setStep (double)
 Change the step raster.
void setTracking (bool enable)
 Enables or disables tracking.
void setUpdateTime (int t)
 Specify the update interval for automatic scrolling.
void setValid (bool valid)
double step () const
void stopMoving ()
 Stop updating if automatic scrolling is active.
double value () const
 Returns the current value.
virtual ~QwtAbstractSlider ()
 Destructor.

Protected Member Functions

double exactPrevValue () const
 Returns the exact previous value.
double exactValue () const
 Returns the exact value.
virtual void getScrollMode (const QPoint &p, int &scrollMode, int &direction)=0
 Determine what to do when the user presses a mouse button.
virtual double getValue (const QPoint &p)=0
 Determine the value corresponding to a specified poind.
virtual void keyPressEvent (QKeyEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
double mouseOffset () const
virtual void mousePressEvent (QMouseEvent *e)
 Mouse press event handler.
virtual void mouseReleaseEvent (QMouseEvent *e)
 Mouse Release Event handler.
double prevValue () const
 Returns the previous value.
virtual void rangeChange ()
 Notify a change of the range.
int scrollMode () const
void setMouseOffset (double)
virtual void setPosition (const QPoint &)
virtual void stepChange ()
 Notify a change of the step size.
virtual void timerEvent (QTimerEvent *e)
virtual void valueChange ()
virtual void wheelEvent (QWheelEvent *e)

Properties

double mass
Orientation orientation
bool readOnly
bool valid

Private Member Functions

void buttonReleased ()
 Emits a valueChanged() signal if necessary.

Private Attributes

PrivateData * d_data

Classes

class  PrivateData

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

Generated by  Doxygen 1.6.0   Back to index