QwtAnalogClock(3)
π QwtAnalogClock(3) β Library Functions Manual vibe check π
Okay so hey bestie, welcome to QwtAnalogClock(3) from the Library Functions Manual β¨. This page is literally about an analog clock, and it's giving main character widget energy fr fr.
π NAME π
QwtAnalogClock β an analog clock.
πΈ SYNOPSIS πΈ
#include <qwt_analog_clock.h>
Inherits QwtDial.
β¨ Public Types β¨
enum Hand { SecondHand, MinuteHand, HourHand, NHands }
π Public Types inherited from QwtDial π
enum Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken }β frame shadow.enum Mode { RotateNeedle, RotateScale }β mode controlling whether the needle or the scale is rotating.
π«Ά Public Slots π«Ά
void setCurrentTime ()β sets the current time.void setTime (const QTime &)
π«Ά Public Slots inherited from QwtAbstractSlider π«Ά
void setValue (double value)
π Public Member Functions π
QwtAnalogClock (QWidget *parent=NULL)virtual ~QwtAnalogClock ()β destructor.void setHand (Hand, QwtDialNeedle *)const QwtDialNeedle * hand (Hand) constQwtDialNeedle * hand (Hand)
π¦ Public Member Functions inherited from QwtDial π¦
QwtDial (QWidget *parent=NULL)β constructor.virtual ~QwtDial ()β destructor.void setFrameShadow (Shadow)Shadow frameShadow () constvoid setLineWidth (int)int lineWidth () constvoid setMode (Mode)β changes the mode of the dial.Mode mode () constvoid setScaleArc (double minArc, double maxArc)void setMinScaleArc (double)double minScaleArc () constvoid setMaxScaleArc (double)double maxScaleArc () constvirtual void setOrigin (double)β changes the origin.double origin () constvoid setNeedle (QwtDialNeedle *)const QwtDialNeedle * needle () constQwtDialNeedle * needle ()QRect boundingRect () constQRect innerRect () constvirtual QRect scaleInnerRect () constvirtual QSize sizeHint () const overridevirtual QSize minimumSizeHint () const overridevoid setScaleDraw (QwtRoundScaleDraw *)QwtRoundScaleDraw * scaleDraw ()const QwtRoundScaleDraw * scaleDraw () const
π¦ Public Member Functions inherited from QwtAbstractSlider π¦
QwtAbstractSlider (QWidget *parent=NULL)β constructor.virtual ~QwtAbstractSlider ()β destructor.void setValid (bool)bool isValid () constdouble value () constβ returns the current value.void setWrapping (bool)bool wrapping () constvoid setTotalSteps (uint)β sets the number of steps.uint totalSteps () constvoid setSingleSteps (uint)β sets the number of steps for a single increment.uint singleSteps () constvoid setPageSteps (uint)β sets the number of steps for a page increment.uint pageSteps () constvoid setStepAlignment (bool)β enables step alignment.bool stepAlignment () constvoid setTracking (bool)β enables or disables tracking.bool isTracking () constvoid setReadOnly (bool)bool isReadOnly () constvoid setInvertedControls (bool)bool invertedControls () const
π¦ Public Member Functions inherited from QwtAbstractScale π¦
QwtAbstractScale (QWidget *parent=NULL)virtual ~QwtAbstractScale ()β destructor.void setScale (double lowerBound, double upperBound)β specifies a scale.void setScale (const QwtInterval &)β specifies a scale.void setScale (const QwtScaleDiv &)β specifies a scale.const QwtScaleDiv & scaleDiv () constvoid setLowerBound (double value)double lowerBound () constvoid setUpperBound (double value)double upperBound () constvoid setScaleStepSize (double stepSize)β sets the step size used for calculating a scale division.double scaleStepSize () constvoid setScaleMaxMajor (int ticks)β sets the maximum number of major tick intervals.int scaleMaxMinor () constvoid setScaleMaxMinor (int ticks)β sets the maximum number of minor tick intervals.int scaleMaxMajor () constvoid setScaleEngine (QwtScaleEngine *)β sets a scale engine.const QwtScaleEngine * scaleEngine () constQwtScaleEngine * scaleEngine ()int transform (double) constdouble invTransform (int) constbool isInverted () constdouble minimum () constdouble maximum () constconst QwtScaleMap & scaleMap () const
π₯ Protected Member Functions π₯
virtual void drawNeedle (QPainter *, const QPointF &, double radius, double direction, QPalette::ColorGroup) const overrideβ draws the needle.virtual void drawHand (QPainter *, Hand, const QPointF &, double radius, double direction, QPalette::ColorGroup) const
π₯ Protected Member Functions inherited from QwtDial π₯
virtual void wheelEvent (QWheelEvent *) overridevirtual void paintEvent (QPaintEvent *) overridevirtual void changeEvent (QEvent *) overridevirtual void drawFrame (QPainter *)virtual void drawContents (QPainter *) constβ draws the contents inside the frame.virtual void drawFocusIndicator (QPainter *) constvoid invalidateCache ()virtual void drawScale (QPainter *, const QPointF ¢er, double radius) constvirtual void drawScaleContents (QPainter *painter, const QPointF ¢er, double radius) constvirtual double scrolledTo (const QPoint &) const overrideβ determines the value for a new position of the slider handle.virtual bool isScrollPosition (const QPoint &) const overrideβ determines what to do when the user presses a mouse button.virtual void sliderChange () overrideβ callingupdate().virtual void scaleChange () override
π₯ Protected Member Functions inherited from QwtAbstractSlider π₯
virtual void mousePressEvent (QMouseEvent *) overridevirtual void mouseReleaseEvent (QMouseEvent *) overridevirtual void mouseMoveEvent (QMouseEvent *) overridevirtual void keyPressEvent (QKeyEvent *) overridevoid incrementValue (int stepCount)double incrementedValue (double value, int stepCount) const
π₯ Protected Member Functions inherited from QwtAbstractScale π₯
void rescale (double lowerBound, double upperBound, double stepSize)void setAbstractScaleDraw (QwtAbstractScaleDraw *)β sets a scale draw.const QwtAbstractScaleDraw * abstractScaleDraw () constQwtAbstractScaleDraw * abstractScaleDraw ()void updateScaleDraw ()
π Additional Inherited Members π
Signals inherited from QwtAbstractSlider
void valueChanged (double value)β notifies a change of value.void sliderPressed ()void sliderReleased ()void sliderMoved (double value)
π Detailed Description π
An analog clock.
β¨ 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);
Note: Theexamples/dialsexample shows how to useQwtAnalogClock.
Definition at line 43 of file qwt_analog_clock.h.
π§ Member Enumeration Documentation π§
enum QwtAnalogClock::Hand
Hand type. See also setHand(), hand().
Enumerator
SecondHandβ needle displaying the seconds.MinuteHandβ needle displaying the minutes.HourHandβ needle displaying the hours.NHandsβ number of needles.
Definition at line 52 of file qwt_analog_clock.h.
π Constructor & Destructor Documentation π
Constructor
QwtAnalogClock::QwtAnalogClock (QWidget * parent = NULL) [explicit]
Constructor. Parameters: parent β parent widget.
Definition at line 51 of file qwt_analog_clock.cpp.
Destructor
QwtAnalogClock::~QwtAnalogClock () [virtual]
Destructor.
Definition at line 110 of file qwt_analog_clock.cpp.
π Member Function Documentation π
drawHand
void QwtAnalogClock::drawHand (QPainter * painter, Hand hd, const QPointF & center, double radius, double direction, QPalette::ColorGroup cg) 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.
Definition at line 239 of file qwt_analog_clock.cpp.
drawNeedle
void QwtAnalogClock::drawNeedle (QPainter * painter, const QPointF & center, double radius, double direction, QPalette::ColorGroup colorGroup) const [override], [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.colorGroupβColorGroup.
See also: drawHand().
Reimplemented from QwtDial.
Definition at line 202 of file qwt_analog_clock.cpp.
hand (non-const)
QwtDialNeedle * QwtAnalogClock::hand (Hand hd)
Returns: clock hand.
Parameters: hd β specifies the type of hand.
See also: setHand().
Definition at line 146 of file qwt_analog_clock.cpp.
hand (const)
const QwtDialNeedle * QwtAnalogClock::hand (Hand hd) const
Returns: clock hand.
Parameters: hd β specifies the type of hand.
See also: setHand().
Definition at line 159 of file qwt_analog_clock.cpp.
setCurrentTime
void QwtAnalogClock::setCurrentTime () [slot]
Set the current time.
Definition at line 167 of file qwt_analog_clock.cpp.
setHand
void QwtAnalogClock::setHand (Hand hand, QwtDialNeedle * needle)
Set a clock hand.
Parameters:
handβ specifies the type of hand.needleβ hand.
See also: hand().
Definition at line 132 of file qwt_analog_clock.cpp.
setTime
void QwtAnalogClock::setTime (const QTime & time) [slot]
Set a time.
Parameters: time β time to display.
Definition at line 176 of file qwt_analog_clock.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
xoxo, Qwt User's Guide π β QwtAnalogClock(3), no date in the footer, just vibes β¨
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms