Parent Directory | Revision Log
add a clock overlay
1 | #include "clockoverlay.h" |
2 | #include <QTime> |
3 | |
4 | ClockOverlay::ClockOverlay(QWidget* parent) |
5 | : QLCDNumber(parent) |
6 | { |
7 | } |
8 | |
9 | |
10 | void ClockOverlay::timerTick() |
11 | { |
12 | QTime now = QTime::currentTime(); |
13 | QString format = ( (now.second()%2)==0) ? "HH:mm" : "HH mm"; |
14 | |
15 | this->display( QTime::currentTime().toString(format) ); |
16 | |
17 | this->raise(); |
18 | } |
ViewVC Help | |
Powered by ViewVC 1.1.20 |