From a01f2e36a0cc1c0fc379ca7679f227d7922c2923 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 10 Feb 2019 01:22:58 +0100 Subject: [PATCH] Ref T535, added supervisor notifcation sound --- src/blackmisc/audio/notificationsounds.cpp | 3 +++ src/blackmisc/audio/notificationsounds.h | 15 ++++++++------- src/blacksound/soundgenerator.cpp | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/blackmisc/audio/notificationsounds.cpp b/src/blackmisc/audio/notificationsounds.cpp index a3c3b90c8..001c2d1c6 100644 --- a/src/blackmisc/audio/notificationsounds.cpp +++ b/src/blackmisc/audio/notificationsounds.cpp @@ -22,6 +22,7 @@ namespace BlackMisc static const QString login("login"); static const QString logoff("logoff"); static const QString privateMsg("private msg."); + static const QString supMsg("supervisor msg."); static const QString mentioned("cs mentioned"); static const QString joined("room joined"); static const QString left("room left"); @@ -34,6 +35,7 @@ namespace BlackMisc case NotificationLogin: return login; case NotificationLogoff: return logoff; case NotificationTextMessagePrivate: return privateMsg; + case NotificationTextMessageSupervisor: return supMsg; case NotificationTextCallsignMentioned: return mentioned; case NotificationVoiceRoomJoined: return joined; case NotificationVoiceRoomLeft: return left; @@ -51,6 +53,7 @@ namespace BlackMisc if (notification.testFlag(NotificationLogin)) n << flagToString(NotificationLogin); if (notification.testFlag(NotificationLogoff)) n << flagToString(NotificationLogoff); if (notification.testFlag(NotificationTextMessagePrivate)) n << flagToString(NotificationTextMessagePrivate); + if (notification.testFlag(NotificationTextMessageSupervisor)) n << flagToString(NotificationTextMessageSupervisor); if (notification.testFlag(NotificationTextCallsignMentioned)) n << flagToString(NotificationTextCallsignMentioned); if (notification.testFlag(NotificationVoiceRoomJoined)) n << flagToString(NotificationVoiceRoomJoined); if (notification.testFlag(NotificationVoiceRoomLeft)) n << flagToString(NotificationVoiceRoomLeft); diff --git a/src/blackmisc/audio/notificationsounds.h b/src/blackmisc/audio/notificationsounds.h index 0a4f99d8e..e1ad9d353 100644 --- a/src/blackmisc/audio/notificationsounds.h +++ b/src/blackmisc/audio/notificationsounds.h @@ -42,16 +42,17 @@ namespace BlackMisc NotificationLogin = 1 << 1, NotificationLogoff = 1 << 2, NotificationTextMessagePrivate = 1 << 3, - NotificationTextCallsignMentioned = 1 << 4, - NotificationVoiceRoomJoined = 1 << 5, - NotificationVoiceRoomLeft = 1 << 6, - PTTClick = 1 << 7, - LoadSounds = 1 << 8, //!< end marker and force loading of sounds, keep as last element - AllTextNotifications = NotificationTextMessagePrivate | NotificationTextCallsignMentioned, + NotificationTextMessageSupervisor = 1 << 4, + NotificationTextCallsignMentioned = 1 << 5, + NotificationVoiceRoomJoined = 1 << 6, + NotificationVoiceRoomLeft = 1 << 7, + PTTClick = 1 << 8, + LoadSounds = 1 << 9, //!< end marker and force loading of sounds, keep as last element + AllTextNotifications = NotificationTextMessagePrivate | NotificationTextCallsignMentioned | NotificationTextMessageSupervisor, AllLoginNotifications = NotificationLogin | NotificationLogoff, AllVoiceRoomNotifications = NotificationVoiceRoomJoined | NotificationVoiceRoomLeft, AllNotifications = NotificationError | AllTextNotifications | AllLoginNotifications | AllVoiceRoomNotifications, - DefaultNotifications = NotificationError | NotificationTextMessagePrivate | AllLoginNotifications | AllVoiceRoomNotifications, + DefaultNotifications = NotificationError | AllTextNotifications | AllLoginNotifications | AllVoiceRoomNotifications, All = AllNotifications | PTTClick }; Q_DECLARE_FLAGS(Notification, NotificationFlag) diff --git a/src/blacksound/soundgenerator.cpp b/src/blacksound/soundgenerator.cpp index 3d48590a2..3f581a10b 100644 --- a/src/blacksound/soundgenerator.cpp +++ b/src/blacksound/soundgenerator.cpp @@ -500,6 +500,7 @@ namespace BlackSound success = playlist->addMedia(QUrl::fromLocalFile(CDirectoryUtils::soundFilesDirectory() + "/login.wav")) && success; success = playlist->addMedia(QUrl::fromLocalFile(CDirectoryUtils::soundFilesDirectory() + "/logoff.wav")) && success; success = playlist->addMedia(QUrl::fromLocalFile(CDirectoryUtils::soundFilesDirectory() + "/privatemessage.wav")) && success; + success = playlist->addMedia(QUrl::fromLocalFile(CDirectoryUtils::soundFilesDirectory() + "/supervisormessage.wav")) && success; success = playlist->addMedia(QUrl::fromLocalFile(CDirectoryUtils::soundFilesDirectory() + "/callsignmentioned.wav")) && success; success = playlist->addMedia(QUrl::fromLocalFile(CDirectoryUtils::soundFilesDirectory() + "/voiceroomjoined.wav")) && success; success = playlist->addMedia(QUrl::fromLocalFile(CDirectoryUtils::soundFilesDirectory() + "/voiceroomleft.wav")) && success;