Ref T567, PTT click also on key up

* added sound
* UI component
This commit is contained in:
Klaus Basan
2019-03-17 00:58:56 +01:00
committed by Mat Sutcliffe
parent 754f70a4ed
commit 8c83020b92
8 changed files with 39 additions and 16 deletions

View File

@@ -50,7 +50,8 @@ 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 pttClick() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClick); }
bool pttClickDown() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyDown); }
bool pttClickUp() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyUp); }
//! @}
//! Settings value

View File

@@ -40,7 +40,7 @@ namespace BlackMisc
case NotificationVoiceRoomJoined: return joined;
case NotificationVoiceRoomLeft: return left;
case NotificationNoAudioTransmission: return noaudiotx;
case PTTClick: return ptt;
case PTTClickKeyDown: return ptt;
case LoadSounds: return load;
default: break;
}

View File

@@ -46,14 +46,15 @@ namespace BlackMisc
NotificationVoiceRoomJoined = 1 << 6,
NotificationVoiceRoomLeft = 1 << 7,
NotificationNoAudioTransmission = 1 << 8,
PTTClick = 1 << 9,
LoadSounds = 1 << 10, //!< end marker and force loading of sounds, keep as last element
PTTClickKeyDown = 1 << 9,
PTTClickKeyUp = 1 << 10,
LoadSounds = 1 << 11, //!< end marker and force loading of sounds, keep as last element
AllTextNotifications = NotificationTextMessagePrivate | NotificationTextCallsignMentioned | NotificationTextMessageSupervisor,
AllLoginNotifications = NotificationLogin | NotificationLogoff,
AllVoiceRoomNotifications = NotificationVoiceRoomJoined | NotificationVoiceRoomLeft | NotificationNoAudioTransmission,
AllNotifications = NotificationError | AllTextNotifications | AllLoginNotifications | AllVoiceRoomNotifications,
DefaultNotifications = NotificationError | AllTextNotifications | AllLoginNotifications | AllVoiceRoomNotifications,
All = AllNotifications | PTTClick
All = AllNotifications | PTTClickKeyDown | PTTClickKeyUp
};
Q_DECLARE_FLAGS(Notification, NotificationFlag)