style changes and removals of typeid

refs #81
This commit is contained in:
Klaus Basan
2013-12-22 20:28:56 +00:00
committed by Mathew Sutcliffe
parent 229d7c6068
commit 978f3c88e5
73 changed files with 7356 additions and 7130 deletions

View File

@@ -7,46 +7,66 @@
namespace BlackMisc
{
namespace Geo
{
namespace Geo
{
/*
* String for converter
*/
QString CCoordinateGeodetic::convertToQString(bool i18n) const
{
QString s = "Geodetic: {%1, %2, %3}";
return s.arg(this->m_latitude.valueRoundedWithUnit(6, i18n)).arg(this->m_longitude.valueRoundedWithUnit(6, i18n)).arg(this->m_height.valueRoundedWithUnit(i18n));
}
/*
* String for converter
*/
QString CCoordinateGeodetic::convertToQString(bool i18n) const
{
QString s = "Geodetic: {%1, %2, %3}";
return s.arg(this->m_latitude.valueRoundedWithUnit(6, i18n)).arg(this->m_longitude.valueRoundedWithUnit(6, i18n)).arg(this->m_height.valueRoundedWithUnit(i18n));
}
/*
* Marshall to Dbus
*/
void CCoordinateGeodetic::marshallToDbus(QDBusArgument &argument) const
{
argument << this->m_latitude;
argument << this->m_longitude;
argument << this->m_height;
}
/*
* Marshall to Dbus
*/
void CCoordinateGeodetic::marshallToDbus(QDBusArgument &argument) const
{
argument << this->m_latitude;
argument << this->m_longitude;
argument << this->m_height;
}
/*
* Unmarshall from Dbus
*/
void CCoordinateGeodetic::unmarshallFromDbus(const QDBusArgument &argument)
{
argument >> this->m_latitude;
argument >> this->m_longitude;
argument >> this->m_height;
}
/*
* Unmarshall from Dbus
*/
void CCoordinateGeodetic::unmarshallFromDbus(const QDBusArgument &argument)
{
argument >> this->m_latitude;
argument >> this->m_longitude;
argument >> this->m_height;
}
/*
* Register metadata
*/
void CCoordinateGeodetic::registerMetadata()
{
qRegisterMetaType<CCoordinateGeodetic>(typeid(CCoordinateGeodetic).name());
qDBusRegisterMetaType<CCoordinateGeodetic>();
}
/*
* Same coordinate
*/
bool CCoordinateGeodetic::operator ==(const CCoordinateGeodetic &other) const
{
if (this == &other) return true;
return this->m_height == other.m_height &&
this->m_latitude == other.m_latitude &&
this->m_longitude == other.m_longitude;
}
} // namespace
/*
* Unequal?
*/
bool CCoordinateGeodetic::operator !=(const CCoordinateGeodetic &other) const
{
return !((*this) == other);
}
/*
* Register metadata
*/
void CCoordinateGeodetic::registerMetadata()
{
qRegisterMetaType<CCoordinateGeodetic>();
qDBusRegisterMetaType<CCoordinateGeodetic>();
}
} // namespace
} // namespace