• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • tools
observinglist.h
Go to the documentation of this file.
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  ***************************************************************************/
8 
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  ***************************************************************************/
17 
18 #ifndef OBSERVINGLIST_H_
19 #define OBSERVINGLIST_H_
20 
21 #include <QList>
22 #include <QAbstractTableModel>
23 
24 #include <kdialog.h>
25 #include <kio/copyjob.h>
26 
27 #include "ui_observinglist.h"
28 #include "kstarsdatetime.h"
29 #include "skyobjects/skyobject.h"
30 #include "obslistpopupmenu.h"
31 
32 class KSAlmanac;
33 class QSortFilterProxyModel;
34 class QStandardItemModel;
35 class KStars;
36 class KStarsDateTime;
37 class GeoLocation;
38 
39 
40 class ObservingListUI : public QFrame, public Ui::ObservingList {
41  Q_OBJECT
42 
43 public:
46  ObservingListUI( QWidget *parent );
47 };
48 
79 class ObservingList : public KDialog
80 {
81  Q_OBJECT
82 
83 public:
86  ObservingList( KStars *_ks );
89  ~ObservingList();
90 
94  inline bool contains( const SkyObject *o ) { return m_ObservingList.contains( const_cast<SkyObject*>(o) ); }
95 
98  bool isLarge() const { return bIsLarge; }
99 
102  QList<SkyObject*>& obsList() { return m_ObservingList; }
103 
106  QList<SkyObject*>& sessionList() { return m_SessionList; }
107 
111  SkyObject *currentObject() const { return m_CurrentObject; }
112 
116  void saveCurrentList();
117 
121  void plot( SkyObject *o );
122 
127  double findAltitude( SkyPoint *p, double hour=0);
128 
131  QList<QString> imageList() { return ImageList; }
132 
137  void setCurrentImage( const SkyObject *o, bool temp = false );
138 
142  void saveCurrentUserLog();
143 
146  void setSaveImagesButton();
147 
151  bool eventFilter( QObject *obj, QEvent *event );
152 
156  void saveThumbImage();
157 
158  QString getTime( const SkyObject *o ) { return TimeHash.value( o->name(), QTime( 30,0,0 ) ).toString( "h:mm:ss AP" ); }
159 
160  QTime scheduledTime( SkyObject *o ) { return TimeHash.value( o->name(), o->transitTime( dt, geo ) ); }
161 
162  void setTime( const SkyObject *o, QTime t ) { TimeHash.insert( o->name(), t); }
163 
164  GeoLocation* geoLocation() { return geo; }
165 
166  KStarsDateTime dateTime() { return dt; }
167 
171  SkyObject* findObjectByName( QString name );
172 
175  void selectObject( const SkyObject *o );
176 
179  void setDefaultImage();
180 
181 public slots:
187  void slotAddObject( SkyObject *o=NULL, bool session=false, bool update=false );
188 
192  void slotRemoveSelectedObjects();
193 
201  void slotRemoveObject( SkyObject *o=NULL, bool session=false, bool update=false );
202 
205  void slotCenterObject();
206 
209  void slotSlewToObject();
210 
213  void slotDetails();
214 
217  void slotAVT();
218 
221  void slotWUT();
222 
225  void slotAddToSession();
226 
229  void slotFind();
230 
236  void slotNewSelection();
237 
240  void slotOpenList();
241 
244  void slotSaveList();
245 
248  void slotLoadWishList();
249 
252  void slotSaveSessionAs(bool nativeSave = true);
253 
256  void slotSaveSession(bool nativeSave = true);
257 
260  void slotWizard();
261 
264  void slotToggleSize();
265 
271  void slotChangeTab(int index);
272 
276  void slotLocation();
277 
280  void slotUpdate();
281 
285  void slotSetTime();
286 
290  void slotGetImage( bool _dss = false );
291 
292  void slotGoogleImage();
293 
298  void slotSaveAllImages();
299 
305  void saveImage( KUrl url , QString filename );
306 
309  void slotSaveImage();
310 
313  void slotImageViewer();
314 
317  void slotDeleteCurrentImage();
318 
321  void slotDeleteAllImages();
322 
325  void slotDSS() { slotGetImage( true ); }
326 
329  void slotOALExport();
330 
331  void slotAddVisibleObj();
332 
333 
334 protected slots:
335  void slotClose();
336  void downloadReady();
337 
338 private:
339  KStars *ks;
340  KSAlmanac *ksal;
341  ObservingListUI *ui;
342  QList<SkyObject*> m_ObservingList, m_SessionList;
343  SkyObject *LogObject, *m_CurrentObject;
344  bool isModified, bIsLarge, sessionView, dss, singleSelection, showScope, noSelection;
345  QString FileName, CurrentImage, DSSUrl, SDSSUrl, ThumbImage, CurrentImagePath, CurrentTempPath;
346  char decsgn;
347  KStarsDateTime dt;
348  GeoLocation *geo;
349  QStandardItemModel *m_Model, *m_Session;
350  QSortFilterProxyModel *m_SortModel, *m_SortModelSession;
351  KIO::Job *downloadJob; // download job of image -> 0 == no job is running
352  QHash<QString, QTime> TimeHash;
353  QList<QString> ImageList;
354  ObsListPopupMenu *pmenu;
355 };
356 
357 #endif // OBSERVINGLIST_H_
ObservingList::imageList
QList< QString > imageList()
Return the list of downloaded images.
Definition: observinglist.h:131
ObservingList::slotSaveAllImages
void slotSaveAllImages()
Downloads the images of all the objects in the session list Note: This downloads the SDSS image...
Definition: observinglist.cpp:1129
ObservingList::setSaveImagesButton
void setSaveImagesButton()
decides on whether to enable the SaveImages button or not
Definition: observinglist.cpp:1210
ObservingList::geoLocation
GeoLocation * geoLocation()
Definition: observinglist.h:164
ObservingList::slotAddVisibleObj
void slotAddVisibleObj()
Definition: observinglist.cpp:1318
ObservingList::slotImageViewer
void slotImageViewer()
Shows the image in a ImageViewer window.
Definition: observinglist.cpp:1175
ObservingList::slotSaveSessionAs
void slotSaveSessionAs(bool nativeSave=true)
save the current observing session plan to disk, specify filename.
Definition: observinglist.cpp:812
skyobject.h
QWidget
ObservingList::dateTime
KStarsDateTime dateTime()
Definition: observinglist.h:166
obslistpopupmenu.h
ObservingListUI::ObservingListUI
ObservingListUI(QWidget *parent)
Cunstructor.
Definition: observinglist.cpp:82
KDialog
ObservingList::scheduledTime
QTime scheduledTime(SkyObject *o)
Definition: observinglist.h:160
KSAlmanac
A class that implements methods to find sun rise, sun set, twilight begin / end times, moon rise and moon set times.
Definition: ksalmanac.h:42
ObservingList::slotSaveSession
void slotSaveSession(bool nativeSave=true)
save the current session
Definition: observinglist.cpp:879
ObsListPopupMenu
The Popup Menu for the observing list in KStars.
Definition: obslistpopupmenu.h:30
QObject
SkyObject::transitTime
QTime transitTime(const KStarsDateTime &dt, const GeoLocation *geo)
The same iteration technique described in riseSetTime() is used here.
Definition: skyobject.cpp:241
KStars
This is the main window for KStars.
Definition: kstars.h:94
ObservingList::slotFind
void slotFind()
Open the Find Dialog.
Definition: observinglist.cpp:670
ObservingList::slotAddToSession
void slotAddToSession()
Add the object to the Session List.
Definition: observinglist.cpp:658
ObservingList::slotSlewToObject
void slotSlewToObject()
slew the telescope to the selected object
Definition: observinglist.cpp:599
ObservingList::slotToggleSize
void slotToggleSize()
toggle between the large and small window states
Definition: observinglist.cpp:949
ObservingList::findAltitude
double findAltitude(SkyPoint *p, double hour=0)
Return the altitude of the given SkyObject for the given hour.
Definition: observinglist.cpp:939
ObservingList::slotWizard
void slotWizard()
construct a new observing list using the wizard.
Definition: observinglist.cpp:900
ObservingList::slotOpenList
void slotOpenList()
load an observing list from disk.
Definition: observinglist.cpp:746
ThumbImage
Definition: thumbimage.h:24
ObservingList::setTime
void setTime(const SkyObject *o, QTime t)
Definition: observinglist.h:162
ObservingListUI
Definition: observinglist.h:40
ObservingList::slotGoogleImage
void slotGoogleImage()
Definition: observinglist.cpp:1283
ObservingList::~ObservingList
~ObservingList()
Destuctor (empty)
Definition: observinglist.cpp:219
ObservingList::eventFilter
bool eventFilter(QObject *obj, QEvent *event)
This is the declaration of the event filter function which is installed on the KImageFilePreview and ...
Definition: observinglist.cpp:1221
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
ObservingList::ObservingList
ObservingList(KStars *_ks)
Constructor.
Definition: observinglist.cpp:89
ObservingList::slotClose
void slotClose()
Definition: observinglist.cpp:726
ObservingList::saveImage
void saveImage(KUrl url, QString filename)
saves the image syncronously from a given URL into a given file url the url from which the image has ...
Definition: observinglist.cpp:1153
GeoLocation
Contains all relevant information for specifying a location on Earth: City Name, State/Province name...
Definition: geolocation.h:39
ObservingList::setDefaultImage
void setDefaultImage()
set the default image in the image preview.
Definition: observinglist.cpp:1354
ObservingList::slotAVT
void slotAVT()
Show the Altitude vs Time for selecteld objects.
Definition: observinglist.cpp:681
ObservingList::selectObject
void selectObject(const SkyObject *o)
make a selection in the session view
Definition: observinglist.cpp:1341
ObservingList::slotDeleteAllImages
void slotDeleteAllImages()
Removes all the save DSS/SDSS images from the disk.
Definition: observinglist.cpp:1186
ObservingList::slotDSS
void slotDSS()
download the DSS image and show it
Definition: observinglist.h:325
ObservingList::slotSaveList
void slotSaveList()
save the current observing list to disk.
Definition: observinglist.cpp:820
ObservingList::slotNewSelection
void slotNewSelection()
Tasks needed when changing the selected object Save the user log of the previous selected object...
Definition: observinglist.cpp:455
KStarsDateTime
Extension of KDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day...
Definition: kstarsdatetime.h:45
ObservingList::slotSetTime
void slotSetTime()
Takes the time from the QTimeEdit box and sets it as the time parameter in the tableview of the Sessi...
Definition: observinglist.cpp:1054
ObservingList::saveCurrentUserLog
void saveCurrentUserLog()
Save the user log text to a file.
Definition: observinglist.cpp:735
ObservingList::slotGetImage
void slotGetImage(bool _dss=false)
Downloads the corresponding DSS or SDSS image from the web and displays it.
Definition: observinglist.cpp:1061
ObservingList::slotAddObject
void slotAddObject(SkyObject *o=NULL, bool session=false, bool update=false)
add a new object to list o pointer to the object to add to the list session flag toggle adding the ob...
Definition: observinglist.cpp:226
ObservingList::slotWUT
void slotWUT()
Open the WUT dialog.
Definition: observinglist.cpp:650
ObservingList::saveThumbImage
void saveThumbImage()
saves a thumbnail image for the details dialog from the downloaded image
Definition: observinglist.cpp:1306
QSortFilterProxyModel
ObservingList::slotChangeTab
void slotChangeTab(int index)
toggle the setEnabled flags according to current view set the m_currentItem to NULL and clear selecti...
Definition: observinglist.cpp:1001
ObservingList::contains
bool contains(const SkyObject *o)
Definition: observinglist.h:94
ObservingList::sessionList
QList< SkyObject * > & sessionList()
Definition: observinglist.h:106
ObservingList::slotRemoveObject
void slotRemoveObject(SkyObject *o=NULL, bool session=false, bool update=false)
Remove skyobject from the observing list.
Definition: observinglist.cpp:334
ObservingList::slotSaveImage
void slotSaveImage()
saves the temporary image permanently
Definition: observinglist.cpp:1168
ObservingList::findObjectByName
SkyObject * findObjectByName(QString name)
return the object with the name as the passed QString from the Session List, return null otherwise ...
Definition: observinglist.cpp:1334
ObservingList::currentObject
SkyObject * currentObject() const
Definition: observinglist.h:111
ObservingList::slotUpdate
void slotUpdate()
Updates the tableviews for the new geolocation and date.
Definition: observinglist.cpp:1035
ObservingList::slotOALExport
void slotOALExport()
Export a target list to the oal compliant format.
Definition: observinglist.cpp:1314
ObservingList
Tool window for managing a custom list of objects.
Definition: observinglist.h:79
ObservingList::saveCurrentList
void saveCurrentList()
If the current list has unsaved changes, ask the user about saving it.
Definition: observinglist.cpp:799
ObservingList::isLarge
bool isLarge() const
Definition: observinglist.h:98
kstarsdatetime.h
ObservingList::obsList
QList< SkyObject * > & obsList()
Definition: observinglist.h:102
ObservingList::plot
void plot(SkyObject *o)
Plot the SkyObject's Altitude vs Time in the AVTPlotWidget.
Definition: observinglist.cpp:910
ObservingList::slotDetails
void slotDetails()
Show the details window for the selected object.
Definition: observinglist.cpp:642
ObservingList::setCurrentImage
void setCurrentImage(const SkyObject *o, bool temp=false)
Sets the image parameters for the current object o The passed object for setting the parameters temp ...
Definition: observinglist.cpp:1096
ObservingList::getTime
QString getTime(const SkyObject *o)
Definition: observinglist.h:158
SkyObject::name
virtual QString name(void) const
Definition: skyobject.h:124
ObservingList::slotRemoveSelectedObjects
void slotRemoveSelectedObjects()
Remove skyobjects which are highlighted in the observing list tool from the observing list...
Definition: observinglist.cpp:393
ObservingList::slotCenterObject
void slotCenterObject()
center the selected object in the display
Definition: observinglist.cpp:584
SkyObject
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.
Definition: skyobject.h:46
QFrame
ObservingList::slotDeleteCurrentImage
void slotDeleteCurrentImage()
Remove the current image.
Definition: observinglist.cpp:1300
ObservingList::slotLoadWishList
void slotLoadWishList()
Load the Wish list from disk.
Definition: observinglist.cpp:848
ObservingList::downloadReady
void downloadReady()
Definition: observinglist.cpp:1078
ObservingList::slotLocation
void slotLocation()
Opens the Location dialog to set the GeoLocation for the sessionlist.
Definition: observinglist.cpp:1026
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal