mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
As another improvement of voice testing beautified/simplified audio UI a bit
This commit is contained in:
@@ -72,6 +72,8 @@ namespace BlackGui
|
|||||||
ui->tb_AtcStationsAtisReload->setText("");
|
ui->tb_AtcStationsAtisReload->setText("");
|
||||||
ui->tb_AtcStationsLoadMetar->setIcon(CIcons::metar());
|
ui->tb_AtcStationsLoadMetar->setIcon(CIcons::metar());
|
||||||
ui->tb_AtcStationsLoadMetar->setText("");
|
ui->tb_AtcStationsLoadMetar->setText("");
|
||||||
|
ui->tb_Audio->setIcon(CIcons::appAudio16());
|
||||||
|
ui->tb_Audio->setText("");
|
||||||
|
|
||||||
// set station mode
|
// set station mode
|
||||||
ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline);
|
ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline);
|
||||||
@@ -83,7 +85,7 @@ namespace BlackGui
|
|||||||
// Signal / Slots
|
// Signal / Slots
|
||||||
connect(ui->le_AtcStationsOnlineMetar, &QLineEdit::returnPressed, this, &CAtcStationComponent::getMetarAsEntered);
|
connect(ui->le_AtcStationsOnlineMetar, &QLineEdit::returnPressed, this, &CAtcStationComponent::getMetarAsEntered);
|
||||||
connect(ui->tb_AtcStationsLoadMetar, &QPushButton::clicked, this, &CAtcStationComponent::getMetarAsEntered);
|
connect(ui->tb_AtcStationsLoadMetar, &QPushButton::clicked, this, &CAtcStationComponent::getMetarAsEntered);
|
||||||
connect(ui->pb_Audio, &QPushButton::clicked, this, &CAtcStationComponent::requestAudioWidget);
|
connect(ui->tb_Audio, &QPushButton::clicked, this, &CAtcStationComponent::requestAudioWidget);
|
||||||
connect(this, &QTabWidget::currentChanged, this, &CAtcStationComponent::atcStationsTabChanged); // "local" tab changed (booked, online)
|
connect(this, &QTabWidget::currentChanged, this, &CAtcStationComponent::atcStationsTabChanged); // "local" tab changed (booked, online)
|
||||||
connect(ui->tvp_AtcStationsOnline, &QTableView::clicked, this, &CAtcStationComponent::onlineAtcStationSelected);
|
connect(ui->tvp_AtcStationsOnline, &QTableView::clicked, this, &CAtcStationComponent::onlineAtcStationSelected);
|
||||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::testRequestDummyAtcOnlineStations, this, &CAtcStationComponent::testCreateDummyOnlineAtcStations);
|
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::testRequestDummyAtcOnlineStations, this, &CAtcStationComponent::testCreateDummyOnlineAtcStations);
|
||||||
|
|||||||
@@ -154,7 +154,10 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="4">
|
<item row="0" column="4">
|
||||||
<widget class="QPushButton" name="pb_Audio">
|
<widget class="QToolButton" name="tb_Audio">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>goto audio panel</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>audio</string>
|
<string>audio</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -297,7 +300,7 @@
|
|||||||
<tabstop>le_AtcStationsOnlineMetar</tabstop>
|
<tabstop>le_AtcStationsOnlineMetar</tabstop>
|
||||||
<tabstop>tb_AtcStationsLoadMetar</tabstop>
|
<tabstop>tb_AtcStationsLoadMetar</tabstop>
|
||||||
<tabstop>tb_AtcStationsAtisReload</tabstop>
|
<tabstop>tb_AtcStationsAtisReload</tabstop>
|
||||||
<tabstop>pb_Audio</tabstop>
|
<tabstop>tb_Audio</tabstop>
|
||||||
<tabstop>comp_AtcStationsSettings</tabstop>
|
<tabstop>comp_AtcStationsSettings</tabstop>
|
||||||
<tabstop>te_AtcStationsOnlineInfo</tabstop>
|
<tabstop>te_AtcStationsOnlineInfo</tabstop>
|
||||||
<tabstop>tvp_AtcStationsOnlineTree</tabstop>
|
<tabstop>tvp_AtcStationsOnlineTree</tabstop>
|
||||||
|
|||||||
@@ -45,11 +45,9 @@ namespace BlackGui
|
|||||||
// audio is optional
|
// audio is optional
|
||||||
const bool audio = this->hasAudio();
|
const bool audio = this->hasAudio();
|
||||||
this->setEnabled(audio);
|
this->setEnabled(audio);
|
||||||
ui->lbl_ExtraInfo->setText(audio ? sGui->getIContextAudio()->audioRunsWhereInfo() : "No audio, cannot change.");
|
ui->le_ExtraInfo->setText(audio ? sGui->getIContextAudio()->audioRunsWhereInfo() : "No audio, cannot change.");
|
||||||
|
|
||||||
bool c = connect(ui->tb_ExpandNotificationSounds, &QToolButton::toggled, this, &CAudioSetupComponent::onToggleNotificationSoundsVisibility);
|
bool c = connect(ui->cb_SetupAudioLoopback, &QCheckBox::toggled, this, &CAudioSetupComponent::onLoopbackToggled);
|
||||||
Q_ASSERT(c);
|
|
||||||
c = connect(ui->cb_SetupAudioLoopback, &QCheckBox::toggled, this, &CAudioSetupComponent::onLoopbackToggled);
|
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
|
|
||||||
if (audio)
|
if (audio)
|
||||||
@@ -72,7 +70,6 @@ namespace BlackGui
|
|||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
this->reloadSettings();
|
this->reloadSettings();
|
||||||
ui->tb_ExpandNotificationSounds->setChecked(false); // collapse
|
|
||||||
Q_UNUSED(c);
|
Q_UNUSED(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,11 +84,6 @@ namespace BlackGui
|
|||||||
ui->cb_SetupAudioNotificationVoiceRoom->setChecked(as.getNotificationFlag(CNotificationSounds::NotificationVoiceRoomJoined));
|
ui->cb_SetupAudioNotificationVoiceRoom->setChecked(as.getNotificationFlag(CNotificationSounds::NotificationVoiceRoomJoined));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAudioSetupComponent::onToggleNotificationSoundsVisibility(bool checked)
|
|
||||||
{
|
|
||||||
ui->fr_NotificationSoundsInner->setVisible(checked);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CAudioSetupComponent::initAudioDeviceLists()
|
void CAudioSetupComponent::initAudioDeviceLists()
|
||||||
{
|
{
|
||||||
if (!this->hasAudio()) { return; }
|
if (!this->hasAudio()) { return; }
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ namespace BlackGui
|
|||||||
//! Loopback toggled
|
//! Loopback toggled
|
||||||
void onLoopbackToggled(bool loopback);
|
void onLoopbackToggled(bool loopback);
|
||||||
|
|
||||||
//! Visibilty (show/hide buttons)
|
|
||||||
void onToggleNotificationSoundsVisibility(bool checked);
|
|
||||||
|
|
||||||
//! Audio device lists from settings
|
//! Audio device lists from settings
|
||||||
void initAudioDeviceLists();
|
void initAudioDeviceLists();
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>264</width>
|
<width>200</width>
|
||||||
<height>359</height>
|
<height>322</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -55,6 +55,23 @@
|
|||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_Info">
|
||||||
|
<property name="text">
|
||||||
|
<string>Info</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="le_ExtraInfo">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>extra info goes here</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="lbl_SetupAudioInputDevice">
|
<widget class="QLabel" name="lbl_SetupAudioInputDevice">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -100,83 +117,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="lbl_ExtraInfo">
|
<widget class="QLabel" name="lbl_Notifications">
|
||||||
<property name="text">
|
|
||||||
<string>Extra info goes here</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout" name="gl_NotificationSounds">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="lbl_NotificationSounds">
|
|
||||||
<property name="text">
|
|
||||||
<string>Notification sounds</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QToolButton" name="tb_ExpandNotificationSounds">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>18</width>
|
|
||||||
<height>18</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Toggle visibility</string>
|
<string>Notifications</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>Not.:</string>
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
|
||||||
<normaloff>:/diagona/icons/diagona/icons/toggle-expand.png</normaloff>
|
|
||||||
<normalon>:/diagona/icons/diagona/icons/toggle.png</normalon>:/diagona/icons/diagona/icons/toggle-expand.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QFrame" name="fr_NotificationSoundsInner">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationVoiceRoom">
|
|
||||||
<property name="text">
|
|
||||||
<string>notification for join/leave voice room</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="cb_SetupAudioPlayNotificationSounds">
|
<widget class="QCheckBox" name="cb_SetupAudioPlayNotificationSounds">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>play notification sounds</string>
|
<string>play notification sounds</string>
|
||||||
@@ -186,14 +137,18 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="5" column="1">
|
||||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextMessage">
|
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextMessage">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>notification for text messages</string>
|
<string>notification for text messages</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="6" column="1">
|
||||||
|
<widget class="QCheckBox" name="cb_SetupAudioNotificationVoiceRoom">
|
||||||
|
<property name="text">
|
||||||
|
<string>notification for join/leave voice room</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -213,8 +168,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="../../blackmisc/blackmisc.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>CAudioVolumeComponent</class>
|
<class>CAudioVolumeComponent</class>
|
||||||
<widget class="QFrame" name="CAudioVolumeComponent">
|
<widget class="QFrame" name="CAudioVolumeComponent">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>193</width>
|
||||||
|
<height>50</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Frame</string>
|
<string>Frame</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -106,12 +114,6 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="pb_ShowWinMixer">
|
<widget class="QToolButton" name="pb_ShowWinMixer">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Windows sound mixer</string>
|
<string>Windows sound mixer</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -126,12 +128,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="pb_Mute">
|
<widget class="QToolButton" name="pb_Mute">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Toggle mute</string>
|
<string>Toggle mute</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -153,12 +149,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="pb_Volume100">
|
<widget class="QToolButton" name="pb_Volume100">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
|
|||||||
Reference in New Issue
Block a user