Kstars

conjunctions.h
1/*
2 SPDX-FileCopyrightText: 2008 Akarsh Simha <akarshsimha@gmail.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5
6
7 Much of the code here is taken from Pablo de Vicente's
8 modcalcplanets.h
9
10*/
11
12#pragma once
13
14#include "dms.h"
15#include "ui_conjunctions.h"
16
17#include <QFrame>
18#include <QMap>
19#include <QString>
20#include "skycomponents/typedef.h"
21#include <memory>
22
25
26class GeoLocation;
27class KSPlanetBase;
28class SkyObject;
29
30//FIXME: URGENT! There's a bug when setting max sep to 0!
31
32/**
33 * @short Predicts conjunctions using KSConjunct in the background
34 */
35class ConjunctionsTool : public QFrame, public Ui::ConjunctionsDlg
36{
38
39 public:
40 explicit ConjunctionsTool(QWidget *p);
41 virtual ~ConjunctionsTool() override = default;
42
43 public slots:
44
45 void slotLocation();
46 void slotCompute();
47 void showProgress(int);
48 void slotFindObject();
49 void setMode(int);
50 void slotGoto();
51 void slotFilterType(int);
52 void slotClear();
53 void slotExport();
54 void slotFilterReg(const QString &);
55
56 private:
57 void showConjunctions(const QMap<long double, dms> &conjunctionlist, const QString &object1,
58 const QString &object2);
59
60 /**
61 * @brief setUpConjunctionOpposition
62 * @short set up ui for conj./opp.
63 */
64 void setUpConjunctionOpposition();
65
66 /**
67 * @brief mode
68 * @short Represents whether the tool looks for conj/opp.
69 */
70 enum MODE {
71 CONJUNCTION,
72 OPPOSITION
73 } mode;
74
75 SkyObject_s Object1;
76 KSPlanetBase_s Object2; // Second object is always a planet.
77 /// To store the names of Planets vs. values expected by KSPlanetBase::createPlanet()
79
80 /// To store Julian Days corresponding to the row index in the output list widget
81 QMap<int, long double> outputJDList;
82 GeoLocation *geoPlace { nullptr };
83 QStandardItemModel *m_Model { nullptr };
84 QSortFilterProxyModel *m_SortModel { nullptr };
85 int m_index { 0 };
86};
Predicts conjunctions using KSConjunct in the background.
Contains all relevant information for specifying a location on Earth: City Name, State/Province name,...
Definition geolocation.h:28
A subclass of TrailObject that provides additional information needed for most solar system objects.
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.