mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #77, handling commands (aka dot commands)
* network, aircraft context consume command line commands * hooked up with keypad area
This commit is contained in:
committed by
Roland Winklmeier
parent
fe2fa65d36
commit
cd69eebe8c
@@ -58,7 +58,9 @@ namespace BlackGui
|
||||
Q_ASSERT(this->getIContextOwnAircraft());
|
||||
Q_ASSERT(this->getIContextNetwork());
|
||||
connect(this->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CMainKeypadAreaComponent::ps_connectionStatusChanged);
|
||||
connect(this, &CMainKeypadAreaComponent::commandEntered, this->getIContextNetwork(), &IContextNetwork::parseCommandLine);
|
||||
connect(this->getIContextOwnAircraft(), &IContextOwnAircraft::changedAircraftCockpit, this, &CMainKeypadAreaComponent::ps_ownAircraftCockpitChanged);
|
||||
connect(this, &CMainKeypadAreaComponent::commandEntered, this->getIContextOwnAircraft(), &IContextOwnAircraft::parseCommandLine);
|
||||
}
|
||||
|
||||
void CMainKeypadAreaComponent::ps_buttonPressed()
|
||||
@@ -97,11 +99,6 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CMainKeypadAreaComponent::ps_buttonDoubleClicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CMainKeypadAreaComponent::ps_connectionStatusChanged(uint from, uint to, const QString &message)
|
||||
{
|
||||
INetwork::ConnectionStatus statusFrom = static_cast<INetwork::ConnectionStatus>(from);
|
||||
@@ -128,6 +125,7 @@ namespace BlackGui
|
||||
QString c = this->ui->le_CommandLineInput->text().trimmed();
|
||||
if (c.isEmpty()) return;
|
||||
emit this->commandEntered(c);
|
||||
this->ui->le_CommandLineInput->clear();
|
||||
}
|
||||
|
||||
void CMainKeypadAreaComponent::ps_ownAircraftCockpitChanged(const CAircraft &aircraft, const QString &originator)
|
||||
|
||||
Reference in New Issue
Block a user