Kstars

capturepreviewwidget.h
1/*
2 SPDX-FileCopyrightText: 2012 Jasem Mutlaq <mutlaqja@ikarustech.com>
3 SPDX-FileCopyrightText: 2021 Wolfgang Reissenberger <sterne-jaeger@openfuture.de>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#pragma once
9
10#include "ui_capturepreviewwidget.h"
11#include "captureprocessoverlay.h"
12
13#include <QObject>
14#include <QWidget>
15
16class FITSData;
17class SummaryFITSView;
18
19namespace Ekos
20{
21class Capture;
22class Mount;
23class SchedulerModuleState;
24class SequenceJob;
25}
26
27class CapturePreviewWidget : public QWidget, public Ui::CapturePreviewWidget
28{
30public:
31 explicit CapturePreviewWidget(QWidget *parent = nullptr);
32
33 void shareCaptureModule(Ekos::Capture *module);
34 void shareSchedulerModuleState(QSharedPointer<Ekos::SchedulerModuleState> state);
35 void shareMountModule(Ekos::Mount *module);
36
37 /**
38 * @brief display information about the currently running job
39 * @param currently active job
40 */
41 void updateJobProgress(Ekos::SequenceJob *job, const QSharedPointer<FITSData> &data, const QString &devicename);
42
43 /**
44 * @brief update the preview image from a file
45 * @param filePath to load
46 */
47 void updateJobPreview(const QString &filePath);
48
49 /**
50 * @brief Show the next frame from the capture history
51 */
52 void showNextFrame();
53
54 /**
55 * @brief Show the previous frame from the capture history
56 */
57 void showPreviousFrame();
58
59 /**
60 * @brief Delete the currently displayed frame
61 */
62 void deleteCurrentFrame();
63
64 /**
65 * @brief Set the summary FITS view
66 */
67 void setSummaryFITSView(const QSharedPointer<SummaryFITSView> &view);
68
69 /**
70 * @brief enable / disable display widgets
71 */
72 void setEnabled(bool enabled);
73
74 /**
75 * @brief reset display values
76 */
77 void reset();
78
79 /**
80 * @brief set the target name
81 */
82 void setTargetName(QString name);
83
84public slots:
85 /**
86 * @brief update display when the capture status changes
87 */
88 void updateCaptureStatus(Ekos::CaptureState status, bool isPreview, const QString &trainname);
89
90 /**
91 * @brief Slot receiving the update of the current target distance.
92 * @param targetDiff distance to the target in arcseconds.
93 */
94 void updateTargetDistance(double targetDiff);
95
96 /**
97 * @brief update the count down value of the current exposure
98 * @param delta time difference
99 */
100 void updateCaptureCountDown(int delta);
101
102 /**
103 * @brief React upon changed camera device selection
104 */
105 void selectedTrainChanged(QString newName);
106
107private:
108
109 void updateExposureProgress(Ekos::SequenceJob *job, const QString &devicename);
110 void updateDownloadProgress(double downloadTimeLeft, const QString &devicename);
111
112 QSharedPointer<Ekos::SchedulerModuleState> m_schedulerModuleState = nullptr;
113 Ekos::Capture *m_captureModule = nullptr;
114 Ekos::Mount *m_mountModule = nullptr;
115
116 // cache frame data
118
119 // known train names
120 QList<QString> m_trainNames;
121
122 // target the mount is pointing to (may be different to the scheduler job name)
123 QString m_mountTarget = "";
124
125 // summary FITS view
127 // FITS data overlay
129
130 // move to trash or delete finally
131 bool m_permanentlyDelete {false};
132};
Captures single or sequence of images from a CCD.
Definition capture.h:94
Supports controlling INDI telescope devices including setting/retrieving mount properties,...
Definition mount.h:33
Sequence Job is a container for the details required to capture a series of images.
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
CaptureState
Capture states.
Definition ekos.h:92
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.