QwtSlider is a slider widget which operates on an interval of type double. QwtSlider supports different layouts as well as a scale.
Definition at line 34 of file qwt_slider.h.
Public Types | |
enum | ScalePos { NoScale, LeftScale, RightScale, TopScale, BottomScale } |
enum | BGSTYLE { BgTrough = 0x1, BgSlot = 0x2, BgBoth = BgTrough | BgSlot } |
Public Member Functions | |
QwtSlider (QWidget *parent, Qt::Orientation=Qt::Horizontal, ScalePos=NoScale, BGSTYLE bgStyle=BgTrough) | |
virtual | ~QwtSlider () |
virtual void | setOrientation (Qt::Orientation) |
void | setBgStyle (BGSTYLE) |
BGSTYLE | bgStyle () const |
void | setScalePosition (ScalePos s) |
ScalePos | scalePosition () 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 |
void | setScaleDraw (QwtScaleDraw *) |
const QwtScaleDraw * | scaleDraw () 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 |
QwtScaleDraw * | scaleDraw () |
|
Background style.
Definition at line 70 of file qwt_slider.h. |
|
Scale position. QwtSlider tries to enforce valid combinations of its orientation and scale position:
Definition at line 56 of file qwt_slider.h. |
|
Constructor.
Definition at line 64 of file qwt_slider.cpp. |
|
Definition at line 735 of file qwt_slider.cpp. |
|
Definition at line 759 of file qwt_slider.cpp. |
|
Draw the QwtSlider.
Definition at line 517 of file qwt_slider.cpp. References QwtAbstractScaleDraw::draw(), QwtPainter::drawFocusRect(), drawSlider(), and scaleDraw(). Referenced by paintEvent(). |
|
Draw the slider into the specified rectangle.
Definition at line 319 of file qwt_slider.cpp. References drawThumb(), QwtAbstractSlider::isValid(), QwtAbstractSlider::orientation(), QwtDoubleRange::value(), and xyPosition(). Referenced by draw(). |
|
Draw the thumb at a position.
Definition at line 395 of file qwt_slider.cpp. References QwtAbstractSlider::orientation(). Referenced by drawSlider(). |
|
Notify change in font.
Definition at line 312 of file qwt_slider.cpp. References layoutSlider(). |
|
Determine scrolling mode and direction.
Implements QwtAbstractSlider. Definition at line 472 of file qwt_slider.cpp. |
|
Determine the value corresponding to a specified mouse location.
Implements QwtAbstractSlider. Definition at line 459 of file qwt_slider.cpp. References QwtAbstractSlider::orientation(). |
|
Recalculate the slider's geometry and layout based on the current rect and fonts.
Definition at line 546 of file qwt_slider.cpp. References QwtScaleDraw::getBorderDistHint(), QwtScaleDraw::move(), QwtAbstractSlider::orientation(), scaleDraw(), and QwtScaleDraw::setLength(). Referenced by fontChange(), rangeChange(), resizeEvent(), scaleChange(), setBgStyle(), setBorderWidth(), setMargins(), setOrientation(), setScalePosition(), setThumbLength(), and setThumbWidth(). |
|
Return a minimum size hint.
Definition at line 777 of file qwt_slider.cpp. References QwtScaleDraw::extent(), QwtScaleDraw::getBorderDistHint(), QwtScaleDraw::minLength(), QwtAbstractSlider::orientation(), and scaleDraw(). Referenced by sizeHint(). |
|
Qt paint event.
Definition at line 501 of file qwt_slider.cpp. References draw(). |
|
Notify change of range.
Reimplemented from QwtDoubleRange. Definition at line 692 of file qwt_slider.cpp. References QwtAbstractScale::autoScale(), layoutSlider(), QwtDoubleRange::maxValue(), QwtDoubleRange::minValue(), QwtDoubleRange::rangeChange(), and QwtAbstractScale::rescale(). |
|
Qt resize event.
Definition at line 535 of file qwt_slider.cpp. References layoutSlider(). |
|
Notify changed scale.
Reimplemented from QwtAbstractScale. Definition at line 305 of file qwt_slider.cpp. References layoutSlider(). |
|
Return the scale position.
Definition at line 236 of file qwt_slider.cpp. |
|
Set the background style. Definition at line 726 of file qwt_slider.cpp. References layoutSlider(). |
|
Change the slider's border width.
Definition at line 245 of file qwt_slider.cpp. References layoutSlider(). |
|
Set distances between the widget's border and internals.
Definition at line 708 of file qwt_slider.cpp. References layoutSlider(). |
|
Set the orientation.
Reimplemented from QwtAbstractSlider. Definition at line 174 of file qwt_slider.cpp. References layoutSlider(), QwtAbstractSlider::orientation(), and QwtAbstractSlider::setOrientation(). Referenced by setScalePosition(). |
|
Change the scale position (and slider orientation).
Definition at line 224 of file qwt_slider.cpp. References layoutSlider(), and setOrientation(). |
|
Set the slider's thumb length.
Definition at line 261 of file qwt_slider.cpp. References layoutSlider(). |
|
Change the width of the thumb.
Definition at line 277 of file qwt_slider.cpp. References layoutSlider(). |
|
Definition at line 767 of file qwt_slider.cpp. References minimumSizeHint(). |
|
Definition at line 743 of file qwt_slider.cpp. |
|
Definition at line 751 of file qwt_slider.cpp. |
|
Notify change of value.
Reimplemented from QwtAbstractSlider. Definition at line 684 of file qwt_slider.cpp. References QwtAbstractSlider::valueChange(). |
|
Find the x/y position for a given value v.
Definition at line 453 of file qwt_slider.cpp. Referenced by drawSlider(). |