File indexing completed on 2024-04-21 14:46:55

0001 /*
0002     SPDX-FileCopyrightText: 2002 Pablo de Vicente <vicente@oan.es>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "ui_modcalcgeod.h"
0010 
0011 #include <memory>
0012 
0013 class QTextStream;
0014 class GeoLocation;
0015 
0016 /**
0017  * Class which implements the KStars calculator module to compute
0018  * Geodetic coordinates to/from Cartesian coordinates.
0019  *
0020  * @author Pablo de Vicente
0021  * @version 0.9
0022  */
0023 class modCalcGeodCoord : public QFrame, public Ui::modCalcGeodCoordDlg
0024 {
0025     Q_OBJECT
0026   public:
0027     explicit modCalcGeodCoord(QWidget *p);
0028 
0029     void genGeoCoords(void);
0030     void getCartGeoCoords(void);
0031     void getSphGeoCoords(void);
0032     void showSpheGeoCoords(void);
0033     void showCartGeoCoords(void);
0034 
0035   public slots:
0036 
0037     void slotComputeGeoCoords(void);
0038     void slotClearGeoCoords(void);
0039     void setEllipsoid(int i);
0040     void slotLongCheckedBatch();
0041     void slotLatCheckedBatch();
0042     void slotElevCheckedBatch();
0043     void slotXCheckedBatch();
0044     void slotYCheckedBatch();
0045     void slotZCheckedBatch();
0046     void slotOutputFile();
0047     void slotInputFile();
0048 
0049   private:
0050     void geoCheck(void);
0051     void xyzCheck(void);
0052     void showLongLat(void);
0053     void processLines(QTextStream &istream);
0054     void slotRunBatch(void);
0055 
0056     //      QRadioButton *cartRadio, *spheRadio;
0057     //      QVBox *vbox, *rightBox;
0058     //      QLineEdit *xGeoName, *yGeoName, *zGeoName, *altGeoName;
0059     //      dmsBox *timeBox, *dateBox, *lonGeoBox, *latGeoBox;
0060 
0061     std::unique_ptr<GeoLocation> geoPlace;
0062     bool xyzInputCoords { false };
0063 };