File indexing completed on 2024-04-28 16:08:28

0001 // SPDX-FileCopyrightText: 2023 Mathis BrĂ¼chert <mbb@kaidan.im>
0002 //
0003 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 
0005 #ifndef NOTE_H
0006 #define NOTE_H
0007 
0008 #include <QObject>
0009 #include <QUrl>
0010 
0011 class Note : public QObject
0012 {
0013     Q_OBJECT
0014 
0015     Q_PROPERTY(QUrl soundFile READ soundFile NOTIFY soundFileChanged)
0016     Q_PROPERTY(int sound READ sound WRITE setSound NOTIFY soundChanged)
0017     Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
0018 
0019 public:
0020     explicit Note(QObject *parent = nullptr);
0021 
0022     int sound() const;
0023     void setSound(const int sound);
0024     Q_SIGNAL void soundChanged();
0025 
0026     QUrl soundFile() const;
0027     void setSoundFile(const QUrl &soundFile);
0028     Q_SIGNAL void soundFileChanged();
0029 
0030     int volume() const;
0031     void setVolume(int volume);
0032     Q_SIGNAL void volumeChanged();
0033 
0034 private:
0035     int m_sound;
0036     int m_volume;
0037     QUrl m_soundFile;
0038 };
0039 
0040 #endif // NOTE_H