Ref T259, Ref T243 added ctor for nullptr init (like other PQs)

This commit is contained in:
Klaus Basan
2018-03-21 01:31:55 +01:00
parent 0c06ac26f7
commit 582347b557

View File

@@ -31,9 +31,8 @@ namespace BlackMisc
{
namespace Aviation
{
/*!
* \brief Heading as used in aviation, can be true or magnetic heading
* Heading as used in aviation, can be true or magnetic heading
* \remarks Intentionally allowing +/- CAngle , and >= / <= CAngle.
*/
class BLACKMISC_EXPORT CHeading :
@@ -67,22 +66,25 @@ namespace BlackMisc
//! \copydoc BlackMisc::Mixin::String::toQString
QString convertToQString(bool i18n = false) const;
//! \brief Default constructor: 0 heading true
CHeading() : CAngle(0, BlackMisc::PhysicalQuantities::CAngleUnit::rad()), m_north(Magnetic) {}
//! Default constructor: 0
CHeading() : CAngle(0, PhysicalQuantities::CAngleUnit::rad()), m_north(True) {}
//! \brief Constructor
CHeading(double value, ReferenceNorth north, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit), m_north(north) {}
//! Constructor
CHeading(double value, const PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit), m_north(True) {}
//! \brief Constructor by CAngle
//! Constructor
CHeading(double value, ReferenceNorth north, const PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit), m_north(north) {}
//! Constructor by CAngle
CHeading(const CAngle &heading, ReferenceNorth north) : CAngle(heading), m_north(north) {}
//! \brief Magnetic heading?
//! Magnetic heading?
bool isMagneticHeading() const { return Magnetic == this->m_north; }
//! \brief True heading?
//! True heading?
bool isTrueHeading() const { return True == this->m_north; }
//! \brief Get reference north (magnetic or true)
//! Get reference north (magnetic or true)
ReferenceNorth getReferenceNorth() const { return m_north; }
private:
@@ -93,8 +95,8 @@ namespace BlackMisc
BLACK_METAMEMBER(north)
);
};
}
}
} // ns
} // ns
Q_DECLARE_METATYPE(BlackMisc::Aviation::CHeading)