00001 #ifndef KDE__TIMER_H
00002 #define KDE__TIMER_H
00003
00004 #include <faith/object.h>
00005
00006 namespace Faith
00007 {
00008
00021 class FAITH_CORE_EXPORT Timer : public Object
00022 {
00023 K_OBJECT
00024 bool mActive;
00025 bool mSingleShot;
00026 bool mDeleteMe;
00027
00028 public:
00029 Timer(Object *parent=0, const char *name=0);
00034 bool isActive() const;
00035
00044 void start(int msec, bool singleshot=false);
00045
00049 void changeInterval(int msec);
00050
00056 void stop();
00057
00072 static void singleShot(int msec, Object *receiver, const char *member);
00073
00074 protected:
00075 void timerEvent(TimerEvent *);
00076
00077 signals:
00084 void timeout();
00085 };
00086
00087
00088 }
00089
00090 #endif
00091