QwtSlider(3)

NAME
QwtSlider - The Slider Widget.

SYNOPSIS

#include <qwt_slider.h>

Inherits QwtSliderBase, and QwtScaleIf.

  Public Types
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)
void setThumbLength (int l)
void setThumbWidth (int w)
void setBorderWidth (int bw)
void setMargins (int x, int y)
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
virtual QSizePolicy sizePolicy () const

  Protected Methods
virtual double getValue (const QPoint &p)
virtual void getScrollMode (const QPoint &p, int &scrollMode, int &direction)
void draw (QPainter *p, const QRect &update_rect)
virtual void drawSlider (QPainter *p, const QRect &r)
virtual void drawThumb (QPainter *p, const QRect &, int pos)
virtual void resizeEvent (QResizeEvent *e)
virtual void paintEvent (QPaintEvent *e)
virtual void valueChange ()
virtual void rangeChange ()
virtual void scaleChange ()
virtual void fontChange (const QFont &oldFont)
void layoutSlider (bool update=TRUE)
int xyPosition (double v) const

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.

MEMBER ENUMERATION DOCUMENTATION

  anonymous enum

Background style

See also:
QwtSlider::QwtSlider

  enum QwtSlider::ScalePos

Position of the scale

See also:
QwtSlider::QwtSlider

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 Qt::Horizontal or Qt::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.

MEMBER FUNCTION DOCUMENTATION

  void QwtSlider::draw (QPainter * p, const QRect & update_rect) [protected]

redraw the slider.

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

Draw the slider into the specified rectangle.

  void QwtSlider::drawThumb (QPainter * p, const QRect & sliderRect, int pos) [protected, virtual]

Draw the thumb at a position.

  void QwtSlider::fontChange (const QFont & f) [protected, virtual]

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::layoutSlider (bool update_geometry = TRUE) [protected]

Recalculate the slider's geometry and layout based on.

  QSize QwtSlider::minimumSizeHint () const [virtual]

Return a minimum size hint.

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

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

Qt paint event.

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

Notify change of range.

Reimplemented from QwtDblRange.

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

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 xMargin, int yMargin)

Set distances between the widget's border and internals.

Parameters:

xMargin
    Horizontal margin

yMargin
    Vertical margin

  void QwtSlider::setThumbLength (int thumbLength)

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 [virtual]

Returns:
QwtSlider::minimumSizeHint()

  QSizePolicy QwtSlider::sizePolicy () const [virtual]

Returns:
Horizontal: MinimumExpanding/Fixed, Vertical: Fixed/MinimumExpanding

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

Notify change of value.

Reimplemented from QwtSliderBase.

  int QwtSlider::xyPosition (double v) const [protected]

Find the x/y position for a given value v.

AUTHOR

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