9using namespace swift::misc::physical_quantities;
10using namespace swift::misc::aviation;
14namespace swift::misc::weather
19 : m_level(level), m_directionMain(direction), m_speed(speed), m_gustSpeed(gustSpeed)
62 if (m_directionVariable)
63 windAsString +=
"variable ";
65 windAsString += QStringLiteral(
"%1 ").
arg(m_directionMain.toQString());
67 if (m_directionFrom !=
CAngle() && m_directionTo !=
CAngle())
69 windAsString += QStringLiteral(
"variable between %1 and %2 ")
70 .
arg(m_directionFrom.toQString(), m_directionTo.toQString());
73 windAsString += QStringLiteral(
"at %2").
arg(m_speed.toQString());
74 if (m_gustSpeed.value() > 0.5) windAsString += QStringLiteral(
" and gusts at %1").
arg(m_gustSpeed.toQString());
Non-owning reference to a CPropertyIndex with a subset of its features.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
Altitude as used in aviation, can be AGL or MSL altitude.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Physical unit angle (radians, degrees).
void setDirection(const physical_quantities::CAngle &main)
Set direction.
CWindLayer()=default
Default constructor.
void setPropertyByIndex(swift::misc::CPropertyIndexRef index, const QVariant &variant)
Set property by index.
ColumnIndex
Properties by index.
void setGustSpeed(const physical_quantities::CSpeed &gustSpeed)
Set gust speed.
QString convertToQString(bool i18n=false) const
Cast as QString.
void setDirectionVariable(bool variable=true)
Set direction to variable.
void setLevel(const swift::misc::aviation::CAltitude &level)
Set level.
QVariant propertyByIndex(swift::misc::CPropertyIndexRef index) const
Property by index.
void setSpeed(const physical_quantities::CSpeed &speed)
Set speed.
QString arg(Args &&... args) const const
QVariant fromValue(T &&value)
bool toBool() const const
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.