Kstars

capturecountswidget.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 <QObject>
11 #include <QWidget>
12 #include <QTime>
13 
14 #include "ui_capturecountswidget.h"
15 #include "ekos/scheduler/scheduler.h"
16 #include "ekos/capture/capture.h"
17 #include "ekos/capture/sequencejob.h"
18 
19 class CaptureCountsWidget : public QWidget, public Ui::CaptureCountsWidget
20 {
21  Q_OBJECT
22 public:
23  friend class CapturePreviewWidget;
24 
25  explicit CaptureCountsWidget(QWidget *parent = nullptr);
26 
27 public slots:
28 
29  /**
30  * @brief display the progress of the current exposure (remaining time etc.)
31  * @param job currently active job
32  */
33  void updateExposureProgress(Ekos::SequenceJob *job);
34 
35  /**
36  * @brief display the download progress
37  * @param timeLeft time left until the download is finished
38  */
39  void updateDownloadProgress(double timeLeft);
40 
41 
42 private:
43  void shareCaptureProcess(Ekos::Capture *process) {captureProcess = process;}
44  void shareSchedulerProcess(Ekos::Scheduler *process) {schedulerProcess = process;}
45 
46  /**
47  * @brief update the count down value of the current exposure
48  * @param delta time difference
49  */
50  void updateCaptureCountDown(int delta);
51 
52  /**
53  * @brief update display when the capture status changes
54  * @param status current capture status
55  */
56  void updateCaptureStatus(Ekos::CaptureState status);
57 
58  /**
59  * @brief display information about the currently running job
60  * @param currently active job
61  */
62  void updateJobProgress(Ekos::SequenceJob *job);
63 
64  /**
65  * @brief enable / disable display widgets
66  */
67  void setEnabled(bool enabled);
68 
69  /**
70  * @brief reset display values
71  */
72  void reset();
73 
74  // informations about the current frame
75  void setFrameInfo(const QString frametype, const QString filter = "", const double exptime = -1, const int xBin = -1, const int yBin = -1, const double gain = -1);
76 
77 
78  Ekos::Scheduler *schedulerProcess = nullptr;
79  Ekos::Capture *captureProcess = nullptr;
80 
81  QTime imageCountDown;
82  QTime sequenceCountDown;
83  QTime jobCountDown;
84  QTime overallCountDown;
85 };
Q_OBJECTQ_OBJECT
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 Sat Aug 13 2022 04:01:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.