1 /***************************************************************************
2 planetviewer.h - Display overhead view of the solar system
4 begin : Sun May 25 2003
5 copyright : (C) 2003 by Jason Harris
6 email : jharris@30doradus.org
7 ***************************************************************************/
8 /***************************************************************************
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 ***************************************************************************/
17 #ifndef PLANETVIEWER_H
18 #define PLANETVIEWER_H
20 #include <kdialogbase.h>
21 #include <kpushbutton.h>
24 #include "kstarsplotwidget.h"
25 #include "planetviewerui.h"
26 #include "kstarsdatetime.h"
27 #include "planetcatalog.h"
29 /**@class PlanetViewer
30 *@short Display an overhead view of the solar system
34 class PlanetViewer
: public KDialogBase
38 PlanetViewer(QWidget
*parent
= 0, const char *name
= 0);
41 QString
centerPlanet() const { return CenterPlanet
; }
42 void setCenterPlanet( const QString
&cp
) { CenterPlanet
= cp
; }
44 KPlotObject
* planetObject(uint i
) const { return planet
[i
]; }
45 QString
planetName(uint i
) const { return pName
[i
]; }
48 virtual void keyPressEvent( QKeyEvent
*e
);
49 virtual void paintEvent( QPaintEvent
* );
52 void initPlotObjects();
54 void setTimeScale(float);
55 void slotChangeDate( const ExtDate
&d
);
67 int UpdateInterval
[9], LastUpdate
[9];
68 QString pName
[9], pColor
[9];
72 KPlotObject
*planet
[9];
73 KPlotObject
*planetLabel
[9];
76 class PVPlotWidget
: public KStarsPlotWidget
80 PVPlotWidget( double x1
, double x2
, double y1
, double y2
,
81 QWidget
*parent
=0, const char *name
=0 );
82 PVPlotWidget( QWidget
*parent
=0, const char *name
=0 );
90 void doubleClicked( double, double );
93 virtual void keyPressEvent( QKeyEvent
*e
);
94 virtual void mousePressEvent( QMouseEvent
*e
);
95 virtual void mouseMoveEvent( QMouseEvent
*e
);
96 virtual void mouseReleaseEvent( QMouseEvent
* );
97 virtual void mouseDoubleClickEvent( QMouseEvent
*e
);
98 virtual void wheelEvent( QWheelEvent
*e
);
101 bool mouseButtonDown
;