- bookworm 6.1.4-2
- testing 6.1.4-2
- unstable 6.1.4-2
- experimental 6.2.0-1
QwtSlider(3) | Qwt User's Guide | QwtSlider(3) |
NAME¶
QwtSlider - The Slider Widget.
SYNOPSIS¶
#include <qwt_slider.h>
Inherits QwtAbstractSlider.
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)
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 override
virtual QSize minimumSizeHint () const override
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
override
Determine the value for a new position of the slider handle. virtual bool
isScrollPosition (const QPoint &) const override
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 *) override
virtual void mouseReleaseEvent (QMouseEvent *) override
virtual void resizeEvent (QResizeEvent *) override
virtual void paintEvent (QPaintEvent *) override
virtual void changeEvent (QEvent *) override
virtual void timerEvent (QTimerEvent *) override
virtual bool event (QEvent *) override
virtual void scaleChange () override
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.
Definition at line 30 of file qwt_slider.h.
Member Enumeration Documentation¶
enum QwtSlider::ScalePosition¶
Position of the scale
See also
Enumerator
- NoScale
- The slider has no scale.
- LeadingScale
- The scale is right of a vertical or below a horizontal slider.
- TrailingScale
- The scale is left of a vertical or above a horizontal slider.
Definition at line 54 of file qwt_slider.h.
Constructor & Destructor Documentation¶
QwtSlider::QwtSlider (QWidget * parent = NULL) [explicit]¶
Construct vertical slider in QwtSlider::Trough style with a scale to the left.
The scale is initialized to [0.0, 100.0] and the value set to 0.0.
Parameters
See also
Definition at line 119 of file qwt_slider.cpp.
QwtSlider::QwtSlider (Qt::Orientation orientation, QWidget * parent = NULL) [explicit]¶
Construct a slider in QwtSlider::Trough style
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
orientation Orientation of the slider.
Definition at line 136 of file qwt_slider.cpp.
Member Function Documentation¶
int QwtSlider::borderWidth () const¶
Returns
See also
Definition at line 262 of file qwt_slider.cpp.
void QwtSlider::changeEvent (QEvent * event) [override], [protected], [virtual]¶
Handles QEvent::StyleChange and QEvent::FontChange events
Parameters
Reimplemented from QwtAbstractScale.
Definition at line 724 of file qwt_slider.cpp.
void QwtSlider::drawHandle (QPainter * painter, const QRect & handleRect, int pos) const [protected], [virtual]¶
Draw the thumb at a position
Parameters
handleRect Bounding rectangle of the handle
pos Position of the handle marker in widget coordinates
Definition at line 473 of file qwt_slider.cpp.
void QwtSlider::drawSlider (QPainter * painter, const QRect & sliderRect) const [protected], [virtual]¶
Draw the slider into the specified rectangle.
Parameters
sliderRect Bounding rectangle of the slider
Definition at line 415 of file qwt_slider.cpp.
bool QwtSlider::event (QEvent * event) [override], [protected], [virtual]¶
Qt event handler
Parameters
Returns
Definition at line 712 of file qwt_slider.cpp.
QRect QwtSlider::handleRect () const [protected]¶
Returns
Definition at line 990 of file qwt_slider.cpp.
QSize QwtSlider::handleSize () const¶
Returns
See also
Definition at line 326 of file qwt_slider.cpp.
bool QwtSlider::hasGroove () const¶
Returns
See also
Definition at line 904 of file qwt_slider.cpp.
bool QwtSlider::hasTrough () const¶
Returns
See also
Definition at line 875 of file qwt_slider.cpp.
bool QwtSlider::isScrollPosition (const QPoint & pos) const [override], [protected], [virtual]¶
Determine what to do when the user presses a mouse button.
Parameters
Return values
See also
Implements QwtAbstractSlider.
Definition at line 503 of file qwt_slider.cpp.
QSize QwtSlider::minimumSizeHint () const [override], [virtual]¶
Returns
See also
Definition at line 922 of file qwt_slider.cpp.
void QwtSlider::mousePressEvent (QMouseEvent * event) [override], [protected], [virtual]¶
Mouse press event handler
Parameters
Reimplemented from QwtAbstractSlider.
Definition at line 547 of file qwt_slider.cpp.
void QwtSlider::mouseReleaseEvent (QMouseEvent * event) [override], [protected], [virtual]¶
Mouse release event handler
Parameters
Reimplemented from QwtAbstractSlider.
Definition at line 606 of file qwt_slider.cpp.
Qt::Orientation QwtSlider::orientation () const¶
Returns
See also
Definition at line 202 of file qwt_slider.cpp.
void QwtSlider::paintEvent (QPaintEvent * event) [override], [protected], [virtual]¶
Qt paint event handler
Parameters
Definition at line 675 of file qwt_slider.cpp.
void QwtSlider::resizeEvent (QResizeEvent * event) [override], [protected], [virtual]¶
Qt resize event handler
Parameters
Definition at line 700 of file qwt_slider.cpp.
const QwtScaleDraw * QwtSlider::scaleDraw () const¶
Returns
See also
Definition at line 363 of file qwt_slider.cpp.
QwtSlider::ScalePosition QwtSlider::scalePosition () const¶
Returns
See also
Definition at line 230 of file qwt_slider.cpp.
double QwtSlider::scrolledTo (const QPoint & pos) const [override], [protected], [virtual]¶
Determine the value for a new position of the slider handle.
Parameters
Returns
See also
Implements QwtAbstractSlider.
Definition at line 526 of file qwt_slider.cpp.
void QwtSlider::setBorderWidth (int width)¶
Change the slider's border width. The border width is used for drawing the slider handle and the trough.
Parameters
See also
Definition at line 244 of file qwt_slider.cpp.
void QwtSlider::setGroove (bool on)¶
En/Disable the groove
The slider can be customized by showing a groove for the handle.
Parameters
See also
Definition at line 889 of file qwt_slider.cpp.
void QwtSlider::setHandleSize (const QSize & size)¶
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
Definition at line 311 of file qwt_slider.cpp.
void QwtSlider::setOrientation (Qt::Orientation orientation)¶
Set the orientation.
Parameters
See also
Definition at line 175 of file qwt_slider.cpp.
void QwtSlider::setScaleDraw (QwtScaleDraw * scaleDraw)¶
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
Definition at line 344 of file qwt_slider.cpp.
void QwtSlider::setScalePosition (ScalePosition scalePosition)¶
Change the position of the scale.
Parameters
See also
Definition at line 213 of file qwt_slider.cpp.
void QwtSlider::setSpacing (int spacing)¶
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
Definition at line 278 of file qwt_slider.cpp.
void QwtSlider::setTrough (bool on)¶
En/Disable the trough
The slider can be customized by showing a trough for the handle.
Parameters
See also
Definition at line 860 of file qwt_slider.cpp.
void QwtSlider::setUpdateInterval (int interval)¶
Specify the update interval for automatic scrolling. The minimal accepted value is 50 ms.
Parameters
See also
Definition at line 395 of file qwt_slider.cpp.
QSize QwtSlider::sizeHint () const [override], [virtual]¶
Returns
Definition at line 912 of file qwt_slider.cpp.
QRect QwtSlider::sliderRect () const [protected]¶
Returns
Definition at line 1014 of file qwt_slider.cpp.
int QwtSlider::spacing () const¶
Returns
See also
Definition at line 296 of file qwt_slider.cpp.
void QwtSlider::timerEvent (QTimerEvent * event) [override], [protected], [virtual]¶
Timer event handler
Handles the timer, when the mouse stays pressed inside the sliderRect().
Parameters
Definition at line 633 of file qwt_slider.cpp.
int QwtSlider::updateInterval () const¶
Returns
See also
Definition at line 404 of file qwt_slider.cpp.
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Sun Jul 18 2021 | Version 6.2.0 |