-
Notifications
You must be signed in to change notification settings - Fork 2
/
qPolarView.h
52 lines (33 loc) · 1.04 KB
/
qPolarView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef __QPOLARVIEW_H__
#define __QPOLARVIEW_H__
#include "Satellite.h"
#include <QWidget>
#include <QVector>
#include <CoordGeodetic.h>
class QPolarView : public QWidget
{
Q_OBJECT
public:
QPolarView(QWidget* parent = 0);
QList<Satellite> satellites() const;
void addSatellite(Satellite sat);
const CoordGeodetic& getObserver() const { return obsPosition; }
protected:
void paintEvent(QPaintEvent *);
void mouseMoveEvent(QMouseEvent* event);
public slots:
void setLocationText(QString text);
void setEventText(QString text);
void setObserversPosition(const CoordGeodetic &geo);
private:
QPoint azelToXy(double azimutz, double elevation) const;
void xyToAzel(QPointF xy, double &azimutz, double &elevation);
void drawMarker(QPainter& painter, QString label, const QPointF& point, const QColor& color);
QList<Satellite> mSatellites;
QString locationText;
QString eventText;
QString cursorText;
QString satelliteText;
CoordGeodetic obsPosition;
};
#endif // __QPOLARVIEW_H__