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.
void saveScreen ()
 Not to keep screen lit.

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 81 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 117 of file clockswidget.cpp.


Member Function Documentation

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

Definition at line 220 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 159 of file clockswidget.cpp.

void ClocksWidget::pause (  )  [slot]

Pause game.

Definition at line 123 of file clockswidget.cpp.

void ClocksWidget::saveScreen (  )  [slot]

Not to keep screen lit.

Definition at line 153 of file clockswidget.cpp.

void ClocksWidget::stopPlay (  )  [slot]

End the game.

Definition at line 144 of file clockswidget.cpp.

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

Member Data Documentation

Definition at line 74 of file clockswidget.h.

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

Definition at line 96 of file clockswidget.h.

QTime ClocksWidget::delayTimer_ [protected]

Definition at line 91 of file clockswidget.h.

Definition at line 79 of file clockswidget.h.

QToolButton* ClocksWidget::pauseButton_ [protected]

Definition at line 78 of file clockswidget.h.

QLabel* ClocksWidget::pauseLabel_ [protected]

Definition at line 76 of file clockswidget.h.

int ClocksWidget::recentX [protected]

To avoid double clicks.

Definition at line 93 of file clockswidget.h.

int ClocksWidget::recentY [protected]

Definition at line 94 of file clockswidget.h.

Definition at line 90 of file clockswidget.h.

QLabel* ClocksWidget::welcomeLabel_ [protected]

Definition at line 77 of file clockswidget.h.

Definition at line 73 of file clockswidget.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator
Generated on Tue Oct 12 20:52:59 2010 for Chess Clock by  doxygen 1.6.3