2013-04-05 22:46:56 +02:00
|
|
|
#ifndef GPSSNRWIDGET_H
|
|
|
|
#define GPSSNRWIDGET_H
|
|
|
|
|
|
|
|
#include <QGraphicsView>
|
|
|
|
#include <QtGui/QGraphicsRectItem>
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
class GpsSnrWidget : public QGraphicsView {
|
2013-04-05 22:46:56 +02:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit GpsSnrWidget(QWidget *parent = 0);
|
|
|
|
~GpsSnrWidget();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void updateSat(int index, int prn, int elevation, int azimuth, int snr);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static const int MAX_SATTELITES = 16;
|
|
|
|
int satellites[MAX_SATTELITES][4];
|
|
|
|
QGraphicsScene *scene;
|
|
|
|
QGraphicsRectItem *boxes[MAX_SATTELITES];
|
2013-05-19 16:37:30 +02:00
|
|
|
QGraphicsSimpleTextItem *satTexts[MAX_SATTELITES];
|
|
|
|
QGraphicsSimpleTextItem *satSNRs[MAX_SATTELITES];
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
|
|
void drawSat(int index);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GPSSNRWIDGET_H
|