File indexing completed on 2024-04-28 03:43:07
0001 /* Progress and status of capture preparation and execution 0002 SPDX-FileCopyrightText: Wolfgang Reissenberger <sterne-jaeger@openfuture.de> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "ui_ledstatuswidget.h" 0010 #include "ekos/ekos.h" 0011 #include "indi/indimount.h" 0012 0013 #include <KLed> 0014 0015 namespace Ekos 0016 { 0017 0018 class LedStatusWidget : public QWidget, Ui::LedStatusWidget 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 LedStatusWidget(QWidget * parent = nullptr); 0024 0025 /** 0026 * @brief Change the status text and LED color 0027 */ 0028 void setStatus(QString text, Qt::GlobalColor color); 0029 0030 /** 0031 * @brief Currently displayed status text 0032 */ 0033 QString getStatusText() { return statusText->text(); } 0034 0035 public slots: 0036 /** 0037 * @brief Handle new capture state 0038 */ 0039 void setCaptureState(CaptureState status); 0040 0041 /** 0042 * @brief Handle the mount state 0043 */ 0044 void setMountState(QString text, ISD::Mount::Status status); 0045 0046 /** 0047 * @brief Handle the focus state 0048 */ 0049 void setFocusState(FocusState status); 0050 0051 /** 0052 * @brief Handle new filter state 0053 */ 0054 void setFilterState(FilterState status); 0055 0056 private: 0057 KLed *statusLed {nullptr}; 0058 0059 FilterState lastFilterState = FILTER_IDLE; 0060 }; 0061 0062 } // namespace