mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Some fixes and formatting
* CTime::switchUnit(CTimeUnit::hms()); * Coordinate canHandleIndex protected * copyright
This commit is contained in:
committed by
Mathew Sutcliffe
parent
edf8191969
commit
4fcf9efab7
@@ -95,6 +95,12 @@ namespace BlackMisc
|
||||
return Geo::calculateBearing((*this), otherCoordinate);
|
||||
}
|
||||
|
||||
bool ICoordinateGeodetic::canHandleIndex(const CPropertyIndex &index)
|
||||
{
|
||||
int i = index.frontCasted<int>();
|
||||
return (i >= static_cast<int>(IndexLatitude)) && (i <= static_cast<int>(IndexGeodeticHeightAsString));
|
||||
}
|
||||
|
||||
CVariant ICoordinateGeodetic::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||
{
|
||||
if (!index.isMyself())
|
||||
|
||||
@@ -74,12 +74,9 @@ namespace BlackMisc
|
||||
//! Initial bearing
|
||||
BlackMisc::PhysicalQuantities::CAngle bearing(const ICoordinateGeodetic &otherCoordinate) const;
|
||||
|
||||
//! Can given index be handled
|
||||
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
int i = index.frontCasted<int>();
|
||||
return (i >= static_cast<int>(IndexLatitude)) && (i <= static_cast<int>(IndexGeodeticHeightAsString));
|
||||
}
|
||||
protected:
|
||||
//! Can given index be handled?
|
||||
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index);
|
||||
};
|
||||
|
||||
//! Great circle distance between points
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace BlackMisc
|
||||
QTime CTime::toQTime() const
|
||||
{
|
||||
CTime copy(*this);
|
||||
copy.setUnit(CTimeUnit::hms());
|
||||
copy.switchUnit(CTimeUnit::hms());
|
||||
|
||||
// QTime is not defined for negative numbers
|
||||
// so we use the absolute value here
|
||||
|
||||
@@ -16,13 +16,11 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Simulation
|
||||
{
|
||||
|
||||
IModelMappingsProvider::IModelMappingsProvider(QObject *parent) : QObject(parent) {}
|
||||
|
||||
const CAircraftMappingList &IModelMappingsProvider::getMappingList() const
|
||||
{
|
||||
return this->m_mappings;
|
||||
return m_mappings;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackMisc
|
||||
const BlackMisc::Network::CAircraftMappingList &getMappingList() const;
|
||||
|
||||
protected:
|
||||
BlackMisc::Network::CAircraftMappingList m_mappings; //!< Mappings
|
||||
BlackMisc::Network::CAircraftMappingList m_mappings; //!< mappings
|
||||
};
|
||||
|
||||
//! Model mappings dummy
|
||||
|
||||
Reference in New Issue
Block a user