Kstars

capturepreviewwidget.h
1 /*
2  SPDX-FileCopyrightText: 2012 Jasem Mutlaq <[email protected]>
3  SPDX-FileCopyrightText: 2021 Wolfgang Reissenberger <[email protected]>
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 "capture.h"
14 #include "sequencejob.h"
15 #include "fitsviewer/fitsdata.h"
16 #include "fitsviewer/summaryfitsview.h"
17 #include "ekos/scheduler/scheduler.h"
18 
19 #include <QObject>
20 #include <QWidget>
21 
22 class CapturePreviewWidget : public QWidget, public Ui::CapturePreviewWidget
23 {
24  Q_OBJECT
25 public:
26  explicit CapturePreviewWidget(QWidget *parent = nullptr);
27 
28  void shareCaptureProcess(Ekos::Capture *process);
29  void shareSchedulerProcess(Ekos::Scheduler *process);
30  void shareMountProcess(Ekos::Mount *process);
31 
32  /**
33  * @brief display information about the currently running job
34  * @param currently active job
35  */
36  void updateJobProgress(Ekos::SequenceJob *job, const QSharedPointer<FITSData> &data);
37 
38  /**
39  * @brief Show the next frame from the capture history
40  */
41  void showNextFrame();
42 
43  /**
44  * @brief Show the previous frame from the capture history
45  */
46  void showPreviousFrame();
47 
48  /**
49  * @brief Delete the currently displayed frame
50  */
51  void deleteCurrentFrame();
52 
53  /**
54  * @brief Set the summary FITS view
55  */
56  void setSummaryFITSView(SummaryFITSView *view);
57 
58  /**
59  * @brief enable / disable display widgets
60  */
61  void setEnabled(bool enabled);
62 
63  /**
64  * @brief reset display values
65  */
66  void reset();
67 
68 signals:
69 
70 public slots:
71  /**
72  * @brief update display when the capture status changes
73  * @param status current capture status
74  */
75  void updateCaptureStatus(Ekos::CaptureState status);
76 
77  /**
78  * @brief Slot receiving the update of the current target distance.
79  * @param targetDiff distance to the target in arcseconds.
80  */
81  void updateTargetDistance(double targetDiff);
82 
83  /**
84  * @brief update the count down value of the current exposure
85  * @param delta time difference
86  */
87  void updateCaptureCountDown(int delta);
88 
89 private:
90  Ekos::Scheduler *schedulerProcess = nullptr;
91  Ekos::Capture *captureProcess = nullptr;
92  Ekos::Mount *mountProcess = nullptr;
93 
94  // cache frame data
95  CaptureProcessOverlay::FrameData m_currentFrame;
96 
97  // target the mount is pointing to (may be different to the scheduler job name)
98  QString m_mountTarget = "";
99 
100  // summary FITS view
101  SummaryFITSView *m_fitsPreview = nullptr;
102  // FITS data overlay
103  CaptureProcessOverlay *overlay = nullptr;
104 };
Q_OBJECTQ_OBJECT
Supports controlling INDI telescope devices including setting/retrieving mount properties,...
Definition: mount.h:31
CaptureState
Capture states.
Definition: ekos.h:91
void setEnabled(bool)
Captures single or sequence of images from a CCD. The capture class support capturing single or multi...
Definition: capture.h:83
KGuiItem reset()
The Ekos scheduler is a simple scheduler class to orchestrate automated multi object observation jobs...
Definition: scheduler.h:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.