mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Extend GFS data and CGridPoint with surface pressure and temperature
This commit is contained in:
@@ -30,13 +30,15 @@ namespace BlackMisc
|
||||
const CCloudLayerList &cloudLayers,
|
||||
const CTemperatureLayerList &temperatureLayers,
|
||||
const CVisibilityLayerList &visibilityLayers,
|
||||
const CWindLayerList &windLayers) :
|
||||
const CWindLayerList &windLayers,
|
||||
const CPressure &surfacePressure) :
|
||||
m_identifier(identifier),
|
||||
m_position(position),
|
||||
m_cloudLayers(cloudLayers),
|
||||
m_temperatureLayers(temperatureLayers),
|
||||
m_visibilityLayers(visibilityLayers),
|
||||
m_windLayers(windLayers)
|
||||
m_windLayers(windLayers),
|
||||
m_surfacePressure(surfacePressure)
|
||||
{ }
|
||||
|
||||
void CGridPoint::copyWeatherDataFrom(const CGridPoint &other)
|
||||
@@ -45,6 +47,7 @@ namespace BlackMisc
|
||||
setTemperatureLayers(other.getTemperatureLayers());
|
||||
setVisibilityLayers(other.getVisibilityLayers());
|
||||
setWindLayers(other.getWindLayers());
|
||||
setSurfacePressure(other.getSurfacePressure());
|
||||
}
|
||||
|
||||
CVariant CGridPoint::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||
@@ -63,6 +66,8 @@ namespace BlackMisc
|
||||
return CVariant::fromValue(m_temperatureLayers);
|
||||
case IndexWindLayers:
|
||||
return CVariant::fromValue(m_windLayers);
|
||||
case IndexSurfacePressure:
|
||||
return CVariant::fromValue(m_surfacePressure);
|
||||
default:
|
||||
return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
@@ -80,7 +85,6 @@ namespace BlackMisc
|
||||
case IndexPosition:
|
||||
setPosition(variant.value<CCoordinateGeodetic>());
|
||||
break;
|
||||
break;
|
||||
case IndexCloudLayers:
|
||||
setCloudLayers(variant.value<CCloudLayerList>());
|
||||
break;
|
||||
@@ -90,6 +94,9 @@ namespace BlackMisc
|
||||
case IndexWindLayers:
|
||||
setWindLayers(variant.value<CWindLayerList>());
|
||||
break;
|
||||
case IndexSurfacePressure:
|
||||
setSurfacePressure(variant.value<CPressure>());
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(variant, index);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user