9#include "ui_observatory.h"
11#include "indi/indidome.h"
12#include "indi/indiweather.h"
16#include <KLocalizedString>
21struct ObservatoryStatusControl
23 bool useDome, useShutter, useWeather;
28 bool parkDome, closeShutter, stopScheduler;
33class Observatory :
public QWidget,
public Ui::Observatory
36 Q_CLASSINFO(
"D-Bus Interface",
"org.kde.kstars.Ekos.Observatory")
42 bool setDome(
ISD::Dome *device);
43 bool addWeatherSource(
ISD::Weather *device);
52 return m_LogText.
join(
"\n");
61 ObservatoryStatusControl statusControl()
63 return m_StatusControl;
65 void setStatusControl(ObservatoryStatusControl control);
67 void setWeatherSource(
const QString &name);
77 void enableMotionControl(
bool enabled);
80 void enableAutoSync(
bool enabled);
81 void showAutoSync(
bool enabled);
85 void appendLogText(
const QString &);
91 void setWarningActions(WeatherActions
actions);
92 void setAlertActions(WeatherActions
actions);
103 std::map<QString, QPair<QAbstractButton*, QLineEdit*>*> sensorDataWidgets = {};
105 std::map<QString, QVector<QCPGraphData>*> sensorGraphData = {};
108 std::map<QString, int> sensorRanges = {};
116 ISD::Weather::Status m_WeatherStatus { ISD::Weather::WEATHER_IDLE };
119 void initWeatherActions(
bool enabled);
121 void initSensorGraphs();
122 void updateSensorData(
const QJsonArray &data);
127 void weatherChanged(ISD::Weather::Status status);
132 void setWarningActionsActive(
bool active);
136 void setAlertActionsActive(
bool active);
141 bool autoScaleValues()
143 return m_autoScaleValues;
145 void setAutoScaleValues(
bool show);
150 void statusControlSettingsChanged();
153 void enableWeather(
bool enable);
154 void clearSensorDataHistory();
155 void shutdownWeather();
156 void setWeatherStatus(ISD::Weather::Status status);
160 void refreshSensorGraph();
162 void execute(WeatherActions
actions);
165 void weatherWarningSettingsChanged();
166 void weatherAlertSettingsChanged();
169 void selectedSensorChanged(
QString id);
172 void observatoryStatusChanged(
bool ready);
173 void domeAzimuthChanged(
double position);
177 void setDomeStatus(ISD::Dome::Status status);
178 void setDomeParkStatus(ISD::ParkStatus status);
179 void setShutterStatus(ISD::Dome::ShutterStatus status);
184 WeatherActions getWarningActions()
188 QString getWarningActionsStatus();
189 bool getWarningActionsActive()
191 return warningActionsActive;
197 WeatherActions getAlertActions()
199 return m_AlertActions;
201 QString getAlertActionsStatus();
202 bool getAlertActionsActive()
204 return alertActionsActive;
212 ObservatoryStatusControl m_StatusControl;
214 QTimer warningTimer, alertTimer;
216 bool warningActionsActive, alertActionsActive, m_autoScaleValues;
217 void startAlertTimer();
218 void startWarningTimer();
Class handles control of INDI dome devices.
Focuser class handles control of INDI Weather devices.
Ekos is an advanced Astrophotography tool for Linux.
ISD is a collection of INDI Standard Devices.
QString join(QChar separator) const const