mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #452 adjusted GUI components to
* changed classes (e.g. CAircraft -> CSimulatedAircraft) * changes signatures in contexts / providers * minor fixes as renamed GUI widgets, asserts, paint event
This commit is contained in:
committed by
Mathew Sutcliffe
parent
4a3b553296
commit
6ca0d480d3
@@ -16,6 +16,7 @@
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackGui;
|
||||
|
||||
@@ -69,16 +70,16 @@ namespace BlackGui
|
||||
this->prefillWithAircraftData(this->getIContextOwnAircraft()->getOwnAircraft());
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::prefillWithAircraftData(const BlackMisc::Aviation::CAircraft &ownAircraft)
|
||||
void CFlightPlanComponent::prefillWithAircraftData(const BlackMisc::Simulation::CSimulatedAircraft &ownAircraft)
|
||||
{
|
||||
// only override with valid values
|
||||
if (CCallsign::isValidCallsign(ownAircraft.getCallsignAsString()))
|
||||
{
|
||||
this->ui->le_Callsign->setText(ownAircraft.getCallsign().asString());
|
||||
}
|
||||
if (CAircraftIcaoCode::isValidDesignator(ownAircraft.getIcaoInfo().getAircraftDesignator()))
|
||||
if (CAircraftIcaoCode::isValidDesignator(ownAircraft.getAircraftIcaoCodeDesignator()))
|
||||
{
|
||||
this->ui->le_AircraftType->setText(ownAircraft.getIcaoInfo().getAircraftDesignator());
|
||||
this->ui->le_AircraftType->setText(ownAircraft.getAircraftIcaoCodeDesignator());
|
||||
}
|
||||
if (ownAircraft.hasValidRealName())
|
||||
{
|
||||
@@ -340,7 +341,7 @@ namespace BlackGui
|
||||
return;
|
||||
}
|
||||
|
||||
CAircraft ownAircraft = this->getIContextOwnAircraft()->getOwnAircraft();
|
||||
CSimulatedAircraft ownAircraft = this->getIContextOwnAircraft()->getOwnAircraft();
|
||||
CFlightPlan loadedPlan = this->getIContextNetwork()->loadFlightPlanFromNetwork(ownAircraft.getCallsign());
|
||||
if (loadedPlan.wasSentOrLoaded())
|
||||
{
|
||||
@@ -419,9 +420,7 @@ namespace BlackGui
|
||||
|
||||
CIdentifier CFlightPlanComponent::flightPlanIdentifier()
|
||||
{
|
||||
if (m_identifier.getName().isEmpty())
|
||||
m_identifier = CIdentifier(QStringLiteral("FLIGHTPLANCOMPONENT"));
|
||||
|
||||
if (m_identifier.getName().isEmpty()) { m_identifier = CIdentifier(QStringLiteral("FLIGHTPLANCOMPONENT")); }
|
||||
return m_identifier;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user