QwtAnalogClock(3)
π 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) constQwtDialNeedle * hand (Hand)virtual void setHand (Hand, QwtDialNeedle *)
Protected Member Functions π
virtual void drawHand (QPainter *, Hand, const QPoint &, int radius, double direction, QPalette::ColorGroup) constvirtual void drawNeedle (QPainter *, const QPoint &, int radius, double direction, QPalette::ColorGroup) constvirtual 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: Theexamples/dialsexample shows how to useQwtAnalogClock. π
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 ¢er, intradius, doubledirection, QPalette::ColorGroupcg) const [protected], [virtual]
Draw a clock hand ποΈ
Parameters:
painterβ Painterhdβ Specify the type of handcenterβ Center of the clockradiusβ Maximum length for the handsdirectionβ Direction of the hand in degrees, counter clockwisecgβ ColorGroup
void QwtAnalogClock::drawNeedle (QPainter *painter, const QPoint ¢er, 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β Paintercenterβ Center of the clockradiusβ Maximum length for the handsdirectionβ 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 handneedleβ 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
- 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