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 Show the next frame from the capture history
45 */
46 void showNextFrame();
47
48 /**
49 * @brief Show the previous frame from the capture history
50 */
51 void showPreviousFrame();
52
53 /**
54 * @brief Delete the currently displayed frame
55 */
56 void deleteCurrentFrame();
57
58 /**
59 * @brief Set the summary FITS view
60 */
61 void setSummaryFITSView(SummaryFITSView *view);
62
63 /**
64 * @brief enable / disable display widgets
65 */
66 void setEnabled(bool enabled);
67
68 /**
69 * @brief reset display values
70 */
71 void reset();
72
73 /**
74 * @brief set the target name
75 */
76 void setTargetName(QString name);
77
78public slots:
79 /**
80 * @brief update display when the capture status changes
81 */
82 void updateCaptureStatus(Ekos::CaptureState status, bool isPreview, const QString &devicename);
83
84 /**
85 * @brief Slot receiving the update of the current target distance.
86 * @param targetDiff distance to the target in arcseconds.
87 */
88 void updateTargetDistance(double targetDiff);
89
90 /**
91 * @brief update the count down value of the current exposure
92 * @param delta time difference
93 */
94 void updateCaptureCountDown(int delta);
95
96 /**
97 * @brief React upon changed camera device selection
98 */
99 void currentCameraDeviceNameChanged(QString newName);
100
101private:
102
103 void updateExposureProgress(Ekos::SequenceJob *job, const QString &devicename);
104 void updateDownloadProgress(double downloadTimeLeft, const QString &devicename);
105
106 QSharedPointer<Ekos::SchedulerModuleState> m_schedulerModuleState = nullptr;
107 Ekos::Capture *m_captureModule = nullptr;
108 Ekos::Mount *m_mountModule = nullptr;
109
110 // cache frame data
112
113 // known camera device names
114 QList<QString> m_cameraNames;
115
116 // target the mount is pointing to (may be different to the scheduler job name)
117 QString m_mountTarget = "";
118
119 // summary FITS view
120 SummaryFITSView *m_fitsPreview = nullptr;
121 // FITS data overlay
122 CaptureProcessOverlay *m_overlay = nullptr;
123
124 // move to trash or delete finally
125 bool m_permanentlyDelete {false};
126};
Captures single or sequence of images from a CCD.
Definition capture.h:90
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:79
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 Fri Jul 26 2024 11:59:51 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.