1 /***************************************************************************
2 observinglist.h - K Desktop Planetarium
5 copyright : (C) 2004 by Jeff Woods, Jason Harris
6 email : jcwoods@bellsouth.net, jharris@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
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. *
16 ***************************************************************************/
18 #ifndef OBSERVINGLIST_H
19 #define OBSERVINGLIST_H
21 #include <kdialogbase.h>
22 #include "skyobject.h"
25 class ObservingListUI
;
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
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)
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
58 class ObservingList
: public KDialogBase
65 ObservingList( KStars
*_ks
, QWidget
* parent
= 0 );
66 /**@short Destuctor (empty)
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(); }
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
108 /**@short Show the details window for the selected object
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.
123 /**@short save the current observing list to disk.
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();
142 QPtrList
<SkyObject
> obsList
;
143 QPtrList
<SkyObject
> SelectedObjects
;
144 SkyObject
*LogObject
;
148 QString ListName
, FileName
;
151 #endif // OBSERVINGLIST_H