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);
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 * @param status current capture status
82 */
83 void updateCaptureStatus(Ekos::CaptureState status, bool isPreview);
84
85 /**
86 * @brief Slot receiving the update of the current target distance.
87 * @param targetDiff distance to the target in arcseconds.
88 */
89 void updateTargetDistance(double targetDiff);
90
91 /**
92 * @brief update the count down value of the current exposure
93 * @param delta time difference
94 */
95 void updateCaptureCountDown(int delta);
96
97private:
98 QSharedPointer<Ekos::SchedulerModuleState> m_schedulerModuleState = nullptr;
99 Ekos::Capture *m_captureModule = nullptr;
100 Ekos::Mount *m_mountModule = nullptr;
101
102 // cache frame data
103 CaptureProcessOverlay::FrameData m_currentFrame;
104
105 // target the mount is pointing to (may be different to the scheduler job name)
106 QString m_mountTarget = "";
107
108 // summary FITS view
109 SummaryFITSView *m_fitsPreview = nullptr;
110 // FITS data overlay
111 CaptureProcessOverlay *m_overlay
112 = nullptr;
113
114 // move to trash or delete finally
115 bool m_permanentlyDelete {false};
116};
Captures single or sequence of images from a CCD.
Definition capture.h:92
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 May 17 2024 11:48:25 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.