QwtKnob(3)

πŸ“¦ version 5.2.3a, in epel 9, fedora 43, fedora 44

πŸ’– 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 () const
  • int knobWidth () const
  • virtual QSize minimumSizeHint () const
  • const QwtRoundScaleDraw * scaleDraw () const
  • QwtRoundScaleDraw * scaleDraw ()
  • void setBorderWidth (int bw)
  • void setKnobWidth (int w)
  • void setScaleDraw (QwtRoundScaleDraw *)
  • void setSymbol (Symbol)
  • void setTotalAngle (double angle)
  • virtual QSize sizeHint () const
  • Symbol symbol () const
  • double 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:

  • QwtAbstractSlider and QwtAbstractScale for 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