forked from seppd/qmmp-modern
-
Notifications
You must be signed in to change notification settings - Fork 0
/
timer.h
43 lines (32 loc) · 800 Bytes
/
timer.h
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
39
40
41
42
43
/*
* 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.
*/
#ifndef TIMER_H
#define TIMER_H
#include <QObject>
#include <QTimer>
#include "object.h"
class QTimer;
class Timer : public QObject
{
Q_OBJECT
M_OBJECT
public:
Q_INVOKABLE explicit Timer(QObject *parent = 0);
~Timer() {}
Q_INVOKABLE void start();
Q_INVOKABLE void stop();
Q_INVOKABLE int delay() const;
Q_INVOKABLE void setDelay(int value);
signals:
void timeout();
public slots:
private:
QTimer *m_timer;
};
#endif // TIMER_H