QwtAnalogClock(3)

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

πŸ• QwtAnalogClock β€” straight from the Qwt User's Guide πŸ’–

okay bestie, welcome to the manual page for QwtAnalogClock, and yeah the manual name is QwtAnalogClock(3) from the Qwt User's Guide, iykyk ✨


NAME πŸ’…

QwtAnalogClock β€”

not me leaving a dangling dash and zero description πŸ’€ the original page really said "class name, then vibes"

SYNOPSIS ✨

#include <qwt_analog_clock.h>

Inherits QwtDial. πŸ‘‘

Public Types πŸŽ€

  • enum Hand { SecondHand, MinuteHand, HourHand, NHands }

Public Slots πŸ¦‹

  • void setCurrentTime ()
  • void setTime (const QTime &=QTime::currentTime())

Public Member Functions 🌸

  • QwtAnalogClock (QWidget *parent=NULL)
  • virtual ~QwtAnalogClock ()
  • const QwtDialNeedle * hand (Hand) const
  • QwtDialNeedle * hand (Hand)
  • virtual void setHand (Hand, QwtDialNeedle *)

Protected Member Functions πŸ’œ

  • virtual void drawHand (QPainter *, Hand, const QPoint &, int radius, double direction, QPalette::ColorGroup) const
  • virtual void drawNeedle (QPainter *, const QPoint &, int radius, double direction, QPalette::ColorGroup) const
  • virtual QwtText scaleLabel (double) const

Detailed Description 🌈

An analog clock. πŸ•°οΈ that's it, that's the whole bit, and honestly? iconic.

Example ⭐

#include <qwt_analog_clock.h>

  QwtAnalogClock *clock = new QwtAnalogClock(...);
  clock->scaleDraw()->setPenWidth(3);
  clock->setLineWidth(6);
  clock->setFrameShadow(QwtDial::Sunken);
  clock->setTime();

  // update the clock every second
  QTimer *timer = new QTimer(clock);
  timer->connect(timer, SIGNAL(timeout()), clock, SLOT(setCurrentTime()));
  timer->start(1000);

Qwt is missing a set of good looking hands. Contributions are very welcome. 🫢 like please, someone come through, the clock needs a glow-up and the maintainers are literally asking fr fr.

Note: The examples/dials example shows how to use QwtAnalogClock. πŸ‘‘

Member Enumeration Documentation 🧚

enum QwtAnalogClock::Hand

Hand type πŸ–οΈ

See also: setHand(), hand()


Constructor & Destructor Documentation πŸŽ€

QwtAnalogClock::QwtAnalogClock (QWidget *parent = NULL) [explicit]

Constructor ✨

Parameters:

  • parent β€” Parent widget

Member Function Documentation πŸ’–

void QwtAnalogClock::drawHand (QPainter *painter, Handhd, const QPoint &center, intradius, doubledirection, QPalette::ColorGroupcg) const [protected], [virtual]

Draw a clock hand πŸ–οΈ

Parameters:

  • painter β€” Painter
  • hd β€” Specify the type of hand
  • center β€” Center of the clock
  • radius β€” Maximum length for the hands
  • direction β€” Direction of the hand in degrees, counter clockwise
  • cg β€” ColorGroup

void QwtAnalogClock::drawNeedle (QPainter *painter, const QPoint &center, intradius, doubledirection, QPalette::ColorGroupcg) const [protected], [virtual]

Draw the needle. A clock has no single needle but three hands instead. drawNeedle translates value() into directions for the hands and calls drawHand(). πŸ•°οΈβœ¨

Parameters:

  • painter β€” Painter
  • center β€” Center of the clock
  • radius β€” Maximum length for the hands
  • direction β€” Dummy, not used. πŸ’€ (yes really, it just sits there)
  • cg β€” ColorGroup

See also: drawHand()

Reimplemented from QwtDial.


const QwtDialNeedle * QwtAnalogClock::hand (Handhd) const

Returns: Clock hand πŸ–οΈ

Parameters:

  • hd β€” Specifies the type of hand

See also: setHand()


QwtDialNeedle * QwtAnalogClock::hand (Handhd)

Returns: Clock hand πŸ–οΈ

Parameters:

  • hd β€” Specifies the type of hand

See also: setHand()


QwtText QwtAnalogClock::scaleLabel (doublevalue) const [protected], [virtual]

Find the scale label for a given value πŸ”

Parameters:

  • value β€” Value

Returns: Label

Reimplemented from QwtDial.


void QwtAnalogClock::setCurrentTime () [slot]

Set the current time. This is the same as QwtAnalogClock::setTime(), but Qt < 3.0 can't handle default parameters for slots. 🫠 shoutout to the old Qt era, we do not miss you.


void QwtAnalogClock::setHand (Handhand, QwtDialNeedle *needle) [virtual]

Set a clockhand πŸ–οΈ

Parameters:

  • hand β€” Specifies the type of hand
  • needle β€” Hand

See also: hand()


void QwtAnalogClock::setTime (const QTime &time = QTime::currentTime()) [slot]

Set a time ⏰

Parameters:

  • time β€” Time to display

Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code. πŸ€– (not a human author, just Doxygen doing its little thing)


and that's the whole page bestie, no cap, nothing skipped, every flag-less parameter and every [slot] tag accounted for πŸ’…

Version 5.2.3 β€” Tue Nov 20 2012 ✨

mwah, 2012 called and it's still serving clock energy, love that for us πŸ•πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from