moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / focusdialog.h
blob8efef068f01ea18a02ffc467b57d062bbac80ef2
1 /***************************************************************************
2 focusdialog.h - description
3 -------------------
4 begin : Sat Mar 23 2002
5 copyright : (C) 2002 by Jason Harris
6 email : kstars@30doradus.org
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 FOCUSDIALOG_H
19 #define FOCUSDIALOG_H
21 #include <kdialogbase.h>
22 #include "focusdialogdlg.h"
24 class QVBoxLayout;
25 class QHBoxLayout;
26 class KLineEdit;
27 class SkyPoint;
28 class FocusDialogDlg;
30 /**@class FocusDialog
31 *@short A small dialog for setting the focus coordinates manually.
32 *@author Jason Harris
33 *@version 1.0
36 class FocusDialog : public KDialogBase {
37 Q_OBJECT
38 public:
39 /**Constructor. */
40 FocusDialog( QWidget *parent=0 );
42 /**Destructor (empty). */
43 ~FocusDialog();
45 /**@return pointer to the SkyPoint described by the entered RA, Dec */
46 SkyPoint* point() const { return Point; }
48 /**@return suggested size of focus window. */
49 QSize sizeHint() const;
51 /**@return whether user set the AltAz coords */
52 bool usedAltAz() const { return UsedAltAz; }
54 void activateAzAltPage();
55 long double epochToJd (double epoch);
57 double getEpoch (QString eName);
59 public slots:
60 /**If text has been entered in both KLineEdits, enable the Ok button. */
61 void checkLineEdits();
63 /**Attempt to interpret the text in the KLineEdits as Ra and Dec values.
64 *If the point is validated, close the window.
66 void validatePoint();
67 void slotOk();
69 private:
70 QVBoxLayout *vlay;
71 QHBoxLayout *hlayRA, *hlayDec;
72 KLineEdit *editRA, *editDec;
73 SkyPoint *Point;
74 FocusDialogDlg *fdlg;
75 bool UsedAltAz;
78 #endif