• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

libkdegames

Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | List of all members
KGameClock Class Reference

#include <KGameClock>

Inheritance diagram for KGameClock:
Inheritance graph
[legend]

Public Types

enum  ClockType { HourMinSec = 0, MinSecOnly }
 

Public Slots

virtual void pause ()
 
virtual void restart ()
 
virtual void resume ()
 

Signals

void timeChanged (const QString &)
 

Public Member Functions

 KGameClock (QObject *parent=0, ClockType clocktype=HourMinSec)
 
virtual ~KGameClock ()
 
uint seconds () const
 
void setTime (uint seconds)
 
void setTime (const QString &s)
 
void showTime ()
 
QString timeString () const
 

Protected Slots

virtual void timeoutClock ()
 

Detailed Description

Class representing a game clock, wraps after 24 hours.

Definition at line 35 of file kgameclock.h.

Member Enumeration Documentation

enum KGameClock::ClockType
Enumerator
HourMinSec 
MinSecOnly 

Definition at line 39 of file kgameclock.h.

Constructor & Destructor Documentation

KGameClock::KGameClock ( QObject *  parent = 0,
KGameClock::ClockType  clocktype = HourMinSec 
)
explicit
Returns
Constructor

Definition at line 40 of file kgameclock.cpp.

KGameClock::~KGameClock ( )
virtual

Definition at line 48 of file kgameclock.cpp.

Member Function Documentation

void KGameClock::pause ( )
virtualslot

Pause the clock.

Definition at line 98 of file kgameclock.cpp.

void KGameClock::restart ( )
virtualslot

Reset the clock and start again from zero.

Definition at line 83 of file kgameclock.cpp.

void KGameClock::resume ( )
virtualslot

Resume counting time from the current position.

Definition at line 93 of file kgameclock.cpp.

uint KGameClock::seconds ( ) const
Returns
the total number of seconds elapsed.

Definition at line 103 of file kgameclock.cpp.

void KGameClock::setTime ( uint  seconds)

Set the time.

Definition at line 108 of file kgameclock.cpp.

void KGameClock::setTime ( const QString &  s)

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

Definition at line 117 of file kgameclock.cpp.

void KGameClock::showTime ( )

Refresh.

Definition at line 78 of file kgameclock.cpp.

void KGameClock::timeChanged ( const QString &  )
signal
void KGameClock::timeoutClock ( )
protectedvirtualslot

Definition at line 53 of file kgameclock.cpp.

QString KGameClock::timeString ( ) const
Returns
the time as a string to be displayed: "mm:ss" or "hh:mm:ss" depending on clock type.

Definition at line 68 of file kgameclock.cpp.


The documentation for this class was generated from the following files:
  • kgameclock.h
  • kgameclock.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdegames

Skip menu "libkdegames"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal