The SimulatorView class implements a view of the World currently being simulated.
More...
#include <simulatorview.h>
|
void | step (void) |
| Called by a QTimer periodically, depending on the set timestep. More...
|
|
|
| SimulatorView (QWidget *parent=0) |
|
| ~SimulatorView () |
|
void | wheelEvent (QWheelEvent *event) |
| Called when the mouse wheel moves inside the SimulatorView. Calls zoom(1) when the wheel is scrolled upwards and zoom(-1) when the wheel is scrolled downwards. More...
|
|
void | mouseMoveEvent (QMouseEvent *event) |
| Called when the mouse moves within SimulatorView. Will scroll around the world when the right mouse button is held down. More...
|
|
void | zoom (int direction) |
| Zooms the view in or out depending on the sign of direction. More...
|
|
void | setPhysicalSteps (unsigned numberOfSteps) |
| Sets the number of physical steps being run between each time the graphics are updated. More...
|
|
The SimulatorView class implements a view of the World currently being simulated.
SimulatorView::SimulatorView |
( |
QWidget * |
parent = 0 ) | |
|
|
explicit |
SimulatorView::~SimulatorView |
( |
) | |
|
void SimulatorView::mouseMoveEvent |
( |
QMouseEvent * |
event) | |
|
Called when the mouse moves within SimulatorView. Will scroll around the world when the right mouse button is held down.
- Parameters
-
event | QMouseEvent sent by the QGraphicsView base class. |
void SimulatorView::setPhysicalSteps |
( |
unsigned |
numberOfSteps) | |
|
void SimulatorView::step |
( |
void |
) | |
|
|
slot |
void SimulatorView::wheelEvent |
( |
QWheelEvent * |
event) | |
|
Called when the mouse wheel moves inside the SimulatorView. Calls zoom(1) when the wheel is scrolled upwards and zoom(-1) when the wheel is scrolled downwards.
- Parameters
-
event | QWheelEvent sent by the QGraphicsView base class. |
References sign(), and zoom().
void SimulatorView::zoom |
( |
int |
direction) | |
|
QElapsedTimer* SimulatorView::_elapsedTimer |
|
private |
unsigned SimulatorView::_physicalSteps |
|
private |
QTimer* SimulatorView::_timer |
|
private |
unsigned SimulatorView::_timestep |
|
private |
World* SimulatorView::_world |
|
private |
The documentation for this class was generated from the following files: