ClocksWidget Class Reference

Widget with two clocks. More...

#include <clockswidget.h>

List of all members.

Public Slots

void pause ()
 Pause game.
void stopPlay ()
 End the game.

Signals

void TurnFinished (TurnInformation *turnInfo)
void ClickedWhenStopped ()

Public Member Functions

 ClocksWidget (ChessClock *white, ChessClock *black, QWidget *parent=0)
 ~ClocksWidget ()
bool isPlayStarted ()

Protected Types

enum  GameStatus {
  Stopped, WhiteTurn, BlackTurn, WhitePause,
  BlackPause, Welcome
}

Protected Member Functions

void mouseReleaseEvent (QMouseEvent *event)
bool eventFilter (QObject *obj, QEvent *event)

Protected Attributes

ChessClockwhite_
ChessClockblack_
QLabel * pauseLabel_
QLabel * welcomeLabel_
QToolButton * pauseButton_
ScreenLitKeeperkeeper_
GameStatus status_
QTime delayTimer_
int recentX
 To avoid double clicks.
int recentY

Static Protected Attributes

static int const CLICKDELAY = 1500

Detailed Description

Widget with two clocks.

Author:
Arto Hyvättinen
Date:
2010-08-14

Central widget of Chess Clock. Needed to create new ClocksWidget to every new game.

Definition at line 47 of file clockswidget.h.


Member Enumeration Documentation

enum ClocksWidget::GameStatus [protected]
Enumerator:
Stopped 

Not running.

WhiteTurn 
BlackTurn 
WhitePause 
BlackPause 
Welcome 

Definition at line 79 of file clockswidget.h.


Constructor & Destructor Documentation

ClocksWidget::ClocksWidget ( ChessClock white,
ChessClock black,
QWidget *  parent = 0 
)

Definition at line 39 of file clockswidget.cpp.

ClocksWidget::~ClocksWidget (  ) 

Definition at line 114 of file clockswidget.cpp.


Member Function Documentation

void ClocksWidget::ClickedWhenStopped (  )  [signal]
bool ClocksWidget::eventFilter ( QObject *  obj,
QEvent *  event 
) [protected]

Definition at line 212 of file clockswidget.cpp.

bool ClocksWidget::isPlayStarted (  )  [inline]

Definition at line 53 of file clockswidget.h.

void ClocksWidget::mouseReleaseEvent ( QMouseEvent *  event  )  [protected]

Definition at line 151 of file clockswidget.cpp.

void ClocksWidget::pause (  )  [slot]

Pause game.

Definition at line 120 of file clockswidget.cpp.

void ClocksWidget::stopPlay (  )  [slot]

End the game.

Definition at line 141 of file clockswidget.cpp.

void ClocksWidget::TurnFinished ( TurnInformation turnInfo  )  [signal]

Member Data Documentation

Definition at line 72 of file clockswidget.h.

int const ClocksWidget::CLICKDELAY = 1500 [static, protected]

Definition at line 94 of file clockswidget.h.

QTime ClocksWidget::delayTimer_ [protected]

Definition at line 89 of file clockswidget.h.

Definition at line 77 of file clockswidget.h.

QToolButton* ClocksWidget::pauseButton_ [protected]

Definition at line 76 of file clockswidget.h.

QLabel* ClocksWidget::pauseLabel_ [protected]

Definition at line 74 of file clockswidget.h.

int ClocksWidget::recentX [protected]

To avoid double clicks.

Definition at line 91 of file clockswidget.h.

int ClocksWidget::recentY [protected]

Definition at line 92 of file clockswidget.h.

Definition at line 88 of file clockswidget.h.

QLabel* ClocksWidget::welcomeLabel_ [protected]

Definition at line 75 of file clockswidget.h.

Definition at line 71 of file clockswidget.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator
Generated on Mon Sep 27 18:30:34 2010 for Chess Clock by  doxygen 1.6.3