mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
[AFV] Ref T730, changed/added settings for AFV and allow still to use old swift notifications
This commit is contained in:
@@ -164,8 +164,8 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
const CSettings s = m_audioSettings.get();
|
const CSettings s = m_audioSettings.get();
|
||||||
m_doClickWhenAppropriate = s.pttClickDown();
|
m_doClickWhenAppropriate = s.afvClicked();
|
||||||
m_doBlockWhenAppropriate = s.pttBlocked();
|
m_doBlockWhenAppropriate = s.afvBlocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CReceiverSampleProvider::addSilentSamples(const IAudioDto &audioDto, uint frequency, float distanceRatio)
|
void CReceiverSampleProvider::addSilentSamples(const IAudioDto &audioDto, uint frequency, float distanceRatio)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
QSize CCockpitInfoAreaComponent::getPreferredSizeWhenFloating(int areaIndex) const
|
QSize CCockpitInfoAreaComponent::getPreferredSizeWhenFloating(int areaIndex) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(areaIndex);
|
Q_UNUSED(areaIndex)
|
||||||
return QSize(600, 400);
|
return QSize(600, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,12 +44,9 @@ namespace BlackGui
|
|||||||
InfoArea area = static_cast<InfoArea>(areaIndex);
|
InfoArea area = static_cast<InfoArea>(areaIndex);
|
||||||
switch (area)
|
switch (area)
|
||||||
{
|
{
|
||||||
case InfoAreaAudio:
|
case InfoAreaAudio: return CIcons::appAudio16();
|
||||||
return CIcons::appAudio16();
|
case InfoAreaVoiceRooms: return CIcons::appVoiceRooms16();
|
||||||
case InfoAreaVoiceRooms:
|
default: return CIcons::empty();
|
||||||
return CIcons::appVoiceRooms16();
|
|
||||||
default:
|
|
||||||
return CIcons::empty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ namespace BlackMisc
|
|||||||
bool pttClickDown() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyDown); }
|
bool pttClickDown() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyDown); }
|
||||||
bool pttClickUp() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyUp); }
|
bool pttClickUp() const { return this->isNotificationFlagSet(CNotificationSounds::PTTClickKeyUp); }
|
||||||
bool pttBlocked() const { return this->isNotificationFlagSet(CNotificationSounds::PTTBlocked); }
|
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
|
//! Settings value
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ namespace BlackMisc
|
|||||||
static const QString pttBlocked("PTT blocked");
|
static const QString pttBlocked("PTT blocked");
|
||||||
static const QString load("load sounds");
|
static const QString load("load sounds");
|
||||||
static const QString noaudiotx("No audio tx");
|
static const QString noaudiotx("No audio tx");
|
||||||
|
static const QString afvclick("AFC click");
|
||||||
|
static const QString afvblock("AFV blocked");
|
||||||
|
|
||||||
switch (notification)
|
switch (notification)
|
||||||
{
|
{
|
||||||
@@ -46,6 +48,8 @@ namespace BlackMisc
|
|||||||
case PTTClickKeyDown: return pttDown;
|
case PTTClickKeyDown: return pttDown;
|
||||||
case PTTClickKeyUp: return pttUp;
|
case PTTClickKeyUp: return pttUp;
|
||||||
case PTTBlocked: return pttBlocked;
|
case PTTBlocked: return pttBlocked;
|
||||||
|
case AFVClicked: return afvclick;
|
||||||
|
case AFVBlocked: return afvblock;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
return unknown;
|
return unknown;
|
||||||
@@ -64,6 +68,9 @@ namespace BlackMisc
|
|||||||
if (notification.testFlag(PTTClickKeyUp)) n << flagToString(PTTClickKeyUp);
|
if (notification.testFlag(PTTClickKeyUp)) n << flagToString(PTTClickKeyUp);
|
||||||
if (notification.testFlag(PTTClickKeyDown)) n << flagToString(PTTClickKeyDown);
|
if (notification.testFlag(PTTClickKeyDown)) n << flagToString(PTTClickKeyDown);
|
||||||
if (notification.testFlag(PTTBlocked)) n << flagToString(PTTBlocked);
|
if (notification.testFlag(PTTBlocked)) n << flagToString(PTTBlocked);
|
||||||
|
|
||||||
|
if (notification.testFlag(AFVClicked)) n << flagToString(AFVClicked);
|
||||||
|
if (notification.testFlag(AFVBlocked)) n << flagToString(AFVBlocked);
|
||||||
return n.join(", ");
|
return n.join(", ");
|
||||||
}
|
}
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ namespace BlackMisc
|
|||||||
NotificationNoAudioTransmission = 1 << 6,
|
NotificationNoAudioTransmission = 1 << 6,
|
||||||
PTTClickKeyDown = 1 << 7,
|
PTTClickKeyDown = 1 << 7,
|
||||||
PTTClickKeyUp = 1 << 8,
|
PTTClickKeyUp = 1 << 8,
|
||||||
PTTBlocked = 1 << 9
|
PTTBlocked = 1 << 9,
|
||||||
|
AFVClicked = 1 << 14,
|
||||||
|
AFVBlocked = 1 << 15
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(Notification, NotificationFlag)
|
Q_DECLARE_FLAGS(Notification, NotificationFlag)
|
||||||
|
|
||||||
@@ -59,8 +61,11 @@ namespace BlackMisc
|
|||||||
//! All PTT notification flags
|
//! All PTT notification flags
|
||||||
constexpr static Notification AllPTTNotifications = Notification(PTTBlocked | PTTClickKeyUp | PTTClickKeyDown);
|
constexpr static Notification AllPTTNotifications = Notification(PTTBlocked | PTTClickKeyUp | PTTClickKeyDown);
|
||||||
|
|
||||||
|
//! All AFV flags
|
||||||
|
constexpr static Notification AllAfv = Notification(AFVClicked | AFVBlocked);
|
||||||
|
|
||||||
//! All notification flags
|
//! 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
|
//! Default notification flags
|
||||||
constexpr static Notification DefaultNotifications = Notification(AllNotifications);
|
constexpr static Notification DefaultNotifications = Notification(AllNotifications);
|
||||||
|
|||||||
Reference in New Issue
Block a user