Kstars

mounttargetwidget.h
1/* Widget to slew or sync to a position.
2 SPDX-FileCopyrightText: Wolfgang Reissenberger <sterne-jaeger@openfuture.de>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8#include "ui_mounttargetwidget.h"
9#include "skypoint.h"
10
11#include <QObject>
12#include <QWidget>
13
14namespace Ekos
15{
16class MountTargetWidget : public QWidget, public Ui::MountTargetWidget
17{
19public:
20 explicit MountTargetWidget(QWidget *parent = nullptr);
21
22 bool processCoords(dms &ra, dms &de);
23
24 // set target position and target name
25 void setTargetPosition(SkyPoint *target);
26 void setTargetName(const QString &name);
27
28 // target coord conversions for displaying
29 bool raDecToAzAlt(QString qsRA, QString qsDec);
30 bool raDecToHaDec(QString qsRA);
31 bool azAltToRaDec(QString qsAz, QString qsAlt);
32 bool azAltToHaDec(QString qsAz, QString qsAlt);
33 bool haDecToRaDec(QString qsHA);
34 bool haDecToAzAlt(QString qsHA, QString qsDec);
35
36 void setJ2000Enabled(bool enabled);
37
38private:
39 void processSlew();
40 void processSync();
41 void findTarget();
42 void updateTargetDisplay(int id = -1, SkyPoint *target = nullptr);
43
44 bool updateTarget();
45 QSharedPointer<SkyPoint> currentTarget;
46 bool m_isJ2000 {false};
47
48 /**
49 * @brief Helper function to update coordinates of a sky point from its JNow coordinates
50 * @param coords sky point with correct JNow values in RA and DEC
51 * @param updateJ2000 update the J2000 coordinates
52 * @param updateHorizontal update the ALT/AZ coordinates
53 */
54 void updateJ2000Coordinates(SkyPoint *coords, bool updateJ2000=true, bool updateHorizontal=true);
55
56signals:
57 void sync(double RA, double DE);
58 void slew(double RA, double DE);
59
60};
61
62} // namespace
The sky coordinates of a point in the sky.
Definition skypoint.h:45
An angle, stored as degrees, but expressible in many ways.
Definition dms.h:38
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.