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

Prakash Mohan prak902000 at gmail.com
Mon Jul 20 02:09:27 CEST 2009


SVN commit 999508 by prakash:

Adding a feature to save the list of equipments with the user. Right now the dialog can be accessed using ctrl+0.

CCMAIL:kstars-devel at kde.org


 M  +2 -1      CMakeLists.txt  
 A             comast/equipmentwriter.cpp   [License: GPL (v2+)]
 A             comast/equipmentwriter.h   [License: GPL (v2+)]
 A             comast/equipmentwriter.ui  
 M  +1 -0      comast/log.cpp  
 M  +10 -1     comast/log.h  
 M  +3 -0      ksalmanac.h  
 M  +5 -0      kstars.h  
 M  +3 -0      kstarsactions.cpp  
 M  +2 -0      kstarsdata.cpp  
 M  +6 -1      kstarsdata.h  
 M  +9 -0      kstarsinit.cpp  


--- branches/kstars/summer/kstars/kstars/CMakeLists.txt #999507:999508
@@ -320,6 +320,7 @@
     comast/filter.cpp
     comast/observation.cpp
     comast/lens.cpp
+    comast/equipmentwriter.cpp
 )
 
 set(kstars_SRCS ${indi_SRCS} ${fits_SRCS} 
@@ -337,7 +338,7 @@
 
 kde4_add_ui_files(kstars_SRCS
        ${indiui_SRCS} ${fitsui_SRCS} ${xplanetui_SRCS} ${kstars_optionsui_SRCS} ${kstars_dialogsui_SRCS}
-         thumbnailpicker.ui thumbnaileditor.ui 
+         thumbnailpicker.ui thumbnaileditor.ui comast/equipmentwriter.ui
 )
 
 #kde4_add_app_icon(kstars_SRCS "${KDE4_ICON_DIR}/oxygen/*/apps/kstars.png")
--- branches/kstars/summer/kstars/kstars/comast/log.cpp #999507:999508
@@ -35,6 +35,7 @@
 
 QString Comast::Log::writeLog( bool _native ) {
     ks = KStars::Instance();
+    output = "";
     m_targetList = ks->observingList()->sessionList();
     native = _native;
     writeBegin();
--- branches/kstars/summer/kstars/kstars/comast/log.h #999507:999508
@@ -36,6 +36,8 @@
 #include "comast/lens.h"
 #include "comast/observation.h"
 
+class KStars;
+
 class Comast::Log {
     public:
         QString writeLog( bool native = true );
@@ -50,7 +52,14 @@
         void writeLenses();
         void writeFilters();
         void writeImagers();
-        inline QList<SkyObject *> targetList() { return m_targetList; }
+        inline QList<SkyObject *> *targetList() { return &m_targetList; }
+        inline QList<Comast::Scope *> *scopeList() { return &m_scopeList; }
+        inline QList<Comast::Site *> *siteList() { return &m_siteList; }
+        inline QList<Comast::Session *> *sessionList() { return &m_sessionList; }
+        inline QList<Comast::Eyepiece *> *eyepieceList() { return &m_eyepieceList; }
+        inline QList<Comast::Lens *> *lensList() { return &m_lensList; }
+        inline QList<Comast::Filter *> *filterList() { return &m_filterList; }
+        inline QList<Comast::Observation *> *observationList() { return &m_observationList; }
         void writeObserver( Comast::Observer *o );
         void writeSite( Comast::Site *s );
         void writeSession( Comast::Session *s );
--- branches/kstars/summer/kstars/kstars/ksalmanac.h #999507:999508
@@ -25,6 +25,9 @@
 #include "kstars.h"
 #include "kstarsdatetime.h"
 #include "kstarsdata.h"
+
+class KStars;
+
 class KSAlmanac {
     public:
         void RiseSetTime( SkyObject *o, double *riseTime, double *setTime, QTime *RiseTime, QTime *SetTime );
--- branches/kstars/summer/kstars/kstars/kstars.h #999507:999508
@@ -23,6 +23,7 @@
 #include <config-kstars.h>
 
 #include "tools/observinglist.h"
+#include "comast/equipmentwriter.h"
 
 // forward declaration is enough. We only need pointers
 class QPalette;
@@ -51,6 +52,7 @@
 class ImageViewer;
 class FlagManager;
 class ObservingList;
+class EquipmentWriter;
 
 class OpsCatalog;
 class OpsGuides;
@@ -692,6 +694,8 @@
     /**Save data to config file before exiting.*/
     void slotAboutToQuit();
 
+    void slotEquipmentWriter();
+
 private:
     /**
         *Initialize Menu bar, toolbars and all Actions.
@@ -733,6 +737,7 @@
 
     //FIXME: move to KStarsData
     ObservingList *obsList;
+    EquipmentWriter *eWriter;
     AltVsTime *avt;
     WUTDialog *wut;
     SkyCalendar *skycal;
--- branches/kstars/summer/kstars/kstars/kstarsactions.cpp #999507:999508
@@ -1049,6 +1049,9 @@
     obsList->show();
 }
 
+void KStars::slotEquipmentWriter() {
+    eWriter->show();
+}
 //Help Menu
 void KStars::slotTipOfDay() {
     KTipDialog::showTip(this, "kstars/tips", true);
--- branches/kstars/summer/kstars/kstars/kstarsdata.cpp #999507:999508
@@ -104,6 +104,7 @@
     locale = new KLocale( "kstars" );
 
     m_SkyComposite = new SkyMapComposite( 0, this );
+    m_logObject = new Comast::Log;
 
     //Instantiate LST and HourAngle
     LST = new dms();
@@ -129,6 +130,7 @@
     delete locale;
     delete LST;
     delete HourAngle;
+    delete m_logObject;
 
     while ( ! geoList.isEmpty() )
         delete geoList.takeFirst();
--- branches/kstars/summer/kstars/kstars/kstarsdata.h #999507:999508
@@ -32,6 +32,8 @@
 #include "kstarsdatetime.h"
 #include "simclock.h"
 #include "skycomponents/skymapcomposite.h"
+#include "comast/comast.h"
+#include "comast/log.h"
 
 //#define MINZOOM 200.
 #define MINZOOM 250.
@@ -341,6 +343,8 @@
     KSNumbers* updateNum()  { return &m_updateNum; }
     void syncUpdateIDs();
 
+    Comast::Log *logObject() { return m_logObject; }
+
 signals:
     /**Signal that specifies the text that should be drawn in the KStarsSplash window.
     	*/
@@ -470,8 +474,8 @@
     SimClock Clock;
     KStarsDateTime LTime;
     ColorScheme CScheme;
+    Comast::Log *m_logObject;
 
-
     bool TimeRunsForward, temporaryTrail, snapToFocus;
 
     //	QString cnameFile;
@@ -504,6 +508,7 @@
     KSNumbers    m_preUpdateNum, m_updateNum;
 
     static KStarsData* pinstance;
+
 };
 
 
--- branches/kstars/summer/kstars/kstars/kstarsinit.cpp #999507:999508
@@ -47,6 +47,7 @@
 #include "infoboxes.h"
 #include "simclock.h"
 #include "widgets/timestepbox.h"
+#include "comast/equipmentwriter.h"
 
 #include <config-kstars.h>
 
@@ -386,7 +387,14 @@
     ka = actionCollection()->addAction( "flagmanager" );
     ka->setText( i18n( "Flags...") );
     connect( ka, SIGNAL( triggered() ), this, SLOT( slotFlagManager() ) );
+    
+    // comast Menu
 
+    ka = actionCollection()->addAction( "ewriter" );
+    ka->setText( i18n( "Equipment Writer..." ) );
+    ka->setShortcuts( KShortcut( Qt::CTRL+Qt::Key_0 ) );
+    connect( ka, SIGNAL( triggered() ), this, SLOT( slotEquipmentWriter() ) );
+
     // devices Menu
 #ifdef HAVE_INDI_H
 #ifndef Q_WS_WIN
@@ -629,6 +637,7 @@
 
     //Initialize Observing List
     obsList = new ObservingList( this );
+    eWriter = new EquipmentWriter();
 
     //Do not start the clock if "--paused" specified on the cmd line
     if ( StartClockRunning )


More information about the Kstars-devel mailing list