QwtSlider (3) - Linux Manuals
NAME
QwtSlider -
SYNOPSIS
#include <qwt_slider.h>
Public Types
enum ScalePosition { NoScale, LeadingScale, TrailingScale }
Public Member Functions
QwtSlider (QWidget *parent=NULL)
QwtSlider (Qt::Orientation, QWidget *parent=NULL)
virtual ~QwtSlider ()
Destructor.
void setOrientation (Qt::Orientation)
Set the orientation.
Qt::Orientation orientation () const
void setScalePosition (ScalePosition)
Change the position of the scale.
ScalePosition scalePosition () const
void setTrough (bool)
bool hasTrough () const
void setGroove (bool)
bool hasGroove () const
void setHandleSize (const QSize &)
Set the slider's handle size.
QSize handleSize () const
void setBorderWidth (int bw)
Change the slider's border width.
int borderWidth () const
void setSpacing (int)
Change the spacing between trough and scale.
int spacing () const
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
void setScaleDraw (QwtScaleDraw *)
Set a scale draw.
const QwtScaleDraw * scaleDraw () const
void setUpdateInterval (int)
Specify the update interval for automatic scrolling.
int updateInterval () const
Protected Member Functions
virtual double scrolledTo (const QPoint &) const
Determine the value for a new position of the slider handle.
virtual bool isScrollPosition (const QPoint &) const
Determine what to do when the user presses a mouse button.
virtual void drawSlider (QPainter *, const QRect &) const
virtual void drawHandle (QPainter *, const QRect &, int pos) const
virtual void mousePressEvent (QMouseEvent *)
virtual void mouseReleaseEvent (QMouseEvent *)
virtual void resizeEvent (QResizeEvent *)
virtual void paintEvent (QPaintEvent *)
virtual void changeEvent (QEvent *)
virtual void timerEvent (QTimerEvent *)
virtual void scaleChange ()
Notify changed scale.
QRect sliderRect () const
QRect handleRect () const
Additional Inherited Members
Detailed Description
The Slider Widget.
QwtSlider is a slider widget which operates on an interval of type double. Its position is related to a scale showing the current value.
The slider can be customized by having a through, a groove - or both.
See Also:
Enumerator
The scale is initialized to [0.0, 100.0] and the value set to 0.0.
Parameters:
See Also:
When orientation is Qt::Vertical the scale will be aligned to the left - otherwise at the the top of the slider.
The scale is initialized to [0.0, 100.0] and the value set to 0.0.
Parameters:
Returns:
See Also:
Parameters:
Parameters:
Parameters:
Returns:
Returns:
See Also:
Returns:
See Also:
Returns:
See Also:
Determine what to do when the user presses a mouse button.
Parameters:
Return values:
See Also:
Returns:
See Also:
Parameters:
Reimplemented from QwtAbstractSlider.
Parameters:
Reimplemented from QwtAbstractSlider.
Returns:
See Also:
Parameters:
Parameters:
Returns:
See Also:
Returns:
See Also:
Determine the value for a new position of the slider handle.
Parameters:
Returns:
See Also:
Change the slider's border width. The border width is used for drawing the slider handle and the trough.
Parameters:
See Also:
The slider can be cutomized by showing a groove for the handle.
Parameters:
See Also:
Set the slider's handle size. When the size is empty the slider handle will be painted with a default size depending on its orientation() and backgroundStyle().
Parameters:
See Also:
Set the orientation.
Parameters:
See Also:
Set a scale draw. For changing the labels of the scales, it is necessary to derive from QwtScaleDraw and overload QwtScaleDraw::label().
Parameters:
See Also:
Change the position of the scale.
Parameters:
See Also:
Change the spacing between trough and scale. A spacing of 0 means, that the backbone of the scale is covered by the trough.
The default setting is 4 pixels.
Parameters:
See Also:
The slider can be cutomized by showing a trough for the handle.
Parameters:
See Also:
Specify the update interval for automatic scrolling. The minimal accepted value is 50 ms.
Parameters:
See Also:
Returns:
Returns:
Returns:
See Also:
Handles the timer, when the mouse stays pressed inside the sliderRect().
Parameters:
Returns:
See Also:
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Member Enumeration Documentation
enum QwtSlider::ScalePosition
Position of the scale
Constructor & Destructor Documentation
QwtSlider::QwtSlider (QWidget *parent = NULL) [explicit]
Construct vertical slider in QwtSlider::Trough style with a scale to the left.
QwtSlider::QwtSlider (Qt::Orientationorientation, QWidget *parent = NULL) [explicit]
Construct a slider in QwtSlider::Trough style
orientation Orientation of the slider.
Member Function Documentation
int QwtSlider::borderWidth () const
void QwtSlider::changeEvent (QEvent *event) [protected], [virtual]
Handles QEvent::StyleChange and QEvent::FontChange events
void QwtSlider::drawHandle (QPainter *painter, const QRect &handleRect, intpos) const [protected], [virtual]
Draw the thumb at a position
handleRect Bounding rectangle of the handle
pos Position of the handle marker in widget coordinates
void QwtSlider::drawSlider (QPainter *painter, const QRect &sliderRect) const [protected], [virtual]
Draw the slider into the specified rectangle.
sliderRect Bounding rectangle of the slider
QRect QwtSlider::handleRect () const [protected]
QSize QwtSlider::handleSize () const
bool QwtSlider::hasGroove () const
bool QwtSlider::hasTrough () const
bool QwtSlider::isScrollPosition (const QPoint &pos) const [protected], [virtual]
QSize QwtSlider::minimumSizeHint () const [virtual]
void QwtSlider::mousePressEvent (QMouseEvent *event) [protected], [virtual]
Mouse press event handler
void QwtSlider::mouseReleaseEvent (QMouseEvent *event) [protected], [virtual]
Mouse release event handler
Qt::Orientation QwtSlider::orientation () const
void QwtSlider::paintEvent (QPaintEvent *event) [protected], [virtual]
Qt paint event handler
void QwtSlider::resizeEvent (QResizeEvent *event) [protected], [virtual]
Qt resize event handler
const QwtScaleDraw * QwtSlider::scaleDraw () const
QwtSlider::ScalePosition QwtSlider::scalePosition () const
double QwtSlider::scrolledTo (const QPoint &pos) const [protected], [virtual]
void QwtSlider::setBorderWidth (intwidth)
void QwtSlider::setGroove (boolon)
En/Disable the groove
void QwtSlider::setHandleSize (const QSize &size)
void QwtSlider::setOrientation (Qt::Orientationorientation)
void QwtSlider::setScaleDraw (QwtScaleDraw *scaleDraw)
void QwtSlider::setScalePosition (ScalePositionscalePosition)
void QwtSlider::setSpacing (intspacing)
void QwtSlider::setTrough (boolon)
En/Disable the trough
void QwtSlider::setUpdateInterval (intinterval)
QSize QwtSlider::sizeHint () const [virtual]
QRect QwtSlider::sliderRect () const [protected]
int QwtSlider::spacing () const
void QwtSlider::timerEvent (QTimerEvent *event) [protected], [virtual]
Timer event handler
int QwtSlider::updateInterval () const
Author