1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-08 19:46:06 +01:00
LibrePilot/ground/src/plugins/gpsdisplay/gpssnrwidget.h
cranphin e5c8c2129f GCS GPSDisplay: Add SNR bars, fix sattelite indexes from nmea parser.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1728 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-09-23 21:35:08 +00:00

35 lines
751 B
C++

#ifndef GPSSNRWIDGET_H
#define GPSSNRWIDGET_H
#include <QGraphicsView>
#include <QtGui/QGraphicsRectItem>
class GpsSnrWidget : public QGraphicsView
{
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];
QGraphicsSimpleTextItem* satTexts[MAX_SATTELITES];
void drawSat(int index);
protected:
void showEvent(QShowEvent *event);
void resizeEvent(QResizeEvent *event);
};
#endif // GPSSNRWIDGET_H