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 | | ||||
14 | #include <QObject> | ||||
15 | | ||||
16 | | ||||
17 | namespace Ekos | ||||
18 | { | ||||
19 | | ||||
20 | class ObservatoryDomeModel: public QObject | ||||
21 | { | ||||
22 | | ||||
23 | Q_OBJECT | ||||
24 | | ||||
25 | public: | ||||
26 | ObservatoryDomeModel() = default; | ||||
27 | | ||||
28 | void initModel(Dome *dome); | ||||
29 | | ||||
30 | ISD::Dome::Status status(); | ||||
31 | ISD::Dome::ShutterStatus shutterStatus(); | ||||
32 | | ||||
33 | // proxies to the underlying dome object | ||||
34 | bool canPark() { return (mDome != nullptr && mDome->canPark()); } | ||||
35 | void park(); | ||||
36 | void unpark(); | ||||
37 | bool hasShutter() { return (mDome != nullptr && mDome->hasShutter()); } | ||||
38 | void openShutter(); | ||||
39 | void closeShutter(); | ||||
40 | | ||||
41 | private: | ||||
42 | Dome *mDome; | ||||
43 | | ||||
44 | signals: | ||||
45 | void newStatus(ISD::Dome::Status state); | ||||
46 | void newShutterStatus(ISD::Dome::ShutterStatus status); | ||||
47 | void ready(); | ||||
48 | void newLog(const QString &text); | ||||
49 | }; | ||||
50 | | ||||
51 | } |