#include <kgameclock.h>

Public Types | |
| enum | ClockType { HourMinSec = 0, MinSecOnly } |
Public Slots | |
| virtual void | restart () |
| Reset the clock and start again from zero. | |
| virtual void | pause () |
| Pause the clock. | |
| virtual void | resume () |
| Resume counting time from the current position. | |
Signals | |
| void | timeChanged (const QString &) |
Public Member Functions | |
| KGameClock (QObject *parent=0, ClockType clocktype=HourMinSec) | |
| |
| virtual | ~KGameClock () |
| uint | seconds () const |
| |
| QString | timeString () const |
| |
| void | setTime (uint seconds) |
| Set the time. | |
| void | setTime (const QString &s) |
| Set the time (format should be "hh:mm:ss"). | |
| void | showTime () |
| Refresh. | |
Protected Slots | |
| virtual void | timeoutClock () |
Friends | |
| class | KGameClockPrivate |
Definition at line 33 of file kgameclock.h.
| KGameClock::KGameClock | ( | QObject * | parent = 0, |
|
| KGameClock::ClockType | clocktype = HourMinSec | |||
| ) | [explicit] |
Definition at line 40 of file kgameclock.cpp.
References KGameClockPrivate::clocktype, timeoutClock(), and KGameClockPrivate::timerClock.
| KGameClock::~KGameClock | ( | ) | [virtual] |
Definition at line 48 of file kgameclock.cpp.
| uint KGameClock::seconds | ( | ) | const |
Definition at line 103 of file kgameclock.cpp.
References KGameClockPrivate::hour, KGameClockPrivate::min, and KGameClockPrivate::sec.
| QString KGameClock::timeString | ( | ) | const |
Definition at line 68 of file kgameclock.cpp.
References KGameClockPrivate::clocktype, KGameClockPrivate::hour, KGameClockPrivate::min, MinSecOnly, and KGameClockPrivate::sec.
Referenced by showTime().
| void KGameClock::setTime | ( | uint | seconds | ) |
Set the time.
Definition at line 108 of file kgameclock.cpp.
References KGameClockPrivate::hour, KGameClockPrivate::min, KGameClockPrivate::sec, and showTime().
Referenced by setTime().

| void KGameClock::setTime | ( | const QString & | s | ) |
Set the time (format should be "hh:mm:ss").
Definition at line 117 of file kgameclock.cpp.
References setTime().

| void KGameClock::showTime | ( | ) |
Refresh.
Definition at line 78 of file kgameclock.cpp.
References timeChanged(), and timeString().
Referenced by restart(), setTime(), and timeoutClock().

| void KGameClock::timeChanged | ( | const QString & | ) | [signal] |
Referenced by showTime().
| void KGameClock::restart | ( | ) | [virtual, slot] |
Reset the clock and start again from zero.
Definition at line 83 of file kgameclock.cpp.
References KGameClockPrivate::hour, KGameClockPrivate::min, resume(), KGameClockPrivate::sec, showTime(), and KGameClockPrivate::timerClock.
| void KGameClock::pause | ( | ) | [virtual, slot] |
Pause the clock.
Definition at line 98 of file kgameclock.cpp.
References KGameClockPrivate::timerClock.
| void KGameClock::resume | ( | ) | [virtual, slot] |
Resume counting time from the current position.
Definition at line 93 of file kgameclock.cpp.
References KGameClockPrivate::timerClock.
Referenced by restart().
| void KGameClock::timeoutClock | ( | ) | [protected, virtual, slot] |
Definition at line 53 of file kgameclock.cpp.
References KGameClockPrivate::hour, KGameClockPrivate::min, KGameClockPrivate::sec, and showTime().
Referenced by KGameClock().
friend class KGameClockPrivate [friend] |
Definition at line 94 of file kgameclock.h.
1.5.3