Inherited by Clock.
Public Types | |
enum | { SQUARE, ANALOG, ROUND, DIGITAL } |
Public Member Functions | |
ClockOutput (int x, int y, int w, int h, const char *l=0) | |
void | value (unsigned long v) |
void | value (int, int, int) |
unsigned long | value () const |
int | hour () const |
int | minute () const |
int | second () const |
Protected Member Functions | |
void | draw (int, int, int, int) |
void | draw () |
type() may be set to SQUARE, ROUND, or DIGITAL (nyi).
|
Return the hour sent to the last call to value(). |
|
Return the minute sent to the last call to value(). |
|
Return the second sent to the last call to value(). |
|
Return the last Unix timestamp the clock was set to. |
|
Set the hour, minute, and second to display. The hour is effectively taken modulus 12 and the minute and second modulus 60 to figure out where to place the hands. Redraw happens only if different. This does not set the unsigned long value() member, as it can't because it does not know the date. |
|
Set the clock to a Unix timestamp. The value is passed through the localtime() library function and used to get the hour, minute, and second. |