Go to the documentation of this file.00001
00002
00003
00004
00005
00006
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() { return done_; }
00039
00042 void cancel();
00043
00044 private:
00045 Wt::Signal<void> done_;
00046 int start_;
00047 int stop_;
00048 unsigned msec_;
00049
00050 int current_;
00051
00052 WTimer *timer_;
00053
00056 void timerTick();
00057 };
00058
00061 #endif // WCOUNTDOWNWIDGET_H_