mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
refs #240, moved notification sounds in project blackmisc
Notification sounds are used in BlackGui components. They require the whole Qt multimedia library. However, GUI only triggers playing the sound. As a workaround the notification sounds enumeration has been moved in an own class, and moved to the subproject BlackMisc. Hence it is possible to compile BlackGui without dependency to BlackSound.
This commit is contained in:
32
src/blackmisc/notificationsounds.h
Normal file
32
src/blackmisc/notificationsounds.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef BLACKMISC_NOTIFICATIONSOUNDS_H
|
||||
#define BLACKMISC_NOTIFICATIONSOUNDS_H
|
||||
|
||||
namespace BlackSound
|
||||
{
|
||||
|
||||
/*!
|
||||
* Simplified enums to play sound. Outside BlackSound as this allows
|
||||
* to trigger sounds without using Multimedia libraries.
|
||||
*/
|
||||
struct CNotificationSounds
|
||||
{
|
||||
//! How to play?
|
||||
enum PlayMode
|
||||
{
|
||||
Single,
|
||||
SingleWithAutomaticDeletion,
|
||||
EndlessLoop
|
||||
};
|
||||
|
||||
//! Play notification
|
||||
enum Notification
|
||||
{
|
||||
NotificationError = 0,
|
||||
NotificationLogin,
|
||||
NotificationLogoff,
|
||||
NotificationTextMessage,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user