• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkdegames

kgameclock.h

Go to the documentation of this file.
00001 /*
00002     This file is part of the KDE games library
00003     Copyright (C) 2007 Mauricio Piacentini (mauricio@tabuleiro.com)
00004     Portions reused from KGameLCDClock
00005     Copyright (C) 2001,2002,2003 Nicolas Hadacek (hadacek@kde.org)
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Library General Public
00009     License version 2 as published by the Free Software Foundation.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef __KGAMECLOCK_H
00023 #define __KGAMECLOCK_H
00024 
00025 #include <QtCore/QObject>
00026 #include <libkdegames_export.h>
00027 
00028 class KGameClockPrivate;
00029 
00035 class KDEGAMES_EXPORT KGameClock : public QObject
00036 {
00037     Q_OBJECT
00038 public:
00039     enum ClockType { HourMinSec = 0, MinSecOnly };
00040 
00044     explicit KGameClock(QObject *parent = 0, ClockType clocktype = HourMinSec);
00045 
00046     virtual ~KGameClock();
00047 
00051     uint seconds() const;
00052 
00056     QString timeString() const;
00057 
00061     void setTime(uint seconds);
00062 
00066     void setTime(const QString &s);
00067     
00071     void showTime();
00072 
00073 Q_SIGNALS:
00074     void timeChanged(const QString &);
00075 
00076 public Q_SLOTS:
00080     virtual void restart();
00081 
00085     virtual void pause();
00086 
00090     virtual void resume();
00091 
00092 protected Q_SLOTS:
00093     virtual void timeoutClock();
00094 
00095 private:
00096     friend class KGameClockPrivate;
00097     KGameClockPrivate *const d;
00098 
00099     Q_DISABLE_COPY(KGameClock)
00100 };
00101 
00102 #endif

libkdegames

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

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal