mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +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_Opacity100, &QPushButton::pressed, this, &CMainKeypadAreaComponent::ps_buttonSelected);
|
||||||
connect(ui->pb_SoundMaxVolume, &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_SoundMute, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected);
|
||||||
|
connect(ui->pb_Audio, &QPushButton::released, this, &CMainKeypadAreaComponent::ps_buttonSelected);
|
||||||
|
|
||||||
// command line
|
// command line
|
||||||
this->connect(ui->lep_CommandLineInput, &QLineEdit::returnPressed, this, &CMainKeypadAreaComponent::ps_commandEntered);
|
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())
|
else if (senderButton == ui->pb_SoundMute && sGui->getIContextAudio())
|
||||||
{
|
{
|
||||||
bool mute = sGui->getIContextAudio()->isMuted();
|
const bool mute = sGui->getIContextAudio()->isMuted();
|
||||||
sGui->getIContextAudio()->setMute(!mute);
|
sGui->getIContextAudio()->setMute(!mute);
|
||||||
}
|
}
|
||||||
else if (senderButton == ui->pb_Connect)
|
else if (senderButton == ui->pb_Connect)
|
||||||
{
|
{
|
||||||
emit connectPressed();
|
emit connectPressed();
|
||||||
}
|
}
|
||||||
|
else if (senderButton == ui->pb_Audio)
|
||||||
|
{
|
||||||
|
emit audioPressed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainKeypadAreaComponent::ps_connectionStatusChanged(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to)
|
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 BlackMisc { namespace Simulation { class CSimulatedAircraft; } }
|
||||||
namespace Ui { class CMainKeypadAreaComponent; }
|
namespace Ui { class CMainKeypadAreaComponent; }
|
||||||
|
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
namespace Components
|
namespace Components
|
||||||
@@ -67,6 +66,9 @@ namespace BlackGui
|
|||||||
//! Ident pressed
|
//! Ident pressed
|
||||||
void identPressed();
|
void identPressed();
|
||||||
|
|
||||||
|
//! Request audio
|
||||||
|
void audioPressed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
//! Main info area changed
|
//! Main info area changed
|
||||||
void onMainInfoAreaChanged(int currentTabIndex, QList<int> dockedIndexes, QList<int> floatingIndexes);
|
void onMainInfoAreaChanged(int currentTabIndex, QList<int> dockedIndexes, QList<int> floatingIndexes);
|
||||||
|
|||||||
@@ -117,12 +117,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="4">
|
<item row="2" column="4">
|
||||||
<widget class="QPushButton" name="pb_Empty_3">
|
<widget class="QPushButton" name="pb_Audio">
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>Audio</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user