1 /* ColorCode, a free MasterMind clone with built in solver
2  * Copyright (C) 2009  Dirk Laebisch
3  * http://www.laebisch.com/
4  *
5  * ColorCode is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * ColorCode is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with ColorCode. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef GAMETIMER_H
20 #define GAMETIMER_H
21 
22 #include <QtGui>
23 #include <iostream>
24 #include "colorcode.h"
25 #include "timedisplay.h"
26 
27 using namespace std;
28 
29 class GameTimer : public QThread
30 {
31     Q_OBJECT
32 
33     public:
34         GameTimer(QObject* parent = 0);
35         ~GameTimer();
36 
37         void run();
38 
39     public slots:
40         void Start();
41         void TimeOut();
42 
43     signals:
44         void TimeOutSignal(int tick);
45 
46     private:
47         int mInterval;
48 };
49 
50 #endif // GAMETIMER_H
51