Kstars

camera.h
1/*
2 SPDX-FileCopyrightText: 2012 Jasem Mutlaq <mutlaqja@ikarustech.com>
3 SPDX-FileCopyrightText: 2024 Wolfgang Reissenberger <sterne-jaeger@openfuture.de>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#pragma once
9#include "ui_camera.h"
10#include "ui_limits.h"
11#include "ui_calibrationoptions.h"
12#include "capturetypes.h"
13#include "customproperties.h"
14#include "rotatorsettings.h"
15#include "sequencejob.h"
16
17namespace
18{
19
20// Columns in the job table
21enum JobTableColumnIndex
22{
23 JOBTABLE_COL_STATUS = 0,
24 JOBTABLE_COL_FILTER,
25 JOBTABLE_COL_COUNTS,
26 JOBTABLE_COL_EXP,
27 JOBTABLE_COL_TYPE,
28 JOBTABLE_COL_BINNING,
29 JOBTABLE_COL_ISO,
30 JOBTABLE_COL_OFFSET
31};
32} // namespace
33
34class DSLRInfo;
35
36namespace Ekos
37{
38
39class Capture;
40class CaptureDeviceAdaptor;
41class CameraProcess;
42class CameraState;
43class ScriptsManager;
44class FilterManager;
45class SequenceJob;
46
47class Camera : public QWidget, public Ui::Camera
48{
50 friend class Capture;
51public:
52
53 // default constructor
54 explicit Camera(int id = 0, bool standAlone = false, QWidget *parent = nullptr);
55 // constructor for standalone editor
56 explicit Camera(bool standAlone = false, QWidget *parent = nullptr);
57 ~Camera();
58
59 // ////////////////////////////////////////////////////////////////////
60 // device control
61 // ////////////////////////////////////////////////////////////////////
62 // Gain
63 // This sets and gets the custom properties target gain
64 // it does not access the ccd gain property
65 void setGain(double value);
66 double getGain();
67
68 void setOffset(double value);
69 double getOffset();
70
71 /**
72 * @brief Add new Rotator
73 * @param name name of the new rotator
74 */
75 void setRotator(QString name);
76
77 /**
78 * @brief addDSLRInfo Save DSLR Info the in the database. If the interactive dialog was open, close it.
79 * @param model Camera name
80 * @param maxW Maximum width in pixels
81 * @param maxH Maximum height in pixels
82 * @param pixelW Pixel horizontal size in microns
83 * @param pixelH Pizel vertical size in microns
84 */
85 void addDSLRInfo(const QString &model, uint32_t maxW, uint32_t maxH, double pixelW, double pixelH);
86
87 // ////////////////////////////////////////////////////////////////////
88 // Main capturing actions
89 // ////////////////////////////////////////////////////////////////////
90 /**
91 * @brief Start the execution of the Capture::SequenceJob list #jobs.
92 *
93 * Starting the execution of the Capture::SequenceJob list selects the first job
94 * from the list that may be executed and starts to prepare the job (@see prepareJob()).
95 *
96 * Several factors determine, which of the jobs will be selected:
97 * - First, the list is searched to find the first job that is marked as idle or aborted.
98 * - If none is found, it is checked whether ignoring job progress is set. If yes,
99 * all jobs are are reset (@see reset()) and the first one from the list is selected.
100 * If no, the user is asked whether the jobs should be reset. If the user declines,
101 * starting is aborted.
102 */
103 void start();
104
105 /**
106 * Stops currently running jobs:
107 * CAPTURE_IDLE: capture in idle state waiting for further action (e.g. single sequence
108 * is complete, next one starting)
109 * CAPTURE_COMPLETE: all capture sequences are complete
110 * CAPTURE_ABORT: capture aborted either by user interaction or by a technical error
111 * CAPTURE_SUSPEND: capture suspended and waiting to be restarted
112 * @param targetState status of the job after stop
113 */
114 void stop(CaptureState targetState = CAPTURE_IDLE);
115
116 /**
117 * Aborts all jobs and mark current state as ABORTED. It simply calls stop(CAPTURE_ABORTED)
118 */
119 void abort()
120 {
121 stop(CAPTURE_ABORTED);
122 }
123
124 /**
125 * Aborts all jobs and mark current state as SUSPENDED. It simply calls stop(CAPTURE_SUSPENDED)
126 * The only difference between SUSPENDED and ABORTED it that capture module can automatically resume a suspended
127 * state on its own without external trigger once the right conditions are met. When whatever reason caused the module
128 * to go into suspended state ceases to exist, the capture module automatically resumes. On the other hand, ABORTED state
129 * must be started via an external programmatic or user trigger (e.g. click the start button again).
130 */
131 void suspend()
132 {
133 stop(CAPTURE_SUSPENDED);
134 }
135
136 /** DBUS interface function.
137 * @brief pause Pauses the Sequence Queue progress AFTER the current capture is complete.
138 */
139 void pause();
140
141 /**
142 * @brief toggleSequence Toggle sequence state depending on its current state.
143 * 1. If paused, then resume sequence.
144 * 2. If idle or completed, then start sequence.
145 * 3. Otherwise, abort current sequence.
146 */
147 void toggleSequence();
148
149 /**
150 * Toggle video streaming if supported by the device.
151 * @param enabled Set to true to start video streaming, false to stop it if active.
152 */
153 void toggleVideo(bool enabled);
154
155 /**
156 * @brief restartCamera Restarts the INDI driver associated with a camera. Remote and Local drivers are supported.
157 * @param name Name of camera to restart. If a driver defined multiple cameras, they would be removed and added again
158 * after driver restart.
159 */
160 void restartCamera(const QString &name);
161
162 /**
163 * @brief capturePreview Capture a single preview image
164 */
165 void capturePreview();
166
167 /**
168 * @brief startFraming Like captureOne but repeating.
169 */
170 void startFraming();
171
172 /**
173 * @brief generateDarkFlats Generate a list of dark flat jobs from available flat frames.
174 */
175 void generateDarkFlats();
176
177 /**
178 * @brief setDownloadProgress update the Capture Module and Summary
179 * Screen's estimate of how much time is left in the download
180 */
181 void updateDownloadProgress(double downloadTimeLeft, const QString &devicename);
182
183 void updateCaptureCountDown(int deltaMillis);
184
185 // ////////////////////////////////////////////////////////////////////
186 // Job handling
187 // ////////////////////////////////////////////////////////////////////
188
189 /**
190 * @brief createJob Create a new job with the settings given in the GUI.
191 * @param jobtype batch, preview, looping or dark flat job.
192 * @param filenamePreview if the job is to generate a preview filename
193 * @return pointer to job created or nullptr otherwise.
194 */
195 SequenceJob *createJob(SequenceJob::SequenceJobType jobtype = SequenceJob::JOBTYPE_BATCH,
196 FilenamePreviewType filenamePreview = FILENAME_NOT_PREVIEW);
197
198 /**
199 * @brief removeJob Remove a job sequence from the queue
200 * @param index Row index for job to remove, if left as -1 (default), the currently selected row will be removed.
201 * if no row is selected, the last job shall be removed.
202 * @param true if sequence is removed. False otherwise.
203 */
204 Q_INVOKABLE bool removeJob(int index = -1);
205
206 /**
207 * @brief modifyJob Select a job and enter edit state
208 * @param index Row index for job to edit, if left as -1 (default), the currently selected row will be edited.
209 * @param true if sequence is in edit state. False otherwise.
210 */
211 Q_INVOKABLE bool modifyJob(int index = -1);
212
213 // ////////////////////////////////////////////////////////////////////
214 // Process control
215 // ////////////////////////////////////////////////////////////////////
216 /**
217 * Enables or disables the maximum guiding deviation and sets its value.
218 * @param enable If true, enable the guiding deviation check, otherwise, disable it.
219 * @param value if enable is true, it sets the maximum guiding deviation in arcsecs. If the value is exceeded, the capture operation is aborted until the value falls below the value threshold.
220 */
221 void setMaximumGuidingDeviation(bool enable, double value);
222
223 /**
224 * Enables or disables the in sequence focus and sets Half-Flux-Radius (HFR) limit.
225 * @param enable If true, enable the in sequence auto focus check, otherwise, disable it.
226 * @param HFR if enable is true, it sets HFR in pixels. After each exposure, the HFR is re-measured and if it exceeds the specified value, an autofocus operation will be commanded.
227 */
228 void setInSequenceFocus(bool enable, double HFR);
229
230 /**
231 * Loads the Ekos Sequence Queue file in the Sequence Queue. Jobs are appended to existing jobs.
232 * @param fileURL full URL of the filename
233 * @param targetName override the target in the sequence queue file (necessary for using the target of the scheduler)
234 */
235 bool loadSequenceQueue(const QString &fileURL, QString targetName = "");
236
237 /**
238 * Saves the Sequence Queue to the Ekos Sequence Queue file.
239 * @param fileURL full URL of the filename
240 */
241 bool saveSequenceQueue(const QString &path);
242
243 /**
244 * @brief Update the camera's capture state
245 */
246 void updateCameraStatus(CaptureState status);
247
248 /**
249 * Aborts any current jobs and remove all sequence queue jobs.
250 */
251 void clearSequenceQueue();
252
253 // shortcuts
254 void loadSequenceQueue();
255 void saveSequenceQueue();
256 void saveSequenceQueueAs();
257
258 QVariantMap getAllSettings() const;
259 void setAllSettings(const QVariantMap &settings, const QVariantMap *standAloneSettings = nullptr);
260
261 // ////////////////////////////////////////////////////////////////////
262 // Optical Train handling
263 // ////////////////////////////////////////////////////////////////////
264 void setupOpticalTrainManager();
265 void refreshOpticalTrain();
266
267
268 QString opticalTrain() const
269 {
270 return opticalTrainCombo->currentText();
271 }
272
273 /**
274 * @brief Select the optical train
275 */
276 void selectOpticalTrain(QString name);
277
278 // Utilities for storing stand-alone variables.
279 void storeTrainKey(const QString &key, const QStringList &list);
280 void storeTrainKeyString(const QString &key, const QString &str);
281
282 // ////////////////////////////////////////////////////////////////////
283 // Filter Manager and filters
284 // ////////////////////////////////////////////////////////////////////
285 void setupFilterManager();
286 void clearFilterManager();
287
288 /**
289 * @brief checkFilter Refreshes the filter wheel information in the capture module.
290 */
291 void refreshFilterSettings();
292
293 const QSharedPointer<FilterManager> &filterManager() const
294 {
295 return m_FilterManager;
296 }
297
298 /**
299 * @brief shortcut for updating the current filter information for the state machine
300 */
301 void updateCurrentFilterPosition();
302
303 /**
304 * @brief Add new Filter Wheel
305 * @param name device name of the new filter wheel
306 */
307 void setFilterWheel(QString name);
308
309 // ////////////////////////////////////////////////////////////////////
310 // Devices and process engine
311 // ////////////////////////////////////////////////////////////////////
312
313 /**
314 * @brief activeJob Shortcut to device adapter
315 */
317 {
318 return m_DeviceAdaptor;
319 }
320
322 {
323 return m_cameraProcess;
324 }
325
326 // shortcut for the module state
327 QSharedPointer<CameraState> state() const
328 {
329 return m_cameraState;
330 }
331
332 // shortcut for the active job
333 SequenceJob *activeJob() const
334 {
335 return state()->getActiveJob();
336 }
337
338 // Shortcut to the active camera held in the device adaptor
339 ISD::Camera *activeCamera();
340
341 /**
342 * @brief currentScope Retrieve the scope parameters from the optical train.
343 */
344 QJsonObject currentScope();
345
346 /**
347 * @brief currentReducer Retrieve the reducer parameters from the optical train.
348 */
349 double currentReducer();
350
351 /**
352 * @brief currentAperture Determine the current aperture
353 * @return
354 */
355 double currentAperture();
356
357 void setForceTemperature(bool enabled)
358 {
359 cameraTemperatureS->setChecked(enabled);
360 }
361
362 // Propagate meridian flip state changes to the UI
363 void updateMeridianFlipStage(MeridianFlipState::MFStage stage);
364
365 // ////////////////////////////////////////////////////////////////////
366 // sub dialogs
367 // ////////////////////////////////////////////////////////////////////
368
369 void openExposureCalculatorDialog();
370
371 // Script Manager
372 void handleScriptsManager();
373
374 /**
375 * @brief showTemperatureRegulation Toggle temperature regulation dialog which sets temperature ramp and threshold
376 */
377 void showTemperatureRegulation();
378
379 void createDSLRDialog();
380
381 // Observer
382 void showObserverDialog();
383
384 // ////////////////////////////////////////////////////////////////////
385 // Standalone editor
386 // ////////////////////////////////////////////////////////////////////
387 /**
388 * Gets called when the stand-alone editor gets a show event.
389 * Do this initialization here so that if the live capture module was
390 * used after startup, it will have set more recent remembered values.
391 */
392 void onStandAloneShow(QShowEvent* event);
393
394 bool m_standAlone {false};
395 void setStandAloneGain(double value);
396 void setStandAloneOffset(double value);
397
398 CustomProperties *customPropertiesDialog() const
399 {
400 return m_customPropertiesDialog.get();
401 }
402
403
404 // ////////////////////////////////////////////////////////////////////
405 // Access to properties
406 // ////////////////////////////////////////////////////////////////////
407
408 /**
409 * @brief Set the observer name.
410 */
411 void setObserverName(const QString &value)
412 {
413 state()->setObserverName(value);
414 };
415
416 QString getObserverName()
417 {
418 return state()->observerName();
419 }
420
421 QVariantMap &settings()
422 {
423 return m_settings;
424 }
425 void setSettings(const QVariantMap &newSettings)
426 {
427 m_settings = newSettings;
428 }
429
430 int cameraId() const
431 {
432 return m_cameraId;
433 }
434
435signals:
436 // communication with other modules
437 void ready();
438 void requestAction(int cameraID, CaptureWorkflowActionType action);
439 void refreshCamera(uint id, bool isValid);
440 void newExposureProgress(SequenceJob *job, const QString &trainname);
441 void newDownloadProgress(double, const QString &trainname);
442 void newImage(SequenceJob *job, const QSharedPointer<FITSData> &data, const QString &trainname);
443 void captureTarget(QString targetName);
444 void captureComplete(const QVariantMap &metadata, const QString &trainname);
445 void resetNonGuidedDither();
446 void runAutoFocus(AutofocusReason autofocusReason, const QString &reasonInfo, const QString &trainname);
447 void resetFocusFrame(const QString &trainname);
448 void abortFocus(const QString &trainname);
449 void adaptiveFocus(const QString &trainname);
450 void settingsUpdated(const QVariantMap &settings);
451 void sequenceChanged(const QJsonArray &sequence);
452 void newLocalPreview(const QString &preview);
453 void dslrInfoRequested(const QString &cameraName);
454 void filterManagerUpdated(ISD::FilterWheel *device);
455 void newFilterStatus(FilterState state);
456 void trainChanged();
457 void newLog(const QString &text);
458
459 // Signals for the Analyze tab.
460 void captureStarting(double exposureSeconds, const QString &filter);
461 void captureAborted(double exposureSeconds);
462
463 // communication with other modules
464 void checkFocus(double, const QString &trainname);
465 void meridianFlipStarted(const QString &trainname);
466 void guideAfterMeridianFlip();
467 void newStatus(CaptureState status, const QString &devicename, int cameraID);
468 void suspendGuiding();
469 void resumeGuiding();
470 void driverTimedout(const QString &deviceName);
471
472private slots:
473 // ////////////////////////////////////////////////////////////////////
474 // slots handling device and module events
475 // ////////////////////////////////////////////////////////////////////
476
477 void setVideoStreamEnabled(bool enabled);
478
479 // Cooler
480 void setCoolerToggled(bool enabled);
481
482 // Filter
483 void setFilterStatus(FilterState filterState);
484
485 // Jobs
486 void resetJobs();
487 bool selectJob(QModelIndex i);
488 void editJob(QModelIndex i);
489 void resetJobEdit(bool cancelled = false);
490
491private:
492
493 /**
494 * @brief initCamera Initialize all camera settings
495 */
496 void initCamera();
497 // ////////////////////////////////////////////////////////////////////
498 // Device updates
499 // ////////////////////////////////////////////////////////////////////
500 // Rotator
501 void updateRotatorAngle(double value);
502 void setRotatorReversed(bool toggled);
503
504 /**
505 * @brief updateCCDTemperature Update CCD temperature in capture module.
506 * @param value Temperature in celcius.
507 */
508 void updateCCDTemperature(double value);
509
510 // Auto Focus
511 /**
512 * @brief setFocusStatus Forward the new focus state to the capture module state machine
513 */
514 void setFocusStatus(FocusState newstate);
515
516 /**
517 * @brief updateFocusStatus Handle new focus state
518 */
519 void updateFocusStatus(FocusState newstate);
520
521 // Adaptive Focus
522 /**
523 * @brief focusAdaptiveComplete Forward the new focus state to the capture module state machine
524 */
525 void focusAdaptiveComplete(bool success)
526 {
527 // directly forward it to the state machine
528 state()->updateAdaptiveFocusState(success);
529 }
530
531 /**
532 * @brief New camera selected
533 * @param isValid is the selected camera valid.
534 */
535 void updateCamera(bool isValid);
536
537 /**
538 * @brief checkCamera Refreshes the CCD information in the capture module.
539 */
540 void refreshCameraSettings();
541
542 /**
543 * @brief processCCDNumber Process number properties arriving from CCD. Currently, only CCD and Guider frames are processed.
544 * @param nvp pointer to number property.
545 */
546 void processCameraNumber(INDI::Property prop);
547
548 /**
549 * @brief Slot receiving the update of the current target distance.
550 * @param targetDiff distance to the target in arcseconds.
551 */
552 void updateTargetDistance(double targetDiff);
553
554 // ////////////////////////////////////////////////////////////////////
555 // Capture actions
556 // ////////////////////////////////////////////////////////////////////
557 /**
558 * @brief captureStarted Change the UI after the capturing process
559 * has been started.
560 */
561 void jobStarting();
562
563 /**
564 * @brief addJob Add a new job to the UI. This is used when a job is loaded from a capture sequence file. In
565 * contrast to {@see #createJob()}, the job's attributes are taken from the file and only the UI gehts updated.
566 */
567 void addJob(SequenceJob *job);
568
569 /**
570 * @brief jobEditFinished Editing of an existing job finished, update its
571 * attributes from the UI settings. The job under edit is taken from the
572 * selection in the job table.
573 * @return true if job updated succeeded.
574 */
575 Q_INVOKABLE void editJobFinished();
576
577 /**
578 * @brief imageCapturingCompleted Capturing a single frame completed
579 */
580 Q_INVOKABLE void imageCapturingCompleted();
581
582 /**
583 * @brief captureStopped Capturing has stopped
584 */
585 Q_INVOKABLE void captureStopped();
586
587 /**
588 * @brief processFITSfinished processing new FITS data received from camera finished.
589 * @param success true iff processing was successful
590 */
591 Q_INVOKABLE void processingFITSfinished(bool success);
592
593 /**
594 * @brief captureRunning Manage the result when capturing has been started
595 */
596 Q_INVOKABLE void captureRunning();
597
598 /**
599 * @brief captureImageStarted Image capturing for the active job has started.
600 */
601 Q_INVOKABLE void captureImageStarted();
602
603 /**
604 * @brief jobPreparationStarted Preparation actions for the current active job have beenstarted.
605 */
606 Q_INVOKABLE void jobExecutionPreparationStarted();
607
608 /**
609 * @brief jobPrepared Select the job that is currently in preparation.
610 */
611 void jobPrepared(SequenceJob *job);
612
613 /**
614 * @brief Set the name of the target to be captured.
615 */
616 void setTargetName(const QString &newTargetName);
617
618 // ////////////////////////////////////////////////////////////////////
619 // UI controls
620 // ////////////////////////////////////////////////////////////////////
621 void checkFrameType(int index);
622
623 /**
624 * @brief updateStartButtons Update the start and the pause button to new states of capturing
625 * @param start start capturing
626 * @param pause pause capturing
627 */
628 void updateStartButtons(bool start, bool pause = false);
629
630 void setBusy(bool enable);
631
632 /**
633 * @brief Listen to device property changes (temperature, rotator) that are triggered by
634 * SequenceJob.
635 */
636 void updatePrepareState(CaptureState prepareState);
637
638 /**
639 * @brief updateJobTable Update the table row values for the given sequence job. If the job
640 * is null, all rows will be updated
641 * @param job as identifier for the row
642 * @param full if false, then only the status and the counter will be updated.
643 */
644 void updateJobTable(SequenceJob *job, bool full = false);
645
646 /**
647 * @brief updateJobFromUI Update all job attributes from the UI settings.
648 */
649 void updateJobFromUI(SequenceJob *job, FilenamePreviewType filenamePreview = FILENAME_NOT_PREVIEW);
650
651 /**
652 * @brief syncGUIToJob Update UI to job settings
653 */
654 void syncGUIToJob(SequenceJob *job);
655
656 void syncFrameType(const QString &name);
657
658 void syncCameraInfo();
659
660 // create a new row in the job table and fill it with the given job's values
661 void createNewJobTableRow(SequenceJob *job);
662
663 /**
664 * @brief Update the style of the job's row, depending on the job's state
665 */
666 void updateRowStyle(SequenceJob *job);
667
668 /**
669 * @brief updateCellStyle Update the cell's style. If active is true, set a bold and italic font and
670 * a regular font otherwise.
671 */
672 void updateCellStyle(QTableWidgetItem *cell, bool active);
673
674 /**
675 * @brief syncControl Sync setting to widget. The value depends on the widget type.
676 * @param settings Map of all settings
677 * @param key name of widget to sync
678 * @param widget pointer of widget to set
679 * @return True if sync successful, false otherwise
680 */
681 bool syncControl(const QVariantMap &settings, const QString &key, QWidget * widget);
682
683 /**
684 * @brief moveJobUp Move the job in the sequence queue one place up or down.
685 */
686 void moveJob(bool up);
687
688
689 void removeJobFromQueue();
690
691 void saveFITSDirectory();
692
693 /**
694 * @brief updateCaptureFormats Update encoding and transfer formats
695 */
696 void updateCaptureFormats();
697
698 /**
699 * @brief updateHFRCheckAlgo Update the in-sequence HFR check algorithm
700 */
701 void updateHFRCheckAlgo();
702
703 /**
704 * Clear in-sequence focus settings. It sets the autofocus HFR to zero so that next autofocus value is remembered for the in-sequence focusing.
705 */
706 void clearAutoFocusHFR();
707
708 // selection of a job
709 void selectedJobChanged(QModelIndex current, QModelIndex previous);
710
711 // Clear Camera Configuration
712 void clearCameraConfiguration();
713
714 // Change filter name in INDI
715 void editFilterName();
716 bool editFilterNameInternal(const QStringList &labels, QStringList &newLabels);
717
718 void updateVideoDurationUnit();
719
720 // ////////////////////////////////////////////////////////////////////
721 // Settings
722 // ////////////////////////////////////////////////////////////////////
723 /**
724 * @brief loadSettings Load setting from Options and set them accordingly.
725 */
726 void loadGlobalSettings();
727
728 /**
729 * @brief syncLimitSettings Update Limits UI from Options
730 */
731 void syncLimitSettings();
732
733 /**
734 * @brief settleSettings Run this function after timeout from debounce timer to update database
735 * and emit settingsChanged signal. This is required so we don't overload output.
736 */
737 void settleSettings();
738
739 /**
740 * @brief syncSettings When checkboxes, comboboxes, or spin boxes are updated, save their values in the
741 * global and per-train settings.
742 */
743 void syncSettings();
744
745 /**
746 * @brief Connect GUI elements to sync settings once updated.
747 */
748 void connectSyncSettings();
749 /**
750 * @brief Stop updating settings when GUI elements are updated.
751 */
752 void disconnectSyncSettings();
753
754 // ////////////////////////////////////////////////////////////////////
755 // helper functions
756 // ////////////////////////////////////////////////////////////////////
757 // object initializstion
758 void init();
759 // camera device name
760 QString getCameraName()
761 {
762 return activeCamera() == nullptr ? "" : activeCamera()->getDeviceName();
763 }
764
765 // check if the upload paths are filled correctly
766 bool checkUploadPaths(FilenamePreviewType filenamePreview);
767
768 // Create a Json job from the current job table row
769 QJsonObject createJsonJob(SequenceJob *job, int currentRow);
770
771 /**
772 * @return Returns true if an ongoing capture is a preview capture.
773 */
774 bool isActiveJobPreview()
775 {
776 return state() && state()->isActiveJobPreview();
777 }
778
779 // Filename preview
780 void generatePreviewFilename();
781 QString previewFilename(FilenamePreviewType previewType = FILENAME_LOCAL_PREVIEW);
782
783 // Updating the upload mode
784 void selectUploadMode(int index);
785 void checkUploadMode(int index);
786
787 /**
788 * @brief updateJobTableCountCell Update the job counter in the job table of a sigle job
789 */
790 void updateJobTableCountCell(SequenceJob *job, QTableWidgetItem *countCell);
791
792 void cullToDSLRLimits();
793
794 void resetFrameToZero();
795
796 // reset = 0 --> Do not reset
797 // reset = 1 --> Full reset
798 // reset = 2 --> Only update limits if needed
799 void updateFrameProperties(int reset = 0);
800
801 // ////////////////////////////////////////////////////////////////////
802 // Sub dialogs
803 // ////////////////////////////////////////////////////////////////////
804 QSharedPointer<FilterManager> m_FilterManager;
805 std::unique_ptr<Ui::Limits> m_LimitsUI;
806 QPointer<QDialog> m_LimitsDialog;
807 std::unique_ptr<Ui::Calibration> m_CalibrationUI;
808 QPointer<QDialog> m_CalibrationDialog;
809 QPointer<ScriptsManager> m_scriptsManager;
810 QSharedPointer<RotatorSettings> m_RotatorControlPanel;
811 std::unique_ptr<DSLRInfo> m_DSLRInfoDialog;
812
813 // ////////////////////////////////////////////////////////////////////
814 // Module logging
815 // ////////////////////////////////////////////////////////////////////
816 void appendLogText(const QString &text)
817 {
818 emit newLog(QString("[%1] ").arg(getCameraName()) + text);
819 }
820
821 // ////////////////////////////////////////////////////////////////////
822 // Attributes
823 // ////////////////////////////////////////////////////////////////////
824 int m_cameraId;
825 QVariantMap m_settings;
826 QVariantMap m_GlobalSettings;
827 std::unique_ptr<CustomProperties> m_customPropertiesDialog;
828 QTimer m_DebounceTimer;
829
830 bool m_standAloneUseCcdGain { true};
831 bool m_standAloneUseCcdOffset { true};
832 bool m_JobUnderEdit { false };
833
834 QUrl m_dirPath;
835
837 QSharedPointer<CameraProcess> m_cameraProcess;
838 QSharedPointer<CameraState> m_cameraState;
839
840 // Controls
841 double GainSpinSpecialValue { INVALID_VALUE };
842 double OffsetSpinSpecialValue { INVALID_VALUE };
843};
844} // namespace Ekos
Camera class controls an INDI Camera device.
Definition indicamera.h:45
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
@ CAPTURE_SUSPENDED
Definition ekos.h:98
@ CAPTURE_ABORTED
Definition ekos.h:99
@ CAPTURE_IDLE
Definition ekos.h:93
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
QObject * parent() const const
virtual bool event(QEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.