QwtSlider(3)
NAME π
Bestie, this is QwtSlider(3) β the Slider Widget. That's the name, periodt.
SYNOPSIS β¨
Okay so first, include this header, no cap:
#include <qwt_slider.h>
Inherits QwtAbstractSlider, and QwtAbstractScale. Slay.
Public Types π
These enums are iconic:
enum BGSTYLE { BgTrough = 0x1, BgSlot = 0x2, BgBoth = BgTrough |
BgSlot }
enum ScalePos { NoScale, LeftScale, RightScale, TopScale, BottomScale }
Public Member Functions π
Here's the main character energy functions, bestie:
QwtSlider (QWidget *parent, Qt::Orientation=Qt::Horizontal, ScalePos=NoScale, BGSTYLE bgStyle=BgTrough)BGSTYLE bgStyle () constint borderWidth () constvirtual QSize minimumSizeHint () constconst QwtScaleDraw * scaleDraw () constScalePos scalePosition () constvoid setBgStyle (BGSTYLE)void setBorderWidth (int bw)void setMargins (int x, int y)virtual void setOrientation (Qt::Orientation)void setScaleDraw (QwtScaleDraw *)void setScalePosition (ScalePos s)void setThumbLength (int l)void setThumbWidth (int w)virtual QSize sizeHint () constint thumbLength () constint thumbWidth () const
Protected Member Functions π
These are the protected ones, lowkey for the internals:
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 fontChange (const QFont &oldFont)virtual void getScrollMode (const QPoint &p, int &scrollMode, int &direction)virtual double getValue (const QPoint &p)void layoutSlider (bool update=true)virtual void paintEvent (QPaintEvent *e)virtual void rangeChange ()virtual void resizeEvent (QResizeEvent *e)virtual void scaleChange ()QwtScaleDraw * scaleDraw ()virtual void valueChange ()int xyPosition (double v) const
Additional Inherited Members π
There are more inherited members, bestie β they're chilling in the parent classes. No cap. Go check QwtAbstractSlider and QwtAbstractScale for the deets.
Detailed Description π¦
The Slider Widget. It's giving slider realness.
QwtSlider is a slider widget which operates on an interval of type double. QwtSlider supports different layouts as well as a scale. Obsessed.
See also: QwtAbstractSlider and QwtAbstractScale for the descriptions of the inherited members.
Member Enumeration Documentation πΈ
enum QwtSlider::BGSTYLE
Background style. The vibe check for your background.
See also: QwtSlider()
enum QwtSlider::ScalePos
Scale position. QwtSlider tries to enforce valid combinations of its orientation and scale position:
Qt::Horizonalcombines withNoScale,TopScaleandBottomScaleQt::Verticalcombines withNoScale,LeftScaleandRightScale
See also: QwtSlider()
Constructor & Destructor Documentation π
QwtSlider::QwtSlider (QWidget *parent, Qt::Orientationorientation = Qt::Horizontal, ScalePosscalePos = NoScale, BGSTYLEbgStyle = BgTrough) [explicit]
Constructor. Parameters:
parentβ parent widgetorientationβ Orientation of the slider. Can beQt::HorizontalorQt::Vertical. Defaults toQt::Horizontal.scalePosβ Position of the scale. Defaults toQwtSlider::NoScale.bgStyleβ Background style.QwtSlider::BgTroughdraws the slider button in a trough,QwtSlider::BgSlotdraws a slot underneath the button. An or-combination of both may also be used. The default isQwtSlider::BgTrough.
QwtSlider enforces valid combinations of its orientation and scale position. If the combination is invalid, the scale position will be set to NoScale. Valid combinations are:
Qt::HorizonalwithNoScale,TopScale, orBottomScale;Qt::VerticalwithNoScale,LeftScale, orRightScale.
Member Function Documentation π
QwtSlider::BGSTYLE QwtSlider::bgStyle () const
Returns: the background style. That's the vibe of your background, bestie.
int QwtSlider::borderWidth () const
Returns: the border width.
void QwtSlider::drawSlider (QPainter *painter, const QRect &r) [protected], [virtual]
Draw the slider into the specified rectangle.
Parameters:
painterβ Painterrβ Rectangle
void QwtSlider::drawThumb (QPainter *painter, const QRect &sliderRect, intpos) [protected], [virtual]
Draw the thumb at a position
Parameters:
painterβ PaintersliderRectβ Bounding rectangle of the sliderposβ Position of the slider thumb
void QwtSlider::getScrollMode (const QPoint &p, int &scrollMode, int &direction) [protected], [virtual]
Determine scrolling mode and direction.
Parameters:
pβ pointscrollModeβ Scrolling modedirectionβ Direction
Implements QwtAbstractSlider.
double QwtSlider::getValue (const QPoint &pos) [protected], [virtual]
Determine the value corresponding to a specified mouse location.
Parameters:
posβ Mouse position
Implements QwtAbstractSlider.
void QwtSlider::layoutSlider (boolupdate_geometry = true) [protected]
Recalculate the slider's geometry and layout based on the current rect and fonts.
Parameters:
update_geometryβ notify the layout system and call update to redraw the scale
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 *event) [protected], [virtual]
Qt paint event
Parameters:
eventβ Paint event
const QwtScaleDraw * QwtSlider::scaleDraw () const
Returns: the scale draw of the slider
See also: setScaleDraw()
QwtScaleDraw * QwtSlider::scaleDraw () [protected]
Returns: the scale draw of the slider
See also: setScaleDraw()
void QwtSlider::setBgStyle (BGSTYLEst)
Set the background style.
void QwtSlider::setBorderWidth (intbd)
Change the slider's border width.
Parameters:
bdβ border width
void QwtSlider::setMargins (intxMargin, intyMargin)
Set distances between the widget's border and internals.
Parameters:
xMarginβ Horizontal marginyMarginβ Vertical margin
void QwtSlider::setOrientation (Qt::Orientationo) [virtual]
Set the orientation.
Parameters:
oβ Orientation. Allowed values areQt::HorizontalandQt::Vertical.
If the new orientation and the old scale position are an invalid combination, the scale position will be set to QwtSlider::NoScale.
See also: QwtAbstractSlider::orientation()
Reimplemented from QwtAbstractSlider.
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:
scaleDrawβ ScaleDraw object, that has to be created withnewand will be deleted in~QwtSlideror the next call ofsetScaleDraw().
void QwtSlider::setScalePosition (ScalePoss)
Change the scale position (and slider orientation).
Parameters:
sβ Position of the scale.
A valid combination of scale position and orientation is enforced:
- if the new scale position is Left or Right, the scale orientation will become
Qt::Vertical; - if the new scale position is Bottom or Top the scale orientation will become
Qt::Horizontal; - if the new scale position is
QwtSlider::NoScale, the scale orientation will not change.
void QwtSlider::setThumbLength (intthumbLength)
Set the slider's thumb length.
Parameters:
thumbLengthβ new length
void QwtSlider::setThumbWidth (intw)
Change the width of the thumb.
Parameters:
wβ new width
QSize QwtSlider::sizeHint () const [virtual]
Returns: QwtSlider::minimumSizeHint()
int QwtSlider::thumbLength () const
Returns: the thumb length.
int QwtSlider::thumbWidth () const
Returns: the thumb width.
int QwtSlider::xyPosition (doublevalue) const [protected]
Find the x/y position for a given value v
Parameters:
valueβ Value
Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Okay bestie, that's the whole page. Version 5.2.3, dated Tue Nov 20 2012, from the Qwt User's Guide. Footer vibes only. π
β¨
π¦ where this page comes from
- epel 9: qwt5-qt5-devel 5.2.3a-12.20210522gita2b11e3.el9 Β· LGPLv2+ with exceptions
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms