-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtimer.cpp
More file actions
38 lines (31 loc) · 736 Bytes
/
timer.cpp
File metadata and controls
38 lines (31 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* Copyright (C) 2016 Dmitry Morozov <dmorozov@outlook.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <QTimer>
#include "timer.h"
Timer::Timer(QObject *parent) : QObject(parent)
{
m_timer = new QTimer(this);
connect(m_timer, SIGNAL(timeout()), this, SIGNAL(timeout()));
}
void Timer::start()
{
m_timer->start();
}
void Timer::stop()
{
m_timer->stop();
}
int Timer::delay() const
{
return m_timer->interval();
}
void Timer::setDelay(int value)
{
m_timer->setInterval(value);
}