21 #include <VCardGeoValue.h>
23 #include <VCardValue.h>
27 using namespace VCARD;
34 GeoValue::GeoValue(
const GeoValue & x)
35 : Value(x), latitude_(x.latitude_), longitude_(x.longitude_)
39 GeoValue::GeoValue(
const TQCString & s)
45 GeoValue::operator = (GeoValue & x)
47 if (*
this == x)
return *
this;
49 latitude_ = x.latitude_;
50 longitude_ = x.longitude_;
52 Value::operator = (x);
57 GeoValue::operator = (
const TQCString & s)
59 Value::operator = (s);
64 GeoValue::operator == (GeoValue & x)
68 if ( latitude_ != x.latitude_ )
return false;
69 if ( longitude_ != x.longitude_ )
return false;
81 return new GeoValue( *
this );
87 int semiColon = strRep_.find(
";" );
89 if ( semiColon == -1 )
92 latitude_ = strRep_.left( semiColon ).toFloat();
93 longitude_ = strRep_.mid( semiColon + 1, strRep_.length() - semiColon ).toFloat();
99 strRep_.sprintf(
"%.6f;%.6f", latitude_, longitude_ );