1 #ifndef COLLISIONDISPLAY2D_H
2 #define COLLISIONDISPLAY2D_H
4 #include <QGraphicsView>
5 #include <QGraphicsScene>
7 #include <unordered_map>
8 #include "collisiondisplay.h"
9 #include "qalgorithm.h"
10 #include "qparticle2d.h"
99 QGraphicsScene* scene;
101 std::vector<QParticle2D*> drawnParticles;
102 std::unordered_map<Particle*, QParticle2D*> particleMap;
105 #endif // COLLISIONDISPLAY2D_H
void finished()
Signals that the display has finished. Usually because the user clicked "stop", for example...
The QAlgorithm class is a QT wrapper for Algorithm.
Definition: qalgorithm.h:13
CollisionDisplay2D(QWidget *parent=0)
Constructs a CollisionDisplay2D.
Definition: collisiondisplay2d.cpp:4
The parent class of 2D and 3D visualization windows.
Definition: collisiondisplay.h:14
QGraphicsScene * getScene()
Gets the scene that is declared in CollisionDisplay2D.
Definition: collisiondisplay2d.cpp:128
void stop()
Stops the timer and reinitializes the QTimer timer, QGraphicsScene scene, QAlgorithm qalg...
Definition: collisiondisplay2d.cpp:48
QTimer * getTimer()
Gets the timer declared in CollisionDisplay.
Definition: collisiondisplay2d.cpp:124
The view containing 2D visualization.
Definition: collisiondisplay2d.h:21
void step()
Performs one step of the display.
Definition: collisiondisplay2d.cpp:60
void start()
Starts the simulation.
Definition: collisiondisplay2d.cpp:23
void setQAlgorithm(QAlgorithm *qalgorithm)
Sets the algorithm declared in CollisionDisplay.
Definition: collisiondisplay2d.cpp:136