8#include "guidestatewidget.h"
12GuideStateWidget::GuideStateWidget(
QWidget * parent) :
QWidget(parent)
18void GuideStateWidget::init()
21 if (idlingStateLed ==
nullptr)
23 idlingStateLed =
new KLed(
Qt::gray, KLed::Off, KLed::Flat, KLed::Circular,
this);
24 idlingStateLed->setObjectName(
"idlingStateLed");
25 guideStateLayout->insertWidget(0, idlingStateLed);
27 if (preparingStateLed ==
nullptr)
29 preparingStateLed =
new KLed(
Qt::gray, KLed::Off, KLed::Flat, KLed::Circular,
this);
30 preparingStateLed->setObjectName(
"preparingStateLed");
31 guideStateLayout->insertWidget(2, preparingStateLed);
33 if (runningStateLed ==
nullptr)
35 runningStateLed =
new KLed(
Qt::gray, KLed::Off, KLed::Flat, KLed::Circular,
this);
36 runningStateLed->setObjectName(
"runningStateLed");
37 guideStateLayout->insertWidget(4, runningStateLed);
41void GuideStateWidget::updateGuideStatus(GuideState state)
43 idlingStateLed->off();
44 preparingStateLed->off();
45 runningStateLed->off();
48 case GUIDE_DISCONNECTED:
49 idlingStateLed->setColor(
Qt::red);
54 preparingStateLed->setColor(
Qt::gray);
64 preparingStateLed->on();
66 case GUIDE_STAR_SELECT:
67 case GUIDE_CALIBRATING:
70 preparingStateLed->on();
72 case GUIDE_CALIBRATION_ERROR:
73 preparingStateLed->setColor(
Qt::red);
74 runningStateLed->setColor(
Qt::red);
75 preparingStateLed->on();
77 case GUIDE_CALIBRATION_SUCCESS:
80 preparingStateLed->on();
85 runningStateLed->setState(KLed::On);
87 case GUIDE_MANUAL_DITHERING:
89 case GUIDE_DITHERING_SETTLE:
93 runningStateLed->setState(KLed::On);
95 case GUIDE_DITHERING_ERROR:
98 preparingStateLed->setColor(
Qt::red);
99 runningStateLed->setColor(
Qt::red);
100 idlingStateLed->on();
105 idlingStateLed->on();
Ekos is an advanced Astrophotography tool for Linux.