mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
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.
33 lines
682 B
C++
33 lines
682 B
C++
#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
|