mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
* updateFromVatsimDataFileStation * updateFromVatsimDataFileAircraft * Changed to 1 line comments //! where applicable
69 lines
2.1 KiB
C++
69 lines
2.1 KiB
C++
/* Copyright (C) 2013 VATSIM Community / authors
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* 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/. */
|
|
|
|
/*!
|
|
\file
|
|
*/
|
|
|
|
#ifndef BLACKMISC_AIRCRAFTLIST_H
|
|
#define BLACKMISC_AIRCRAFTLIST_H
|
|
|
|
#include "avaircraft.h"
|
|
#include "collection.h"
|
|
#include "sequence.h"
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QList>
|
|
|
|
namespace BlackMisc
|
|
{
|
|
namespace Aviation
|
|
{
|
|
/*!
|
|
* Value object encapsulating a list of aircrafts.
|
|
*/
|
|
class CAircraftList : public CSequence<CAircraft>
|
|
{
|
|
public:
|
|
//! \brief Default constructor.
|
|
CAircraftList();
|
|
|
|
//! \brief Construct from a base class object.
|
|
CAircraftList(const CSequence<CAircraft> &other);
|
|
|
|
//! \copydoc CValueObject::toQVariant
|
|
virtual QVariant toQVariant() const
|
|
{
|
|
return QVariant::fromValue(*this);
|
|
}
|
|
|
|
//! \brief Find 0..n stations by callsign
|
|
CAircraftList findByCallsign(const CCallsign &callsign) const;
|
|
|
|
/*!
|
|
* \brief Find 0..n stations within range of given coordinate
|
|
* \param coordinate other position
|
|
* \param range within range of other position
|
|
* \return
|
|
*/
|
|
CAircraftList findWithinRange(const BlackMisc::Geo::ICoordinateGeodetic &coordinate, const BlackMisc::PhysicalQuantities::CLength &range) const;
|
|
|
|
//! \brief Register metadata
|
|
static void registerMetadata();
|
|
|
|
//! \brief Update aircraft with data from VATSIM data file
|
|
//! \remarks The list used needs to contain the VATSIM data file objects
|
|
int updateFromVatsimDataFileAircraft(CAircraft &aircraftToBeUpdated) const;
|
|
};
|
|
|
|
} //namespace
|
|
} // namespace
|
|
|
|
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftList)
|
|
Q_DECLARE_METATYPE(BlackMisc::CCollection<BlackMisc::Aviation::CAircraft>)
|
|
Q_DECLARE_METATYPE(BlackMisc::CSequence<BlackMisc::Aviation::CAircraft>)
|
|
|
|
#endif //guard
|