Esempio n. 1
0
Pomodoro::Pomodoro(QObject *parent) :
    QObject(parent)
{
    time_left = 0;
    timer = new QTimer();
    timer->setInterval(1000);
    connect(timer, SIGNAL(timeout()), this, SLOT(timerTicked()));
}
Esempio n. 2
0
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();
}
Esempio n. 3
0
void Timer::triggerTick() {
    emit timerTicked("DEBUG", mInterval);
}