libkdegames Library API Documentation

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 ()
virtual void stop ()
virtual void start ()

Public Member Functions

 KGameLCDClock (QWidget *parent=0, const char *name=0)
 ~KGameLCDClock ()
uint seconds () const
QString pretty () const
void setTime (uint seconds)
void setTime (const QString &s)

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.


Member Function Documentation

uint KGameLCDClock::seconds  )  const
 

Returns:
the total number of seconds elapsed.

Definition at line 165 of file kgamelcd.cpp.

QString KGameLCDClock::pretty  )  const
 

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

Definition at line 135 of file kgamelcd.cpp.

References QString::number().

void KGameLCDClock::setTime uint  seconds  ) 
 

Set the time.

Definition at line 170 of file kgamelcd.cpp.

Referenced by setTime().

void KGameLCDClock::setTime const QString s  ) 
 

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

Definition at line 178 of file kgamelcd.cpp.

References QString::length(), QString::section(), and setTime().

void KGameLCDClock::reset  )  [virtual, slot]
 

Stop the clock and reset it to zero.

Definition at line 147 of file kgamelcd.cpp.

References QTimer::stop().

void KGameLCDClock::stop  )  [virtual, slot]
 

Stop the clock but do not reset it to zero.

Definition at line 160 of file kgamelcd.cpp.

References QTimer::stop().

void KGameLCDClock::start  )  [virtual, slot]
 

Start the clock from the current time.

Definition at line 155 of file kgamelcd.cpp.

References QTimer::start().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkdegames Library Version 3.4.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 9 09:38:21 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003