QwtSlider(3)

NAME
QwtSlider - The Slider Widget.

SYNOPSIS

#include <qwt_slider.h>

Inherits QwtSliderBase, and QwtScaleIf.

  Public Types
enum Orientation { Vertical, Horizontal }
enum ScalePos { None, Left, Right, Top, Bottom }
enum { BgTrough = 0x1, BgSlot = 0x2 }

  Public Methods
QwtSlider (QWidget *parent, const char *name=0, Orientation orient=Horizontal, ScalePos scalePos=None, int bgStyle=BgTrough)
~QwtSlider ()
void setThumbLength (int l)
void setThumbWidth (int w)
void setBorderWidth (int bw)
void setMargins (int x, int y)
QSize sizeHint () const

  Protected Methods
virtual void drawSlider (QPainter *p, const QRect &r)
double getValue (const QPoint &p)
void getScrollMode (const QPoint &p, int &scrollMode, int &direction)
void resizeEvent (QResizeEvent *e)
void paintEvent (QPaintEvent *e)
void valueChange ()
void rangeChange ()
void scaleChange ()
void fontChange (const QFont &oldFont)

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.

See also:
QwtSliderBase and QwtScaleIf for the descriptions of the inherited members.

CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

  QwtSlider::QwtSlider (QWidget * parent, const char * name = 0, Orientation orient = Horizontal, ScalePos scalePos = None, int bgStyle = BgTrough)

Constructor.

Parameters:

parent
    parent widget

name
    The Widget's name. Default = 0.

Orient
    Orientation of the slider. Can be QwtSlider::Horizontal or QwtSlider::Vertical. Defaults to Horizontal.

scalePos
    Position of the scale. Can be QwtSlider::None, QwtSlider::Left, QwtSlider::Right, QwtSlider::Top, or QwtSlider::Bottom. Defaults to QwtSlider::None.

bgStyle
    Background style. QwtSlider::BgTrough draws the slider button in a trough, QwtSlider::BgSlot draws a slot underneath the button. An or-combination of both may also be used. The default is QwtSlider::BgTrough.

  QwtSlider::~QwtSlider ()

Destructor.

MEMBER FUNCTION DOCUMENTATION

  void QwtSlider::drawSlider (QPainter * p, const QRect & r) [protected, virtual]

Draw the slider into the specified rectangle.

  void QwtSlider::fontChange (const QFont & oldFont) [protected]

Notify change in font.

  void QwtSlider::getScrollMode (const QPoint & p, int & scrollMode, int & direction) [protected, virtual]

Determine scrolling mode and direction.

Parameters:

p   point

Reimplemented from QwtSliderBase.

  double QwtSlider::getValue (const QPoint & p) [protected, virtual]

Determine the value corresponding to a specified mouse location.

Reimplemented from QwtSliderBase.

  void QwtSlider::paintEvent (QPaintEvent * e) [protected]

Qt paint event.

  void QwtSlider::rangeChange () [protected, virtual]

Notify change of range.

Reimplemented from QwtDblRange.

  void QwtSlider::resizeEvent (QResizeEvent * e) [protected]

Qt resize event.

  void QwtSlider::scaleChange () [protected, virtual]

Notify changed scale.

Reimplemented from QwtScaleIf.

  void QwtSlider::setBorderWidth (int bd)

Change the slider's border width.

Parameters:

bd  border width

  void QwtSlider::setMargins (int hor, int vert)

Set distances between the widget's border and internals.

Parameters:

hor

vert
    Margins

  void QwtSlider::setThumbLength (int l)

Set the slider's thumb length.

Parameters:

l   new length

  void QwtSlider::setThumbWidth (int w)

Change the width of the thumb.

Parameters:

w   new width

  QSize QwtSlider::sizeHint () const

Return a recommended size.

Warning:
The return value of sizeHint() depends on the font and the scale.

  void QwtSlider::valueChange () [protected, virtual]

Notify change of value.

Reimplemented from QwtSliderBase.

AUTHOR

Generated automatically by Doxygen for Qwt User's Guide from the source code.