mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Formatting, comments / doxygen
This commit is contained in:
@@ -12,41 +12,21 @@ namespace BlackMisc
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Acceleration
|
||||
*/
|
||||
//! Acceleration
|
||||
class CAcceleration : public CPhysicalQuantity<CAccelerationUnit, CAcceleration>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CAcceleration() : CPhysicalQuantity(0, CAccelerationUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CAcceleration(double value, const CAccelerationUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \brief Copy constructor by base type
|
||||
* \param base
|
||||
*/
|
||||
CAcceleration(const CPhysicalQuantity &base) : CPhysicalQuantity(base) {}
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
//! copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Virtual destructor
|
||||
*/
|
||||
//! Virtual destructor
|
||||
virtual ~CAcceleration() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -19,16 +19,10 @@ namespace BlackMisc
|
||||
class CAngle : public CPhysicalQuantity<CAngleUnit, CAngle>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CAngle() : CPhysicalQuantity(0, CAngleUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CAngle(double value, const CAngleUnit &unit): CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
@@ -54,9 +48,7 @@ namespace BlackMisc
|
||||
degrees + minutes / 100.0,
|
||||
CAngleUnit::sexagesimalDegMin()) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
|
||||
@@ -17,21 +17,14 @@ namespace BlackMisc
|
||||
class CFrequency : public CPhysicalQuantity<CFrequencyUnit, CFrequency>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CFrequency() : CPhysicalQuantity(0, CFrequencyUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CFrequency(double value, const CFrequencyUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
|
||||
@@ -12,35 +12,23 @@ namespace BlackMisc
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Physical unit length (length)
|
||||
*/
|
||||
//! Physical unit length (length)
|
||||
class CLength : public CPhysicalQuantity<CLengthUnit, CLength>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CLength() : CPhysicalQuantity(0, CLengthUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CLength(double value, const CLengthUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Virtual destructor
|
||||
*/
|
||||
//! Virtual destructor
|
||||
virtual ~CLength() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -18,29 +18,19 @@ namespace BlackMisc
|
||||
class CMass : public CPhysicalQuantity<CMassUnit, CMass>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CMass() : CPhysicalQuantity(0, CMassUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CMass(double value, const CMassUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Virtual destructor
|
||||
*/
|
||||
//! Virtual destructor
|
||||
virtual ~CMass() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -15,34 +15,22 @@ namespace BlackMisc
|
||||
|
||||
/*!
|
||||
* \brief Physical unit distance
|
||||
* \author KWB
|
||||
*/
|
||||
class CPressure : public CPhysicalQuantity<CPressureUnit, CPressure>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CPressure() : CPhysicalQuantity(0, CPressureUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
*\brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CPressure(double value, const CPressureUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Virtual destructor
|
||||
*/
|
||||
//! Virtual destructor
|
||||
virtual ~CPressure() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -19,29 +19,20 @@ namespace BlackMisc
|
||||
{
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CSpeed() : CPhysicalQuantity(0, CSpeedUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
*\brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CSpeed(double value, const CSpeedUnit &unit) : CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
//! Destructor
|
||||
virtual ~CSpeed() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ namespace BlackMisc
|
||||
*/
|
||||
class CPqString : public BlackMisc::CValueObject
|
||||
{
|
||||
public:
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CPqString)
|
||||
QString m_string;
|
||||
|
||||
@@ -14,34 +14,21 @@ namespace BlackMisc
|
||||
|
||||
/*!
|
||||
* \brief Physical unit temperature
|
||||
* \author KWB
|
||||
*/
|
||||
class CTemperature : public CPhysicalQuantity<CTemperatureUnit, CTemperature>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CTemperature() : CPhysicalQuantity(0, CTemperatureUnit::defaultUnit()) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CTemperature(double value, const CTemperatureUnit &unit): CPhysicalQuantity(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! Destructor
|
||||
virtual ~CTemperature() {}
|
||||
};
|
||||
|
||||
@@ -50,4 +37,4 @@ namespace BlackMisc
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CTemperature)
|
||||
|
||||
#endif // BLACKMISC_CTEMPERATURE_H
|
||||
#endif // guard
|
||||
|
||||
@@ -28,8 +28,8 @@ namespace BlackMisc
|
||||
//! By Qt time
|
||||
CTime(const QTime &time);
|
||||
|
||||
//! By string hh:mm or hh:mm:ss
|
||||
CTime(const QString &time);
|
||||
//! \copydoc CPhysicalQuantity(const QString &unitString)
|
||||
CTime(const QString &unitString) : CPhysicalQuantity(unitString) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
@@ -37,8 +37,8 @@ namespace BlackMisc
|
||||
//! Destructor
|
||||
virtual ~CTime() {}
|
||||
|
||||
//! From string hh:mm, or hh:mm:ss
|
||||
void parseFromString(const QString &time);
|
||||
//! From string hh:mm, or hh:mm:ss, or time units such as s, min
|
||||
virtual void parseFromString(const QString &time) override;
|
||||
|
||||
//! To Qt time
|
||||
QTime toQTime() const;
|
||||
@@ -50,4 +50,4 @@ namespace BlackMisc
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CTime)
|
||||
|
||||
#endif // BLACKMISC_PQTIME_H
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user