Inheritance diagram for QwtAnalogClock:
#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);
Public Types | |
enum | Hand { SecondHand, MinuteHand, HourHand, NHands } |
Public Member Functions | |
QwtAnalogClock (QWidget *parent=0, const char *name=0) | |
virtual | ~QwtAnalogClock () |
virtual void | setHand (Hand, QwtDialNeedle *) |
const QwtDialNeedle * | hand (Hand) const |
QwtDialNeedle * | hand (Hand) |
void | setCurrentTime () |
void | setTime (const QTime &=QTime::currentTime()) |
Protected Member Functions | |
virtual QString | scaleLabel (double) const |
virtual void | drawNeedle (QPainter *, const QPoint &, int radius, double direction, QPalette::ColorGroup) const |
virtual void | drawHand (QPainter *, Hand, const QPoint &, int radius, double direction, QPalette::ColorGroup) const |
|
Constructor
|
|
Destructor.
|
|
Draw a clock hand
|
|
Draw the needle. A clock has no single needle but three hands instead. drawNeedle translates value() into directions for the hands and calls drawHand().
Reimplemented from QwtDial. |
|
|
|
|
|
Find the scale label for a given value
Reimplemented from QwtDial. |
|
Set the current time. This is the same as QwtAnalogClock::setTime(), but Qt < 3.0 canīt handle default parameters for slots. |
|
Set a clockhand
|
|
Set a time
|