/home/koen/project/wt/cvs/wt/examples/mission/CountDownWidget.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
00003  *
00004  * See the LICENSE file for terms of use.
00005  */
00006 // This may look like C code, but it's really -*- C++ -*-
00007 #ifndef WCOUNTDOWNWIDGET_H_
00008 #define WCOUNTDOWNWIDGET_H_
00009 
00010 #include <Wt/WText>
00011 
00012 namespace Wt {
00013   class WTimer;
00014 }
00015 
00016 using namespace Wt;
00017 
00022 
00025 class CountDownWidget : public WText
00026 {
00027 public:
00033   CountDownWidget(int start, int stop, unsigned msec,
00034                   WContainerWidget *parent = 0);
00035 
00038   Wt::Signal<void> done;
00039 
00040 public slots:
00043   void cancel();
00044 
00045 private slots:
00048   void timerTick();
00049 
00050 private:
00051   int start_;
00052   int stop_;
00053   unsigned msec_;
00054 
00055   int current_;
00056 
00057   WTimer *timer_;
00058 };
00059 
00062 #endif // WCOUNTDOWNWIDGET_H_

Generated on Fri Jul 25 17:05:59 2008 for Wt by doxygen 1.5.3