ChirpSim
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Slots | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
MainWindow Class Reference

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>

Inheritance diagram for MainWindow:
Inheritance graph

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
 
SimulatorViewsimulatorView
 

Detailed Description

The MainWindow class is the main window for the application, containing a SimulatorView along with supporting menu items for ease of use.

Constructor & Destructor Documentation

MainWindow::MainWindow ( QWidget *  parent = 0)
explicit

References createSimulatorView(), and ui.

Here is the call graph for this function:

MainWindow::~MainWindow ( )

References ui.

Member Function Documentation

void MainWindow::createSimulatorView ( )
private

References selectedItemChanged(), simulatorView, and ui.

Referenced by MainWindow(), and on_actionLoad_World_triggered().

Here is the call graph for this function:

Here is the caller graph for this function:

void MainWindow::destroySimulatorView ( )
private

References selectedItemChanged(), simulatorView, and ui.

Referenced by on_actionLoad_World_triggered().

Here is the call graph for this function:

Here is the caller graph for this function:

void MainWindow::on_action1x_triggered ( )
privateslot

Sets the simulation to real-time.

References SimulatorView::setPhysicalSteps(), and simulatorView.

Here is the call graph for this function:

void MainWindow::on_action2x_triggered ( )
privateslot

Sets the simulation to 2x real-time.

References SimulatorView::setPhysicalSteps(), and simulatorView.

Here is the call graph for this function:

void MainWindow::on_action3x_triggered ( )
privateslot

Sets the simulation to 3x real-time.

References SimulatorView::setPhysicalSteps(), and simulatorView.

Here is the call graph for this function:

void MainWindow::on_actionExit_triggered ( )
privateslot

Closes the main window and exits the program. Called when the Exit menu item is clicked.

void MainWindow::on_actionLoad_World_triggered ( )
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().

Here is the call graph for this function:

void MainWindow::on_actionZoom_in_triggered ( )
privateslot

Zooms in the SimulatorView. Called when the Zoom In menu item is clicked.

References simulatorView, and SimulatorView::zoom().

Here is the call graph for this function:

void MainWindow::on_actionZoom_out_triggered ( )
privateslot

Zooms out the SimulatorView. Called when the Zoom Out menu item is clicked.

References simulatorView, and SimulatorView::zoom().

Here is the call graph for this function:

void MainWindow::selectedItemChanged ( void  )
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().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

SimulatorView* MainWindow::simulatorView
private
Ui::MainWindow* MainWindow::ui
private

The documentation for this class was generated from the following files: