SpeedPlotView: Replace QQueue by boost::circular_buffer, reduce number of points to draw, increase legend background size

This commit is contained in:
Anton Lashkov
2015-12-05 15:07:16 +04:00
parent cd2496215e
commit dd9728334a
2 changed files with 45 additions and 21 deletions

View File

@@ -29,9 +29,12 @@
#ifndef SPEEDPLOTVIEW_H
#define SPEEDPLOTVIEW_H
#ifndef Q_MOC_RUN
#include <boost/circular_buffer.hpp>
#endif
#include <QGraphicsView>
#include <QMap>
#include <QQueue>
class QPen;
class SpeedPlotView : public QGraphicsView
@@ -94,8 +97,8 @@ private:
bool m_enable;
};
QQueue<double> m_xData;
QMap<GraphID, QQueue<double> > m_yData;
boost::circular_buffer<double> m_xData;
QMap<GraphID, boost::circular_buffer<double> > m_yData;
QMap<GraphID, GraphProperties> m_properties;
PeriodInSeconds m_viewablePointsCount;