QwtKnob(3)
π QwtKnob(3) π
okay so bestie, we are deep in the Qwt User's Guide right now and today's main character is QwtKnob. it's giving vintage radio. it's giving volume dial. it's giving "i was built by Doxygen and i still ate". πβ¨
πΈ NAME πΈ
QwtKnob -
and that's it, that's the whole name line β the original left the one-liner blank, so we're respecting the silence. it said nothing and served anyway. π
β¨ SYNOPSIS β¨
#include <qwt_knob.h>
Inherits QwtAbstractSlider, and QwtAbstractScale.
no cap, it's a double inheritance situation. it contains multitudes. π¦
π«Ά Public Types
enum Symbol { Line, Dot }
two symbols. that's the whole menu. pick your fighter. π
π Public Member Functions
QwtKnob (QWidget *parent=NULL)virtual ~QwtKnob ()int borderWidth () constint knobWidth () constvirtual QSize minimumSizeHint () constconst QwtRoundScaleDraw * scaleDraw () constQwtRoundScaleDraw * scaleDraw ()void setBorderWidth (int bw)void setKnobWidth (int w)void setScaleDraw (QwtRoundScaleDraw *)void setSymbol (Symbol)void setTotalAngle (double angle)virtual QSize sizeHint () constSymbol symbol () constdouble totalAngle () const
look at that roster. getters, setters, hints, a destructor β the full lineup, no skips. π
π Protected Member Functions
void draw (QPainter *p, const QRect &ur)void drawKnob (QPainter *p, const QRect &r)void drawMarker (QPainter *p, double arc, const QColor &c)virtual void paintEvent (QPaintEvent *e)virtual void resizeEvent (QResizeEvent *e)
these are the behind-the-scenes girls. the ones doing the actual painting. protected, as they should be. π
π Additional Inherited Members
(the original page just vibes here, no list, so we move on. respect.) β¨
π Detailed Description π
The Knob Widget.
so what is it, bestie? the QwtKnob widget imitates look and behaviour of a volume knob on a radio. literally. it's a radio dial. it contains a scale around the knob which is set up automatically or can be configured manually (see QwtAbstractScale). Automatic scrolling is enabled when the user presses a mouse button on the scale. For a description of signals, slots and other members, see QwtAbstractSlider.
See also:
QwtAbstractSliderandQwtAbstractScalefor the descriptions of the inherited members.
π§ Member Enumeration Documentation π§
π¦ enum QwtKnob::Symbol
Symbol
See also:
QwtKnob::QwtKnob()
πΈ Constructor & Destructor Documentation πΈ
β¨ QwtKnob::QwtKnob (QWidget *parent = NULL) [explicit]
Constructor
Parameters:
- parent β Parent widget
π Member Function Documentation π
π void QwtKnob::draw (QPainter *painter, const QRect &rect) [protected]
Repaint the knob
Parameters:
- painter β Painter
- rect β Update rectangle
π void QwtKnob::drawKnob (QPainter *painter, const QRect &r) [protected]
Draw the knob.
Parameters:
- painter β painter
- r β Bounding rectangle of the knob (without scale)
note the "without scale" β the scale is not invited to this rectangle. she's a separate event. π
π void QwtKnob::drawMarker (QPainter *p, doublearc, const QColor &c) [protected]
Draw the marker at the knob's front.
Parameters:
- p β Painter
- arc β Angle of the marker
- c β Marker color
π QSize QwtKnob::minimumSizeHint () const [virtual]
Return a minimum size hint.
Warning: The return value of QwtKnob::minimumSizeHint() depends on the font and the scale.
fr fr, do not hardcode assumptions about it β the font and the scale are running this show. π
π void QwtKnob::paintEvent (QPaintEvent *e) [protected], [virtual]
Repaint the knob
Parameters:
- e β Paint event
π void QwtKnob::resizeEvent (QResizeEvent *e) [protected], [virtual]
Qt Resize Event
short and sweet. she resizes. that's the tweet. π¦
π const QwtRoundScaleDraw * QwtKnob::scaleDraw () const
Returns:
- the scale draw of the knob
See also:
setScaleDraw()
π QwtRoundScaleDraw * QwtKnob::scaleDraw ()
Returns:
- the scale draw of the knob
See also:
setScaleDraw()
yes bestie, there are two of these β one const, one not. same description, same see-also. twin icons. no notes. π
π void QwtKnob::setBorderWidth (intbw)
Set the knob's border width.
Parameters:
- bw β new border width
π void QwtKnob::setKnobWidth (intw)
Change the knob's width. The specified width must be >= 5, or it will be clipped.
Parameters:
- w β New width
>= 5 or it gets clipped. that's the rule. don't fight it. π
π void QwtKnob::setScaleDraw (QwtRoundScaleDraw *scaleDraw)
Change the scale draw of the knob
For changing the labels of the scales, it is necessary to derive from QwtRoundScaleDraw and overload QwtRoundScaleDraw::label().
See also:
scaleDraw()
π void QwtKnob::setSymbol (QwtKnob::Symbols)
Set the symbol of the knob.
See also:
symbol()
π void QwtKnob::setTotalAngle (doubleangle)
Set the total angle by which the knob can be turned.
Parameters:
- angle β Angle in degrees.
The default angle is 270 degrees. It is possible to specify an angle of more than 360 degrees so that the knob can be turned several times around its axis.
more than 360 degrees?? she spins. she goes around. multiple times. main character energy, honestly. π₯
π QSize QwtKnob::sizeHint () const [virtual]
Returns:
minimumSizeHint()
π QwtKnob::Symbol QwtKnob::symbol () const
Returns:
- symbol of the knob
See also:
setSymbol()
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
and that's the whole page, bestie. you understood the assignment β¨ this was Version 5.2.3, dated Tue Nov 20 2012, and it lives at QwtKnob(3) in the manual. go forth and turn some knobs. πππ¦
π¦ 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