21 #include <tqdatastream.h>
28 : mLatitude( 91 ), mLongitude( 181 ), mValidLat( false ), mValidLong( false )
72 return mValidLat && mValidLong;
75 bool Geo::operator==(
const Geo &g )
const
79 if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude )
return true;
83 bool Geo::operator!=(
const Geo &g )
const
87 if ( g.mLatitude == mLatitude && g.mLongitude == mLongitude )
return false;
93 return "(" + TQString::number(mLatitude) +
"," + TQString::number(mLongitude) +
")";
96 TQDataStream &TDEABC::operator<<( TQDataStream &s,
const Geo &geo )
98 return s << (float)geo.mLatitude << (
float)geo.mLongitude;
101 TQDataStream &TDEABC::operator>>( TQDataStream &s,
Geo &geo )
103 s >> geo.mLatitude >> geo.mLongitude;
105 geo.mValidLat =
true;
106 geo.mValidLong =
true;
TQString asString() const
Returns string representation of geographical position.
void setLongitude(float)
Sets the longitude.
Geo()
Construct invalid geographics position object.
bool isValid() const
Returns, if this object contains a valid geographical position.
void setLatitude(float)
Sets the latitude.
float longitude() const
Returns the longitude.
float latitude() const
Returns the latitude.
static data, shared by ALL addressee objects