LP-106 Setup Wizard refresh : Add dual servo setup (dual aileron or
[librepilot.git] / ground / gcs / src / plugins / telemetry / monitorwidget.h
blob729d2577518d82b2ac5916c75e2dbccc03a8e199
1 #ifndef MONITORWIDGET_H
2 #define MONITORWIDGET_H
4 #include <QWidget>
5 #include <QObject>
6 #include <QGraphicsView>
7 #include <QtSvg/QSvgRenderer>
8 #include <QtSvg/QGraphicsSvgItem>
9 #include <QtCore/QPointer>
11 class MonitorWidget : public QGraphicsView {
12 Q_OBJECT
13 public:
14 explicit MonitorWidget(QWidget *parent = 0);
15 ~MonitorWidget();
17 void setMin(double min)
19 minValue = min;
22 double getMin()
24 return minValue;
27 void setMax(double max)
29 maxValue = max;
32 double getMax()
34 return maxValue;
37 public slots:
38 void telemetryConnected();
39 void telemetryDisconnected();
40 void telemetryUpdated(double txRate, double rxRate);
42 protected:
43 void showEvent(QShowEvent *event);
44 void resizeEvent(QResizeEvent *event);
46 private:
47 bool connected;
49 double minValue;
50 double maxValue;
52 QGraphicsSvgItem *graph;
54 QPointer<QGraphicsTextItem> txSpeed;
55 QPointer<QGraphicsTextItem> rxSpeed;
57 QList<QGraphicsSvgItem *> txNodes;
58 QList<QGraphicsSvgItem *> rxNodes;
60 Qt::AspectRatioMode aspectRatioMode;
63 #endif // MONITORWIDGET_H