Space Comps
 All Classes Files Functions Variables
collisiondisplay.h
1 #ifndef COLLISIONDISPLAY_H
2 #define COLLISIONDISPLAY_H
3 
4 #include <QTimer>
5 #include "qalgorithm.h"
6 
15 {
16 public:
23  explicit CollisionDisplay();
24  virtual ~CollisionDisplay();
25 
34  QTimer* getTimer();
35 
40  int getNumCollisions();
41 
50  void setQAlgorithm(QAlgorithm* qalgorithm);
51 
56  int getDisplayTimestep();
57 
58 signals:
65  virtual void finished() = 0;
66 
67 public slots:
74  virtual void start() = 0;
75 
83  virtual void stop() = 0;
84 
92  virtual void step() = 0;
93 
94 protected:
95  QTimer* timer;
96  QAlgorithm* qalg;
97  int numCollisions;
98  int displayTimestep;
99  MultiQueue* positionQueue;
100  std::queue<int> collisionTimesteps;
101 };
102 
103 #endif // COLLISIONDISPLAY_H
virtual void finished()=0
Signals that the display is no longer running.
int getDisplayTimestep()
Returns the display timestep.
Definition: collisiondisplay.cpp:18
The QAlgorithm class is a QT wrapper for Algorithm.
Definition: qalgorithm.h:13
virtual void start()=0
Slot used to initialize the display.
The parent class of 2D and 3D visualization windows.
Definition: collisiondisplay.h:14
CollisionDisplay()
Constructs a CollisionDisplay.
Definition: collisiondisplay.cpp:3
Definition: multiqueue.h:8
virtual void stop()=0
Slot used to stop the display.
void setQAlgorithm(QAlgorithm *qalgorithm)
Gives a pointer to the QAlgorithm to the display.
Definition: collisiondisplay.cpp:27
int getNumCollisions()
Returns the number of collisions seen so far.
Definition: collisiondisplay.cpp:23
virtual void step()=0
Slot used to step the display.
QTimer * getTimer()
Returns a pointer to the timer.
Definition: collisiondisplay.cpp:14