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, const char *name=0)
 ~KGameLCDClock ()
uint seconds () const
QString pretty () const
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.

Since:
3.2

Definition at line 126 of file kgamelcd.h.


Constructor & Destructor Documentation

KGameLCDClock::KGameLCDClock QWidget *  parent = 0,
const char *  name = 0
 

Definition at line 113 of file kgamelcd.cpp.

References timeoutClock().

KGameLCDClock::~KGameLCDClock  ) 
 

Definition at line 120 of file kgamelcd.cpp.


Member Function Documentation

QString KGameLCDClock::pretty  )  const
 

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

Definition at line 135 of file kgamelcd.cpp.

void KGameLCDClock::reset  )  [virtual, slot]
 

Stop the clock and reset it to zero.

Definition at line 147 of file kgamelcd.cpp.

uint KGameLCDClock::seconds  )  const
 

Returns:
the total number of seconds elapsed.

Definition at line 165 of file kgamelcd.cpp.

void KGameLCDClock::setTime const QString &  s  ) 
 

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

Definition at line 178 of file kgamelcd.cpp.

References setTime().

Here is the call graph for this function:

void KGameLCDClock::setTime uint  seconds  ) 
 

Set the time.

Definition at line 170 of file kgamelcd.cpp.

Referenced by setTime().

void KGameLCDClock::start  )  [virtual, slot]
 

Start the clock from the current time.

Definition at line 155 of file kgamelcd.cpp.

void KGameLCDClock::stop  )  [virtual, slot]
 

Stop the clock but do not reset it to zero.

Definition at line 160 of file kgamelcd.cpp.

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

Definition at line 123 of file kgamelcd.cpp.

Referenced by KGameLCDClock().


The documentation for this class was generated from the following files:
Generated on Wed Aug 23 18:05:26 2006 for libkdegames by  doxygen 1.4.6