QwtDialNeedle(3)

πŸ’… QwtDialNeedle πŸ’…

So this is the manual page for QwtDialNeedle from the Library Functions Manual β€” like, the whole vibe is "base class for needles that can be used in a QwtDial," and honestly? It's giving main character energy for every needle in the Qwt universe. πŸŽ€


✨ NAME ✨

QwtDialNeedle β€” the base class for needles that can be used in a QwtDial. That's it, that's the whole gig, and she does it beautifully. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <qwt_dial_needle.h>

Inherited by QwtCompassMagnetNeedle, QwtCompassWindArrow, and QwtDialSimpleNeedle β€” yes bestie, she's the mother of them all, and they all inherited her icon status. πŸ‘‘

✨ Public Member Functions ✨

  • QwtDialNeedle() β€” Constructor. She's born. πŸ’–
  • virtual ~QwtDialNeedle() β€” Destructor. She exits, gracefully. 😭
  • virtual void setPalette(const QPalette &) β€” gives her a whole new look.
  • const QPalette & palette() const β€” returns her current palette, no cap.
  • virtual void draw(QPainter *, const QPointF &center, double length, double direction, QPalette::ColorGroup=QPalette::Active) const β€” the moment where she actually gets drawn, literally.

🫢 Protected Member Functions 🫢

  • virtual void drawNeedle(QPainter *painter, double length, QPalette::ColorGroup colorGroup) const =0 β€” Draw the needle. Pure virtual, so you cannot skip this one, bestie.
  • virtual void drawKnob(QPainter *, double width, const QBrush &, bool sunken) const β€” Draw the knob. The little detail that ate. πŸ’…

πŸ¦‹ DETAILED DESCRIPTION πŸ¦‹

Base class for needles that can be used in a QwtDial.

QwtDialNeedle is a pointer that indicates a value by pointing to a specific direction. She's literally that girl who points at things and everyone understands. πŸ”₯

See also: QwtDial, QwtCompass

Definition at line 27 of file qwt_dial_needle.h. πŸ’€ Not me knowing exactly where she lives.

πŸŽ€ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πŸŽ€

QwtDialNeedle::QwtDialNeedle ()

Constructor.

Definition at line 182 of file qwt_dial_needle.cpp. ✨

QwtDialNeedle::~QwtDialNeedle () [virtual]

Destructor.

Definition at line 188 of file qwt_dial_needle.cpp. 😭


πŸ’œ MEMBER FUNCTION DOCUMENTATION πŸ’œ

void QwtDialNeedle::draw (QPainter * painter, const QPointF & center, double length, double direction, QPalette::ColorGroup colorGroup = QPalette::Active) const [virtual]

Draw the needle. This is the whole performance, the moment, the slay. 🌈

Parameters

  • painter β€” Painter.
  • center β€” Center of the dial, start position for the needle.
  • length β€” Length of the needle.
  • direction β€” Direction of the needle, in degrees counter clockwise.
  • colorGroup β€” Color group, used for painting.

Definition at line 219 of file qwt_dial_needle.cpp. πŸ“

void QwtDialNeedle::drawKnob (QPainter * painter, double width, const QBrush & brush, bool sunken) const [protected], [virtual]

Draw the knob. Tiny but iconic β€” the accessory of the needle world. πŸŽ€

Definition at line 234 of file qwt_dial_needle.cpp. πŸ’–

virtual void QwtDialNeedle::drawNeedle (QPainter * painter, double length, QPalette::ColorGroup colorGroup) const [protected], [pure virtual]

Draw the needle. The origin of the needle is at position (0.0, 0.0 ) pointing in direction 0.0 ( = east ). So like, she starts at the origin and faces east β€” we all start somewhere, right? 🧚

The painter is already initialized with translation and rotation. (Translation and rotation are already handled, so don't come for her.) ✨

Parameters

  • painter β€” Painter.
  • length β€” Length of the needle.
  • colorGroup β€” Color group, used for painting.

See also: setPalette(), palette()

Implemented in QwtCompassMagnetNeedle, QwtCompassWindArrow, and QwtDialSimpleNeedle β€” her three daughters, all carrying the legacy. πŸ‘‘

Definition at line 226 of file qwt_dial_needle.cpp... okay no, but seriously, this is pure virtual, so every subclass has to bring their own version. πŸ™ˆ

const QPalette & QwtDialNeedle::palette () const

Returns the palette of the needle. Her look, her colors, her whole aesthetic. πŸ’…

Definition at line 205 of file qwt_dial_needle.cpp. 🌸

void QwtDialNeedle::setPalette (const QPalette & palette) [virtual]

Sets the palette for the needle. A full glow-up, bestie. πŸ’–

Parameters

  • palette β€” New Palette.

Definition at line 197 of file qwt_dial_needle.cpp. ⭐


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code. So like, no human author to thank β€” the robots did this one, and honestly? They ate. πŸ€–βœ¨


Lowkey a warning: drawNeedle is pure virtual β€” if you try to instantiate QwtDialNeedle directly, the compiler will simply not let you, and honestly that's the vibe check working as intended. πŸ’€

Okay that's the whole page, bestie β€” every flag, every signature, every line number, all of it, fr fr. And before you go: this page came to you from the Qwt User's Guide (that's the source and version info, right there in the footer), so big thank you to the Qwt crew for that. 🫢 Byeee! πŸ’œπŸ¦‹πŸŒˆ

πŸ“¦ where this page comes from