Widget with two clocks. More...
#include <clockswidget.h>
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 | |
ChessClock * | white_ |
ChessClock * | black_ |
QLabel * | pauseLabel_ |
QLabel * | welcomeLabel_ |
QToolButton * | pauseButton_ |
ScreenLitKeeper * | keeper_ |
GameStatus | status_ |
QTime | delayTimer_ |
int | recentX |
To avoid double clicks. | |
int | recentY |
Static Protected Attributes | |
static int const | CLICKDELAY = 1500 |
Widget with two clocks.
Central widget of Chess Clock. Needed to create new ClocksWidget to every new game.
Definition at line 47 of file clockswidget.h.
enum ClocksWidget::GameStatus [protected] |
Definition at line 79 of file clockswidget.h.
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.
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] |
ChessClock* ClocksWidget::black_ [protected] |
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.
ScreenLitKeeper* ClocksWidget::keeper_ [protected] |
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.
GameStatus ClocksWidget::status_ [protected] |
Definition at line 88 of file clockswidget.h.
QLabel* ClocksWidget::welcomeLabel_ [protected] |
Definition at line 75 of file clockswidget.h.
ChessClock* ClocksWidget::white_ [protected] |
Definition at line 71 of file clockswidget.h.