moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / tools / observinglist.h
blob59a147fe61225efb3c2b4797cbd89a7ca261b296
1 /***************************************************************************
2 observinglist.h - K Desktop Planetarium
3 -------------------
4 begin : 29 Nov 2004
5 copyright : (C) 2004 by Jeff Woods, Jason Harris
6 email : jcwoods@bellsouth.net, jharris@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef OBSERVINGLIST_H
19 #define OBSERVINGLIST_H
21 #include <kdialogbase.h>
22 #include "skyobject.h"
24 class KStars;
25 class ObservingListUI;
26 class QStringList;
28 /**@class ObservingList
29 *Tool window for managing a custom list of objects. The window
30 *displays the Name, RA, Dec, mag, and type of each object in the list.
32 *By selecting an object in the list, you can perform a number of functions
33 *on that object:
34 *+ Center it in the display (TBD)
35 *+ Examine its Details Window (TBD)
36 *+ Point the telescope at it (TBD)
37 *+ Attach a custom icon or name label (TBD)
38 *+ Attach a trail (solar system only) (TBD)
39 *+ Open the AltVsTime tool (TBD)
41 *The user can also save/load their observing lists, and can export
42 *list data (TBD: as HTML table? CSV format? plain text?)
44 *The observing notes associated with the selected object are displayed
45 *below the list. (TBD)
47 *TODO:
48 *+ Implement a "shaded" state, in which the UI is compressed to
49 * make it easier to float on the KStars window. Displays only
50 * object names, and single-letter action buttons, and no user log.
51 *+ Implement an InfoBox version (the ultimate shaded state)
53 *@short Tool for managing a custom list of objects
54 *@author Jeff Woods, Jason Harris
55 *@version 1.0
58 class ObservingList : public KDialogBase
60 Q_OBJECT
62 public:
63 /**@short Cunstructor
65 ObservingList( KStars *_ks, QWidget* parent = 0 );
66 /**@short Destuctor (empty)
68 ~ObservingList() {}
70 /**@return true if the object is in the observing list
71 *@p o pointer to the object to test.
73 bool contains( const SkyObject *o );
75 SkyObject* first() { return obsList.first(); }
76 SkyObject* next() { return obsList.next(); }
77 uint count() const { return obsList.count(); }
79 public slots:
80 /**@short add a new object to list
81 *@p o pointer to the object to add to the list
83 void slotAddObject( SkyObject *o=NULL );
85 /**@short Remove skyobjects which are highlighted in the
86 *observing list tool from the observing list.
88 void slotRemoveObjects();
90 /**@short Remove skyobject from the observing list.
91 *@p o pointer to the SkyObject to be removed.
92 *Use SkyMap::clickedObject() if o is NULL (default)
94 void slotRemoveObject( SkyObject *o=NULL );
96 /**@short center the selected object in the display
98 void slotCenterObject();
100 /**@short slew the telescope to the selected object
102 void slotSlewToObject();
104 /**@short Show the details window for the selected object
106 void slotDetails();
108 /**@short Show the details window for the selected object
110 void slotAVT();
112 /**@short Tasks needed when changing the selected object
113 *Save the user log of the previous selected object,
114 *find the new selected object in the obsList, and
115 *show the notes associated with the new selected object
117 void slotNewSelection();
119 /**@short load an observing list from disk.
121 void slotOpenList();
123 /**@short save the current observing list to disk.
125 void slotSaveList();
127 /**@short save the current observing list to disk, specify filename.
129 void slotSaveListAs();
131 /**@short Save the user log text to a file.
132 *@note the log is attached to the current object in obsList.
134 void saveCurrentUserLog();
136 protected slots:
137 void slotClose();
139 private:
140 KStars *ks;
141 ObservingListUI *ui;
142 QPtrList<SkyObject> obsList;
143 QPtrList<SkyObject> SelectedObjects;
144 SkyObject *LogObject;
145 uint noNameStars;
147 bool isModified;
148 QString ListName, FileName;
151 #endif // OBSERVINGLIST_H