Kstars

observatorymodel.h
1/* Ekos Observatory Module
2 SPDX-FileCopyrightText: Wolfgang Reissenberger <sterne-jaeger@t-online.de>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "observatorydomemodel.h"
10#include "observatoryweathermodel.h"
11
12#include <QObject>
13
14namespace Ekos
15{
16
17struct ObservatoryStatusControl
18{
19 bool useDome, useShutter, useWeather;
20};
21
22class ObservatoryModel : public QObject
23{
25
26 public:
27 ObservatoryModel();
28
29 ObservatoryDomeModel *getDomeModel()
30 {
31 return mDomeModel;
32 }
33 ObservatoryWeatherModel *getWeatherModel()
34 {
35 return mWeatherModel;
36 }
37
38 void setDomeModel(ObservatoryDomeModel *model);
39 void setWeatherModel(ObservatoryWeatherModel *model);
40
41 /**
42 * @brief Retrieve the settings that define, from which states the
43 * "ready" state of the observatory is derived from.
44 */
45 ObservatoryStatusControl statusControl()
46 {
47 return mStatusControl;
48 }
49 void setStatusControl(ObservatoryStatusControl control);
50
51 /**
52 * @brief Is the observatory ready? This depends upon the states of the weather,
53 * dome etc and upon whether these settings are relevant (see status control).
54 */
55 bool isReady();
56
57 public slots:
58 // call this slot in case that the weather or dome status has changed
59 void updateStatus();
60
61 /**
62 * @brief Depending on the status control settings execute everything so
63 * that the status reaches the state "READY".
64 */
65 void makeReady();
66
67 signals:
68 /**
69 * @brief Signal a new observatory status
70 * @param isReady
71 */
72 void newStatus(bool isReady);
73
74
75 private:
76 ObservatoryStatusControl mStatusControl;
77
78 ObservatoryDomeModel *mDomeModel = nullptr;
79 ObservatoryWeatherModel *mWeatherModel = nullptr;
80
81};
82
83}
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:79
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:49:22 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.