kstars
altvstime.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 altvstime.h - description 00003 ------------------- 00004 begin : Mon Dec 23 2002 00005 copyright : (C) 2002 by Pablo de Vicente 00006 email : vicente@oan.es 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef ALTVSTIME_H 00019 #define ALTVSTIME_H 00020 00021 #include "kstarsplotwidget.h" 00022 00023 class KStarsDateTime; 00024 class QTime; 00025 class QVariant; 00026 class QVBoxLayout; 00027 class KDialogBase; 00028 class KLocale; 00029 class SkyObject; 00030 class SkyPoint; 00031 class dms; 00032 class GeoLocation; 00033 class KStars; 00034 class AltVsTimeUI; 00035 00048 class AVTPlotWidget : public KStarsPlotWidget 00049 { 00050 Q_OBJECT 00051 public: 00054 AVTPlotWidget( double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, QWidget *parent=0, const char* name=0 ); 00055 00064 void setSunRiseSetTimes( double sr, double ss ) { SunRise = sr; SunSet = ss; } 00065 00066 protected: 00071 void mouseMoveEvent( QMouseEvent *e ); 00072 00075 void mousePressEvent( QMouseEvent *e ); 00076 00079 void paintEvent( QPaintEvent *e ); 00080 00081 private: 00082 double SunRise, SunSet; 00083 }; 00084 00093 class AltVsTime : public KDialogBase 00094 { 00095 Q_OBJECT 00096 00097 public: 00100 AltVsTime( QWidget* parent = 0); 00101 00104 ~AltVsTime(); 00105 00110 void setLSTLimits(); 00111 00116 void showCurrentDate (void); 00117 00121 KStarsDateTime getDate (void); 00122 00129 void computeSunRiseSetTimes(); 00130 00136 double getEpoch (QString eName); 00137 00144 void processObject( SkyObject *o, bool forceAdd=false ); 00145 00155 double findAltitude( SkyPoint *p, double hour ); 00156 00160 int currentPlotListItem() const; 00161 00165 QPtrList<SkyPoint>* skyPointList() { return &pList; } 00166 00167 public slots: 00170 void slotUpdateDateLoc(void); 00171 00174 void slotClear(void); 00175 00178 void slotClearBoxes(void); 00179 00183 void slotAddSource(void); 00184 00188 void slotBrowseObject(void); 00189 00192 void slotChooseCity(void); 00193 00200 void slotAdvanceFocus(void); 00201 00205 void slotHighlight(void); 00206 00207 private: 00208 AVTPlotWidget *View; 00209 AltVsTimeUI *avtUI; 00210 QVBoxLayout *topLayout; 00211 00212 GeoLocation *geo; 00213 KStars *ks; 00214 QPtrList<SkyPoint> pList; 00215 QPtrList<SkyPoint> deleteList; 00216 00217 int DayOffset; 00218 bool dirtyFlag; 00219 }; 00220 00221 #endif // ALTVSTIME_H