mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
refs #291, airports in range:
* added descriptive name for airport * airport list model
This commit is contained in:
@@ -152,6 +152,8 @@ namespace BlackMisc
|
||||
return this->m_icao.toQVariant();
|
||||
case IndexIcaoAsString:
|
||||
return QVariant(this->m_icao.asString());
|
||||
case IndexDescriptiveName:
|
||||
return QVariant(this->m_descriptiveName);
|
||||
case IndexPosition:
|
||||
return this->getPosition().toQVariant();
|
||||
case IndexDistanceToPlane:
|
||||
@@ -178,6 +180,9 @@ namespace BlackMisc
|
||||
case IndexIcaoAsString:
|
||||
this->setIcao(CAirportIcao(variant.toString()));
|
||||
break;
|
||||
case IndexDescriptiveName:
|
||||
this->setDescriptiveName(variant.toString());
|
||||
break;
|
||||
case IndexPosition:
|
||||
this->setPosition(variant.value<CCoordinateGeodetic>());
|
||||
break;
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace BlackMisc
|
||||
{
|
||||
IndexIcao = 0,
|
||||
IndexIcaoAsString,
|
||||
IndexDescriptiveName,
|
||||
IndexPosition,
|
||||
IndexDistanceToPlane
|
||||
};
|
||||
@@ -52,11 +53,17 @@ namespace BlackMisc
|
||||
//! Get ICAO code.
|
||||
const CAirportIcao &getIcao() const { return m_icao; }
|
||||
|
||||
//! Get ICAO code as string.
|
||||
QString getIcaoAsString() const { return m_icao.asString(); }
|
||||
|
||||
//! Set ICAO code.
|
||||
void setIcao(const CAirportIcao &icao) { m_icao = icao; }
|
||||
|
||||
//! Get ICAO code as string.
|
||||
QString getIcaoAsString() const { return m_icao.asString(); }
|
||||
//! Get descriptive name
|
||||
QString getDescriptiveName() const { return m_descriptiveName; }
|
||||
|
||||
//! Set descriptive name
|
||||
void setDescriptiveName(const QString &name) { this->m_descriptiveName = name; }
|
||||
|
||||
//! Get the position
|
||||
const BlackMisc::Geo::CCoordinateGeodetic &getPosition() const { return m_position; }
|
||||
@@ -138,8 +145,9 @@ namespace BlackMisc
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CAirport)
|
||||
CAirportIcao m_icao;
|
||||
QString m_descriptiveName;
|
||||
BlackMisc::Geo::CCoordinateGeodetic m_position;
|
||||
BlackMisc::PhysicalQuantities::CLength m_distanceToPlane;
|
||||
BlackMisc::PhysicalQuantities::CLength m_distanceToPlane; // make mutable ?
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user