Main module

class Main.Main[source]

Bases: PyQt5.QtWidgets.QMainWindow

Main Window of program.

Inherits: PyQt5.QtWidgets.QMainWindow

connection_established()[source]

Starts multiplayer match and sends settings dump to other side. Called after successful connection established in connectionWindow.ConnectionWindow

establish_internet_connection()[source]

Shows QWidget with host/connect options connectionWindow.ConnectionWindow Function called on multiplayer_button trigger event.

init_ui()[source]

Initialize user interface in Main Window. Intended to use only inside constructor.

main_button_clicked()[source]

Starts game. Function called on main_button trigger event. main_button is in the middle of toolbar.

paintEvent(e)[source]

Overwrites method from PyQt5.QtWidgets.QMainWindow

show_settings_window()[source]

Shows QWidget with settings window settingsWindow.SettingsWindow Function called on option_act trigger event.

surrender_button_clicked()[source]

Shows QMessageBox to check if user didn’t make misclick. Function called on surrender_button trigger event.

surrender_button_clicked_answered(i)[source]

Surrenders the game. Function called from msg_box inside surrender_button_clicked()