#ifndef MONITORWIDGET_H #define MONITORWIDGET_H #include #include #include #include #include #include class MonitorWidget : public QGraphicsView { Q_OBJECT public: explicit MonitorWidget(QWidget *parent = 0); ~MonitorWidget(); void setMin(double min) { minValue = min; } double getMin() { return minValue; } void setMax(double max) { maxValue = max; } double getMax() { return maxValue; } public slots: void telemetryConnected(); void telemetryDisconnected(); void telemetryUpdated(double txRate, double rxRate); protected: void showEvent(QShowEvent *event); void resizeEvent(QResizeEvent *event); private: bool connected; double minValue; double maxValue; QGraphicsSvgItem *graph; QPointer txSpeed; QPointer rxSpeed; QList txNodes; QList rxNodes; Qt::AspectRatioMode aspectRatioMode; }; #endif // MONITORWIDGET_H