MCPcopy Create free account
hub / github.com/cutechess/cutechess / ChessClock

Method ChessClock

projects/gui/src/chessclock.cpp:26–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25
26ChessClock::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
49void ChessClock::setPlayerName(const QString& name)
50{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected