mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #345 Third and final wave of value classes using the CValueObjectStdTuple CRTP class template, with policy classes.
This commit is contained in:
@@ -17,15 +17,6 @@ namespace BlackMisc
|
||||
namespace Geo
|
||||
{
|
||||
|
||||
/*
|
||||
* Register metadata
|
||||
*/
|
||||
template <class LATorLON> void CEarthAngle<LATorLON>::registerMetadata()
|
||||
{
|
||||
qRegisterMetaType<LATorLON>();
|
||||
qDBusRegisterMetaType<LATorLON>();
|
||||
}
|
||||
|
||||
/*
|
||||
* Latitude or Longitude from a WGS string
|
||||
*/
|
||||
@@ -73,37 +64,10 @@ namespace BlackMisc
|
||||
if (wgs.contains('S', Qt::CaseInsensitive) ||
|
||||
wgs.contains('W', Qt::CaseInsensitive)) deg *= -1;
|
||||
|
||||
CAngle a(deg, min, sec);
|
||||
PhysicalQuantities::CAngle a(deg, min, sec);
|
||||
return LATorLON(a);
|
||||
}
|
||||
|
||||
/*
|
||||
* metaTypeId
|
||||
*/
|
||||
template <class LATorLON> int CEarthAngle<LATorLON>::getMetaTypeId() const
|
||||
{
|
||||
return qMetaTypeId<LATorLON>();
|
||||
}
|
||||
|
||||
/*
|
||||
* is a
|
||||
*/
|
||||
template <class LATorLON> bool CEarthAngle<LATorLON>::isA(int metaTypeId) const
|
||||
{
|
||||
if (metaTypeId == qMetaTypeId<LATorLON>()) { return true; }
|
||||
|
||||
return this->CAngle::isA(metaTypeId);
|
||||
}
|
||||
|
||||
/*
|
||||
* Compare
|
||||
*/
|
||||
template <class LATorLON> int CEarthAngle<LATorLON>::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const CAngle &>(otherBase);
|
||||
return CAngle::compareImpl(other);
|
||||
}
|
||||
|
||||
/*
|
||||
* Icon
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user