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_ */
lvr2::floatArr
boost::shared_array< float > floatArr
Definition: DataStruct.hpp:133
lvr2::LVRPlotter::m_max
float m_max
Definition: LVRPlotter.hpp:71
lvr2::LVRPlotter
Definition: LVRPlotter.hpp:44
lvr2::LVRPlotter::m_maxX
int m_maxX
Definition: LVRPlotter.hpp:74
lvr2::LVRPlotter::mouseRelease
void mouseRelease()
lvr2::LVRPlotter::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
Definition: LVRPlotter.cpp:47
lvr2::LVRPlotter::setPoints
void setPoints(floatArr points, size_t numPoints)
Definition: LVRPlotter.cpp:57
lvr2::LVRPlotter::setPlotMode
void setPlotMode(PlotMode mode)
Definition: LVRPlotter.cpp:52
lvr2::LVRPlotter::removePoints
void removePoints()
Definition: LVRPlotter.cpp:79
lvr2::LVRPlotter::LVRPlotter
LVRPlotter(QWidget *parent=(QWidget *) nullptr)
Definition: LVRPlotter.cpp:36
lvr2::PlotMode::BAR
@ BAR
lvr2::LVRPlotter::paintEvent
void paintEvent(QPaintEvent *event)
Create axes, labeling and draw graph or bar chart.
Definition: LVRPlotter.cpp:92
lvr2::LVRPlotter::m_numPoints
size_t m_numPoints
Definition: LVRPlotter.hpp:69
lvr2::LVRPlotter::m_min
float m_min
Definition: LVRPlotter.hpp:70
lvr2::LVRPlotter::setXRange
void setXRange(int min, int max)
Definition: LVRPlotter.cpp:86
DataStruct.hpp
Datastructures for holding loaded data.
lvr2::PlotMode
PlotMode
Definition: LVRPlotter.hpp:38
lvr2::PlotMode::LINE
@ LINE
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::LVRPlotter::m_mode
PlotMode m_mode
Definition: LVRPlotter.hpp:72
lvr2::LVRPlotter::m_minX
int m_minX
Definition: LVRPlotter.hpp:73
lvr2::LVRPlotter::~LVRPlotter
virtual ~LVRPlotter()
Definition: LVRPlotter.cpp:42
lvr2::LVRPlotter::m_points
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 Wed Mar 2 2022 00:37:24