Kstars

platesolve.h
1/*
2 SPDX-FileCopyrightText: 2025 Hy Murveit <hy@murveit.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ui_platesolve.h"
10
11#include "ekos/ekos.h"
12
13#include <QFrame>
14#include <QDateTime>
15#include "ekos/auxiliary/solverutils.h"
16#include "ekos/auxiliary/stellarsolverprofile.h"
17#include "ekos/auxiliary/stellarsolverprofileeditor.h"
18#include "kpagewidgetmodel.h"
19
20class SkyPoint;
21
22class PlateSolve: public QDialog, public Ui::PlateSolveUI
23{
25
26 public:
27 PlateSolve(QWidget * parent = nullptr);
28
29 void abort();
30 void enableAuxButton(const QString &label, const QString &toolTip = "");
31 void disableAuxButton();
32 void setImageDisplay(const QImage &image);
33
34 const FITSImage::Solution &solution() {
35 return m_Solution;
36 }
37 void setPosition(const SkyPoint &p);
38 void setUsePosition(bool yesNo);
39 void setScale(double scale);
40 void setScaleUnits(int units);
41 void setUseScale(bool yesNo);
42 void setLinear(bool yesNo);
43
44 public slots:
45 void extractImage(const QSharedPointer<FITSData> &imageData);
46 void solveImage(const QSharedPointer<FITSData> &imageData);
47 void solveImage(const QString &filename);
48
49 signals:
50 void clicked();
51 void extractorSuccess();
52 void solverSuccess();
53 void extractorFailed();
54 void solverFailed();
55 void auxClicked();
56
57 private:
58 void setup();
59 void initSolverUI();
60 void setupSolver(const QSharedPointer<FITSData> &imageData, bool extractOnly);
61 void solverDone(bool timedOut, bool success, const FITSImage::Solution &solution, double elapsedSeconds);
62 void extractorDone(bool timedOut, bool success, const FITSImage::Solution &solution, double elapsedSeconds);
63 void setupProfiles(int profileIndex);
64 int getProfileIndex(int moduleIndex);
65 void setProfileIndex(int moduleIndex, int profileIndex);
66 void loadFileDone();
67
68 QSharedPointer<SolverUtils> m_Solver;
69 QSharedPointer<FITSData> m_imageData;
70 QFutureWatcher<bool> m_Watcher;
71 FITSImage::Solution m_Solution;
72
73 // The StellarSolverProfileEditor is shared among all tabs of all FITS Viewers.
74 // They all edit the same (align) profiles.
75 static QPointer<Ekos::StellarSolverProfileEditor> m_ProfileEditor;
76 static QPointer<KConfigDialog> m_EditorDialog;
77 static QPointer<KPageWidgetItem> m_ProfileEditorPage;
78};
79
The sky coordinates of a point in the sky.
Definition skypoint.h:45
Q_OBJECTQ_OBJECT
QObject * parent() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 25 2025 11:58:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.