Beispiel #1
0
    def __init__(self, allDict, allParals):
        super(mainMenu, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.allDict = allDict
        self.allParals = allParals

        movenment.center(self)
        self.setWindowTitle('Byankin Aleksey')

        styles.setStylesForMainWindow(self)
        funcs.makeSurface(self)
        self.ui.gl.setBackgroundColor('#2b2b2b')

        self.ui.stepBackButton.clicked.connect(self.stepBackButton)
        self.ui.stepForwardButton.clicked.connect(self.stepForwardButton)
        self.ui.startButton.clicked.connect(self.startButton)

        self.ui.genes_number.setText('25')
        self.ui.ind_number.setText('15')
        self.ui.elite.setText('.1')
        self.ui.mutation_probability.setText('.001')
        self.ui.size_multiplier.setText('4')
        self.ui.xBorder.setText('10')
        self.ui.yBorder.setText('10')
        self.ui.zBorder.setText('10')
        self.ui.number_of_generations.setText('10')

        mainMenu.getAllData(self)
        funcs.makeBorders(self)
    def test_defaults(self):
        app = QtWidgets.QApplication(sys.argv)
        MainWindow = QtWidgets.QMainWindow()
        ui = Ui_MainWindow()
        ui.setupUi(MainWindow,app)

        self.assertEqual(ui.total_bins_text.text(), "0")
        self.assertEqual(ui.atten_events_text.text(), "0")