Changeset View
Changeset View
Standalone View
Standalone View
kstars/ekos/observatory/observatorydomemodel.h
- This file was added.
1 | /* Ekos Observatory Module | ||||
---|---|---|---|---|---|
2 | Copyright (C) Wolfgang Reissenberger <sterne-jaeger@t-online.de> | ||||
3 | | ||||
4 | This application is free software; you can redistribute it and/or | ||||
5 | modify it under the terms of the GNU General Public | ||||
6 | License as published by the Free Software Foundation; either | ||||
7 | version 2 of the License, or (at your option) any later version. | ||||
8 | */ | ||||
9 | | ||||
10 | #pragma once | ||||
11 | | ||||
12 | #include "../auxiliary/dome.h" | ||||
13 | #include "observatoryweathermodel.h" | ||||
14 | | ||||
15 | #include <QObject> | ||||
16 | | ||||
17 | | ||||
18 | namespace Ekos | ||||
19 | { | ||||
20 | | ||||
21 | class ObservatoryDomeModel: public QObject | ||||
22 | { | ||||
23 | | ||||
24 | Q_OBJECT | ||||
25 | | ||||
26 | public: | ||||
27 | ObservatoryDomeModel() = default; | ||||
28 | | ||||
29 | void initModel(Dome *dome); | ||||
30 | | ||||
31 | ISD::Dome::Status status(); | ||||
32 | ISD::Dome::ShutterStatus shutterStatus(); | ||||
33 | | ||||
34 | // proxies to the underlying dome object | ||||
35 | bool canPark() { return (mDome != nullptr && mDome->canPark()); } | ||||
36 | void park(); | ||||
37 | void unpark(); | ||||
38 | bool hasShutter() { return (mDome != nullptr && mDome->hasShutter()); } | ||||
39 | void openShutter(); | ||||
40 | void closeShutter(); | ||||
41 | | ||||
42 | public slots: | ||||
43 | void execute(WeatherActions actions); | ||||
44 | | ||||
45 | | ||||
46 | private: | ||||
47 | Dome *mDome; | ||||
48 | | ||||
49 | signals: | ||||
50 | void newStatus(ISD::Dome::Status state); | ||||
51 | void newShutterStatus(ISD::Dome::ShutterStatus status); | ||||
52 | void ready(); | ||||
53 | void disconnected(); | ||||
54 | void newLog(const QString &text); | ||||
55 | }; | ||||
56 | | ||||
57 | } |