mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
@@ -20,8 +20,8 @@ namespace BlackMisc
|
||||
namespace Weather
|
||||
{
|
||||
|
||||
CWindLayer::CWindLayer(const CAltitude &altitude, const CAngle &direction, const CSpeed &speed, const CSpeed &gustSpeed) :
|
||||
m_altitude(altitude), m_directionMain(direction), m_speed(speed), m_gustSpeed(gustSpeed)
|
||||
CWindLayer::CWindLayer(const CAltitude &level, const CAngle &direction, const CSpeed &speed, const CSpeed &gustSpeed) :
|
||||
m_level(level), m_directionMain(direction), m_speed(speed), m_gustSpeed(gustSpeed)
|
||||
{ }
|
||||
|
||||
CVariant CWindLayer::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||
@@ -30,8 +30,8 @@ namespace BlackMisc
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexAltitude:
|
||||
return CVariant::fromValue(m_altitude);
|
||||
case IndexLevel:
|
||||
return CVariant::fromValue(m_level);
|
||||
case IndexDirection:
|
||||
return CVariant::fromValue(m_directionMain);
|
||||
case IndexDirectionVariable:
|
||||
@@ -51,8 +51,8 @@ namespace BlackMisc
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexAltitude:
|
||||
setAltitude(variant.value<CAltitude>());
|
||||
case IndexLevel:
|
||||
setLevel(variant.value<CAltitude>());
|
||||
break;
|
||||
case IndexDirection:
|
||||
setDirection(variant.value<CAngle>());
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackMisc
|
||||
//! Properties by index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexAltitude = BlackMisc::CPropertyIndex::GlobalIndexCWindLayer,
|
||||
IndexLevel = BlackMisc::CPropertyIndex::GlobalIndexCWindLayer,
|
||||
IndexDirection,
|
||||
IndexDirectionVariable,
|
||||
IndexSpeed,
|
||||
@@ -45,14 +45,14 @@ namespace BlackMisc
|
||||
CWindLayer() = default;
|
||||
|
||||
//! Constructor
|
||||
CWindLayer(const BlackMisc::Aviation::CAltitude &altitude, const PhysicalQuantities::CAngle &direction,
|
||||
CWindLayer(const BlackMisc::Aviation::CAltitude &level, const PhysicalQuantities::CAngle &direction,
|
||||
const PhysicalQuantities::CSpeed &speed, const PhysicalQuantities::CSpeed &gustSpeed);
|
||||
|
||||
//! Set altitude
|
||||
void setAltitude(const BlackMisc::Aviation::CAltitude &altitude) { m_altitude = altitude; }
|
||||
//! Set level
|
||||
void setLevel(const BlackMisc::Aviation::CAltitude &level) { m_level = level; }
|
||||
|
||||
//! Get altitude
|
||||
BlackMisc::Aviation::CAltitude getAltitude() const { return m_altitude; }
|
||||
//! Get level
|
||||
BlackMisc::Aviation::CAltitude getLevel() const { return m_level; }
|
||||
|
||||
//! Set direction
|
||||
void setDirection(const PhysicalQuantities::CAngle &main) { m_directionMain = main; }
|
||||
@@ -111,7 +111,7 @@ namespace BlackMisc
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CWindLayer)
|
||||
BlackMisc::Aviation::CAltitude m_altitude;
|
||||
BlackMisc::Aviation::CAltitude m_level;
|
||||
PhysicalQuantities::CAngle m_directionMain;
|
||||
PhysicalQuantities::CAngle m_directionFrom;
|
||||
PhysicalQuantities::CAngle m_directionTo;
|
||||
@@ -126,7 +126,7 @@ namespace BlackMisc
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Weather::CWindLayer)
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Weather::CWindLayer, (
|
||||
attr(o.m_altitude),
|
||||
attr(o.m_level),
|
||||
attr(o.m_directionMain),
|
||||
attr(o.m_directionFrom),
|
||||
attr(o.m_directionTo),
|
||||
|
||||
Reference in New Issue
Block a user