mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +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_AtcStationsLoadMetar->setIcon(CIcons::metar());
|
||||
ui->tb_AtcStationsLoadMetar->setText("");
|
||||
ui->tb_Audio->setIcon(CIcons::appAudio16());
|
||||
ui->tb_Audio->setText("");
|
||||
|
||||
// set station mode
|
||||
ui->tvp_AtcStationsOnline->setStationMode(CAtcStationListModel::StationsOnline);
|
||||
@@ -83,7 +85,7 @@ namespace BlackGui
|
||||
// Signal / Slots
|
||||
connect(ui->le_AtcStationsOnlineMetar, &QLineEdit::returnPressed, 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(ui->tvp_AtcStationsOnline, &QTableView::clicked, this, &CAtcStationComponent::onlineAtcStationSelected);
|
||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::testRequestDummyAtcOnlineStations, this, &CAtcStationComponent::testCreateDummyOnlineAtcStations);
|
||||
|
||||
@@ -154,7 +154,10 @@
|
||||
</widget>
|
||||
</item>
|
||||
<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">
|
||||
<string>audio</string>
|
||||
</property>
|
||||
@@ -297,7 +300,7 @@
|
||||
<tabstop>le_AtcStationsOnlineMetar</tabstop>
|
||||
<tabstop>tb_AtcStationsLoadMetar</tabstop>
|
||||
<tabstop>tb_AtcStationsAtisReload</tabstop>
|
||||
<tabstop>pb_Audio</tabstop>
|
||||
<tabstop>tb_Audio</tabstop>
|
||||
<tabstop>comp_AtcStationsSettings</tabstop>
|
||||
<tabstop>te_AtcStationsOnlineInfo</tabstop>
|
||||
<tabstop>tvp_AtcStationsOnlineTree</tabstop>
|
||||
|
||||
@@ -45,11 +45,9 @@ namespace BlackGui
|
||||
// audio is optional
|
||||
const bool audio = this->hasAudio();
|
||||
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);
|
||||
Q_ASSERT(c);
|
||||
c = connect(ui->cb_SetupAudioLoopback, &QCheckBox::toggled, this, &CAudioSetupComponent::onLoopbackToggled);
|
||||
bool c = connect(ui->cb_SetupAudioLoopback, &QCheckBox::toggled, this, &CAudioSetupComponent::onLoopbackToggled);
|
||||
Q_ASSERT(c);
|
||||
|
||||
if (audio)
|
||||
@@ -72,7 +70,6 @@ namespace BlackGui
|
||||
Q_ASSERT(c);
|
||||
}
|
||||
this->reloadSettings();
|
||||
ui->tb_ExpandNotificationSounds->setChecked(false); // collapse
|
||||
Q_UNUSED(c);
|
||||
}
|
||||
|
||||
@@ -87,11 +84,6 @@ namespace BlackGui
|
||||
ui->cb_SetupAudioNotificationVoiceRoom->setChecked(as.getNotificationFlag(CNotificationSounds::NotificationVoiceRoomJoined));
|
||||
}
|
||||
|
||||
void CAudioSetupComponent::onToggleNotificationSoundsVisibility(bool checked)
|
||||
{
|
||||
ui->fr_NotificationSoundsInner->setVisible(checked);
|
||||
}
|
||||
|
||||
void CAudioSetupComponent::initAudioDeviceLists()
|
||||
{
|
||||
if (!this->hasAudio()) { return; }
|
||||
|
||||
@@ -60,9 +60,6 @@ namespace BlackGui
|
||||
//! Loopback toggled
|
||||
void onLoopbackToggled(bool loopback);
|
||||
|
||||
//! Visibilty (show/hide buttons)
|
||||
void onToggleNotificationSoundsVisibility(bool checked);
|
||||
|
||||
//! Audio device lists from settings
|
||||
void initAudioDeviceLists();
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>264</width>
|
||||
<height>359</height>
|
||||
<width>200</width>
|
||||
<height>322</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -55,6 +55,23 @@
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</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">
|
||||
<widget class="QLabel" name="lbl_SetupAudioInputDevice">
|
||||
<property name="text">
|
||||
@@ -100,100 +117,38 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="lbl_ExtraInfo">
|
||||
<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>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbl_Notifications">
|
||||
<property name="toolTip">
|
||||
<string>Toggle visibility</string>
|
||||
<string>Notifications</string>
|
||||
</property>
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioPlayNotificationSounds">
|
||||
<property name="text">
|
||||
<string>play notification sounds</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QFrame" name="fr_NotificationSoundsInner">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextMessage">
|
||||
<property name="text">
|
||||
<string>notification for text messages</string>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationVoiceRoom">
|
||||
<property name="text">
|
||||
<string>notification for join/leave voice room</string>
|
||||
</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">
|
||||
<property name="text">
|
||||
<string>play notification sounds</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_SetupAudioNotificationTextMessage">
|
||||
<property name="text">
|
||||
<string>notification for text messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -213,8 +168,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../blackmisc/blackmisc.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
<ui version="4.0">
|
||||
<class>CAudioVolumeComponent</class>
|
||||
<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">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
@@ -106,12 +114,6 @@
|
||||
</property>
|
||||
<item>
|
||||
<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">
|
||||
<string>Windows sound mixer</string>
|
||||
</property>
|
||||
@@ -126,12 +128,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<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">
|
||||
<string>Toggle mute</string>
|
||||
</property>
|
||||
@@ -153,12 +149,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<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">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
||||
Reference in New Issue
Block a user