mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #927, added audio button in keypad area
This commit is contained in:
committed by
Mathew Sutcliffe
parent
b4878a2bc0
commit
05761b6e07
@@ -60,6 +60,7 @@ namespace BlackGui
|
||||
connect(ui->pb_Opacity100, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected);
|
||||
connect(ui->pb_SoundMaxVolume, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected);
|
||||
connect(ui->pb_SoundMute, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected);
|
||||
connect(ui->pb_Audio, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected);
|
||||
|
||||
// command line
|
||||
this->connect(ui->lep_CommandLineInput, &QLineEdit::returnPressed, this, &CMainKeypadAreaComponent::ps_commandEntered);
|
||||
@@ -129,13 +130,17 @@ namespace BlackGui
|
||||
}
|
||||
else if (senderButton == ui->pb_SoundMute && sGui->getIContextAudio())
|
||||
{
|
||||
bool mute = sGui->getIContextAudio()->isMuted();
|
||||
const bool mute = sGui->getIContextAudio()->isMuted();
|
||||
sGui->getIContextAudio()->setMute(!mute);
|
||||
}
|
||||
else if (senderButton == ui->pb_Connect)
|
||||
{
|
||||
emit connectPressed();
|
||||
}
|
||||
else if (senderButton == ui->pb_Audio)
|
||||
{
|
||||
emit audioPressed();
|
||||
}
|
||||
}
|
||||
|
||||
void CMainKeypadAreaComponent::ps_connectionStatusChanged(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to)
|
||||
|
||||
@@ -28,7 +28,6 @@ class QWidget;
|
||||
|
||||
namespace BlackMisc { namespace Simulation { class CSimulatedAircraft; } }
|
||||
namespace Ui { class CMainKeypadAreaComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
@@ -67,6 +66,9 @@ namespace BlackGui
|
||||
//! Ident pressed
|
||||
void identPressed();
|
||||
|
||||
//! Request audio
|
||||
void audioPressed();
|
||||
|
||||
public slots:
|
||||
//! Main info area changed
|
||||
void onMainInfoAreaChanged(int currentTabIndex, QList<int> dockedIndexes, QList<int> floatingIndexes);
|
||||
|
||||
@@ -117,12 +117,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QPushButton" name="pb_Empty_3">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pb_Audio">
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Audio</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user