[Kstars-devel] branches/kstars/summer/kstars/kstars/comast
Prakash Mohan
prak902000 at gmail.com
Wed Jul 22 07:25:44 CEST 2009
SVN commit 1000813 by prakash:
Adding support in the site class to set a site directly from a GeoLocation
CCMAIL:kstars-devel at kde.org
M +6 -0 site.cpp
M +4 -0 site.h
--- branches/kstars/summer/kstars/kstars/comast/site.cpp #1000812:1000813
@@ -25,3 +25,9 @@
m_LatUnit = _latUnit;
m_LonUnit = _lonUnit;
}
+void Comast::Site::setSite( GeoLocation *geo ) {
+ m_Name = geo->name();
+ m_Lat = geo->lat()->radians();
+ m_Lon = geo->lng()->radians();
+ m_LatUnit = m_LonUnit = "rad";
+}
--- branches/kstars/summer/kstars/kstars/comast/site.h #1000812:1000813
@@ -22,15 +22,19 @@
#include <QString>
+#include "geolocation.h"
+
class Comast::Site {
public:
Site( QString name, double lat, QString latUnit, double lon, QString lonUnit ) { setSite( name, lat, latUnit, lon, lonUnit ); }
+ Site( GeoLocation *geo ) { setSite( geo ); }
QString name() { return m_Name; }
double latitude() { return m_Lat; }
QString latUnit() { return m_LatUnit; }
double longitude() { return m_Lon; }
QString lonUnit() { return m_LonUnit; }
void setSite( QString _name, double _lat, QString _latUnit, double _lon, QString _lonUnit);
+ void setSite( GeoLocation *geo );
private:
QString m_Name, m_LatUnit, m_LonUnit;
double m_Lat, m_Lon;
More information about the Kstars-devel
mailing list