#include <simulationView.hpp>
Collaboration diagram for SimulationView:
Public Member Functions | |
SimulationView (wxWindow *parent, wxWindowID id) | |
Constructor. | |
virtual | ~SimulationView () |
Destructor. | |
void | setGrid (Grid newGrid, bool changed) |
Sets the grid to display. | |
void | setInfo (wxString info) |
Appends a text line to the information box. | |
void | setBlankLine () |
Appends a blank line in the information box. | |
void | setFinished (bool finished) |
Member accessor. | |
void | setSimulation (Simulation *simulation) |
Sets the simulation. | |
void | setNextRow (bool enable) |
Enables/disables the next row button. | |
void | setResults (bool enable) |
Enables/disables the results button. | |
void | enableSimulation (bool enabled) |
Enabled/disables the simulation controls. | |
void | stopSimulation () |
Stops the simulation. | |
Private Member Functions | |
void | initControls () |
Control initialization. | |
void | initSizers () |
Sizer (layout) initialization. | |
void | OnPlayPause (wxCommandEvent &event) |
Play/Pause button click event. | |
void | OnStep (wxCommandEvent &event) |
Step button click event. | |
void | OnNext (wxCommandEvent &event) |
Next row button click event. | |
void | OnResults (wxCommandEvent &event) |
Results button click event. | |
void | OnTimer (wxTimerEvent &event) |
Timer tick event. | |
void | OnSlider (wxCommandEvent &event) |
Timer slider change event. | |
void | OnForward (wxCommandEvent &event) |
Forward button change event. | |
Private Attributes | |
wxBitmap * | bitmapPlay |
wxBitmap * | bitmapPause |
wxBitmap * | bitmapStep |
wxBitmap * | bitmapForward |
wxBitmapButton * | buttonPlayPause |
wxBitmapButton * | buttonStep |
wxBitmapButton * | buttonForward |
wxButton * | buttonNextRow |
wxButton * | buttonResults |
wxStaticText * | labelTimer |
LayoutCanvas * | canvas |
wxTextCtrl * | textInfo |
wxSlider * | slider |
int | timerInterval |
Timer interval in ms. | |
Simulation * | simulation |
Simulation. | |
wxTimer | chrono |
Timer. | |
bool | playing |
Is the simulation playing? | |
bool | finished |
Is the simulation finished? |
This is the view for the simulation. It shows the space being simulated and information about the simulation. It allows the user to play, pause and execute individual steps on the simulation, and also to control the timer of the automated simulation.
Definition at line 41 of file simulationView.hpp.
|
Constructor.
Definition at line 60 of file simulationView.cpp. |
|
Destructor.
Definition at line 76 of file simulationView.cpp. |
|
Enabled/disables the simulation controls.
Definition at line 337 of file simulationView.cpp. References bitmapPlay, buttonForward, buttonPlayPause, buttonStep, chrono, and playing. Referenced by Simulation::nextRow(), Simulation::simulateAll(), and Simulation::updateView(). |
|
Control initialization.
Definition at line 82 of file simulationView.cpp. References bitmapForward, bitmapPause, bitmapPlay, bitmapStep, buttonForward, buttonNextRow, buttonPlayPause, buttonResults, buttonStep, canvas, ID_BUTTON_FORWARD, ID_BUTTON_NEXT, ID_BUTTON_PLAYPAUSE, ID_BUTTON_RESULTS, ID_BUTTON_STEP, ID_SLIDER, labelTimer, slider, and textInfo. |
|
Sizer (layout) initialization.
Definition at line 106 of file simulationView.cpp. References buttonForward, buttonNextRow, buttonPlayPause, buttonResults, buttonStep, canvas, labelTimer, slider, and textInfo. |
|
Forward button change event.
Definition at line 381 of file simulationView.cpp. References Simulation::simulateAll(), and simulation. Here is the call graph for this function: ![]() |
|
Next row button click event.
Definition at line 317 of file simulationView.cpp. References Simulation::nextRow(), and simulation. Here is the call graph for this function: ![]() |
|
Play/Pause button click event.
Definition at line 191 of file simulationView.cpp. References bitmapPause, bitmapPlay, buttonPlayPause, chrono, playing, and timerInterval. |
|
Results button click event.
Definition at line 327 of file simulationView.cpp. References Simulation::results(), and simulation. Here is the call graph for this function: ![]() |
|
Timer slider change event.
Definition at line 364 of file simulationView.cpp. References chrono, labelTimer, playing, slider, and timerInterval. |
|
Step button click event.
Definition at line 213 of file simulationView.cpp. References Simulation::nextStep(), playing, and simulation. Here is the call graph for this function: ![]() |
|
Timer tick event. In here the simulation step is taken if the automated simulation is on.
Definition at line 266 of file simulationView.cpp. References Simulation::nextStep(), playing, and simulation. Here is the call graph for this function: ![]() |
|
Appends a blank line in the information box.
Definition at line 245 of file simulationView.cpp. References textInfo. |
|
Member accessor.
Definition at line 255 of file simulationView.cpp. |
|
Sets the grid to display.
Definition at line 227 of file simulationView.cpp. References canvas, and LayoutCanvas::setGrid(). Referenced by Simulation::nextStep(), Simulation::resetSimulation(), and Simulation::Simulation(). Here is the call graph for this function: ![]() |
|
Appends a text line to the information box.
Definition at line 238 of file simulationView.cpp. References textInfo. Referenced by Simulation::nextStep(), setNextRow(), and setResults(). |
|
Enables/disables the next row button.
Definition at line 289 of file simulationView.cpp. References buttonNextRow, and setInfo(). Referenced by Simulation::nextRow(), Simulation::simulateAll(), and Simulation::updateView(). Here is the call graph for this function: ![]() |
|
Enables/disables the results button.
Definition at line 303 of file simulationView.cpp. References buttonResults, and setInfo(). Referenced by Simulation::nextRow(), Simulation::simulateAll(), and Simulation::updateView(). Here is the call graph for this function: ![]() |
|
Sets the simulation.
Definition at line 279 of file simulationView.cpp. References simulation. |
|
Stops the simulation.
Definition at line 354 of file simulationView.cpp. References playing. Referenced by Simulation::resetSimulation(). |
|
Definition at line 70 of file simulationView.hpp. Referenced by initControls(). |
|
Definition at line 68 of file simulationView.hpp. Referenced by initControls(), and OnPlayPause(). |
|
Definition at line 67 of file simulationView.hpp. Referenced by enableSimulation(), initControls(), and OnPlayPause(). |
|
Definition at line 69 of file simulationView.hpp. Referenced by initControls(). |
|
Definition at line 73 of file simulationView.hpp. Referenced by enableSimulation(), initControls(), and initSizers(). |
|
Definition at line 74 of file simulationView.hpp. Referenced by initControls(), initSizers(), and setNextRow(). |
|
Definition at line 71 of file simulationView.hpp. Referenced by enableSimulation(), initControls(), initSizers(), and OnPlayPause(). |
|
Definition at line 75 of file simulationView.hpp. Referenced by initControls(), initSizers(), and setResults(). |
|
Definition at line 72 of file simulationView.hpp. Referenced by enableSimulation(), initControls(), and initSizers(). |
|
Definition at line 77 of file simulationView.hpp. Referenced by initControls(), initSizers(), and setGrid(). |
|
Timer.
Definition at line 85 of file simulationView.hpp. Referenced by enableSimulation(), OnPlayPause(), and OnSlider(). |
|
Is the simulation finished?
Definition at line 89 of file simulationView.hpp. |
|
Definition at line 76 of file simulationView.hpp. Referenced by initControls(), initSizers(), and OnSlider(). |
|
Is the simulation playing?
Definition at line 87 of file simulationView.hpp. Referenced by enableSimulation(), OnPlayPause(), OnSlider(), OnStep(), OnTimer(), and stopSimulation(). |
|
Definition at line 83 of file simulationView.hpp. Referenced by OnForward(), OnNext(), OnResults(), OnStep(), OnTimer(), and setSimulation(). |
|
Definition at line 79 of file simulationView.hpp. Referenced by initControls(), initSizers(), and OnSlider(). |
|
Definition at line 78 of file simulationView.hpp. Referenced by initControls(), initSizers(), setBlankLine(), and setInfo(). |
|
Timer interval in ms.
Definition at line 81 of file simulationView.hpp. Referenced by OnPlayPause(), and OnSlider(). |