Kstars

observatorydomemodel.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 "../auxiliary/dome.h"
10#include "observatoryweathermodel.h"
11
12#include <QObject>
13
14
15namespace Ekos
16{
17
18class ObservatoryDomeModel: public QObject
19{
21
22 public:
23 ObservatoryDomeModel() = default;
24
25 void initModel(Dome *dome);
26 bool isActive() {return initialized;}
27
28 ISD::Dome::Status status();
29 ISD::Dome::ShutterStatus shutterStatus();
30
31 // proxies to the underlying dome object
32 bool canPark()
33 {
34 return (domeInterface != nullptr && domeInterface->canPark());
35 }
36 void park();
37 void unpark();
38 ISD::ParkStatus parkStatus();
39
40 double azimuthPosition()
41 {
42 return domeInterface->azimuthPosition();
43 }
44 void setAzimuthPosition(double position)
45 {
46 domeInterface->setAzimuthPosition(position);
47 }
48
49 bool canAbsoluteMove()
50 {
51 return (domeInterface != nullptr && domeInterface->canAbsoluteMove());
52 }
53
54 void setRelativePosition(double position)
55 {
56 domeInterface->setRelativePosition(position);
57 }
58
59 bool canRelativeMove()
60 {
61 return (domeInterface != nullptr && domeInterface->canRelativeMove());
62 }
63
64 bool isRolloffRoof()
65 {
66 return (domeInterface != nullptr && domeInterface->isRolloffRoof());
67 }
68
69 bool isAutoSync()
70 {
71 return (domeInterface != nullptr && domeInterface->isAutoSync());
72 }
73
74 void setAutoSync(bool activate);
75
76 void abort();
77
78 bool hasShutter()
79 {
80 return (domeInterface != nullptr && domeInterface->hasShutter());
81 }
82 void openShutter();
83 void closeShutter();
84
85 bool moveDome(bool moveCW, bool start);
86
87 public slots:
88 void execute(WeatherActions actions);
89
90
91 private:
92 Dome *domeInterface;
93 bool initialized = false;
94
95 signals:
96 void newStatus(ISD::Dome::Status state);
97 void newParkStatus(ISD::ParkStatus status);
98 void newShutterStatus(ISD::Dome::ShutterStatus status);
99 void newAutoSyncStatus(bool enabled);
100 void azimuthPositionChanged(double position);
101 void ready();
102 void disconnected();
103 void newLog(const QString &text);
104};
105
106}
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.