class QVBoxLayout;
class QLabel;
class TurnInformation;
+class QToolButton;
+class ScreenLitKeeper;
class ChessClock;
Q_OBJECT
public:
ClocksWidget(ChessClock* white, ChessClock* black, QWidget *parent = 0);
-
+ ~ClocksWidget();
+ bool isPlayStarted() { return (status_!=Welcome); }
protected:
void mouseReleaseEvent(QMouseEvent *event);
signals:
void TurnFinished(TurnInformation* turnInfo);
+ void ClickedWhenStopped();
public slots:
+ /*! Pause game */
void pause();
+ /*! End the game */
+ void stopPlay();
protected:
ChessClock* white_;
QLabel* pauseLabel_;
QLabel* welcomeLabel_;
+ QToolButton* pauseButton_;
+ ScreenLitKeeper* keeper_;
enum GameStatus {
Stopped /*! Not running */,
GameStatus status_;
QTime delayTimer_; /*! To avoid double clicks */
- static int const CLICKDELAY = 500 ; /*! Click delay in msecs */
+ int recentX;
+ int recentY;
+
+ static int const CLICKDELAY = 1500 ; /*! Click delay in msecs */