PaintGaze.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /// PaintGaze.h
  2. #ifndef __PAINTGAZE_H__
  3. #define __PAINTGAZE_H__
  4. #include <QtWidgets>
  5. #include <vector>
  6. #include "../arffHelper/Arff.h"
  7. using namespace std;
  8. class PaintGaze : public QObject
  9. {
  10. Q_OBJECT
  11. public slots:
  12. void HandleTime(int time, QObject *pSender);
  13. ///< Handles new position of video.
  14. void HandleToggleView();
  15. ///< Toggles the diplayed gaze between the primary and secondary ARFF files
  16. public:
  17. PaintGaze();
  18. void SetData(Arff &arff);
  19. ///< Sets the data to read that contain time,x,y information.
  20. void SetFovData(Arff &arff);
  21. ///< Sets the data to Field Of View ARFF converted from equirectangualr file.
  22. void SetCurrentTime(long int currentTime);
  23. ///< Sets the current time.
  24. void SetInterval(long int intervalDuration);
  25. ///< Sets the interval duration.
  26. void Paint(QPainter *painter, QSize size);
  27. ///< Paints the gaze points with painter and normalizes
  28. ///< to the provided size.
  29. private:
  30. void CalculateIntervals();
  31. ///< Calculates the intervals for before and after the current time.
  32. void GetSetup();
  33. ///< It populates the variables needed to correclt display the gaze
  34. Arff *m_pArff; // pointer to ARFF data container
  35. Arff *m_pSecArff; // pointer to sendary ARFF
  36. int m_timeInd;
  37. int m_xInd;
  38. int m_yInd;
  39. long int m_currentTime; // current time in us
  40. long int m_intervalDuration; // duration of intervals for before and after
  41. int m_startPoint; // point of m_vpDataPoins for the interval in the past
  42. int m_endPoint; // point in the future
  43. double m_videoWidth; // width of the video
  44. double m_videoHeight; // height of the video
  45. };
  46. #endif /*__PAINTGAZE_H__*/