Pomodoro::Pomodoro(QObject *parent) : QObject(parent) { time_left = 0; timer = new QTimer(); timer->setInterval(1000); connect(timer, SIGNAL(timeout()), this, SLOT(timerTicked())); }
BreakoutCanvas::BreakoutCanvas(QWidget* parent) : QWidget(parent) // This passes the constructor parameter to the superclass { timer = new QTimer(this); timer->setInterval(5); // an interval of 5ms connect(timer, SIGNAL(timeout()), this, SLOT(timerTicked())); setFixedSize(WIDTH, HEIGHT); reset(); }
void Timer::triggerTick() { emit timerTicked("DEBUG", mInterval); }