[Kstars-devel] branches/kstars/summer/kstars/kstars/comast

Prakash Mohan prak902000 at gmail.com
Tue Jul 21 09:48:52 CEST 2009


SVN commit 1000300 by prakash:

Adding the Lens and Filter elements to the Observation class for the Logs.

CCMAIL: kstars-devel at kde.org


 M  +12 -2     log.cpp  
 M  +3 -1      observation.cpp  
 M  +7 -3      observation.h  


--- branches/kstars/summer/kstars/kstars/comast/log.cpp #1000299:1000300
@@ -326,6 +326,12 @@
     writer->writeStartElement( "eyepiece" );
     writer->writeCharacters( o->eyepiece() );
     writer->writeEndElement();
+    writer->writeStartElement( "lens" );
+    writer->writeCharacters( o->lens() );
+    writer->writeEndElement();
+    writer->writeStartElement( "filter" );
+    writer->writeCharacters( o->filter() );
+    writer->writeEndElement();
     writer->writeStartElement( "result" );
     writer->writeAttribute( "xsi:type", "oal:findingsType" );
     writer->writeAttribute( "lang", o->lang() );
@@ -775,7 +781,7 @@
 }
 
 void Comast::Log::readObservation( QString id ) {
-    QString observer, site, session, target, faintestStar, seeing, scope, eyepiece, result, lang;
+    QString observer, site, session, target, faintestStar, seeing, scope, eyepiece, lens, filter, result, lang;
     KStarsDateTime begin;
     while( ! reader->atEnd() ) {
         reader->readNext();
@@ -800,6 +806,10 @@
                 scope = reader->readElementText();
             else if( reader->name() == "eyepiece" )
                 eyepiece = reader->readElementText();
+            else if( reader->name() == "lens" )
+                lens = reader->readElementText();
+            else if( reader->name() == "filter" )
+                filter = reader->readElementText();
             else if( reader->name() == "result" ) {
                 lang = reader->attributes().value( "lang" ).toString();
                 result = readResult();
@@ -807,7 +817,7 @@
                 readUnknownElement();
         }
     }
-        Comast::Observation *o = new Comast::Observation( id, observer, site, session, target, begin, faintestStar.toDouble(), seeing.toDouble(), scope, eyepiece, result, lang );
+        Comast::Observation *o = new Comast::Observation( id, observer, site, session, target, begin, faintestStar.toDouble(), seeing.toDouble(), scope, eyepiece, lens, filter, result, lang );
         m_observationList.append( o );
 }
 
--- branches/kstars/summer/kstars/kstars/comast/observation.cpp #1000299:1000300
@@ -18,7 +18,7 @@
 
 #include "comast/observation.h"
 
-void Comast::Observation::setObservation( QString _id, QString _observer, QString _site, QString _session, QString _target, KStarsDateTime _begin, double _faintestStar, double _seeing, QString _scope, QString _eyepiece,  QString _result, QString _lang ) {
+void Comast::Observation::setObservation( QString _id, QString _observer, QString _site, QString _session, QString _target, KStarsDateTime _begin, double _faintestStar, double _seeing, QString _scope, QString _eyepiece, QString _lens, QString _filter, QString _result, QString _lang ) {
     m_Name = _id;
     m_Observer = _observer;
     m_Site = _site;
@@ -29,6 +29,8 @@
     m_Seeing = _seeing;
     m_Scope = _scope;
     m_Eyepiece = _eyepiece;
+    m_Lens = _lens;
+    m_Filter = _filter;
     m_Result = _result;
     m_Lang = _lang;
 }
--- branches/kstars/summer/kstars/kstars/comast/observation.h #1000299:1000300
@@ -25,8 +25,8 @@
 
 class Comast::Observation {
     public:
-        Observation( QString id, QString observer, QString site, QString session, QString target, KStarsDateTime begin, double faintestStar, double seeing, QString scope, QString eyepiece, QString result, QString lang ) {
-            setObservation( id, observer, site, session, target, begin, faintestStar, seeing, scope, eyepiece, result, lang );
+        Observation( QString id, QString observer, QString site, QString session, QString target, KStarsDateTime begin, double faintestStar, double seeing, QString scope, QString eyepiece, QString lens, QString filter,  QString result, QString lang ) {
+            setObservation( id, observer, site, session, target, begin, faintestStar, seeing, scope, eyepiece, lens, filter, result, lang );
         }
         QString id() { return m_Name; }
         QString target() { return m_Target; }
@@ -35,12 +35,14 @@
         QString session() { return m_Session; }
         QString scope() { return m_Scope; }
         QString eyepiece() { return m_Eyepiece; }
+        QString lens() { return m_Lens; }
+        QString filter() { return m_Filter; }
         QString lang() { return m_Lang; }
         QString result() { return m_Result; }
         double seeing() { return m_Seeing; }
         double faintestStar() { return m_FaintestStar; }
         KStarsDateTime begin() { return m_Begin; }
-        void setObservation( QString _id, QString _observer, QString _site, QString _session, QString _target, KStarsDateTime _begin, double _faintestStar, double _seeing, QString _scope, QString _eyepiece, QString _result, QString _lang =  "en" );
+        void setObservation( QString _id, QString _observer, QString _site, QString _session, QString _target, KStarsDateTime _begin, double _faintestStar, double _seeing, QString _scope, QString _eyepiece, QString _lens, QString _filter, QString _result, QString _lang =  "en" );
     private:
         QString m_Name; 
         QString m_Target;
@@ -50,6 +52,8 @@
         QString m_Scope;
         QString m_Result;
         QString m_Eyepiece;
+        QString m_Lens;
+        QString m_Filter;
         QString m_Lang;
         double m_Seeing;
         double m_FaintestStar;


More information about the Kstars-devel mailing list