00001 /****************************************************************************** 00002 * 00003 * This file is part of Gibberish. 00004 * 00005 * Gibberish is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * Gibberish is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with Foobar; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 * 00019 *****************************************************************************/ 00020 00021 #ifndef _H_TIMER_WIDGET 00022 #define _H_TIMER_WIDGET 00023 00024 #include <QTime> 00025 #include <QTimer> 00026 00027 #include "ui_TimerWidget.h" 00028 00034 class TimerWidget : public QWidget, private Ui::TimerWidget 00035 { 00036 00037 Q_OBJECT 00038 00039 public: 00040 TimerWidget( QWidget * parent = 0 ); 00041 00042 void setTime( QTime time ); 00043 00044 public slots: 00045 void startTimer(); 00046 void pauseTimer(); 00047 void resetTimer(); 00048 void updateTimer(); 00049 00050 signals: 00051 void timeUp(); 00052 00053 private: 00054 QTime timeLimit; 00055 QTime timeRem; 00056 QTimer * lTimer; 00057 00058 }; 00059 00060 #endif