dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
gpssnrwidget.h
Go to the documentation of this file.
1 #ifndef GPSSNRWIDGET_H
2 #define GPSSNRWIDGET_H
3 
4 #include <QGraphicsView>
5 #include <QGraphicsRectItem>
6 
7 class GpsSnrWidget : public QGraphicsView
8 {
9  Q_OBJECT
10 public:
11  explicit GpsSnrWidget(QWidget *parent = nullptr);
12  ~GpsSnrWidget();
13 
14 signals:
15 
16 public slots:
17  void updateSat(int index, int prn, int elevation, int azimuth, int snr);
18  void satellitesDone();
19 
20 private:
21  static const int MAX_SATELLITES = 32;
22  static const int MAX_SHOWN_SATELLITES = 18;
23  int satellites[MAX_SATELLITES][4];
24  QGraphicsScene *scene;
25  QGraphicsRectItem *boxes[MAX_SHOWN_SATELLITES];
26  QGraphicsSimpleTextItem *satTexts[MAX_SHOWN_SATELLITES];
27  QGraphicsSimpleTextItem *satSNRs[MAX_SHOWN_SATELLITES];
28 
29  void drawSat(int drawIndex, int index);
30 
31 protected:
32  void showEvent(QShowEvent *event);
33  void resizeEvent(QResizeEvent *event);
34 };
35 
36 #endif // GPSSNRWIDGET_H
GpsSnrWidget(QWidget *parent=nullptr)
Definition: gpssnrwidget.cpp:3
void resizeEvent(QResizeEvent *event)
void satellitesDone()
void showEvent(QShowEvent *event)
void updateSat(int index, int prn, int elevation, int azimuth, int snr)