Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

QwtSlider Class Reference

The Slider Widget. More...

#include <qwt_slider.h>

Inheritance diagram for QwtSlider::

QwtSliderBase QwtScaleIf QwtDblRange List of all members.

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.


The documentation for this class was generated from the following files:
Generated on Mon Oct 22 18:38:31 2001 for Qwt User's Guide by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001