Kstars

capturecountswidget.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 <QObject>
11#include <QWidget>
12#include <QTime>
13
14#include "ui_capturecountswidget.h"
15#include "ekos/ekos.h"
16
17namespace Ekos
18{
19class Capture;
20class SequenceJob;
21class SchedulerModuleState;
22}
23
24class CaptureCountsWidget : public QWidget, public Ui::CaptureCountsWidget
25{
27public:
28 friend class CapturePreviewWidget;
29
30 explicit CaptureCountsWidget(QWidget *parent = nullptr);
31
32public slots:
33
34 /**
35 * @brief display the progress of the current exposure (remaining time etc.)
36 * @param job currently active job
37 */
38 void updateExposureProgress(Ekos::SequenceJob *job);
39
40 /**
41 * @brief display the download progress
42 * @param timeLeft time left until the download is finished
43 */
44 void updateDownloadProgress(double timeLeft);
45
46
47private:
48 void shareCaptureProcess(Ekos::Capture *process) {m_captureProcess = process;}
49 void shareSchedulerState(QSharedPointer<Ekos::SchedulerModuleState> state);
50
51 /**
52 * @brief update the count down value of the current exposure
53 * @param delta time difference
54 */
55 void updateCaptureCountDown(int delta);
56
57 /**
58 * @brief update display when the capture status changes
59 * @param status current capture status
60 */
61 void updateCaptureStatus(Ekos::CaptureState status, bool isPreview);
62
63 /**
64 * @brief display information about the currently running job
65 * @param currently active job
66 */
67 void updateJobProgress(Ekos::SequenceJob *job);
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 // informations about the current frame
80 void setFrameInfo(const QString frametype, const QString filter = "", const double exptime = -1, const int xBin = -1, const int yBin = -1, const double gain = -1);
81
82
83 QSharedPointer<Ekos::SchedulerModuleState> m_schedulerModuleState;
84 Ekos::Capture *m_captureProcess = nullptr;
85
86 QTime imageCountDown;
87 QTime sequenceCountDown;
88 QTime jobCountDown;
89 QTime overallCountDown;
90};
Captures single or sequence of images from a CCD.
Definition capture.h:92
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 24 2024 11:49:21 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.