forked from KDE/rattlesnake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
note.h
36 lines (27 loc) · 771 Bytes
/
note.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
#ifndef NOTE_H
#define NOTE_H
#include <QObject>
#include <QUrl>
class Note : public QObject
{
Q_OBJECT
Q_PROPERTY(QUrl soundFile READ soundFile NOTIFY soundFileChanged)
Q_PROPERTY(int sound READ sound WRITE setSound NOTIFY soundChanged)
Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
public:
explicit Note(QObject *parent = nullptr);
int sound() const;
void setSound(const int sound);
Q_SIGNAL void soundChanged();
QUrl soundFile() const;
void setSoundFile(const QUrl &soundFile);
Q_SIGNAL void soundFileChanged();
int volume() const;
void setVolume(int volume);
Q_SIGNAL void volumeChanged();
private:
int m_sound;
int m_volume;
QUrl m_soundFile;
};
#endif // NOTE_H