cut  1.2.1-pre1
QeDartBoard.hpp
Go to the documentation of this file.
1 #ifndef QEDARTBOARD_HPP
2 #define QEDARTBOARD_HPP
3 
4 #include <QObject>
5 #include <QString>
6 #include <QDebug>
7 #include <QMetaClassInfo>
8 #include <QMetaObject>
9 #include <QMetaProperty>
10 #include <QVariant>
11 #include <QWidget>
12 #include <QObject>
13 
14 #include <qpalette.h>
15 #include <qcolor.h>
16 #include <qpainter.h>
17 
18 #define _USE_MATH_DEFINES
19 #include <cmath>
20 
37 class QeDartBoard : public QWidget {
38  Q_OBJECT
39 
44  Q_PROPERTY(double currentAlt MEMBER m_currentAlt READ getCurrentAlt WRITE setCurrentAlt NOTIFY currentAltChanged )
45 
46 
50  Q_PROPERTY(double currentAz MEMBER m_currentAz READ getCurrentAz WRITE setCurrentAz NOTIFY currentAzChanged )
51 
52 
56  Q_PROPERTY(double targetAlt MEMBER m_targetAlt READ getTargetAlt WRITE setTargetAlt NOTIFY targetAltChanged )
57 
58 
62  Q_PROPERTY(double targetAz MEMBER m_targetAz READ getTargetAz WRITE setTargetAz NOTIFY targetAzChanged )
63 
64 
68  Q_PROPERTY(double telescopeLat MEMBER m_telescopeLat READ getTelescopeLat WRITE setTelescopeLat NOTIFY telescopeLatChanged )
69 
70 
74  Q_PROPERTY(double telescopeLong MEMBER m_telescopeLong READ getTelescopeLong WRITE setTelescopeLong NOTIFY telescopeLongChanged )
75 
76 
80  Q_PROPERTY(double windDirection MEMBER m_windDirection READ getWindDirection WRITE setWindDirection NOTIFY windDirectionChanged )
81 
82 
83  public:
84  explicit QeDartBoard(QWidget *parent = Q_NULLPTR);
85  ~QeDartBoard();
86 
87  double getCurrentAlt(){ return m_currentAlt; };
88  double getCurrentAz(){ return m_currentAz; };
89  double getTargetAlt(){ return m_targetAlt; };
90  double getTargetAz(){ return m_targetAz; };
91  double getTelescopeLat(){ return m_telescopeLat; };
92  double getTelescopeLong(){ return m_telescopeLong; };
93  double getWindDirection(){ return m_windDirection; };
94 
95 signals:
100  void currentAltChanged(double newValue);
101 
106  void currentAzChanged(double newValue);
107 
112  void targetAltChanged(double newValue);
113 
118  void targetAzChanged(double newValue);
119 
124  void telescopeLatChanged(double newValue);
125 
130  void telescopeLongChanged(double newValue);
131 
136  void windDirectionChanged(double newValue);
137 
138 
139  public slots:
140  void setCurrentAlt(double newValue){ this->m_currentAlt = newValue; this->update();} ;
141  void setCurrentAz (double newValue){ this->m_currentAz = newValue; this->update(); };
142  void setTargetAlt(double newValue){ this->m_targetAlt = newValue; this->update(); };
143  void setTargetAz(double newValue){ this->m_targetAz = newValue; this->update(); };
144  void setTelescopeLat (double newValue){ this->m_windDirection = newValue; this->update(); };
145  void setTelescopeLong(double newValue){ this->m_telescopeLat = newValue; this->update(); };
146  void setWindDirection(double newValue){ this->m_telescopeLong = newValue; this->update(); };
147 
148  protected:
149  void paintEvent(QPaintEvent *event);
150 
151  private:
152  double m_currentAlt = 0.0;
153  double m_currentAz = 0.0;
154  double m_targetAlt = 0.0;
155  double m_targetAz = 0.0;
156  double m_windDirection = 0.0;
157  double m_telescopeLat = 0.0;
158  double m_telescopeLong = 0.0;
159 };
160 
161 #endif // QEDARTBOARD_HPP
QeDartBoard::currentAz
double currentAz
Azimuth coordinate of the current position in radians.
Definition: QeDartBoard.hpp:50
QeDartBoard::setTelescopeLat
void setTelescopeLat(double newValue)
Definition: QeDartBoard.hpp:144
QeDartBoard::setTargetAlt
void setTargetAlt(double newValue)
Definition: QeDartBoard.hpp:142
QeDartBoard::targetAlt
double targetAlt
Altitude coordinate of the target position in radians.
Definition: QeDartBoard.hpp:56
QeDartBoard::~QeDartBoard
~QeDartBoard()
Definition: QeDartBoard.cpp:12
QeDartBoard::telescopeLatChanged
void telescopeLatChanged(double newValue)
Indicates that telescope latitude has changed.
QeDartBoard::currentAltChanged
void currentAltChanged(double newValue)
Indicates that the current altitude value has changed.
QeDartBoard::windDirectionChanged
void windDirectionChanged(double newValue)
Indicates that the wind direction has changed.
QeDartBoard::getTelescopeLong
double getTelescopeLong()
Definition: QeDartBoard.hpp:92
QeDartBoard::getTargetAz
double getTargetAz()
Definition: QeDartBoard.hpp:90
QeDartBoard::windDirection
double windDirection
Wind direction – currently not used @accessors getWindDirection(), setWindDirection()
Definition: QeDartBoard.hpp:80
QeDartBoard::telescopeLat
double telescopeLat
Telescope Latitude position – currently not used @accessors getTelescopeLat(), setTelescopeLat(double...
Definition: QeDartBoard.hpp:68
QeDartBoard::telescopeLongChanged
void telescopeLongChanged(double newValue)
Indicates that telescope longitude has changed.
QeDartBoard::setCurrentAlt
void setCurrentAlt(double newValue)
Definition: QeDartBoard.hpp:140
QeDartBoard::setTelescopeLong
void setTelescopeLong(double newValue)
Definition: QeDartBoard.hpp:145
QeDartBoard::targetAltChanged
void targetAltChanged(double newValue)
Indicates that the target altitude value has changed.
QeDartBoard
Dartboard widget.
Definition: QeDartBoard.hpp:37
QeDartBoard::paintEvent
void paintEvent(QPaintEvent *event)
Definition: QeDartBoard.cpp:16
QeDartBoard::getCurrentAlt
double getCurrentAlt()
Definition: QeDartBoard.hpp:87
QeDartBoard::setTargetAz
void setTargetAz(double newValue)
Definition: QeDartBoard.hpp:143
QeDartBoard::currentAlt
double currentAlt
Altitude coordinate of the current position in radians.
Definition: QeDartBoard.hpp:44
QeDartBoard::getWindDirection
double getWindDirection()
Definition: QeDartBoard.hpp:93
QeDartBoard::targetAzChanged
void targetAzChanged(double newValue)
Indicates that the target azimuth value has changed.
QeDartBoard::QeDartBoard
QeDartBoard(QWidget *parent=Q_NULLPTR)
Definition: QeDartBoard.cpp:7
QeDartBoard::targetAz
double targetAz
Azimuth coordinate of the target position in radians.
Definition: QeDartBoard.hpp:62
QeDartBoard::telescopeLong
double telescopeLong
Telescope Longitude position – currently not used @accessors getTelescopeLong(), setTelescopeLong()
Definition: QeDartBoard.hpp:74
QeDartBoard::currentAzChanged
void currentAzChanged(double newValue)
Indicates that the current azimuth value has changed.
QeDartBoard::getCurrentAz
double getCurrentAz()
Definition: QeDartBoard.hpp:88
QeDartBoard::setCurrentAz
void setCurrentAz(double newValue)
Definition: QeDartBoard.hpp:141
QeDartBoard::setWindDirection
void setWindDirection(double newValue)
Definition: QeDartBoard.hpp:146
QeDartBoard::getTargetAlt
double getTargetAlt()
Definition: QeDartBoard.hpp:89
QeDartBoard::getTelescopeLat
double getTelescopeLat()
Definition: QeDartBoard.hpp:91
cut-test-performance-python-datapoints.update
def update(number, ups, timeout, datatype, instance)
Definition: cut-test-performance-python-datapoints.py:69