mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
[AFV] Ref T730, changed/added settings for AFV and allow still to use old swift notifications
This commit is contained in:
@@ -62,9 +62,12 @@ namespace BlackMisc
|
||||
bool textMessageSupervisor() const { return this->isNotificationFlagSet(CNotificationSounds::NotificationTextMessageSupervisor); }
|
||||
bool textCallsignMentioned() const { return this->isNotificationFlagSet(CNotificationSounds::NotificationTextCallsignMentioned); }
|
||||
bool noAudioTransmission() const { return this->isNotificationFlagSet(CNotificationSounds::NotificationNoAudioTransmission); }
|
||||
bool pttClickDown() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyDown); }
|
||||
bool pttClickUp() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyUp); }
|
||||
bool pttBlocked() const { return this->isNotificationFlagSet(CNotificationSounds::PTTBlocked); }
|
||||
bool pttClickDown() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyDown); }
|
||||
bool pttClickUp() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyUp); }
|
||||
bool pttBlocked() const { return this->isNotificationFlagSet(CNotificationSounds::PTTBlocked); }
|
||||
|
||||
bool afvClicked() const { return this->isNotificationFlagSet(CNotificationSounds::AFVClicked); }
|
||||
bool afvBlocked() const { return this->isNotificationFlagSet(CNotificationSounds::AFVBlocked); }
|
||||
//! @}
|
||||
|
||||
//! Settings value
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace BlackMisc
|
||||
static const QString pttBlocked("PTT blocked");
|
||||
static const QString load("load sounds");
|
||||
static const QString noaudiotx("No audio tx");
|
||||
static const QString afvclick("AFC click");
|
||||
static const QString afvblock("AFV blocked");
|
||||
|
||||
switch (notification)
|
||||
{
|
||||
@@ -46,6 +48,8 @@ namespace BlackMisc
|
||||
case PTTClickKeyDown: return pttDown;
|
||||
case PTTClickKeyUp: return pttUp;
|
||||
case PTTBlocked: return pttBlocked;
|
||||
case AFVClicked: return afvclick;
|
||||
case AFVBlocked: return afvblock;
|
||||
default: break;
|
||||
}
|
||||
return unknown;
|
||||
@@ -64,6 +68,9 @@ namespace BlackMisc
|
||||
if (notification.testFlag(PTTClickKeyUp)) n << flagToString(PTTClickKeyUp);
|
||||
if (notification.testFlag(PTTClickKeyDown)) n << flagToString(PTTClickKeyDown);
|
||||
if (notification.testFlag(PTTBlocked)) n << flagToString(PTTBlocked);
|
||||
|
||||
if (notification.testFlag(AFVClicked)) n << flagToString(AFVClicked);
|
||||
if (notification.testFlag(AFVBlocked)) n << flagToString(AFVBlocked);
|
||||
return n.join(", ");
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -46,7 +46,9 @@ namespace BlackMisc
|
||||
NotificationNoAudioTransmission = 1 << 6,
|
||||
PTTClickKeyDown = 1 << 7,
|
||||
PTTClickKeyUp = 1 << 8,
|
||||
PTTBlocked = 1 << 9
|
||||
PTTBlocked = 1 << 9,
|
||||
AFVClicked = 1 << 14,
|
||||
AFVBlocked = 1 << 15
|
||||
};
|
||||
Q_DECLARE_FLAGS(Notification, NotificationFlag)
|
||||
|
||||
@@ -59,8 +61,11 @@ namespace BlackMisc
|
||||
//! All PTT notification flags
|
||||
constexpr static Notification AllPTTNotifications = Notification(PTTBlocked | PTTClickKeyUp | PTTClickKeyDown);
|
||||
|
||||
//! All AFV flags
|
||||
constexpr static Notification AllAfv = Notification(AFVClicked | AFVBlocked);
|
||||
|
||||
//! All notification flags
|
||||
constexpr static Notification AllNotifications = Notification(NotificationError | AllTextNotifications | AllLoginNotifications | AllPTTNotifications);
|
||||
constexpr static Notification AllNotifications = Notification(NotificationError | AllTextNotifications | AllLoginNotifications | AllPTTNotifications | AllAfv);
|
||||
|
||||
//! Default notification flags
|
||||
constexpr static Notification DefaultNotifications = Notification(AllNotifications);
|
||||
|
||||
Reference in New Issue
Block a user