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

QwtSlider Class Reference

#include <qwt_slider.h>

Inheritance diagram for QwtSlider:

QwtAbstractSlider QwtAbstractScale QwtDoubleRange

List of all members.


Detailed Description

The Slider Widget.

QwtSlider is a slider widget which operates on an interval of type double. QwtSlider supports different layouts as well as a scale.

sliders.png

See also:
QwtAbstractSlider and QwtAbstractScale for the descriptions of the inherited members.

Definition at line 34 of file qwt_slider.h.


Public Types

enum  BGSTYLE { BgTrough = 0x1, BgSlot = 0x2, BgBoth = BgTrough | BgSlot }
enum  ScalePos {
  NoScale, LeftScale, RightScale, TopScale,
  BottomScale
}
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

bool autoScale () const
BGSTYLE bgStyle () const
int borderWidth () const
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.
virtual QSize minimumSizeHint () const
 Return a minimum size hint.
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.
 QwtSlider (QWidget *parent, const char *name)
 Constructor.
 QwtSlider (QWidget *parent, Qt::Orientation=Qt::Horizontal, ScalePos=NoScale, BGSTYLE bgStyle=BgTrough)
 Constructor.
const QwtScaleDrawscaleDraw () const
QwtScaleEnginescaleEngine ()
const QwtScaleEnginescaleEngine () const
const QwtScaleMapscaleMap () const
int scaleMaxMajor () const
int scaleMaxMinor () const
ScalePos scalePosition () const
void setAutoScale ()
 Advise the widget to control the scale range internally.
void setBgStyle (BGSTYLE)
void setBorderWidth (int bw)
 Change the slider's border width.
void setMargins (int x, int y)
 Set distances between the widget's border and internals.
virtual void setMass (double val)
 Set the slider's mass for flywheel effect.
virtual void setOrientation (Orientation o)
virtual void setOrientation (Qt::Orientation)
 Set the orientation.
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 setScale (const QwtScaleDiv &s)
 Specify a scale.
void setScale (const QwtDoubleInterval &, double step=0.0)
 Specify a scale.
void setScale (double vmin, double vmax, double step=0.0)
 Specify a scale.
void setScaleDraw (QwtScaleDraw *)
void setScaleEngine (QwtScaleEngine *)
 Set a scale engine.
void setScaleMaxMajor (int ticks)
 Set the maximum number of major tick intervals.
void setScaleMaxMinor (int ticks)
 Set the maximum number of minor tick intervals.
void setScalePosition (ScalePos s)
 Change the scale position (and slider orientation).
void setStep (double)
 Change the step raster.
void setThumbLength (int l)
 Set the slider's thumb length.
void setThumbWidth (int w)
 Change the width of the thumb.
void setTracking (bool enable)
 Enables or disables tracking.
void setUpdateTime (int t)
 Specify the update interval for automatic scrolling.
void setValid (bool valid)
virtual QSize sizeHint () const
double step () const
void stopMoving ()
 Stop updating if automatic scrolling is active.
int thumbLength () const
int thumbWidth () const
double value () const
 Returns the current value.

Protected Member Functions

QwtAbstractScaleDrawabstractScaleDraw ()
const QwtAbstractScaleDrawabstractScaleDraw () const
void draw (QPainter *p, const QRect &update_rect)
 Draw the QwtSlider.
virtual void drawSlider (QPainter *p, const QRect &r)
 Draw the slider into the specified rectangle.
virtual void drawThumb (QPainter *p, const QRect &, int pos)
 Draw the thumb at a position.
double exactPrevValue () const
 Returns the exact previous value.
double exactValue () const
 Returns the exact value.
virtual void fontChange (const QFont &oldFont)
 Notify change in font.
virtual void getScrollMode (const QPoint &p, int &scrollMode, int &direction)
 Determine scrolling mode and direction.
virtual double getValue (const QPoint &p)
 Determine the value corresponding to a specified mouse location.
virtual void keyPressEvent (QKeyEvent *e)
void layoutSlider (bool update=true)
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.
virtual void paintEvent (QPaintEvent *e)
 Qt paint event.
double prevValue () const
 Returns the previous value.
virtual void rangeChange ()
 Notify change of range.
void rescale (double vmin, double vmax, double step=0.0)
virtual void resizeEvent (QResizeEvent *e)
 Qt resize event.
virtual void scaleChange ()
 Notify changed scale.
QwtScaleDrawscaleDraw ()
int scrollMode () const
void setAbstractScaleDraw (QwtAbstractScaleDraw *)
 Set a scale draw.
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 ()
 Notify change of value.
virtual void wheelEvent (QWheelEvent *e)
int xyPosition (double v) const
 Find the x/y position for a given value v.

Properties

BGSTYLE bgStyle
int borderWidth
double mass
Orientation orientation
bool readOnly
ScalePos scalePosition
 Return the scale position.
int thumbLength
int thumbWidth
bool valid

Private Member Functions

void initSlider (Qt::Orientation, ScalePos scalePos, BGSTYLE bgStyle)

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