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)

Protected Attributes

ChessClockwhite_
ChessClockblack_
QLabel * pauseLabel_
QLabel * welcomeLabel_
GameStatus status_
QTime delayTimer_

Static Protected Attributes

static int const CLICKDELAY = 500
 To avoid double clicks.

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 45 of file clockswidget.h.


Member Enumeration Documentation

enum ClocksWidget::GameStatus [protected]
Enumerator:
Stopped 

Not running.

WhiteTurn 
BlackTurn 
WhitePause 
BlackPause 
Welcome 

Definition at line 74 of file clockswidget.h.


Constructor & Destructor Documentation

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

Definition at line 33 of file clockswidget.cpp.

ClocksWidget::~ClocksWidget (  ) 

Definition at line 79 of file clockswidget.cpp.


Member Function Documentation

void ClocksWidget::ClickedWhenStopped (  )  [signal]
bool ClocksWidget::isPlayStarted (  )  [inline]

Definition at line 51 of file clockswidget.h.

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

Definition at line 111 of file clockswidget.cpp.

void ClocksWidget::pause (  )  [slot]

Pause game.

Definition at line 85 of file clockswidget.cpp.

void ClocksWidget::stopPlay (  )  [slot]

End the game.

Definition at line 101 of file clockswidget.cpp.

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

Member Data Documentation

Definition at line 69 of file clockswidget.h.

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

To avoid double clicks.

Definition at line 86 of file clockswidget.h.

QTime ClocksWidget::delayTimer_ [protected]

Definition at line 84 of file clockswidget.h.

QLabel* ClocksWidget::pauseLabel_ [protected]

Definition at line 71 of file clockswidget.h.

Definition at line 83 of file clockswidget.h.

QLabel* ClocksWidget::welcomeLabel_ [protected]

Definition at line 72 of file clockswidget.h.

Definition at line 68 of file clockswidget.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator
Generated on Thu Aug 19 21:04:20 2010 for Chess Clock by  doxygen 1.6.3