#ifndef CHART_H #define CHART_H #include class QGestureEvent; QT_CHARTS_USE_NAMESPACE class Chart : public QChart { Q_OBJECT public: explicit Chart(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0); ~Chart(); bool sceneEvent(QEvent *event); std::string entityId; private: bool gestureEvent(QGestureEvent *event); bool myWheelEvent(QGraphicsSceneWheelEvent *event); public slots: void XRangeChanged(qreal min, qreal max); signals: void newDataRequest(const std::string &entityId, qreal min, qreal max); }; #endif // CHART_H