Kstars

indirotator.h
1 /*
2  SPDX-FileCopyrightText: 2022 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "indiconcretedevice.h"
10 
11 namespace ISD
12 {
13 /**
14  * @class Rotator
15  * Rotator class handles control of INDI Rotator devices.
16  *
17  * @author Jasem Mutlaq
18  */
19 class Rotator : public ConcreteDevice
20 {
21  Q_OBJECT
22 
23  public:
25 
26  virtual void registerProperty(INDI::Property prop) override;
27  virtual void processNumber(INDI::Property prop) override;
28  virtual void processSwitch(INDI::Property prop) override;
29 
30  bool setAbsoluteAngle(double angle);
31  bool setAbsoluteSteps(uint32_t steps);
32  bool setReversed(bool enabled);
33 
34  bool isReversed() const {return m_Reversed;}
35  double absoluteAngle() const {return m_AbsoluteAngle;}
36  IPState absoluteAngleState() const {return m_AbsoluteAngleState;}
37 
38  signals:
39  void newAbsoluteAngle(double value, IPState state);
40  void reverseToggled(bool enabled);
41 
42  private:
43  bool m_Reversed {false};
44  double m_AbsoluteAngle {0};
45  IPState m_AbsoluteAngleState {IPS_IDLE};
46 };
47 }
Q_OBJECTQ_OBJECT
The ConcreteDevice class.
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Jun 9 2023 04:02:22 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.