The MainWindow class is the main window for the application, containing a SimulatorView along with supporting menu items for ease of use. More...
#include <mainwindow.h>
Public Slots | |
void | selectedItemChanged (void) |
Called when the SimulatorView detects a change in which item is selected. More... | |
Public Member Functions | |
MainWindow (QWidget *parent=0) | |
~MainWindow () | |
Private Slots | |
void | on_actionExit_triggered () |
Closes the main window and exits the program. Called when the Exit menu item is clicked. More... | |
void | on_actionZoom_in_triggered () |
Zooms in the SimulatorView. Called when the Zoom In menu item is clicked. More... | |
void | on_actionZoom_out_triggered () |
Zooms out the SimulatorView. Called when the Zoom Out menu item is clicked. More... | |
void | on_actionLoad_World_triggered () |
Loads a new world from a JSON-file and creates a new SimulatorView to view the world. Called when the Load World menu item is clicked. More... | |
void | on_action1x_triggered () |
Sets the simulation to real-time. More... | |
void | on_action2x_triggered () |
Sets the simulation to 2x real-time. More... | |
void | on_action3x_triggered () |
Sets the simulation to 3x real-time. More... | |
Private Member Functions | |
void | createSimulatorView () |
void | destroySimulatorView () |
Private Attributes | |
Ui::MainWindow * | ui |
SimulatorView * | simulatorView |
The MainWindow class is the main window for the application, containing a SimulatorView along with supporting menu items for ease of use.
|
explicit |
MainWindow::~MainWindow | ( | ) |
References ui.
|
private |
References selectedItemChanged(), simulatorView, and ui.
Referenced by MainWindow(), and on_actionLoad_World_triggered().
|
private |
References selectedItemChanged(), simulatorView, and ui.
Referenced by on_actionLoad_World_triggered().
|
privateslot |
Sets the simulation to real-time.
References SimulatorView::setPhysicalSteps(), and simulatorView.
|
privateslot |
Sets the simulation to 2x real-time.
References SimulatorView::setPhysicalSteps(), and simulatorView.
|
privateslot |
Sets the simulation to 3x real-time.
References SimulatorView::setPhysicalSteps(), and simulatorView.
|
privateslot |
Closes the main window and exits the program. Called when the Exit menu item is clicked.
|
privateslot |
Loads a new world from a JSON-file and creates a new SimulatorView to view the world. Called when the Load World menu item is clicked.
References createSimulatorView(), destroySimulatorView(), and World::fromJsonDocument().
|
privateslot |
Zooms in the SimulatorView. Called when the Zoom In menu item is clicked.
References simulatorView, and SimulatorView::zoom().
|
privateslot |
Zooms out the SimulatorView. Called when the Zoom Out menu item is clicked.
References simulatorView, and SimulatorView::zoom().
|
slot |
Called when the SimulatorView detects a change in which item is selected.
Connected to the signal selectionChanged of QGraphicsView.
References Robot::id(), and simulatorView.
Referenced by createSimulatorView(), and destroySimulatorView().
|
private |
|
private |
Referenced by createSimulatorView(), destroySimulatorView(), MainWindow(), and ~MainWindow().