KGameLCDClock Class Reference

This class is a digital clock widget. More...

#include <kgamelcd.h>

Inheritance diagram for KGameLCDClock:

Inheritance graph
[legend]
Collaboration diagram for KGameLCDClock:

Collaboration graph
[legend]

List of all members.

Public Slots

virtual void reset ()
 Stop the clock and reset it to zero.
virtual void stop ()
 Stop the clock but do not reset it to zero.
virtual void start ()
 Start the clock from the current time.

Public Member Functions

 KGameLCDClock (QWidget *parent=0)
 ~KGameLCDClock ()
uint seconds () const
 
Returns:
the total number of seconds elapsed.

QString pretty () const
 
Returns:
the time as a string to be displayed: "mm:ss".

void setTime (uint seconds)
 Set the time.
void setTime (const QString &s)
 Set the time (format should be "mm:ss").

Protected Slots

virtual void timeoutClock ()


Detailed Description

This class is a digital clock widget.

It has a maximum duration of 3599 seconds (one hour) and it gets updated every second.

Definition at line 122 of file kgamelcd.h.


Constructor & Destructor Documentation

KGameLCDClock::KGameLCDClock ( QWidget *  parent = 0  ) 

Definition at line 114 of file kgamelcd.cpp.

References timeoutClock().

KGameLCDClock::~KGameLCDClock (  ) 

Definition at line 121 of file kgamelcd.cpp.


Member Function Documentation

uint KGameLCDClock::seconds (  )  const

Returns:
the total number of seconds elapsed.

Definition at line 166 of file kgamelcd.cpp.

QString KGameLCDClock::pretty (  )  const

Returns:
the time as a string to be displayed: "mm:ss".

Definition at line 136 of file kgamelcd.cpp.

void KGameLCDClock::setTime ( uint  seconds  ) 

Set the time.

Definition at line 171 of file kgamelcd.cpp.

Referenced by setTime().

void KGameLCDClock::setTime ( const QString &  s  ) 

Set the time (format should be "mm:ss").

Definition at line 179 of file kgamelcd.cpp.

References setTime().

Here is the call graph for this function:

void KGameLCDClock::reset (  )  [virtual, slot]

Stop the clock and reset it to zero.

Definition at line 148 of file kgamelcd.cpp.

void KGameLCDClock::stop (  )  [virtual, slot]

Stop the clock but do not reset it to zero.

Definition at line 161 of file kgamelcd.cpp.

void KGameLCDClock::start (  )  [virtual, slot]

Start the clock from the current time.

Definition at line 156 of file kgamelcd.cpp.

void KGameLCDClock::timeoutClock (  )  [protected, virtual, slot]

Definition at line 124 of file kgamelcd.cpp.

Referenced by KGameLCDClock().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 08:03:19 2008 for Libkdegames by  doxygen 1.5.3