forked from CountMurphy/QTalarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalarm.h
45 lines (37 loc) · 789 Bytes
/
alarm.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
44
45
#ifndef ALARM_H
#define ALARM_H
#include <QObject>
#include <QString>
#include <QMediaPlayer>
#include <QTimer>
class Alarm : public QObject
{
Q_OBJECT
public:
virtual ~Alarm(){};
static Alarm & GetInstance()
{
static Alarm instance;
return instance;
}
void Start(bool useCustom);
void Stop();
bool isPlaying();
bool canResume;
void SetCustomPath(QString);
bool UsingCustomPath;
bool isBastard;
private:
explicit Alarm(QObject *parent = 0);
QMediaPlayer * media;
QString _DefaultPath;
QString _CustPath;
QTimer *_Pause;
bool _isPlaying;
signals:
public slots:
void RepeatAllTheThings(QMediaPlayer::MediaStatus);
void Resume();
void SetVolume(int);
};
#endif // ALARM_H