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

QwtSlider Class Reference

Inheritance diagram for QwtSlider:

QwtSliderBase QwtScaleIf QwtDblRange 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.

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


Public Types

enum  ScalePos {
  None,
  Left,
  Right,
  Top,
  Bottom
}
enum  BGSTYLE {
  BgTrough = 0x1,
  BgSlot = 0x2,
  BgBoth = BgTrough | BgSlot
}

Public Member Functions

 QwtSlider (QWidget *parent, const char *name=0, Qt::Orientation=Horizontal, ScalePos=None, int bgStyle=BgTrough)
virtual void setOrientation (Qt::Orientation)
void setBgStyle (BGSTYLE st)
BGSTYLE bgStyle () const
void setScalePos (ScalePos st)
ScalePos scalePos () const
int thumbLength () const
int thumbWidth () const
int borderWidth () const
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 Member Functions

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


Member Enumeration Documentation

enum QwtSlider::BGSTYLE
 

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,
Qt::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 &  ,
int  pos
[protected, virtual]
 

Draw the thumb at a position.

void QwtSlider::fontChange const QFont &  oldFont  )  [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
scrollMode Scrolling mode
direction Direction

Implements QwtSliderBase.

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

Determine the value corresponding to a specified mouse location.

Implements QwtSliderBase.

void QwtSlider::layoutSlider bool  update = 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.

Implements 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::setOrientation Qt::Orientation  o  )  [virtual]
 

Set the orientation.

Parameters:
o Orientation. Allowed values are Qt::Horizontal and Qt::Vertical. Defaults to Qt::Horizontal.
See also:
QwtSliderBase::orientation()

void QwtSlider::setThumbLength int  thumbLength  ) 
 

Set the slider's thumb length.

Parameters:
thumbLength 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.


Generated on Tue Nov 25 21:15:09 2003 for Qwt User's Guide by doxygen 1.3.4