MainWindow

mainwindow.*

class ts2.mainwindow.MainWindow(args=None)[source]

Bases: PyQt5.QtWidgets.QMainWindow

MainWindow Class

centerViewOnTrain(trainId)[source]

Centers the graphics view on the given train.

closeEvent(event)[source]

Save window postions on close

loadSimulation(fileName=None)[source]

This is where stuff happens and the simulation is loaded

onAfterShow()[source]

Fires a few moments after window shows

onRecent(act)[source]

Open a recent item

onWheelChanged(direction)[source]

Handle scrollwheel on canvas, sent from XGraphicsView

openEditor(fileName=None)[source]

This slot opens the editor window if it is not already opened

openPropertiesDialog()[source]

Pops-up the simulation properties dialog.

openReassignServiceWindow(trainId)[source]

Opens the reassign service window.

openSplitTrainWindow(trainId)[source]

Opens the split train dialog window.

refreshRecent()[source]

Reload the recent menu

saveGame()[source]

Saves the current game to file.

showAboutBox()[source]

Shows the about box

simulationConnect()[source]

Connects the signals and slots to the simulation.

simulationDisconnect()[source]

Disconnects the simulation for deletion.