[Kstars-devel] branches/kstars/summer/kstars/kstars
Prakash Mohan
prak902000 at gmail.com
Tue Jul 14 21:16:18 CEST 2009
SVN commit 996727 by prakash:
Adding support for reading and writing Observation Notes in OAL compliant XML logs.
CCMAIL: kstars-devel at kde.org
M +6 -0 comast/log.cpp
M +1 -0 skyobjects/auxinfo.h
M +4 -0 skyobjects/skyobject.h
--- branches/kstars/summer/kstars/kstars/comast/log.cpp #996726:996727
@@ -179,7 +179,10 @@
writer->writeStartElement( "constellation" );
writer->writeCDATA( ConstellationBoundary::Instance()->constellationName( o ) );
writer->writeEndElement();
+ writer->writeStartElement( "notes" );
+ writer->writeCDATA( o->notes() );
writer->writeEndElement();
+ writer->writeEndElement();
}
void Comast::Log::writeObserver( Comast::Observer *o ) {
@@ -431,6 +434,9 @@
} else if( reader->name() == "time" ) {
if( o )
ks->observingList()->setTime( o, QTime::fromString( reader->readElementText(), "h:mm:ss AP" ) );
+ } else if( reader->name() == "notes" ) {
+ if( o )
+ o->setNotes( reader->readElementText() );
}
// else if( reader->name() == "datasource" )
// kDebug() << reader->readElementText();
--- branches/kstars/summer/kstars/kstars/skyobjects/auxinfo.h #996726:996727
@@ -39,6 +39,7 @@
QStringList InfoList;
QStringList InfoTitle;
QString userLog;
+ QString notes;
};
#endif
--- branches/kstars/summer/kstars/kstars/skyobjects/skyobject.h #996726:996727
@@ -351,6 +351,10 @@
*/
inline QString &userLog() { return getAuxInfo()->userLog; }
+ inline QString ¬es() { return getAuxInfo()->notes; }
+
+ void setNotes( QString _notes) { getAuxInfo()->notes = _notes; }
+
private:
/**
More information about the Kstars-devel
mailing list