An analog clock.
More...
#include <qwt_analog_clock.h>
Public Types |
enum | Hand { SecondHand,
MinuteHand,
HourHand,
NHands
} |
Public Slots |
void | setCurrentTime () |
| Set the current time.
|
void | setTime (const QTime &) |
Public Member Functions |
| QwtAnalogClock (QWidget *parent=NULL) |
virtual | ~QwtAnalogClock () |
| Destructor.
|
void | setHand (Hand, QwtDialNeedle *) |
const QwtDialNeedle * | hand (Hand) const |
QwtDialNeedle * | hand (Hand) |
Protected Member Functions |
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 |
Detailed Description
An analog clock.
- Example
- Note:
- The examples/dials example shows how to use QwtAnalogClock.
Member Enumeration Documentation
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.
|
Constructor & Destructor Documentation
Member Function Documentation
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 |
void QwtAnalogClock::drawNeedle |
( |
QPainter * |
painter, |
|
|
const QPointF & |
center, |
|
|
double |
radius, |
|
|
double |
dir, |
|
|
QPalette::ColorGroup |
colorGroup |
|
) |
| 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 | Painter |
center | Center of the clock |
radius | Maximum length for the hands |
dir | Dummy, not used. |
colorGroup | ColorGroup |
- See also:
- drawHand()
Reimplemented from QwtDial.
- Returns:
- Clock hand
- Parameters:
-
hd | Specifies the type of hand |
- See also:
- setHand()
- Returns:
- Clock hand
- Parameters:
-
hd | Specifies the type of hand |
- See also:
- setHand()
Set a clock hand
- Parameters:
-
hand | Specifies the type of hand |
needle | Hand |
- See also:
- hand()
List of all members.