mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
CAngleUnit::sexagesimalDeg(), moved conversion to virtual method in CMeasurmenetUnit, made string conversion virtual and also moved it to CMeasurmenetUnit (=>individual formatters). Time unit added.
This commit is contained in:
43
src/blackmisc/pqtime.h
Normal file
43
src/blackmisc/pqtime.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef PQTIME_H
|
||||
#define PQTIME_H
|
||||
|
||||
#include "pqphysicalquantity.h"
|
||||
|
||||
namespace BlackMisc {
|
||||
|
||||
/*!
|
||||
* Time class, e.g. "ms", "hour", "s", "day"
|
||||
* \author KWB
|
||||
*/
|
||||
class CTime : public CPhysicalQuantity<CTimeUnit, CTime>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
CTime() : CPhysicalQuantity(0, CTimeUnit::s(), CTimeUnit::s()) {}
|
||||
/**
|
||||
*\brief Copy constructor
|
||||
*/
|
||||
CTime(const CPhysicalQuantity &time): CPhysicalQuantity(time) {}
|
||||
/*!
|
||||
* \brief Init by int value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
CTime(qint32 value, const CTimeUnit &unit) : CPhysicalQuantity(value, unit, CTimeUnit::s()) {}
|
||||
/*!
|
||||
*\brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
CTime(double value, const CTimeUnit &unit) : CPhysicalQuantity(value, unit, CTimeUnit::s()) {}
|
||||
/*!
|
||||
* \brief Destructor
|
||||
*/
|
||||
virtual ~CTime() {}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
#endif // PQTIME_H
|
||||
Reference in New Issue
Block a user