summaryrefslogtreecommitdiffstats
path: root/kstars/kstars/tools/astrocalc.h
blob: 84604103182143a6beff3dcb4634a7a7c47acef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/***************************************************************************
                          astrocalc.h  -  description
                             -------------------
    begin                : wed dec 19 16:20:11 CET 2002
    copyright            : (C) 2001-2002 by Pablo de Vicente
    email                : vicente@oan.es
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef ASTROCALC_H
#define ASTROCALC_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <qwidget.h>
#include <kdialogbase.h>

#include <kapplication.h>

#include "dms.h"

class QSplitter;
class QListView;
class QTextView;
class QListViewItem;
class QVBox;
class QString;
class modCalcJD;
class modCalcGeodCoord;
class modCalcGalCoord;
class modCalcSidTime;
class modCalcPrec;
class modCalcApCoord;
class modCalcDayLength;
class modCalcAzel;
class modCalcEquinox;
class modCalcPlanets;
class modCalcEclCoords;
class modCalcAngDist;
class modCalcVlsr;

/** Astrocalc is the base class for the KStars astronomical calculator
 * @author: Pablo de Vicente
 * @version 0.9
 */

class AstroCalc : public KDialogBase
{

Q_OBJECT 
	public:
    /** construtor */
	AstroCalc(QWidget *parent = 0);

    /** destructor */
	~AstroCalc();

		/**Generate explanatory text for time modules. */
		void genTimeText(void);

		/**Generate explanatory text for coordinate modules. */
		void genCoordText(void);

		/**Generate explanatory text for geodetic modules. */
		void genGeodText(void);

		/**Generate explanatory text for solar system modules. */
		void genSolarText(void);

		/**Generate frame for Julian Date functions. */
		void genJdFrame(void);

		/**Generate frame for Sidereal Time functions. */
		void genSidFrame(void);

		/**Generate frame for Day Length functions. */
		void genDayFrame(void);

		/**Generates the frame for the Equinox and Solstice functions */
		void genEquinoxFrame(void);

		/**Generate frame for geodetic coordinates frame. */
		void genGeodCoordFrame(void);

		/**Generate frame for galactic coordinates frame. */
		void genGalFrame(void);

		/**Generate frame for ecliptic coordinates frame. */
		void genEclFrame(void);

		/**Generate frame for Precession frame. */
		void genPrecFrame(void);

		/**Generate frame for apparent coordinates frame. */
		void genAppFrame(void);

		/**Generate frame for horizontal coordinates frame. */
		void genAzelFrame(void);

		/**Generate frame for planets coordinates frame. */
		void genPlanetsFrame(void);
		
		/**Generate frame for angular distances frame. */
		void genAngDistFrame(void);

		/**Generate frame for Vlsr frame. */
		void genVlsrFrame(void);
		
		/**remove whatever frame is loaded in the right panel. */
		void delRightPanel(void);

		/**@returns suggested size of calculator window. */
		QSize sizeHint() const;

	public slots:
		/**Determine which item is selected in the function menu QListBox.
			*Generate the corresponding calculator module.
			*/
		void slotItemSelection(QListViewItem *it);
		
	private:
		
		QSplitter *split;
		QListView *navigationPanel, *auxiliar;
		QTextView *splashScreen;
//		QListViewItem *timeItem, *coordItem, *jdItem, *stItem, *dayItem;
		QVBox *vbox, *rightBox;
		QString previousElection;

		enum typeOfPanel {GenText, TimeText, GeoText, SolarText, CoordText, JD, SidTime, DayLength, Equinox, GeoCoord, Galactic, Precessor, Apparent, Azel, Planets, Ecliptic, AngDist, Vlsr};
		typeOfPanel rightPanel;

		modCalcJD *JDFrame;
		modCalcGeodCoord *GeodCoordFrame;
		modCalcGalCoord *GalFrame;
		modCalcSidTime *SidFrame;
		modCalcPrec *PrecFrame;
		modCalcApCoord *AppFrame;
		modCalcDayLength *DayFrame;
		modCalcAzel *AzelFrame;
		modCalcPlanets *PlanetsFrame;
		modCalcEquinox *EquinoxFrame;
		modCalcEclCoords *EclFrame;
		modCalcAngDist *AngDistFrame;
		modCalcVlsr *VlsrFrame;
};

#endif