1 /**************************************************************************
5 Copyright (c) Arto Hyvättinen 2010
7 This file is part of Chess Clock software.
9 Chess Clock is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 Chess Clock is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
20 **************************************************************************/
22 #ifndef CHESSCLOCKWIDGET_H
23 #define CHESSCLOCKWIDGET_H
25 #include "chessclock.h"
32 /*! Simple chess clock widget
34 @author Arto Hyvättinen
39 class ChessClockWidget : public ChessClock
43 ChessClockWidget(bool white, QWidget *parent = 0);
48 virtual void repaintClock();
51 /*! Init pictures from resources */
52 virtual void initPictures();
54 virtual void initLabels();
55 /*! Init top: picture, details, loser mark */
56 virtual void initTop();
57 /*! Init time left in bottom.
58 Override to make different bottom area */
59 virtual void initBottom();
61 /*! Convert msecs to h:mm:ss QString */
62 QString timeString(int msecs);
70 QLabel* pictureLabel_;
71 QLabel* timeUsedLabel_;
72 QLabel* timeAverageLabel_;
77 QVBoxLayout* mainLayout;
82 #endif // CHESSCLOCKWIDGET_H