mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Issue #111 New notification sounds
This commit is contained in:
@@ -23,8 +23,10 @@ namespace BlackMisc
|
||||
static const QString error("error");
|
||||
static const QString login("login");
|
||||
static const QString logoff("logoff");
|
||||
static const QString freqMsg("frequency msg.");
|
||||
static const QString privateMsg("private msg.");
|
||||
static const QString supMsg("supervisor msg.");
|
||||
static const QString unicomMsg("unicom msg.");
|
||||
static const QString mentioned("cs mentioned");
|
||||
static const QString joined("room joined");
|
||||
static const QString left("room left");
|
||||
@@ -43,8 +45,10 @@ namespace BlackMisc
|
||||
case NotificationError: return error;
|
||||
case NotificationLogin: return login;
|
||||
case NotificationLogoff: return logoff;
|
||||
case NotificationTextMessageFrequency: return freqMsg;
|
||||
case NotificationTextMessagePrivate: return privateMsg;
|
||||
case NotificationTextMessageSupervisor: return supMsg;
|
||||
case NotificationTextMessageUnicom: return unicomMsg;
|
||||
case NotificationTextCallsignMentioned: return mentioned;
|
||||
case NotificationNoAudioTransmission: return noaudiotx;
|
||||
case NotificationAtcTunedIn: return tunein;
|
||||
@@ -66,8 +70,10 @@ namespace BlackMisc
|
||||
if (notification.testFlag(NotificationError)) n << flagToString(NotificationError);
|
||||
if (notification.testFlag(NotificationLogin)) n << flagToString(NotificationLogin);
|
||||
if (notification.testFlag(NotificationLogoff)) n << flagToString(NotificationLogoff);
|
||||
if (notification.testFlag(NotificationTextMessageFrequency)) n << flagToString(NotificationTextMessageFrequency);
|
||||
if (notification.testFlag(NotificationTextMessagePrivate)) n << flagToString(NotificationTextMessagePrivate);
|
||||
if (notification.testFlag(NotificationTextMessageSupervisor)) n << flagToString(NotificationTextMessageSupervisor);
|
||||
if (notification.testFlag(NotificationTextMessageUnicom)) n << flagToString(NotificationTextMessageUnicom);
|
||||
if (notification.testFlag(NotificationTextCallsignMentioned)) n << flagToString(NotificationTextCallsignMentioned);
|
||||
if (notification.testFlag(NotificationNoAudioTransmission)) n << flagToString(NotificationNoAudioTransmission);
|
||||
|
||||
|
||||
@@ -40,8 +40,10 @@ namespace BlackMisc
|
||||
NotificationError = 1 << 0,
|
||||
NotificationLogin = 1 << 1,
|
||||
NotificationLogoff = 1 << 2,
|
||||
NotificationTextMessageFrequency = 1 << 12,
|
||||
NotificationTextMessagePrivate = 1 << 3,
|
||||
NotificationTextMessageSupervisor = 1 << 4,
|
||||
NotificationTextMessageUnicom = 1 << 13,
|
||||
NotificationTextCallsignMentioned = 1 << 5,
|
||||
NotificationNoAudioTransmission = 1 << 6,
|
||||
NotificationAtcTunedIn = 1 << 10,
|
||||
@@ -55,7 +57,8 @@ namespace BlackMisc
|
||||
Q_DECLARE_FLAGS(Notification, NotificationFlag)
|
||||
|
||||
//! All text notification flags
|
||||
constexpr static Notification AllTextNotifications = Notification(NotificationTextMessagePrivate | NotificationTextCallsignMentioned | NotificationTextMessageSupervisor);
|
||||
constexpr static Notification AllTextNotifications = Notification(
|
||||
NotificationTextMessageFrequency | NotificationTextMessagePrivate | NotificationTextCallsignMentioned | NotificationTextMessageSupervisor | NotificationTextMessageUnicom);
|
||||
|
||||
//! All login notification flags
|
||||
constexpr static Notification AllLoginNotifications = Notification(NotificationLogin | NotificationLogoff);
|
||||
@@ -70,7 +73,7 @@ namespace BlackMisc
|
||||
constexpr static Notification AllNotifications = Notification(NotificationError | AllTextNotifications | AllLoginNotifications | AllPTTNotifications | AllAfv);
|
||||
|
||||
//! Default notification flags
|
||||
constexpr static Notification DefaultNotifications = Notification(AllNotifications);
|
||||
constexpr static Notification DefaultNotifications = Notification(AllNotifications & ~(NotificationTextMessageFrequency | NotificationTextMessageUnicom));
|
||||
|
||||
//! As string
|
||||
static const QString &flagToString(NotificationFlag notification);
|
||||
|
||||
Reference in New Issue
Block a user