cut 3.3.0
Loading...
Searching...
No Matches
QeDartBoard.hpp
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 <QtUiPlugin/QDesignerExportWidget>
13#include <elt/cut/widgets/widgets/QeRadialItemPlot.hpp>
14
15#include <qpalette.h>
16#include <qcolor.h>
17#include <qpainter.h>
18
19#define _USE_MATH_DEFINES
20#include <cmath>
21
42class QDESIGNER_WIDGET_EXPORT QeDartBoard : public QeRadialItemPlot {
43 Q_OBJECT
44
49 Q_PROPERTY(double currentAlt READ getCurrentAlt WRITE setCurrentAlt NOTIFY currentAltChanged )
50
51
55 Q_PROPERTY(double currentAz READ getCurrentAz WRITE setCurrentAz NOTIFY currentAzChanged )
56
61 Q_PROPERTY(double targetAlt READ getTargetAlt WRITE setTargetAlt NOTIFY targetAltChanged )
62
67 Q_PROPERTY(double targetAz READ getTargetAz WRITE setTargetAz NOTIFY targetAzChanged )
68
74
80
86
87 public:
92 explicit QeDartBoard(QWidget *parent = Q_NULLPTR);
93 virtual ~QeDartBoard();
94
99 double getCurrentAlt(){ return m_currentAlt; };
100
105 double getCurrentAz(){ return m_currentAz; };
106
111 double getTargetAlt(){ return m_targetAlt; };
112
117 double getTargetAz(){ return m_targetAz; };
118
124 double getTelescopeLat(){ return m_telescopeLat; };
125
131 double getTelescopeLong(){ return m_telescopeLong; };
132
138 double getWindDirection(){ return m_windDirection; };
139
140signals:
145 void currentAltChanged(double newValue);
146
151 void currentAzChanged(double newValue);
152
157 void targetAltChanged(double newValue);
158
163 void targetAzChanged(double newValue);
164
170 void telescopeLatChanged(double newValue);
171
177 void telescopeLongChanged(double newValue);
178
184 void windDirectionChanged(double newValue);
185
186public slots:
191 void setCurrentAlt(double newValue);
192
197 void setCurrentAz (double newValue);
198
203 void setTargetAlt(double newValue);
204
209 void setTargetAz(double newValue);
210
216 void setTelescopeLat (double newValue);
217
223 void setTelescopeLong(double newValue);
224
230 void setWindDirection(double newValue);
231
232 protected:
238 void paintEvent(QPaintEvent *event) override;
239
244 void paintDartBoard(QPainter *painter) override;
245
246 private:
247 double m_currentAlt = 0.0;
248 double m_currentAz = 0.0;
249 double m_targetAlt = 0.0;
250 double m_targetAz = 0.0;
251 double m_windDirection = 0.0;
252 double m_telescopeLat = 0.0;
253 double m_telescopeLong = 0.0;
254};
255
256#endif // QEDARTBOARD_HPP
double telescopeLong
Telescope Longitude position – currently not used.
Definition QeDartBoard.hpp:79
double telescopeLat
Telescope Latitude position – currently not used.
Definition QeDartBoard.hpp:73
void currentAzChanged(double newValue)
Indicates that the current azimuth value has changed.
void paintEvent(QPaintEvent *event) override
Overrides QWidget::paintEvent to implement its own rendering instructions.
Definition QeDartBoard.cpp:70
double getCurrentAz()
Gets the value of the current azimuth the widget has.
Definition QeDartBoard.hpp:105
void setTelescopeLong(double newValue)
Sets the value of the longitude of the telescope.
Definition QeDartBoard.cpp:58
void telescopeLatChanged(double newValue)
Indicates that telescope latitude has changed.
void targetAltChanged(double newValue)
Indicates that the target altitude value has changed.
void telescopeLongChanged(double newValue)
Indicates that telescope longitude has changed.
double getTelescopeLong()
Gets the value of the telescope longitude the widget has.
Definition QeDartBoard.hpp:131
double getWindDirection()
Gets the value of the wind direction the widget has.
Definition QeDartBoard.hpp:138
void targetAzChanged(double newValue)
Indicates that the target azimuth value has changed.
double getTargetAz()
Gets the value of the target azimuth the widget has.
Definition QeDartBoard.hpp:117
void setCurrentAz(double newValue)
Sets the value of the current azimuth property.
Definition QeDartBoard.cpp:34
QeDartBoard(QWidget *parent=Q_NULLPTR)
Constructor that is used to set a parent relationship with.
Definition QeDartBoard.cpp:11
double getCurrentAlt()
Gets the value of the current altitude the widget has.
Definition QeDartBoard.hpp:99
void setTelescopeLat(double newValue)
Sets the value of the latitude of the telescope.
Definition QeDartBoard.cpp:52
void setTargetAz(double newValue)
Sets the value of the target azimuth property.
Definition QeDartBoard.cpp:46
double targetAz
Azimuth coordinate of the target position in radians.
Definition QeDartBoard.hpp:67
void setCurrentAlt(double newValue)
Sets the value of the current altitude property.
Definition QeDartBoard.cpp:28
void setWindDirection(double newValue)
Sets the value of the latitude of the telescope.
Definition QeDartBoard.cpp:64
double windDirection
Wind direction – currently not used.
Definition QeDartBoard.hpp:85
void currentAltChanged(double newValue)
Indicates that the current altitude value has changed.
double getTelescopeLat()
Gets the value of the telescope latitude the widget has.
Definition QeDartBoard.hpp:124
double targetAlt
Altitude coordinate of the target position in radians.
Definition QeDartBoard.hpp:61
double currentAz
Azimuth coordinate of the current position in radians.
Definition QeDartBoard.hpp:55
void windDirectionChanged(double newValue)
Indicates that the wind direction has changed.
double getTargetAlt()
Gets the value of the target altitude the widget has.
Definition QeDartBoard.hpp:111
double currentAlt
Altitude coordinate of the current position in radians.
Definition QeDartBoard.hpp:49
void setTargetAlt(double newValue)
Sets the value of the target altitude property.
Definition QeDartBoard.cpp:40
virtual void paintDartBoard(QPainter *painter)
Uses a QPainter to draw the dartboard (mostly static) background.
Definition QeRadialItemPlot.hpp:67
QeRadialItemPlot(QWidget *parent=Q_NULLPTR)
Constructor that is used to set a parent relationship with.
Definition QeRadialItemPlot.cpp:13