| 24 | |
| 25 | |
| 26 | ChessClock::ChessClock(QWidget* parent) |
| 27 | : QWidget(parent), |
| 28 | m_totalTime(0), |
| 29 | m_timerId(-1), |
| 30 | m_infiniteTime(false), |
| 31 | m_nameLabel(new QLabel()), |
| 32 | m_timeLabel(new QLabel()) |
| 33 | { |
| 34 | m_defaultPalette = m_timeLabel->palette(); |
| 35 | m_timeLabel->setAutoFillBackground(true); |
| 36 | |
| 37 | m_nameLabel->setTextFormat(Qt::RichText); |
| 38 | m_nameLabel->setAlignment(Qt::AlignHCenter); |
| 39 | |
| 40 | m_timeLabel->setTextFormat(Qt::RichText); |
| 41 | m_timeLabel->setAlignment(Qt::AlignHCenter); |
| 42 | |
| 43 | QVBoxLayout* layout = new QVBoxLayout(); |
| 44 | layout->addWidget(m_nameLabel); |
| 45 | layout->addWidget(m_timeLabel); |
| 46 | setLayout(layout); |
| 47 | } |
| 48 | |
| 49 | void ChessClock::setPlayerName(const QString& name) |
| 50 | { |
nothing calls this directly
no outgoing calls
no test coverage detected