File indexing completed on 2024-04-28 03:50:13

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2010 Wes Hardaker <hardaker@users.sourceforge.net>
0004 //
0005 
0006 #ifndef GEOAPRSCOORDINATES_H
0007 #define GEOAPRSCOORDINATES_H
0008 
0009 #include <QElapsedTimer>
0010 #include "GeoDataCoordinates.h"
0011 
0012 namespace Marble
0013 {
0014     class GeoAprsCoordinates : public GeoDataCoordinates
0015     {
0016       public:
0017         // must match AprsObject's SeenFrom
0018         enum SeenFrom {
0019             FromNowhere = 0x00,
0020             FromTTY = 0x01,
0021             FromTCPIP = 0x02,
0022             FromFile = 0x04,
0023             Directly = 0x08
0024         };
0025 
0026         GeoAprsCoordinates( qreal lon, qreal lat, int where );
0027         ~GeoAprsCoordinates() override;
0028 
0029         void  addSeenFrom( int where );
0030         int   seenFrom() const;
0031         void  resetTimestamp();
0032         const QElapsedTimer &timestamp() const;
0033 
0034       private:
0035         int   m_seenFrom;
0036         QElapsedTimer m_timestamp;
0037     };
0038 }
0039 
0040 #endif /* GEOAPRSCOORDINATES_H */