File indexing completed on 2024-05-12 03:50:18

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2012 Mohammed Nafees <nafees.technocool@gmail.com>
0004 //
0005 
0006 #ifndef GEODATAVEC2_H
0007 #define GEODATAVEC2_H
0008 
0009 #include <QPointF>
0010 #include "geodata_export.h"
0011 
0012 class QString;
0013 
0014 namespace Marble {
0015 
0016 class GeoDataVec2Private;
0017 
0018 class GEODATA_EXPORT GeoDataVec2 : public QPointF
0019 {
0020 public:
0021     enum Unit {Fraction, Pixels, InsetPixels};
0022 
0023     GeoDataVec2();
0024 
0025     GeoDataVec2(qreal x, qreal y, const QString &xunit, const QString &yunit);
0026 
0027     GeoDataVec2( const GeoDataVec2 &other );
0028 
0029     GeoDataVec2& operator=( const GeoDataVec2 &other );
0030     bool operator==( const GeoDataVec2 &other ) const;
0031     bool operator!=( const GeoDataVec2 &other ) const;
0032     ~GeoDataVec2();
0033 
0034     Unit xunit() const;
0035     void setXunits( Unit xunit );
0036 
0037     Unit yunit() const;
0038     void setYunits( Unit yunit );
0039 
0040 private:
0041     GeoDataVec2Private* const d;
0042 };
0043 
0044 }
0045 
0046 #endif