LVRPlotter.hpp
Go to the documentation of this file.
1 
28 #ifndef LVRPLOTTER_HPP_
29 #define LVRPLOTTER_HPP_
30 
31 #include <QWidget>
32 
33 #include "lvr2/io/DataStruct.hpp"
34 
35 namespace lvr2
36 {
37 
38 enum class PlotMode
39 {
40  LINE,
41  BAR
42 };
43 
44 class LVRPlotter : public QWidget
45 {
46  Q_OBJECT
47 
48 Q_SIGNALS:
49  void mouseRelease();
50 
51 public:
52 
53  LVRPlotter(QWidget* parent = (QWidget*)nullptr);
54  virtual ~LVRPlotter();
55 
56  void setPlotMode(PlotMode mode);
57  void setXRange(int min, int max);
58  void setPoints(floatArr points, size_t numPoints);
59  void setPoints(floatArr points, size_t numPoints, float min, float max);
60  void removePoints();
61 
62 protected:
63  virtual void mouseReleaseEvent(QMouseEvent* event);
65  void paintEvent(QPaintEvent *event);
66 
67 private:
69  size_t m_numPoints;
70  float m_min;
71  float m_max;
73  int m_minX;
74  int m_maxX;
75 };
76 
77 } /* namespace lvr2 */
78 
79 #endif /* LVRPLOTTER_HPP_ */
Datastructures for holding loaded data.
boost::shared_array< float > floatArr
Definition: DataStruct.hpp:133
floatArr m_points
Definition: LVRPlotter.hpp:68


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:08