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

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_modcalcsidtime.h"
0010 
0011 #include <QFrame>
0012 
0013 class QTime;
0014 
0015 class GeoLocation;
0016 
0017 /**
0018  * Class which implements the KStars calculator module to compute Universal
0019  * time to/from Sidereal time.
0020  *
0021  * Inherits modCalcSidTimeDlg
0022  *
0023  * @author Pablo de Vicente
0024  * @version 0.9
0025  */
0026 class modCalcSidTime : public QFrame, public Ui::modCalcSidTimeDlg
0027 {
0028     Q_OBJECT
0029 
0030   public:
0031     explicit modCalcSidTime(QWidget *p);
0032 
0033   private slots:
0034     void slotChangeLocation();
0035     void slotChangeDate();
0036     void slotConvertST(const QTime &lt);
0037     void slotConvertLT(const QTime &st);
0038 
0039     void slotDateChecked();
0040     void slotLocationChecked();
0041     void slotLocationBatch();
0042     void slotCheckFiles();
0043     void slotRunBatch();
0044     void slotViewBatch();
0045     void slotHelpLabel();
0046     void processLines(QTextStream &istream);
0047 
0048   private:
0049     /**
0050      * Fills the UT, Date boxes with the current time
0051      * and date and the longitude box with the current Geo location
0052      */
0053     void showCurrentTimeAndLocation();
0054 
0055     QTime computeLTtoST(QTime lt);
0056     QTime computeSTtoLT(QTime st);
0057 
0058     GeoLocation *geo { nullptr };
0059     GeoLocation *geoBatch { nullptr };
0060 };