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