forked from KDE/rattlesnake
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnote.cpp
More file actions
46 lines (36 loc) · 665 Bytes
/
note.cpp
File metadata and controls
46 lines (36 loc) · 665 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
39
40
41
42
43
44
45
46
#include "note.h"
#include <QDebug>
Note::Note(QObject *parent)
: QObject(parent)
, m_sound(0)
, m_volume(50)
{
}
int Note::sound() const
{
return m_sound;
}
void Note::setSound(const int sound)
{
m_sound = sound;
Q_EMIT soundChanged();
setSoundFile(QUrl(QStringLiteral("qrc:/media/sounds/click%1.wav").arg(sound + 1)));
qDebug() << soundFile();
}
QUrl Note::soundFile() const
{
return m_soundFile;
}
void Note::setSoundFile(const QUrl &soundFile)
{
m_soundFile = soundFile;
}
int Note::volume() const
{
return m_volume;
}
void Note::setVolume(int volume)
{
m_volume = volume;
Q_EMIT volumeChanged();
}