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) const
  • QwtDialNeedle * hand (Hand)

πŸ¦‹ Public Member Functions inherited from QwtDial πŸ¦‹

  • QwtDial (QWidget *parent=NULL) β€” constructor.
  • virtual ~QwtDial () β€” destructor.
  • void setFrameShadow (Shadow)
  • Shadow frameShadow () const
  • void setLineWidth (int)
  • int lineWidth () const
  • void setMode (Mode) β€” changes the mode of the dial.
  • Mode mode () const
  • void setScaleArc (double minArc, double maxArc)
  • void setMinScaleArc (double)
  • double minScaleArc () const
  • void setMaxScaleArc (double)
  • double maxScaleArc () const
  • virtual void setOrigin (double) β€” changes the origin.
  • double origin () const
  • void setNeedle (QwtDialNeedle *)
  • const QwtDialNeedle * needle () const
  • QwtDialNeedle * needle ()
  • QRect boundingRect () const
  • QRect innerRect () const
  • virtual QRect scaleInnerRect () const
  • virtual QSize sizeHint () const override
  • virtual QSize minimumSizeHint () const override
  • void 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 () const
  • double value () const β€” returns the current value.
  • void setWrapping (bool)
  • bool wrapping () const
  • void setTotalSteps (uint) β€” sets the number of steps.
  • uint totalSteps () const
  • void setSingleSteps (uint) β€” sets the number of steps for a single increment.
  • uint singleSteps () const
  • void setPageSteps (uint) β€” sets the number of steps for a page increment.
  • uint pageSteps () const
  • void setStepAlignment (bool) β€” enables step alignment.
  • bool stepAlignment () const
  • void setTracking (bool) β€” enables or disables tracking.
  • bool isTracking () const
  • void setReadOnly (bool)
  • bool isReadOnly () const
  • void 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 () const
  • void setLowerBound (double value)
  • double lowerBound () const
  • void setUpperBound (double value)
  • double upperBound () const
  • void setScaleStepSize (double stepSize) β€” sets the step size used for calculating a scale division.
  • double scaleStepSize () const
  • void setScaleMaxMajor (int ticks) β€” sets the maximum number of major tick intervals.
  • int scaleMaxMinor () const
  • void setScaleMaxMinor (int ticks) β€” sets the maximum number of minor tick intervals.
  • int scaleMaxMajor () const
  • void setScaleEngine (QwtScaleEngine *) β€” sets a scale engine.
  • const QwtScaleEngine * scaleEngine () const
  • QwtScaleEngine * scaleEngine ()
  • int transform (double) const
  • double invTransform (int) const
  • bool isInverted () const
  • double minimum () const
  • double maximum () const
  • const 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 *) override
  • virtual void paintEvent (QPaintEvent *) override
  • virtual void changeEvent (QEvent *) override
  • virtual void drawFrame (QPainter *)
  • virtual void drawContents (QPainter *) const β€” draws the contents inside the frame.
  • virtual void drawFocusIndicator (QPainter *) const
  • void invalidateCache ()
  • virtual void drawScale (QPainter *, const QPointF &center, double radius) const
  • virtual void drawScaleContents (QPainter *painter, const QPointF &center, double radius) const
  • virtual 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 β€” calling update().
  • virtual void scaleChange () override

πŸ”₯ Protected Member Functions inherited from QwtAbstractSlider πŸ”₯

  • virtual void mousePressEvent (QMouseEvent *) override
  • virtual void mouseReleaseEvent (QMouseEvent *) override
  • virtual void mouseMoveEvent (QMouseEvent *) override
  • virtual void keyPressEvent (QKeyEvent *) override
  • void 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 () const
  • QwtAbstractScaleDraw * 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: The examples/dials example shows how to use QwtAnalogClock.

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