Enabled coordinate classes for DBus, added generation method for lat/lng by WGS84 strings

This commit is contained in:
Klaus Basan
2013-07-25 23:58:09 +02:00
parent 7316980a5c
commit 581638ec7f
21 changed files with 280 additions and 72 deletions

View File

@@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef BLACKMISC_GEOLATLONBASE_H
#define BLACKMISC_GEOLATLONBASE_H
#ifndef BLACKMISC_GEOEARTHANGLE_H
#define BLACKMISC_GEOEARTHANGLE_H
#include "blackmisc/pqangle.h"
namespace BlackMisc
@@ -62,6 +62,12 @@ protected:
*/
CEarthAngle(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit): CAngle(value, unit) {}
/*!
* \brief Init by double value
* \param angle
*/
CEarthAngle(const BlackMisc::PhysicalQuantities::CAngle &angle): CAngle(angle) {}
/*!
* \brief String for converter and streaming
* \return
@@ -212,14 +218,18 @@ public:
return l;
}
/*
/*!
* Register metadata
*/
static void registerMetadata()
{
qRegisterMetaType<LATorLON>(typeid(LATorLON).name());
qDBusRegisterMetaType<LATorLON>();
}
static void registerMetadata();
/*!
* \brief Latitude / Longitude from a WGS string such as
* \param wgsCoordinate 50° 2 0″ N / 8° 34 14″ E
* \return
*/
static LATorLON fromWgs84(const QString &wgsCoordinate);
};
} // namespace