mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 15:25:34 +08:00
[AFV] Ref T739, added ATC tuned in/out
This commit is contained in:
@@ -68,6 +68,14 @@ namespace BlackGui
|
||||
Q_ASSERT(c);
|
||||
c = connect(ui->cb_SetupAudioNotificationTextCallsignMentioned, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
c = connect(ui->cb_SetupAudioNotificationTextMessageSupervisor, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
c = connect(ui->cb_SetupAudioNotificationTextMessageSupervisor, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
c = connect(ui->cb_SetupAudioNotificationAtcTunedOut, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
c = connect(ui->cb_SetupAudioNotificationAtcTunedIn, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
c = connect(ui->cb_SetupAudioNoTransmission, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection);
|
||||
Q_ASSERT(c);
|
||||
c = connect(ui->cb_SetupAfvBlocked, &QCheckBox::toggled, this, &CAudioNotificationComponent::onNotificationsToggled, Qt::QueuedConnection);
|
||||
@@ -93,7 +101,8 @@ namespace BlackGui
|
||||
ui->cb_SetupAudioPTTBlocked->isChecked() ||
|
||||
ui->cb_SetupAudioNotificationTextMessagePrivate->isChecked() || ui->cb_SetupAudioNotificationTextMessageSupervisor->isChecked() ||
|
||||
ui->cb_SetupAudioNotificationTextCallsignMentioned->isChecked() || ui->cb_SetupAudioNoTransmission->isChecked() ||
|
||||
ui->cb_SetupAfvBlocked->isChecked() || ui->cb_SetupAfvClicked->isChecked();
|
||||
ui->cb_SetupAfvBlocked->isChecked() || ui->cb_SetupAfvClicked->isChecked() ||
|
||||
ui->cb_SetupAudioNotificationAtcTunedIn->isChecked() || ui->cb_SetupAudioNotificationAtcTunedOut->isChecked();
|
||||
}
|
||||
|
||||
void CAudioNotificationComponent::reloadSettings()
|
||||
@@ -107,6 +116,8 @@ namespace BlackGui
|
||||
ui->cb_SetupAudioNotificationTextMessagePrivate->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationTextMessagePrivate));
|
||||
ui->cb_SetupAudioNotificationTextMessageSupervisor->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationTextMessageSupervisor));
|
||||
ui->cb_SetupAudioNotificationTextCallsignMentioned->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationTextCallsignMentioned));
|
||||
ui->cb_SetupAudioNotificationAtcTunedIn->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationAtcTunedIn));
|
||||
ui->cb_SetupAudioNotificationAtcTunedOut->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationAtcTunedOut));
|
||||
ui->cb_SetupAudioNoTransmission->setChecked(as.isNotificationFlagSet(CNotificationSounds::NotificationNoAudioTransmission));
|
||||
|
||||
ui->cb_SetupAfvBlocked->setChecked(as.isNotificationFlagSet(CNotificationSounds::AFVBlocked));
|
||||
@@ -136,6 +147,9 @@ namespace BlackGui
|
||||
if (cb == ui->cb_SetupAudioNotificationTextCallsignMentioned) { return CNotificationSounds::NotificationTextCallsignMentioned; }
|
||||
if (cb == ui->cb_SetupAudioNotificationTextMessagePrivate) { return CNotificationSounds::NotificationTextMessagePrivate; }
|
||||
if (cb == ui->cb_SetupAudioNotificationTextMessageSupervisor) { return CNotificationSounds::NotificationTextMessageSupervisor; }
|
||||
if (cb == ui->cb_SetupAudioNotificationAtcTunedIn) { return CNotificationSounds::NotificationAtcTunedIn; }
|
||||
if (cb == ui->cb_SetupAudioNotificationAtcTunedOut) { return CNotificationSounds::NotificationAtcTunedOut; }
|
||||
|
||||
if (cb == ui->cb_SetupAudioNoTransmission) { return CNotificationSounds::NotificationNoAudioTransmission; }
|
||||
|
||||
if (cb == ui->cb_SetupAfvBlocked) { return CNotificationSounds::AFVBlocked; }
|
||||
@@ -161,6 +175,9 @@ namespace BlackGui
|
||||
as.setNotificationFlag(CNotificationSounds::AFVBlocked, ui->cb_SetupAfvBlocked->isChecked());
|
||||
as.setNotificationFlag(CNotificationSounds::AFVClicked, ui->cb_SetupAfvClicked->isChecked());
|
||||
|
||||
as.setNotificationFlag(CNotificationSounds::NotificationAtcTunedOut, ui->cb_SetupAudioNotificationAtcTunedOut->isChecked());
|
||||
as.setNotificationFlag(CNotificationSounds::NotificationAtcTunedIn, ui->cb_SetupAudioNotificationAtcTunedIn->isChecked());
|
||||
|
||||
const CStatusMessage msg = m_audioSettings.set(as);
|
||||
CLogMessage(this).preformatted(msg);
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>296</width>
|
||||
<height>295</height>
|
||||
<width>285</width>
|
||||
<height>304</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
@@ -57,6 +57,39 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAfvClicked">
|
||||
<property name="text">
|
||||
<string>AFV click</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_Notifications">
|
||||
<property name="toolTip">
|
||||
<string>Notifications</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Volume:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="sb_NotificationValueVolume">
|
||||
<property name="suffix">
|
||||
<string> volume 25-100 (notifications)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>90</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QWidget" name="wi_SoundDir" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_SoundDir" stretch="0,0,0">
|
||||
@@ -96,81 +129,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextMessagePrivate">
|
||||
<property name="text">
|
||||
<string>notification for private text messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAfvClicked">
|
||||
<property name="text">
|
||||
<string>AFV click</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioPTTClickDown">
|
||||
<property name="text">
|
||||
<string>PTT click (key down)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="sb_NotificationValueVolume">
|
||||
<property name="suffix">
|
||||
<string> volume 25-100 (notifications)</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>25</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>90</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_SoundDirectory">
|
||||
<property name="text">
|
||||
<string>Dir.:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextMessageSupervisor">
|
||||
<property name="text">
|
||||
<string>supervisor messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioPTTClickUp">
|
||||
<property name="text">
|
||||
<string>PTT click (key up)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNoTransmission">
|
||||
<property name="text">
|
||||
<string>No audio transmission warning</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_Notifications">
|
||||
<property name="toolTip">
|
||||
<string>Notifications</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Volume:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextCallsignMentioned">
|
||||
<property name="text">
|
||||
@@ -185,6 +143,62 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextMessagePrivate">
|
||||
<property name="text">
|
||||
<string>notification for private text messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_SoundDirectory">
|
||||
<property name="text">
|
||||
<string>Dir.:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationAtcTunedIn">
|
||||
<property name="text">
|
||||
<string>ATC frequency selected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioPTTClickDown">
|
||||
<property name="text">
|
||||
<string>PTT click (key down)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextMessageSupervisor">
|
||||
<property name="text">
|
||||
<string>supervisor messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNoTransmission">
|
||||
<property name="text">
|
||||
<string>No audio transmission warning</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioPTTClickUp">
|
||||
<property name="text">
|
||||
<string>PTT click (key up)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationAtcTunedOut">
|
||||
<property name="text">
|
||||
<string>ATC frequency deselected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
@@ -62,14 +62,16 @@ namespace BlackSound
|
||||
const QStringList types = QSoundEffect::supportedMimeTypes();
|
||||
CLogMessage(this).info(u"Notification mime types: %1") << types.join(", ");
|
||||
|
||||
this->updateEffect(CNotificationSounds::NotificationError, directory, "error.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationLogin, directory, "login.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationError, directory, "error.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationLogin, directory, "login.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationLogoff, directory, "logoff.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationTextMessagePrivate, directory, "privatemessage.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationTextMessageSupervisor, directory, "supervisormessage.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationTextCallsignMentioned, directory, "callsignmentioned.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationNoAudioTransmission, directory, "noaudiotransmission.wav");
|
||||
this->updateEffect(CNotificationSounds::PTTBlocked, directory, "pttblocked.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationNoAudioTransmission, directory, "noaudiotransmission.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationAtcTunedIn, directory, "atctunedin.wav");
|
||||
this->updateEffect(CNotificationSounds::NotificationAtcTunedOut, directory, "atctunedout.wav");
|
||||
this->updateEffect(CNotificationSounds::PTTBlocked, directory, "pttblocked.wav");
|
||||
this->updateEffect(CNotificationSounds::PTTClickKeyDown, directory, "pttclick.wav");
|
||||
this->updateEffect(CNotificationSounds::PTTClickKeyUp, directory, "pttclick.wav");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user