QwtAnalogClock(3) | Qwt User's Guide | QwtAnalogClock(3) |
QwtAnalogClock - An analog clock.
#include <qwt_analog_clock.h>
Inherits QwtDial.
enum Hand { SecondHand, MinuteHand,
HourHand, NHands }
void setCurrentTime ()
Set the current time. void setTime (const QTime &)
QwtAnalogClock (QWidget *parent=NULL)
virtual ~QwtAnalogClock ()
Destructor. void setHand (Hand, QwtDialNeedle *)
const QwtDialNeedle * hand (Hand) const
QwtDialNeedle * hand (Hand)
virtual void drawNeedle (QPainter *, const QPointF &,
double radius, double direction, QPalette::ColorGroup) const
Draw the needle. virtual void drawHand (QPainter *, Hand, const
QPointF &, double radius, double direction, QPalette::ColorGroup) const
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:
Hand type
See also:
Enumerator
Constructor
Parameters:
Draw a clock hand
Parameters:
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:
See also:
Reimplemented from QwtDial.
Returns:
Parameters:
See also:
Returns:
Parameters:
See also:
Set a clock hand
Parameters:
See also:
Set a time
Parameters:
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Wed Jan 2 2019 | Version 6.1.4 |