moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / tools / astrocalc.h
blob84604103182143a6beff3dcb4634a7a7c47acef1
1 /***************************************************************************
2 astrocalc.h - description
3 -------------------
4 begin : wed dec 19 16:20:11 CET 2002
5 copyright : (C) 2001-2002 by Pablo de Vicente
6 email : vicente@oan.es
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 ASTROCALC_H
19 #define ASTROCALC_H
21 #ifdef HAVE_CONFIG_H
22 #include <config.h>
23 #endif
25 #include <qwidget.h>
26 #include <kdialogbase.h>
28 #include <kapplication.h>
30 #include "dms.h"
32 class QSplitter;
33 class QListView;
34 class QTextView;
35 class QListViewItem;
36 class QVBox;
37 class QString;
38 class modCalcJD;
39 class modCalcGeodCoord;
40 class modCalcGalCoord;
41 class modCalcSidTime;
42 class modCalcPrec;
43 class modCalcApCoord;
44 class modCalcDayLength;
45 class modCalcAzel;
46 class modCalcEquinox;
47 class modCalcPlanets;
48 class modCalcEclCoords;
49 class modCalcAngDist;
50 class modCalcVlsr;
52 /** Astrocalc is the base class for the KStars astronomical calculator
53 * @author: Pablo de Vicente
54 * @version 0.9
57 class AstroCalc : public KDialogBase
60 Q_OBJECT
61 public:
62 /** construtor */
63 AstroCalc(QWidget *parent = 0);
65 /** destructor */
66 ~AstroCalc();
68 /**Generate explanatory text for time modules. */
69 void genTimeText(void);
71 /**Generate explanatory text for coordinate modules. */
72 void genCoordText(void);
74 /**Generate explanatory text for geodetic modules. */
75 void genGeodText(void);
77 /**Generate explanatory text for solar system modules. */
78 void genSolarText(void);
80 /**Generate frame for Julian Date functions. */
81 void genJdFrame(void);
83 /**Generate frame for Sidereal Time functions. */
84 void genSidFrame(void);
86 /**Generate frame for Day Length functions. */
87 void genDayFrame(void);
89 /**Generates the frame for the Equinox and Solstice functions */
90 void genEquinoxFrame(void);
92 /**Generate frame for geodetic coordinates frame. */
93 void genGeodCoordFrame(void);
95 /**Generate frame for galactic coordinates frame. */
96 void genGalFrame(void);
98 /**Generate frame for ecliptic coordinates frame. */
99 void genEclFrame(void);
101 /**Generate frame for Precession frame. */
102 void genPrecFrame(void);
104 /**Generate frame for apparent coordinates frame. */
105 void genAppFrame(void);
107 /**Generate frame for horizontal coordinates frame. */
108 void genAzelFrame(void);
110 /**Generate frame for planets coordinates frame. */
111 void genPlanetsFrame(void);
113 /**Generate frame for angular distances frame. */
114 void genAngDistFrame(void);
116 /**Generate frame for Vlsr frame. */
117 void genVlsrFrame(void);
119 /**remove whatever frame is loaded in the right panel. */
120 void delRightPanel(void);
122 /**@returns suggested size of calculator window. */
123 QSize sizeHint() const;
125 public slots:
126 /**Determine which item is selected in the function menu QListBox.
127 *Generate the corresponding calculator module.
129 void slotItemSelection(QListViewItem *it);
131 private:
133 QSplitter *split;
134 QListView *navigationPanel, *auxiliar;
135 QTextView *splashScreen;
136 // QListViewItem *timeItem, *coordItem, *jdItem, *stItem, *dayItem;
137 QVBox *vbox, *rightBox;
138 QString previousElection;
140 enum typeOfPanel {GenText, TimeText, GeoText, SolarText, CoordText, JD, SidTime, DayLength, Equinox, GeoCoord, Galactic, Precessor, Apparent, Azel, Planets, Ecliptic, AngDist, Vlsr};
141 typeOfPanel rightPanel;
143 modCalcJD *JDFrame;
144 modCalcGeodCoord *GeodCoordFrame;
145 modCalcGalCoord *GalFrame;
146 modCalcSidTime *SidFrame;
147 modCalcPrec *PrecFrame;
148 modCalcApCoord *AppFrame;
149 modCalcDayLength *DayFrame;
150 modCalcAzel *AzelFrame;
151 modCalcPlanets *PlanetsFrame;
152 modCalcEquinox *EquinoxFrame;
153 modCalcEclCoords *EclFrame;
154 modCalcAngDist *AngDistFrame;
155 modCalcVlsr *VlsrFrame;
158 #endif