00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KABC_GEO_H
00022 #define KABC_GEO_H
00023
00024 #include "kabc_export.h"
00025 #include <QtCore/QSharedDataPointer>
00026 #include <QtCore/QString>
00027
00028 namespace KABC {
00029
00035 class KABC_EXPORT Geo
00036 {
00037 friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Geo & );
00038 friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Geo & );
00039
00040 public:
00044 Geo();
00045
00052 Geo( float latitude, float longitude );
00053
00057 Geo( const Geo &other );
00058
00062 ~Geo();
00063
00069 void setLatitude( float latitude );
00070
00074 float latitude() const;
00075
00081 void setLongitude( float longitude );
00082
00086 float longitude() const;
00087
00091 bool isValid() const;
00092
00098 bool operator==( const Geo & ) const;
00099
00103 bool operator!=( const Geo & ) const;
00104
00110 Geo &operator=( const Geo &other );
00111
00115 QString toString() const;
00116
00117 private:
00118 class Private;
00119 QSharedDataPointer<Private> d;
00120 };
00121
00125 KABC_EXPORT QDataStream &operator<<( QDataStream &stream, const Geo &object );
00126
00130 KABC_EXPORT QDataStream &operator>>( QDataStream &stream, Geo &object );
00131
00132 }
00133
00134 #endif