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 "captureprocessoverlay.h"
16#include "ekos/ekos.h"
17
18namespace Ekos
19{
20class Capture;
21class SequenceJob;
22class SchedulerModuleState;
23}
24
25class CaptureCountsWidget : public QWidget, public Ui::CaptureCountsWidget
26{
28public:
29 friend class CapturePreviewWidget;
30
31 explicit CaptureCountsWidget(QWidget *parent = nullptr);
32
33 void setCurrentTrainName(const QString &name);
34
35public slots:
36
37 /**
38 * @brief display the progress of the current exposure (remaining time etc.)
39 * @param job currently active job
40 * @param devicename device name of the camera reporting exposure process
41 */
42 void updateExposureProgress(Ekos::SequenceJob *job, const QString &devicename);
43
44 /**
45 * @brief display the download progress
46 * @param timeLeft time left until the download is finished
47 */
48 void updateDownloadProgress(double timeLeft, const QString &devicename);
49
50
51private:
52 void shareCaptureProcess(Ekos::Capture *process) {m_captureProcess = process;}
53 void shareSchedulerState(QSharedPointer<Ekos::SchedulerModuleState> state);
54
55 /**
56 * @brief update the count down value of the current exposure
57 * @param delta time difference
58 */
59 void updateCaptureCountDown(int delta);
60
61 /**
62 * @brief update display when the capture status changes
63 */
64 void updateCaptureStatus(Ekos::CaptureState status, bool isPreview, const QString &devicename);
65
66 /**
67 * @brief display information about the currently running job
68 * @param job currently active job
69 * @param devicename name of the used camera device
70 */
71 void updateJobProgress(CaptureProcessOverlay::FrameData data, const QString &devicename);
72
73 /**
74 * @brief enable / disable display widgets
75 */
76 void setEnabled(bool enabled);
77
78 /**
79 * @brief reset display values
80 */
81 void reset();
82
83 // informations about the current frame
84 void setFrameInfo(const QString frametype, const QString filter = "", const double exptime = -1, const int xBin = -1, const int yBin = -1, const double gain = -1);
85
86 /**
87 * @brief showCurrentCameraInfo Display the capturing status informations for the selected camera device
88 */
89 void showCurrentCameraInfo();
90
91 QSharedPointer<Ekos::SchedulerModuleState> m_schedulerModuleState;
92 Ekos::Capture *m_captureProcess = nullptr;
93
94 QMap<QString, QTime> imageCountDown;
95 QMap<QString, QTime> sequenceCountDown;
96 QMap<QString, QTime> jobCountDown;
97 QMap<QString, QTime> overallCountDown;
98 // current camera train name
99 QString m_currentTrainName = "";
100
101 // cache frame data
103};
Captures single or sequence of images from a CCD.
Definition capture.h:94
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:83
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 Mon Nov 4 2024 16:38:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.